diff --git a/.github/.wordlist.txt b/.github/.wordlist.txt index 44470a612f42c7..07f3df6b7a9822 100644 --- a/.github/.wordlist.txt +++ b/.github/.wordlist.txt @@ -519,8 +519,10 @@ EthyleneOxideConcentrationMeasurement EvalCode EvalCodeWithName EvalFrameDefault +EV EVB evk +EVSE exceptfds ExchangeContext exe diff --git a/.github/workflows/examples-qpg.yaml b/.github/workflows/examples-qpg.yaml index e95e26816dbcc0..b5aadaf11c11bb 100644 --- a/.github/workflows/examples-qpg.yaml +++ b/.github/workflows/examples-qpg.yaml @@ -63,6 +63,8 @@ jobs: --target qpg-qpg6105-light \ --target qpg-qpg6105-shell \ --target qpg-qpg6105-persistent-storage \ + --target qpg-qpg6105-light-switch \ + --target qpg-qpg6105-thermostat \ build \ --copy-artifacts-to out/artifacts \ " diff --git a/config/qpg/toolchain/BUILD.gn b/config/qpg/toolchain/BUILD.gn index bdf72c9b2ccf5e..65984b186a4f80 100644 --- a/config/qpg/toolchain/BUILD.gn +++ b/config/qpg/toolchain/BUILD.gn @@ -31,6 +31,13 @@ arm_toolchain("qpg_lighting_app") { } } +arm_toolchain("qpg_light_switch_app") { + toolchain_args = { + current_os = "freertos" + import("${chip_root}/examples/light-switch-app/qpg/args.gni") + } +} + arm_toolchain("qpg_shell_app") { toolchain_args = { current_os = "freertos" diff --git a/config/telink/chip-module/CMakeLists.txt b/config/telink/chip-module/CMakeLists.txt index f9f4b933cccf5d..418dbc07e0ba0b 100644 --- a/config/telink/chip-module/CMakeLists.txt +++ b/config/telink/chip-module/CMakeLists.txt @@ -97,7 +97,6 @@ matter_add_gn_arg_bool ("chip_config_network_layer_ble" CONFIG_BT) matter_add_gn_arg_bool ("chip_inet_config_enable_ipv4" CONFIG_NET_IPV4) matter_add_gn_arg_bool ("chip_enable_nfc" CONFIG_CHIP_NFC_COMMISSIONING) matter_add_gn_arg_bool ("chip_enable_ota_requestor" CONFIG_CHIP_OTA_REQUESTOR) -matter_add_gn_arg_bool ("chip_enable_bootloader_mcuboot" CONFIG_BOOTLOADER_MCUBOOT) matter_add_gn_arg_bool ("chip_inet_config_enable_tcp_endpoint" CONFIG_CHIP_BUILD_TESTS) matter_add_gn_arg_bool ("chip_error_logging" CONFIG_MATTER_LOG_LEVEL GREATER_EQUAL 1) matter_add_gn_arg_bool ("chip_progress_logging" CONFIG_MATTER_LOG_LEVEL GREATER_EQUAL 3) 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/examples/index.md b/docs/examples/index.md index e31b434515f11b..0162a25afc149f 100644 --- a/docs/examples/index.md +++ b/docs/examples/index.md @@ -131,6 +131,7 @@ lighting-app/qpg/APPLICATION :maxdepth: 1 light-switch-app/**/README +light-switch-app/qpg/APPLICATION ``` ## Lock example @@ -282,6 +283,7 @@ temperature-measurement-app/**/README thermostat/**/README thermostat/**/Readme +thermostat/qpg/APPLICATION ``` ## TV example 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/air-quality-sensor-app/telink/CMakeLists.txt b/examples/air-quality-sensor-app/telink/CMakeLists.txt index 908bea9eb73a98..5ed8c314f1b334 100644 --- a/examples/air-quality-sensor-app/telink/CMakeLists.txt +++ b/examples/air-quality-sensor-app/telink/CMakeLists.txt @@ -86,10 +86,6 @@ target_include_directories(app PRIVATE ${TELINK_COMMON}/util/include ${CHIP_ROOT}/examples/air-quality-sensor-app/air-quality-sensor-common/include) -add_definitions( - "-DCHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=" -) - target_sources(app PRIVATE src/AppTask.cpp src/ZclCallbacks.cpp @@ -107,3 +103,7 @@ chip_configure_data_model(app INCLUDE_SERVER ZAP_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../air-quality-sensor-common/air-quality-sensor-app.zap ) + +if(CONFIG_BOOTLOADER_MCUBOOT) + target_sources(app PRIVATE ${TELINK_COMMON}/util/src/OTAUtil.cpp) +endif() 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 e1dace194762d8..ad7cb56245f2bd 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; @@ -3041,6 +2848,7 @@ cluster RvcRunMode = 84 { enum ModeTag : enum16 { kIdle = 16384; kCleaning = 16385; + kMapping = 16386; } enum StatusCode : enum8 { @@ -3600,18 +3408,211 @@ cluster RvcOperationalState = 97 { readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; - response struct OperationalCommandResponse = 4 { - ErrorStateStruct commandResponseState = 0; + response struct OperationalCommandResponse = 4 { + ErrorStateStruct commandResponseState = 0; + } + + /** Upon receipt, the device SHALL pause its operation if it is possible based on the current function of the server. */ + command Pause(): OperationalCommandResponse = 0; + /** Upon receipt, the device SHALL stop its operation if it is at a position where it is safe to do so and/or permitted. */ + command Stop(): OperationalCommandResponse = 1; + /** Upon receipt, the device SHALL start its operation if it is safe to do so and the device is in an operational state from which it can be started. */ + command Start(): OperationalCommandResponse = 2; + /** Upon receipt, the device SHALL resume its operation from the point it was at when it received the Pause command, or from the point when it was paused by means outside of this cluster (for example by manual button press). */ + 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; } - /** Upon receipt, the device SHALL pause its operation if it is possible based on the current function of the server. */ - command Pause(): OperationalCommandResponse = 0; - /** Upon receipt, the device SHALL stop its operation if it is at a position where it is safe to do so and/or permitted. */ - command Stop(): OperationalCommandResponse = 1; - /** Upon receipt, the device SHALL start its operation if it is safe to do so and the device is in an operational state from which it can be started. */ - command Start(): OperationalCommandResponse = 2; - /** Upon receipt, the device SHALL resume its operation from the point it was at when it received the Pause command, or from the point when it was paused by means outside of this cluster (for example by manual button press). */ - command Resume(): OperationalCommandResponse = 3; + /** 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 */ @@ -3919,6 +3920,185 @@ provisional cluster ElectricalEnergyMeasurement = 145 { readonly attribute int16u clusterRevision = 65533; } +/** This cluster allows a client to manage the power draw of a device. An example of such a client could be an Energy Management System (EMS) which controls an Energy Smart Appliance (ESA). */ +provisional cluster DeviceEnergyManagement = 152 { + revision 2; + + enum CauseEnum : enum8 { + kNormalCompletion = 0; + kOffline = 1; + kFault = 2; + kUserOptOut = 3; + } + + enum CostTypeEnum : enum8 { + kFinancial = 0; + kGHGEmissions = 1; + kComfort = 2; + kTemperature = 3; + } + + enum ESAStateEnum : enum8 { + kOffline = 0; + kOnline = 1; + kFault = 2; + kUserOptOut = 3; + kPowerAdjustActive = 4; + kPaused = 5; + } + + enum ESATypeEnum : enum8 { + kEVSE = 0; + kSpaceHeating = 1; + kWaterHeating = 2; + kSpaceCooling = 3; + kSpaceHeatingCooling = 4; + kBatteryStorage = 5; + kSolarPV = 6; + kFridgeFreezer = 7; + kWashingMachine = 8; + kDishwasher = 9; + kCooking = 10; + kHomeWaterPump = 11; + kIrrigationWaterPump = 12; + kPoolPump = 13; + kOther = 255; + } + + bitmap Feature : bitmap32 { + kPowerAdjustment = 0x1; + kPowerForecastReporting = 0x2; + kStateForecastReporting = 0x4; + kForecastAdjustment = 0x8; + } + + struct CostStruct { + CostTypeEnum costType = 0; + int32s value = 1; + int8u decimalPoints = 2; + optional int16u currency = 3; + } + + struct SlotStruct { + elapsed_s minDuration = 0; + elapsed_s maxDuration = 1; + elapsed_s defaultDuration = 2; + elapsed_s elapsedSlotTime = 3; + elapsed_s remainingSlotTime = 4; + boolean slotIsPauseable = 5; + elapsed_s minPauseDuration = 6; + elapsed_s maxPauseDuration = 7; + optional int16u manufacturerESAState = 8; + optional power_mw nominalPower = 9; + optional power_mw minPower = 10; + optional power_mw maxPower = 11; + optional energy_mwh nominalEnergy = 12; + optional CostStruct costs[] = 13; + optional power_mw minPowerAdjustment = 14; + optional power_mw maxPowerAdjustment = 15; + optional elapsed_s minDurationAdjustment = 16; + optional elapsed_s maxDurationAdjustment = 17; + } + + struct ForecastStruct { + int16u forecastId = 0; + nullable int16u activeSlotNumber = 1; + epoch_s startTime = 2; + epoch_s endTime = 3; + optional nullable epoch_s earliestStartTime = 4; + optional epoch_s latestEndTime = 5; + boolean isPauseable = 6; + SlotStruct slots[] = 7; + } + + struct ConstraintsStruct { + epoch_s startTime = 0; + elapsed_s duration = 1; + optional power_mw nominalPower = 2; + optional energy_mwh maximumEnergy = 3; + optional int8s loadControl = 4; + } + + struct PowerAdjustStruct { + power_mw minPower = 0; + power_mw maxPower = 1; + elapsed_s minDuration = 2; + elapsed_s maxDuration = 3; + } + + struct SlotAdjustmentStruct { + int8u slotIndex = 0; + power_mw nominalPower = 1; + elapsed_s duration = 2; + } + + info event PowerAdjustStart = 0 { + } + + info event PowerAdjustEnd = 1 { + CauseEnum cause = 0; + elapsed_s duration = 1; + energy_mwh energyUse = 2; + } + + info event Paused = 2 { + } + + info event Resumed = 3 { + } + + readonly attribute ESATypeEnum ESAType = 0; + readonly attribute boolean ESACanGenerate = 1; + readonly attribute ESAStateEnum ESAState = 2; + readonly attribute power_mw absMinPower = 3; + readonly attribute power_mw absMaxPower = 4; + readonly attribute optional nullable PowerAdjustStruct powerAdjustmentCapability[] = 5; + readonly attribute optional nullable ForecastStruct forecast = 6; + 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 PowerAdjustRequestRequest { + power_mw power = 0; + elapsed_s duration = 1; + } + + request struct StartTimeAdjustRequestRequest { + epoch_s requestedStartTime = 0; + } + + request struct PauseRequestRequest { + elapsed_s duration = 0; + } + + request struct ModifyForecastRequestRequest { + int32u forecastId = 0; + SlotAdjustmentStruct slotAdjustments[] = 1; + } + + request struct RequestConstraintBasedForecastRequest { + ConstraintsStruct constraints[] = 0; + } + + /** Allows a client to request an adjustment in the power consumption of an ESA for a specified duration. */ + command PowerAdjustRequest(PowerAdjustRequestRequest): DefaultSuccess = 0; + /** Allows a client to cancel an ongoing PowerAdjustmentRequest operation. */ + command CancelPowerAdjustRequest(): DefaultSuccess = 1; + /** Allows a client to adjust the start time of a Forecast sequence that has not yet started operation (i.e. where the current Forecast StartTime is in the future). */ + command StartTimeAdjustRequest(StartTimeAdjustRequestRequest): DefaultSuccess = 2; + /** Allows a client to temporarily pause an operation and reduce the ESAs energy demand. */ + command PauseRequest(PauseRequestRequest): DefaultSuccess = 3; + /** Allows a client to cancel the PauseRequest command and enable earlier resumption of operation. */ + command ResumeRequest(): DefaultSuccess = 4; + /** Allows a client to modify a Forecast within the limits allowed by the ESA. */ + command ModifyForecastRequest(ModifyForecastRequestRequest): DefaultSuccess = 5; + /** Allows a client to ask the ESA to recompute its Forecast based on power and time constraints. */ + command RequestConstraintBasedForecast(RequestConstraintBasedForecastRequest): DefaultSuccess = 6; +} + /** Electric Vehicle Supply Equipment (EVSE) is equipment used to charge an Electric Vehicle (EV) or Plug-In Hybrid Electric Vehicle. This cluster provides an interface to the functionality of Electric Vehicle Supply Equipment (EVSE) management. */ provisional cluster EnergyEvse = 153 { revision 2; @@ -4466,6 +4646,16 @@ cluster Thermostat = 513 { kCoolingAndHeatingWithReheat = 5; } + enum PresetScenarioEnum : enum8 { + kUnspecified = 0; + kOccupied = 1; + kUnoccupied = 2; + kSleep = 3; + kWake = 4; + kVacation = 5; + kUserDefined = 6; + } + enum SetpointChangeSourceEnum : enum8 { kManual = 0; kSchedule = 1; @@ -4527,6 +4717,10 @@ cluster Thermostat = 513 { kSetback = 0x10; kAutoMode = 0x20; kLocalTemperatureNotExposed = 0x40; + kMatterScheduleConfiguration = 0x80; + kPresets = 0x100; + kSetpoints = 0x200; + kQueuedPresetsSupported = 0x400; } bitmap HVACSystemTypeBitmap : bitmap8 { @@ -4536,6 +4730,11 @@ cluster Thermostat = 513 { kHeatingUsesFuel = 0x20; } + bitmap PresetTypeFeaturesBitmap : bitmap16 { + kAutomatic = 0x1; + kSupportsNames = 0x2; + } + bitmap ProgrammingOperationModeBitmap : bitmap8 { kScheduleActive = 0x1; kAutoRecovery = 0x2; @@ -4574,6 +4773,62 @@ cluster Thermostat = 513 { kCoolSetpointPresent = 0x2; } + bitmap ScheduleTypeFeaturesBitmap : bitmap16 { + kSupportsPresets = 0x1; + kSupportsSetpoints = 0x2; + kSupportsNames = 0x4; + kSupportsOff = 0x8; + } + + bitmap TemperatureSetpointHoldPolicyBitmap : bitmap8 { + kHoldDurationElapsed = 0x1; + kHoldDurationElapsedOrPresetChanged = 0x2; + } + + struct ScheduleTransitionStruct { + ScheduleDayOfWeekBitmap dayOfWeek = 0; + int16u transitionTime = 1; + optional octet_string<16> presetHandle = 2; + optional SystemModeEnum systemMode = 3; + optional temperature coolingSetpoint = 4; + optional temperature heatingSetpoint = 5; + } + + struct ScheduleStruct { + nullable octet_string<16> scheduleHandle = 0; + SystemModeEnum systemMode = 1; + optional char_string<64> name = 2; + optional octet_string<16> presetHandle = 3; + ScheduleTransitionStruct transitions[] = 4; + optional nullable boolean builtIn = 5; + } + + struct PresetStruct { + nullable octet_string<16> presetHandle = 0; + PresetScenarioEnum presetScenario = 1; + optional nullable char_string<64> name = 2; + optional temperature coolingSetpoint = 3; + optional temperature heatingSetpoint = 4; + nullable boolean builtIn = 5; + } + + struct PresetTypeStruct { + PresetScenarioEnum presetScenario = 0; + int8u numberOfPresets = 1; + PresetTypeFeaturesBitmap presetTypeFeatures = 2; + } + + struct QueuedPresetStruct { + nullable octet_string<16> presetHandle = 0; + nullable epoch_s transitionTimestamp = 1; + } + + struct ScheduleTypeStruct { + SystemModeEnum systemMode = 0; + int8u numberOfSchedules = 1; + ScheduleTypeFeaturesBitmap scheduleTypeFeatures = 2; + } + struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; nullable temperature heatSetpoint = 1; @@ -4629,6 +4884,20 @@ cluster Thermostat = 513 { attribute access(write: manage) optional ACLouverPositionEnum ACLouverPosition = 69; readonly attribute optional nullable temperature ACCoilTemperature = 70; attribute access(write: manage) optional ACCapacityFormatEnum ACCapacityformat = 71; + readonly attribute optional PresetTypeStruct presetTypes[] = 72; + readonly attribute optional ScheduleTypeStruct scheduleTypes[] = 73; + readonly attribute optional int8u numberOfPresets = 74; + readonly attribute optional int8u numberOfSchedules = 75; + readonly attribute optional int8u numberOfScheduleTransitions = 76; + readonly attribute optional nullable int8u numberOfScheduleTransitionPerDay = 77; + readonly attribute optional nullable octet_string<16> activePresetHandle = 78; + readonly attribute optional nullable octet_string<16> activeScheduleHandle = 79; + attribute access(write: manage) optional PresetStruct presets[] = 80; + attribute access(write: manage) optional ScheduleStruct schedules[] = 81; + readonly attribute optional boolean presetsSchedulesEditable = 82; + readonly attribute optional TemperatureSetpointHoldPolicyBitmap temperatureSetpointHoldPolicy = 83; + readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 84; + readonly attribute optional nullable QueuedPresetStruct queuedPreset = 85; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -4660,14 +4929,45 @@ cluster Thermostat = 513 { ScheduleModeBitmap modeToReturn = 1; } + request struct SetActiveScheduleRequestRequest { + octet_string<16> scheduleHandle = 0; + } + + request struct SetActivePresetRequestRequest { + octet_string<16> presetHandle = 0; + optional int16u delayMinutes = 1; + } + + request struct StartPresetsSchedulesEditRequestRequest { + int16u timeoutSeconds = 0; + } + + request struct SetTemperatureSetpointHoldPolicyRequest { + TemperatureSetpointHoldPolicyBitmap temperatureSetpointHoldPolicy = 0; + } + /** Command description for SetpointRaiseLower */ command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; /** Command description for SetWeeklySchedule */ command access(invoke: manage) SetWeeklySchedule(SetWeeklyScheduleRequest): DefaultSuccess = 1; /** Command description for GetWeeklySchedule */ command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; - /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ + /** This command is used to clear the weekly schedule. The ClearWeeklySchedule command has no payload. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; + /** This command is used to set the active schedule. */ + command SetActiveScheduleRequest(SetActiveScheduleRequestRequest): DefaultSuccess = 5; + /** This command is used to set the active preset. */ + command SetActivePresetRequest(SetActivePresetRequestRequest): DefaultSuccess = 6; + /** This command is used to start editing the presets and schedules. */ + command access(invoke: manage) StartPresetsSchedulesEditRequest(StartPresetsSchedulesEditRequestRequest): DefaultSuccess = 7; + /** This command is used to cancel editing presets and schedules. */ + command access(invoke: manage) CancelPresetsSchedulesEditRequest(): DefaultSuccess = 8; + /** This command is used to notify the server that all edits are done and should be committed. */ + command access(invoke: manage) CommitPresetsSchedulesRequest(): DefaultSuccess = 9; + /** This command is sent to cancel a queued preset. */ + command access(invoke: manage) CancelSetActivePresetRequest(): DefaultSuccess = 10; + /** This command sets the set point hold policy. */ + command SetTemperatureSetpointHoldPolicy(SetTemperatureSetpointHoldPolicyRequest): DefaultSuccess = 11; } /** An interface for controlling a fan in a heating/cooling system. */ @@ -6752,6 +7052,9 @@ endpoint 0 { ram attribute lastNetworkingStatus; ram attribute lastNetworkID; ram attribute lastConnectErrorValue; + callback attribute supportedWiFiBands; + callback attribute supportedThreadFeatures; + callback attribute threadVersion; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; @@ -7092,39 +7395,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; @@ -7518,6 +7788,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; @@ -7613,25 +7916,53 @@ endpoint 1 { ram attribute clusterRevision default = 1; } + server cluster DeviceEnergyManagement { + emits event PowerAdjustStart; + emits event PowerAdjustEnd; + emits event Paused; + emits event Resumed; + callback attribute ESAType; + callback attribute ESACanGenerate; + callback attribute ESAState; + callback attribute absMinPower; + callback attribute absMaxPower; + callback attribute powerAdjustmentCapability; + callback attribute forecast; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + callback attribute featureMap; + ram attribute clusterRevision default = 2; + + handle command PowerAdjustRequest; + handle command CancelPowerAdjustRequest; + handle command StartTimeAdjustRequest; + handle command PauseRequest; + handle command ResumeRequest; + handle command ModifyForecastRequest; + handle command RequestConstraintBasedForecast; + } + server cluster EnergyEvse { - callback attribute state default = 0; - callback attribute supplyState default = 0; - callback attribute faultState default = 0; - callback attribute chargingEnabledUntil default = 0; - callback attribute dischargingEnabledUntil default = 0; - callback attribute circuitCapacity default = 0; - callback attribute minimumChargeCurrent default = 6000; - callback attribute maximumChargeCurrent default = 0; - callback attribute maximumDischargeCurrent default = 0; - callback attribute userMaximumChargeCurrent default = 0; - callback attribute randomizationDelayWindow default = 600; + callback attribute state; + callback attribute supplyState; + callback attribute faultState; + callback attribute chargingEnabledUntil; + callback attribute dischargingEnabledUntil; + callback attribute circuitCapacity; + callback attribute minimumChargeCurrent; + callback attribute maximumChargeCurrent; + callback attribute maximumDischargeCurrent; + callback attribute userMaximumChargeCurrent; + callback attribute randomizationDelayWindow; callback attribute numberOfWeeklyTargets default = 0; callback attribute numberOfDailyTargets default = 1; callback attribute nextChargeStartTime; callback attribute nextChargeTargetTime; callback attribute nextChargeRequiredEnergy; callback attribute nextChargeTargetSoC; - callback attribute approximateEVEfficiency default = 0xFFFF; + callback attribute approximateEVEfficiency; callback attribute stateOfCharge; callback attribute batteryCapacity; callback attribute vehicleID; @@ -7643,7 +7974,7 @@ endpoint 1 { callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; ram attribute clusterRevision default = 2; handle command GetTargetsResponse; @@ -7749,6 +8080,19 @@ endpoint 1 { ram attribute minSetpointDeadBand default = 0x19; ram attribute controlSequenceOfOperation default = 0x04; ram attribute systemMode default = 0x01; + callback attribute presetTypes; + callback attribute scheduleTypes; + ram attribute numberOfPresets default = 0; + ram attribute numberOfSchedules default = 0; + ram attribute numberOfScheduleTransitionPerDay default = 0xFF; + ram attribute activePresetHandle; + ram attribute activeScheduleHandle; + callback attribute presets; + callback attribute schedules; + ram attribute presetsSchedulesEditable; + ram attribute temperatureSetpointHoldPolicy default = 0; + ram attribute setpointHoldExpiryTimestamp; + callback attribute queuedPreset; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; @@ -7757,6 +8101,13 @@ endpoint 1 { ram attribute clusterRevision default = 6; handle command SetpointRaiseLower; + handle command SetActiveScheduleRequest; + handle command SetActivePresetRequest; + handle command StartPresetsSchedulesEditRequest; + handle command CancelPresetsSchedulesEditRequest; + handle command CommitPresetsSchedulesRequest; + handle command CancelSetActivePresetRequest; + handle command SetTemperatureSetpointHoldPolicy; } server cluster FanControl { @@ -8314,39 +8665,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; @@ -8398,6 +8716,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 fabe40ca88f598..9013ea3140e6db 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 @@ -2562,6 +2562,54 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SupportedWiFiBands", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedThreadFeatures", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "ThreadCapabilitiesBitmap", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ThreadVersion", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "GeneratedCommandList", "code": 65528, @@ -6464,8 +6512,8 @@ ] }, { - "name": "Scenes", - "code": 5, + "name": "Scenes Management", + "code": 98, "mfgCode": null, "define": "SCENES_CLUSTER", "side": "server", @@ -12593,24 +12641,24 @@ ] }, { - "name": "Energy EVSE", - "code": 153, + "name": "Device Energy Management", + "code": 152, "mfgCode": null, - "define": "ENERGY_EVSE_CLUSTER", + "define": "DEVICE_ENERGY_MANAGEMENT_CLUSTER", "side": "server", "enabled": 1, "apiMaturity": "provisional", "commands": [ { - "name": "GetTargetsResponse", + "name": "PowerAdjustRequest", "code": 0, "mfgCode": null, - "source": "server", - "isIncoming": 0, + "source": "client", + "isIncoming": 1, "isEnabled": 1 }, { - "name": "Disable", + "name": "CancelPowerAdjustRequest", "code": 1, "mfgCode": null, "source": "client", @@ -12618,7 +12666,7 @@ "isEnabled": 1 }, { - "name": "EnableCharging", + "name": "StartTimeAdjustRequest", "code": 2, "mfgCode": null, "source": "client", @@ -12626,7 +12674,7 @@ "isEnabled": 1 }, { - "name": "EnableDischarging", + "name": "PauseRequest", "code": 3, "mfgCode": null, "source": "client", @@ -12634,7 +12682,7 @@ "isEnabled": 1 }, { - "name": "StartDiagnostics", + "name": "ResumeRequest", "code": 4, "mfgCode": null, "source": "client", @@ -12642,7 +12690,7 @@ "isEnabled": 1 }, { - "name": "SetTargets", + "name": "ModifyForecastRequest", "code": 5, "mfgCode": null, "source": "client", @@ -12650,29 +12698,21 @@ "isEnabled": 1 }, { - "name": "GetTargets", + "name": "RequestConstraintBasedForecast", "code": 6, "mfgCode": null, "source": "client", "isIncoming": 1, "isEnabled": 1 - }, - { - "name": "ClearTargets", - "code": 7, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 } ], "attributes": [ { - "name": "State", + "name": "ESAType", "code": 0, "mfgCode": null, "side": "server", - "type": "StateEnum", + "type": "ESATypeEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -12684,11 +12724,11 @@ "reportableChange": 0 }, { - "name": "SupplyState", + "name": "ESACanGenerate", "code": 1, "mfgCode": null, "side": "server", - "type": "SupplyStateEnum", + "type": "boolean", "included": 1, "storageOption": "External", "singleton": 0, @@ -12700,11 +12740,11 @@ "reportableChange": 0 }, { - "name": "FaultState", + "name": "ESAState", "code": 2, "mfgCode": null, "side": "server", - "type": "FaultStateEnum", + "type": "ESAStateEnum", "included": 1, "storageOption": "External", "singleton": 0, @@ -12716,11 +12756,11 @@ "reportableChange": 0 }, { - "name": "ChargingEnabledUntil", + "name": "AbsMinPower", "code": 3, "mfgCode": null, "side": "server", - "type": "epoch_s", + "type": "power_mw", "included": 1, "storageOption": "External", "singleton": 0, @@ -12732,11 +12772,11 @@ "reportableChange": 0 }, { - "name": "DischargingEnabledUntil", + "name": "AbsMaxPower", "code": 4, "mfgCode": null, "side": "server", - "type": "epoch_s", + "type": "power_mw", "included": 1, "storageOption": "External", "singleton": 0, @@ -12748,107 +12788,107 @@ "reportableChange": 0 }, { - "name": "CircuitCapacity", + "name": "PowerAdjustmentCapability", "code": 5, "mfgCode": null, "side": "server", - "type": "amperage_ma", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "MinimumChargeCurrent", + "name": "Forecast", "code": 6, "mfgCode": null, "side": "server", - "type": "amperage_ma", + "type": "ForecastStruct", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "6000", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "MaximumChargeCurrent", - "code": 7, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "amperage_ma", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "MaximumDischargeCurrent", - "code": 8, + "name": "AcceptedCommandList", + "code": 65529, "mfgCode": null, "side": "server", - "type": "amperage_ma", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "UserMaximumChargeCurrent", - "code": 9, + "name": "EventList", + "code": 65530, "mfgCode": null, "side": "server", - "type": "amperage_ma", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "RandomizationDelayWindow", - "code": 10, + "name": "AttributeList", + "code": 65531, "mfgCode": null, "side": "server", - "type": "elapsed_s", + "type": "array", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "600", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "NumberOfWeeklyTargets", - "code": 33, + "name": "FeatureMap", + "code": 65532, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "bitmap32", "included": 1, "storageOption": "External", "singleton": 0, @@ -12860,57 +12900,372 @@ "reportableChange": 0 }, { - "name": "NumberOfDailyTargets", - "code": 34, + "name": "ClusterRevision", + "code": 65533, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "int16u", "included": 1, - "storageOption": "External", + "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "2", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 + } + ], + "events": [ + { + "name": "PowerAdjustStart", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 }, { - "name": "NextChargeStartTime", - "code": 35, + "name": "PowerAdjustEnd", + "code": 1, "mfgCode": null, "side": "server", - "type": "epoch_s", + "included": 1 + }, + { + "name": "Paused", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "Resumed", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Energy EVSE", + "code": 153, + "mfgCode": null, + "define": "ENERGY_EVSE_CLUSTER", + "side": "server", + "enabled": 1, + "apiMaturity": "provisional", + "commands": [ + { + "name": "GetTargetsResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "Disable", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "EnableCharging", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "EnableDischarging", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "StartDiagnostics", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "SetTargets", + "code": 5, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetTargets", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ClearTargets", + "code": 7, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "State", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "StateEnum", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "NextChargeTargetTime", - "code": 36, + "name": "SupplyState", + "code": 1, "mfgCode": null, "side": "server", - "type": "epoch_s", + "type": "SupplyStateEnum", "included": 1, "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 }, { - "name": "NextChargeRequiredEnergy", - "code": 37, - "mfgCode": null, + "name": "FaultState", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "FaultStateEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ChargingEnabledUntil", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "epoch_s", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DischargingEnabledUntil", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "epoch_s", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CircuitCapacity", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "amperage_ma", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MinimumChargeCurrent", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "amperage_ma", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "6000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaximumChargeCurrent", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "amperage_ma", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaximumDischargeCurrent", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "amperage_ma", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UserMaximumChargeCurrent", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "amperage_ma", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "RandomizationDelayWindow", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "600", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfWeeklyTargets", + "code": 33, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfDailyTargets", + "code": 34, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NextChargeStartTime", + "code": 35, + "mfgCode": null, + "side": "server", + "type": "epoch_s", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NextChargeTargetTime", + "code": 36, + "mfgCode": null, + "side": "server", + "type": "epoch_s", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NextChargeRequiredEnergy", + "code": 37, + "mfgCode": null, "side": "server", "type": "energy_mwh", "included": 1, @@ -13138,7 +13493,7 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -14215,6 +14570,78 @@ "source": "client", "isIncoming": 1, "isEnabled": 1 + }, + { + "name": "GetRelayStatusLogResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 0 + }, + { + "name": "GetRelayStatusLog", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 0 + }, + { + "name": "SetActiveScheduleRequest", + "code": 5, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 0 + }, + { + "name": "SetActivePresetRequest", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 0 + }, + { + "name": "StartPresetsSchedulesEditRequest", + "code": 7, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 0 + }, + { + "name": "CancelPresetsSchedulesEditRequest", + "code": 8, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 0 + }, + { + "name": "CommitPresetsSchedulesRequest", + "code": 9, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 0 + }, + { + "name": "CancelSetActivePresetRequest", + "code": 10, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 0 + }, + { + "name": "SetTemperatureSetpointHoldPolicy", + "code": 11, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 0 } ], "attributes": [ @@ -14442,6 +14869,214 @@ "maxInterval": 65344, "reportableChange": 0 }, + { + "name": "PresetTypes", + "code": 72, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ScheduleTypes", + "code": 73, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfPresets", + "code": 74, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfSchedules", + "code": 75, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "NumberOfScheduleTransitionPerDay", + "code": 77, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFF", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActivePresetHandle", + "code": 78, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveScheduleHandle", + "code": 79, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Presets", + "code": 80, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Schedules", + "code": 81, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PresetsSchedulesEditable", + "code": 82, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TemperatureSetpointHoldPolicy", + "code": 83, + "mfgCode": null, + "side": "server", + "type": "TemperatureSetpointHoldPolicyBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SetpointHoldExpiryTimestamp", + "code": 84, + "mfgCode": null, + "side": "server", + "type": "epoch_s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "QueuedPreset", + "code": 85, + "mfgCode": null, + "side": "server", + "type": "QueuedPresetStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "GeneratedCommandList", "code": 65528, @@ -21806,8 +22441,8 @@ ] }, { - "name": "Scenes", - "code": 5, + "name": "Scenes Management", + "code": 98, "mfgCode": null, "define": "SCENES_CLUSTER", "side": "server", diff --git a/examples/all-clusters-app/all-clusters-common/src/device-energy-management-stub.cpp b/examples/all-clusters-app/all-clusters-common/src/device-energy-management-stub.cpp new file mode 100644 index 00000000000000..385c1cfa43c8ee --- /dev/null +++ b/examples/all-clusters-app/all-clusters-common/src/device-energy-management-stub.cpp @@ -0,0 +1,73 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using namespace chip; +using namespace chip::app; +using namespace chip::app::Clusters; +using namespace chip::app::Clusters::DeviceEnergyManagement; + +static std::unique_ptr gDelegate; +static std::unique_ptr gInstance; + +void emberAfDeviceEnergyManagementClusterInitCallback(chip::EndpointId endpointId) +{ + VerifyOrDie(endpointId == 1); // this cluster is only enabled for endpoint 1. + VerifyOrDie(gInstance == nullptr); + + CHIP_ERROR err; + + if (gDelegate || gInstance) + { + ChipLogError(AppServer, "DEM Instance or Delegate already exist."); + return; + } + + gDelegate = std::make_unique(); + if (!gDelegate) + { + ChipLogError(AppServer, "Failed to allocate memory for DeviceEnergyManagementDelegate"); + return; + } + + /* Manufacturer may optionally not support all features, commands & attributes */ + gInstance = std::make_unique( + endpointId, *gDelegate, + BitMask( + DeviceEnergyManagement::Feature::kPowerForecastReporting, DeviceEnergyManagement::Feature::kStateForecastReporting, + DeviceEnergyManagement::Feature::kPowerAdjustment, DeviceEnergyManagement::Feature::kForecastAdjustment), + BitMask(OptionalCommands::kSupportsModifyForecastRequest, + OptionalCommands::kSupportsRequestConstraintBasedForecast)); + + if (!gInstance) + { + ChipLogError(AppServer, "Failed to allocate memory for DeviceEnergyManagementManager"); + gDelegate.reset(); + return; + } + + err = gInstance->Init(); /* Register Attribute & Command handlers */ + if (err != CHIP_NO_ERROR) + { + ChipLogError(AppServer, "Init failed on gInstance"); + gInstance.reset(); + gDelegate.reset(); + return; + } +} diff --git a/examples/all-clusters-app/all-clusters-common/src/energy-evse-stub.cpp b/examples/all-clusters-app/all-clusters-common/src/energy-evse-stub.cpp index a0773de104c187..f9983d47883852 100644 --- a/examples/all-clusters-app/all-clusters-common/src/energy-evse-stub.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/energy-evse-stub.cpp @@ -22,25 +22,26 @@ using namespace chip; using namespace chip::app::Clusters; using namespace chip::app::Clusters::EnergyEvse; -static EnergyEvseDelegate * gDelegate = nullptr; -static EnergyEvseManager * gInstance = nullptr; +static std::unique_ptr gDelegate; +static std::unique_ptr gInstance; void emberAfEnergyEvseClusterInitCallback(chip::EndpointId endpointId) { VerifyOrDie(endpointId == 1); // this cluster is only enabled for endpoint 1. - VerifyOrDie(gInstance == nullptr); - gDelegate = new EnergyEvseDelegate(); - if (gDelegate != nullptr) + VerifyOrDie(!gInstance); + + gDelegate = std::make_unique(); + if (gDelegate) { - gInstance = - new EnergyEvseManager(endpointId, *gDelegate, - BitMask( - EnergyEvse::Feature::kChargingPreferences, EnergyEvse::Feature::kPlugAndCharge, - EnergyEvse::Feature::kRfid, EnergyEvse::Feature::kSoCReporting, EnergyEvse::Feature::kV2x), - BitMask(OptionalAttributes::kSupportsUserMaximumChargingCurrent, - OptionalAttributes::kSupportsRandomizationWindow, - OptionalAttributes::kSupportsApproximateEvEfficiency), - BitMask(OptionalCommands::kSupportsStartDiagnostics)); + gInstance = std::make_unique( + endpointId, *gDelegate, + BitMask(EnergyEvse::Feature::kChargingPreferences, EnergyEvse::Feature::kPlugAndCharge, + EnergyEvse::Feature::kRfid, EnergyEvse::Feature::kSoCReporting, + EnergyEvse::Feature::kV2x), + BitMask(OptionalAttributes::kSupportsUserMaximumChargingCurrent, + OptionalAttributes::kSupportsRandomizationWindow, + OptionalAttributes::kSupportsApproximateEvEfficiency), + BitMask(OptionalCommands::kSupportsStartDiagnostics)); gInstance->Init(); /* Register Attribute & Command handlers */ } diff --git a/examples/all-clusters-app/ameba/chip_main.cmake b/examples/all-clusters-app/ameba/chip_main.cmake index e68398afdf625d..66528a9941141a 100755 --- a/examples/all-clusters-app/ameba/chip_main.cmake +++ b/examples/all-clusters-app/ameba/chip_main.cmake @@ -156,6 +156,7 @@ list( ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/air-quality-instance.cpp ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/concentration-measurement-instances.cpp + ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/device-energy-management-stub.cpp ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/energy-evse-stub.cpp ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp ${chip_dir}/examples/all-clusters-app/all-clusters-common/src/oven-modes.cpp @@ -175,6 +176,8 @@ list( ${chip_dir}/examples/all-clusters-app/ameba/main/ManualOperationCommand.cpp ${chip_dir}/examples/all-clusters-app/ameba/main/SmokeCOAlarmManager.cpp + ${chip_dir}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementDelegateImpl.cpp + ${chip_dir}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementManager.cpp ${chip_dir}/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp ${chip_dir}/examples/energy-management-app/energy-management-common/src/EnergyEvseManager.cpp diff --git a/examples/all-clusters-app/asr/BUILD.gn b/examples/all-clusters-app/asr/BUILD.gn index 1c23617af66262..263bd8cf7734b7 100755 --- a/examples/all-clusters-app/asr/BUILD.gn +++ b/examples/all-clusters-app/asr/BUILD.gn @@ -74,6 +74,7 @@ asr_executable("clusters_app") { "${chip_root}/examples/all-clusters-app/all-clusters-common/src/air-quality-instance.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/concentration-measurement-instances.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/device-energy-management-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/energy-evse-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/oven-modes.cpp", @@ -81,6 +82,8 @@ asr_executable("clusters_app") { "${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp", + "${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementDelegateImpl.cpp", + "${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementManager.cpp", "${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp", "${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseManager.cpp", "${examples_plat_dir}/ButtonHandler.cpp", diff --git a/examples/all-clusters-app/cc13x2x7_26x2x7/BUILD.gn b/examples/all-clusters-app/cc13x2x7_26x2x7/BUILD.gn index 26c0f67e389a0c..6ec6202ea21209 100644 --- a/examples/all-clusters-app/cc13x2x7_26x2x7/BUILD.gn +++ b/examples/all-clusters-app/cc13x2x7_26x2x7/BUILD.gn @@ -79,6 +79,7 @@ ti_simplelink_executable("all-clusters-app") { "${chip_root}/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/concentration-measurement-instances.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/device-energy-management-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/energy-evse-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/oven-modes.cpp", @@ -86,6 +87,8 @@ ti_simplelink_executable("all-clusters-app") { "${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp", + "${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementDelegateImpl.cpp", + "${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementManager.cpp", "${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp", "${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseManager.cpp", "${chip_root}/examples/providers/DeviceInfoProviderImpl.cpp", diff --git a/examples/all-clusters-app/cc13x4_26x4/BUILD.gn b/examples/all-clusters-app/cc13x4_26x4/BUILD.gn index e9492d7a223f42..02dbebf7e6d8c9 100644 --- a/examples/all-clusters-app/cc13x4_26x4/BUILD.gn +++ b/examples/all-clusters-app/cc13x4_26x4/BUILD.gn @@ -82,6 +82,7 @@ ti_simplelink_executable("all-clusters-app") { "${chip_root}/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/concentration-measurement-instances.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/device-energy-management-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/energy-evse-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/oven-modes.cpp", @@ -89,6 +90,8 @@ ti_simplelink_executable("all-clusters-app") { "${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp", + "${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementDelegateImpl.cpp", + "${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementManager.cpp", "${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp", "${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseManager.cpp", "${chip_root}/examples/providers/DeviceInfoProviderImpl.cpp", diff --git a/examples/all-clusters-app/esp32/main/CMakeLists.txt b/examples/all-clusters-app/esp32/main/CMakeLists.txt index 89ce7c1c872160..623e2ded547abe 100644 --- a/examples/all-clusters-app/esp32/main/CMakeLists.txt +++ b/examples/all-clusters-app/esp32/main/CMakeLists.txt @@ -75,6 +75,7 @@ set(SRC_DIRS_LIST "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/icd-management-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/diagnostic-logs-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/occupancy-sensor-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/device-energy-management-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/energy-evse-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ethernet-network-diagnostics-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/localization-configuration-server" diff --git a/examples/all-clusters-app/infineon/psoc6/BUILD.gn b/examples/all-clusters-app/infineon/psoc6/BUILD.gn index f4469b9c7bc290..f2b9ab939d6f38 100644 --- a/examples/all-clusters-app/infineon/psoc6/BUILD.gn +++ b/examples/all-clusters-app/infineon/psoc6/BUILD.gn @@ -110,6 +110,7 @@ psoc6_executable("clusters_app") { "${chip_root}/examples/all-clusters-app/all-clusters-common/src/air-quality-instance.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/concentration-measurement-instances.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/device-energy-management-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/energy-evse-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/oven-modes.cpp", @@ -117,6 +118,8 @@ psoc6_executable("clusters_app") { "${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp", + "${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementDelegateImpl.cpp", + "${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementManager.cpp", "${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp", "${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseManager.cpp", "${examples_plat_dir}/LEDWidget.cpp", diff --git a/examples/all-clusters-app/linux/BUILD.gn b/examples/all-clusters-app/linux/BUILD.gn index b2cc122b5090ab..8b031d769773e4 100644 --- a/examples/all-clusters-app/linux/BUILD.gn +++ b/examples/all-clusters-app/linux/BUILD.gn @@ -26,6 +26,7 @@ source_set("chip-all-clusters-common") { "${chip_root}/examples/all-clusters-app/all-clusters-common/src/boolcfg-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/concentration-measurement-instances.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/device-energy-management-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/dishwasher-alarm-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/dishwasher-mode.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/energy-evse-stub.cpp", @@ -42,6 +43,8 @@ source_set("chip-all-clusters-common") { "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/tcc-mode.cpp", + "${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementDelegateImpl.cpp", + "${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementManager.cpp", "${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp", "${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseManager.cpp", "AllClustersCommandDelegate.cpp", diff --git a/examples/all-clusters-app/mbed/CMakeLists.txt b/examples/all-clusters-app/mbed/CMakeLists.txt index 28104e85f0c3b1..f2b6d9f5e88d27 100644 --- a/examples/all-clusters-app/mbed/CMakeLists.txt +++ b/examples/all-clusters-app/mbed/CMakeLists.txt @@ -65,6 +65,7 @@ target_sources(${APP_TARGET} PRIVATE ${ALL_CLUSTERS_COMMON}/src/air-quality-instance.cpp ${ALL_CLUSTERS_COMMON}/src/concentration-measurement-instances.cpp ${ALL_CLUSTERS_COMMON}/src/fan-stub.cpp + ${ALL_CLUSTERS_COMMON}/src/device-energy-management-stub.cpp ${ALL_CLUSTERS_COMMON}/src/energy-evse-stub.cpp ${ALL_CLUSTERS_COMMON}/src/oven-modes.cpp ${ALL_CLUSTERS_COMMON}/src/resource-monitoring-delegates.cpp @@ -73,6 +74,9 @@ target_sources(${APP_TARGET} PRIVATE ${ALL_CLUSTERS_COMMON}/src/static-supported-temperature-levels.cpp ${ENERGY_MANAGEMENT_COMMON}/src/EnergyEvseDelegateImpl.cpp ${ENERGY_MANAGEMENT_COMMON}/src/EnergyEvseManager.cpp + ${ENERGY_MANAGEMENT_COMMON}/src/DeviceEnergyManagementDelegateImpl.cpp + ${ENERGY_MANAGEMENT_COMMON}/src/DeviceEnergyManagementManager.cpp + ) chip_configure_data_model(${APP_TARGET} diff --git a/examples/all-clusters-app/nrfconnect/CMakeLists.txt b/examples/all-clusters-app/nrfconnect/CMakeLists.txt index 48499c29712d40..49bf4fb7f95e3a 100644 --- a/examples/all-clusters-app/nrfconnect/CMakeLists.txt +++ b/examples/all-clusters-app/nrfconnect/CMakeLists.txt @@ -65,10 +65,13 @@ target_sources(app PRIVATE ${ALL_CLUSTERS_COMMON_DIR}/src/fan-stub.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/oven-modes.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/energy-evse-stub.cpp + ${ALL_CLUSTERS_COMMON_DIR}/src/device-energy-management-stub.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/binding-handler.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/air-quality-instance.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/concentration-measurement-instances.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/resource-monitoring-delegates.cpp + ${ENERGY_MANAGEMENT_COMMON_DIR}/src/DeviceEnergyManagementDelegateImpl.cpp + ${ENERGY_MANAGEMENT_COMMON_DIR}/src/DeviceEnergyManagementManager.cpp ${ENERGY_MANAGEMENT_COMMON_DIR}/src/EnergyEvseDelegateImpl.cpp ${ENERGY_MANAGEMENT_COMMON_DIR}/src/EnergyEvseManager.cpp ${NRFCONNECT_COMMON}/util/LEDWidget.cpp) diff --git a/examples/all-clusters-app/nxp/mw320/BUILD.gn b/examples/all-clusters-app/nxp/mw320/BUILD.gn index 01bba26479a7af..a858c18e87fed2 100644 --- a/examples/all-clusters-app/nxp/mw320/BUILD.gn +++ b/examples/all-clusters-app/nxp/mw320/BUILD.gn @@ -78,6 +78,7 @@ mw320_executable("shell_mw320") { "${chip_root}/examples/all-clusters-app/all-clusters-common/src/air-quality-instance.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/concentration-measurement-instances.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/device-energy-management-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/energy-evse-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/oven-modes.cpp", @@ -85,6 +86,8 @@ mw320_executable("shell_mw320") { "${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp", + "${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementDelegateImpl.cpp", + "${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementManager.cpp", "${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp", "${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseManager.cpp", "${chip_root}/src/lib/shell/streamer_mw320.cpp", diff --git a/examples/all-clusters-app/openiotsdk/CMakeLists.txt b/examples/all-clusters-app/openiotsdk/CMakeLists.txt index 60b5bdddf40740..3b50f286b1683b 100644 --- a/examples/all-clusters-app/openiotsdk/CMakeLists.txt +++ b/examples/all-clusters-app/openiotsdk/CMakeLists.txt @@ -60,12 +60,15 @@ target_sources(${APP_TARGET} ${ALL_CLUSTERS_COMMON}/src/concentration-measurement-instances.cpp ${ALL_CLUSTERS_COMMON}/src/fan-stub.cpp ${ALL_CLUSTERS_COMMON}/src/oven-modes.cpp + ${ALL_CLUSTERS_COMMON}/src/device-energy-management-stub.cpp ${ALL_CLUSTERS_COMMON}/src/energy-evse-stub.cpp ${ALL_CLUSTERS_COMMON}/src/resource-monitoring-delegates.cpp ${ALL_CLUSTERS_COMMON}/src/static-supported-modes-manager.cpp ${ALL_CLUSTERS_COMMON}/src/binding-handler.cpp ${ENERGY_MANAGEMENT_COMMON}/src/EnergyEvseDelegateImpl.cpp ${ENERGY_MANAGEMENT_COMMON}/src/EnergyEvseManager.cpp + ${ENERGY_MANAGEMENT_COMMON}/src/DeviceEnergyManagementDelegateImpl.cpp + ${ENERGY_MANAGEMENT_COMMON}/src/DeviceEnergyManagementManager.cpp ) target_link_libraries(${APP_TARGET} diff --git a/examples/all-clusters-app/telink/CMakeLists.txt b/examples/all-clusters-app/telink/CMakeLists.txt index 7448fd76c4d91f..ae715a8c41ebfb 100644 --- a/examples/all-clusters-app/telink/CMakeLists.txt +++ b/examples/all-clusters-app/telink/CMakeLists.txt @@ -72,10 +72,6 @@ target_include_directories(app PRIVATE ${TELINK_COMMON}/common/include ${TELINK_COMMON}/util/include) -add_definitions( - "-DCHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=" -) - target_sources(app PRIVATE src/AppTask.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/smco-stub.cpp @@ -86,10 +82,13 @@ target_sources(app PRIVATE ${ALL_CLUSTERS_COMMON_DIR}/src/air-quality-instance.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/concentration-measurement-instances.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/fan-stub.cpp + ${ALL_CLUSTERS_COMMON_DIR}/src/device-energy-management-stub.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/energy-evse-stub.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/resource-monitoring-delegates.cpp ${ENERGY_MANAGEMENT_COMMON_DIR}/src/EnergyEvseDelegateImpl.cpp ${ENERGY_MANAGEMENT_COMMON_DIR}/src/EnergyEvseManager.cpp + ${ENERGY_MANAGEMENT_COMMON_DIR}/src/DeviceEnergyManagementDelegateImpl.cpp + ${ENERGY_MANAGEMENT_COMMON_DIR}/src/DeviceEnergyManagementManager.cpp ${TELINK_COMMON}/common/src/mainCommon.cpp ${TELINK_COMMON}/common/src/AppTaskCommon.cpp ${TELINK_COMMON}/util/src/LEDWidget.cpp @@ -101,3 +100,7 @@ chip_configure_data_model(app INCLUDE_SERVER ZAP_FILE ${ALL_CLUSTERS_COMMON_DIR}/all-clusters-app.zap ) + +if(CONFIG_BOOTLOADER_MCUBOOT) + target_sources(app PRIVATE ${TELINK_COMMON}/util/src/OTAUtil.cpp) +endif() diff --git a/examples/all-clusters-app/tizen/BUILD.gn b/examples/all-clusters-app/tizen/BUILD.gn index 202d288f87053c..e9bb7f56e4bfaa 100644 --- a/examples/all-clusters-app/tizen/BUILD.gn +++ b/examples/all-clusters-app/tizen/BUILD.gn @@ -27,6 +27,7 @@ source_set("chip-all-clusters-common") { "${chip_root}/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/concentration-measurement-instances.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/device-energy-management-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/energy-evse-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/oven-modes.cpp", @@ -34,6 +35,8 @@ source_set("chip-all-clusters-common") { "${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp", + "${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementDelegateImpl.cpp", + "${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementManager.cpp", "${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp", "${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseManager.cpp", ] 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 22ca859b26a104..dd01a2fb356f22 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; @@ -2521,72 +2328,265 @@ cluster BooleanState = 69 { cluster ModeSelect = 80 { revision 2; - bitmap Feature : bitmap32 { - kOnOff = 0x1; + bitmap Feature : bitmap32 { + kOnOff = 0x1; + } + + struct SemanticTagStruct { + vendor_id mfgCode = 0; + enum16 value = 1; + } + + struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + SemanticTagStruct semanticTags[] = 2; + } + + readonly attribute char_string<64> description = 0; + readonly attribute nullable enum16 standardNamespace = 1; + readonly attribute ModeOptionStruct supportedModes[] = 2; + readonly attribute int8u currentMode = 3; + attribute optional nullable int8u startUpMode = 4; + attribute optional nullable int8u onMode = 5; + 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 ChangeToModeRequest { + int8u newMode = 0; + } + + /** On receipt of this command, if the NewMode field matches the Mode field in an entry of the SupportedModes list, the server SHALL set the CurrentMode attribute to the NewMode value, otherwise, the server SHALL respond with an INVALID_COMMAND status response. */ + command ChangeToMode(ChangeToModeRequest): DefaultSuccess = 0; +} + +/** Attributes and commands for configuring the temperature control, and reporting temperature. */ +cluster TemperatureControl = 86 { + revision 1; // NOTE: Default/not specifically set + + bitmap Feature : bitmap32 { + kTemperatureNumber = 0x1; + kTemperatureLevel = 0x2; + kTemperatureStep = 0x4; + } + + readonly attribute optional temperature temperatureSetpoint = 0; + readonly attribute optional temperature minTemperature = 1; + readonly attribute optional temperature maxTemperature = 2; + readonly attribute optional temperature step = 3; + readonly attribute optional int8u selectedTemperatureLevel = 4; + readonly attribute optional char_string supportedTemperatureLevels[] = 5; + 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 SetTemperatureRequest { + optional temperature targetTemperature = 0; + optional int8u targetTemperatureLevel = 1; + } + + /** Set Temperature */ + 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; } - struct SemanticTagStruct { - vendor_id mfgCode = 0; - enum16 value = 1; + response struct StoreSceneResponse = 4 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; } - struct ModeOptionStruct { - char_string<64> label = 0; - int8u mode = 1; - SemanticTagStruct semanticTags[] = 2; + request struct RecallSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + optional nullable int16u transitionTime = 2; } - readonly attribute char_string<64> description = 0; - readonly attribute nullable enum16 standardNamespace = 1; - readonly attribute ModeOptionStruct supportedModes[] = 2; - readonly attribute int8u currentMode = 3; - attribute optional nullable int8u startUpMode = 4; - attribute optional nullable int8u onMode = 5; - 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 GetSceneMembershipRequest { + group_id groupID = 0; + } - request struct ChangeToModeRequest { - int8u newMode = 0; + response struct GetSceneMembershipResponse = 6 { + status status = 0; + nullable int8u capacity = 1; + group_id groupID = 2; + optional int8u sceneList[] = 3; } - /** On receipt of this command, if the NewMode field matches the Mode field in an entry of the SupportedModes list, the server SHALL set the CurrentMode attribute to the NewMode value, otherwise, the server SHALL respond with an INVALID_COMMAND status response. */ - command ChangeToMode(ChangeToModeRequest): DefaultSuccess = 0; -} + request struct EnhancedAddSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; + int16u transitionTime = 2; + char_string sceneName = 3; + ExtensionFieldSet extensionFieldSets[] = 4; + } -/** Attributes and commands for configuring the temperature control, and reporting temperature. */ -cluster TemperatureControl = 86 { - revision 1; // NOTE: Default/not specifically set + response struct EnhancedAddSceneResponse = 64 { + status status = 0; + group_id groupID = 1; + int8u sceneID = 2; + } - bitmap Feature : bitmap32 { - kTemperatureNumber = 0x1; - kTemperatureLevel = 0x2; - kTemperatureStep = 0x4; + request struct EnhancedViewSceneRequest { + group_id groupID = 0; + int8u sceneID = 1; } - readonly attribute optional temperature temperatureSetpoint = 0; - readonly attribute optional temperature minTemperature = 1; - readonly attribute optional temperature maxTemperature = 2; - readonly attribute optional temperature step = 3; - readonly attribute optional int8u selectedTemperatureLevel = 4; - readonly attribute optional char_string supportedTemperatureLevels[] = 5; - 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; + 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 SetTemperatureRequest { - optional temperature targetTemperature = 0; - optional int8u targetTemperatureLevel = 1; + request struct CopySceneRequest { + CopyModeBitmap mode = 0; + group_id groupIdentifierFrom = 1; + int8u sceneIdentifierFrom = 2; + group_id groupIdentifierTo = 3; + int8u sceneIdentifierTo = 4; } - /** Set Temperature */ - command SetTemperature(SetTemperatureRequest): DefaultSuccess = 0; + 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 */ @@ -3564,6 +3564,16 @@ cluster Thermostat = 513 { kCoolingAndHeatingWithReheat = 5; } + enum PresetScenarioEnum : enum8 { + kUnspecified = 0; + kOccupied = 1; + kUnoccupied = 2; + kSleep = 3; + kWake = 4; + kVacation = 5; + kUserDefined = 6; + } + enum SetpointChangeSourceEnum : enum8 { kManual = 0; kSchedule = 1; @@ -3625,6 +3635,10 @@ cluster Thermostat = 513 { kSetback = 0x10; kAutoMode = 0x20; kLocalTemperatureNotExposed = 0x40; + kMatterScheduleConfiguration = 0x80; + kPresets = 0x100; + kSetpoints = 0x200; + kQueuedPresetsSupported = 0x400; } bitmap HVACSystemTypeBitmap : bitmap8 { @@ -3634,6 +3648,11 @@ cluster Thermostat = 513 { kHeatingUsesFuel = 0x20; } + bitmap PresetTypeFeaturesBitmap : bitmap16 { + kAutomatic = 0x1; + kSupportsNames = 0x2; + } + bitmap ProgrammingOperationModeBitmap : bitmap8 { kScheduleActive = 0x1; kAutoRecovery = 0x2; @@ -3672,6 +3691,62 @@ cluster Thermostat = 513 { kCoolSetpointPresent = 0x2; } + bitmap ScheduleTypeFeaturesBitmap : bitmap16 { + kSupportsPresets = 0x1; + kSupportsSetpoints = 0x2; + kSupportsNames = 0x4; + kSupportsOff = 0x8; + } + + bitmap TemperatureSetpointHoldPolicyBitmap : bitmap8 { + kHoldDurationElapsed = 0x1; + kHoldDurationElapsedOrPresetChanged = 0x2; + } + + struct ScheduleTransitionStruct { + ScheduleDayOfWeekBitmap dayOfWeek = 0; + int16u transitionTime = 1; + optional octet_string<16> presetHandle = 2; + optional SystemModeEnum systemMode = 3; + optional temperature coolingSetpoint = 4; + optional temperature heatingSetpoint = 5; + } + + struct ScheduleStruct { + nullable octet_string<16> scheduleHandle = 0; + SystemModeEnum systemMode = 1; + optional char_string<64> name = 2; + optional octet_string<16> presetHandle = 3; + ScheduleTransitionStruct transitions[] = 4; + optional nullable boolean builtIn = 5; + } + + struct PresetStruct { + nullable octet_string<16> presetHandle = 0; + PresetScenarioEnum presetScenario = 1; + optional nullable char_string<64> name = 2; + optional temperature coolingSetpoint = 3; + optional temperature heatingSetpoint = 4; + nullable boolean builtIn = 5; + } + + struct PresetTypeStruct { + PresetScenarioEnum presetScenario = 0; + int8u numberOfPresets = 1; + PresetTypeFeaturesBitmap presetTypeFeatures = 2; + } + + struct QueuedPresetStruct { + nullable octet_string<16> presetHandle = 0; + nullable epoch_s transitionTimestamp = 1; + } + + struct ScheduleTypeStruct { + SystemModeEnum systemMode = 0; + int8u numberOfSchedules = 1; + ScheduleTypeFeaturesBitmap scheduleTypeFeatures = 2; + } + struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; nullable temperature heatSetpoint = 1; @@ -3727,6 +3802,20 @@ cluster Thermostat = 513 { attribute access(write: manage) optional ACLouverPositionEnum ACLouverPosition = 69; readonly attribute optional nullable temperature ACCoilTemperature = 70; attribute access(write: manage) optional ACCapacityFormatEnum ACCapacityformat = 71; + readonly attribute optional PresetTypeStruct presetTypes[] = 72; + readonly attribute optional ScheduleTypeStruct scheduleTypes[] = 73; + readonly attribute optional int8u numberOfPresets = 74; + readonly attribute optional int8u numberOfSchedules = 75; + readonly attribute optional int8u numberOfScheduleTransitions = 76; + readonly attribute optional nullable int8u numberOfScheduleTransitionPerDay = 77; + readonly attribute optional nullable octet_string<16> activePresetHandle = 78; + readonly attribute optional nullable octet_string<16> activeScheduleHandle = 79; + attribute access(write: manage) optional PresetStruct presets[] = 80; + attribute access(write: manage) optional ScheduleStruct schedules[] = 81; + readonly attribute optional boolean presetsSchedulesEditable = 82; + readonly attribute optional TemperatureSetpointHoldPolicyBitmap temperatureSetpointHoldPolicy = 83; + readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 84; + readonly attribute optional nullable QueuedPresetStruct queuedPreset = 85; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -3758,14 +3847,45 @@ cluster Thermostat = 513 { ScheduleModeBitmap modeToReturn = 1; } + request struct SetActiveScheduleRequestRequest { + octet_string<16> scheduleHandle = 0; + } + + request struct SetActivePresetRequestRequest { + octet_string<16> presetHandle = 0; + optional int16u delayMinutes = 1; + } + + request struct StartPresetsSchedulesEditRequestRequest { + int16u timeoutSeconds = 0; + } + + request struct SetTemperatureSetpointHoldPolicyRequest { + TemperatureSetpointHoldPolicyBitmap temperatureSetpointHoldPolicy = 0; + } + /** Command description for SetpointRaiseLower */ command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; /** Command description for SetWeeklySchedule */ command access(invoke: manage) SetWeeklySchedule(SetWeeklyScheduleRequest): DefaultSuccess = 1; /** Command description for GetWeeklySchedule */ command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; - /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ + /** This command is used to clear the weekly schedule. The ClearWeeklySchedule command has no payload. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; + /** This command is used to set the active schedule. */ + command SetActiveScheduleRequest(SetActiveScheduleRequestRequest): DefaultSuccess = 5; + /** This command is used to set the active preset. */ + command SetActivePresetRequest(SetActivePresetRequestRequest): DefaultSuccess = 6; + /** This command is used to start editing the presets and schedules. */ + command access(invoke: manage) StartPresetsSchedulesEditRequest(StartPresetsSchedulesEditRequestRequest): DefaultSuccess = 7; + /** This command is used to cancel editing presets and schedules. */ + command access(invoke: manage) CancelPresetsSchedulesEditRequest(): DefaultSuccess = 8; + /** This command is used to notify the server that all edits are done and should be committed. */ + command access(invoke: manage) CommitPresetsSchedulesRequest(): DefaultSuccess = 9; + /** This command is sent to cancel a queued preset. */ + command access(invoke: manage) CancelSetActivePresetRequest(): DefaultSuccess = 10; + /** This command sets the set point hold policy. */ + command SetTemperatureSetpointHoldPolicy(SetTemperatureSetpointHoldPolicyRequest): DefaultSuccess = 11; } /** An interface for controlling a fan in a heating/cooling system. */ @@ -5940,6 +6060,9 @@ endpoint 0 { ram attribute lastNetworkingStatus; ram attribute lastNetworkID; ram attribute lastConnectErrorValue; + callback attribute supportedWiFiBands; + callback attribute supportedThreadFeatures; + callback attribute threadVersion; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; @@ -6158,33 +6281,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; @@ -6315,6 +6411,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; @@ -6718,32 +6841,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; @@ -6791,6 +6888,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..5aff52c41cca6b 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 @@ -2235,6 +2235,54 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SupportedWiFiBands", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedThreadFeatures", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "ThreadCapabilitiesBitmap", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ThreadVersion", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "GeneratedCommandList", "code": 65528, @@ -4551,8 +4599,8 @@ ] }, { - "name": "Scenes", - "code": 5, + "name": "Scenes Management", + "code": 98, "mfgCode": null, "define": "SCENES_CLUSTER", "side": "server", @@ -6851,7 +6899,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -6899,7 +6947,7 @@ "code": 28, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "SystemModeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -10787,8 +10835,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/esp32/main/CMakeLists.txt b/examples/all-clusters-minimal-app/esp32/main/CMakeLists.txt index cb38515a1a8770..cae8b64315a232 100644 --- a/examples/all-clusters-minimal-app/esp32/main/CMakeLists.txt +++ b/examples/all-clusters-minimal-app/esp32/main/CMakeLists.txt @@ -81,6 +81,7 @@ set(SRC_DIRS_LIST "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/diagnostic-logs-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/door-lock-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/occupancy-sensor-server" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/device-energy-management-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/energy-evse-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/ethernet-network-diagnostics-server" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/localization-configuration-server" diff --git a/examples/all-clusters-minimal-app/telink/CMakeLists.txt b/examples/all-clusters-minimal-app/telink/CMakeLists.txt index a7bb51ba0e67fe..a68471e379a842 100644 --- a/examples/all-clusters-minimal-app/telink/CMakeLists.txt +++ b/examples/all-clusters-minimal-app/telink/CMakeLists.txt @@ -70,10 +70,6 @@ target_include_directories(app PRIVATE ${TELINK_COMMON}/common/include ${TELINK_COMMON}/util/include) -add_definitions( - "-DCHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=" -) - target_sources(app PRIVATE src/AppTask.cpp ${ALL_CLUSTERS_COMMON_DIR}/src/smco-stub.cpp @@ -90,3 +86,7 @@ chip_configure_data_model(app INCLUDE_SERVER ZAP_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../all-clusters-common/all-clusters-minimal-app.zap ) + +if(CONFIG_BOOTLOADER_MCUBOOT) + target_sources(app PRIVATE ${TELINK_COMMON}/util/src/OTAUtil.cpp) +endif() diff --git a/examples/bridge-app/telink/CMakeLists.txt b/examples/bridge-app/telink/CMakeLists.txt index 1b65dc3bf543e7..f4da959953def8 100644 --- a/examples/bridge-app/telink/CMakeLists.txt +++ b/examples/bridge-app/telink/CMakeLists.txt @@ -69,11 +69,6 @@ target_include_directories(app PRIVATE ${TELINK_COMMON}/util/include ${TELINK_COMMON}/app/include) -add_definitions( - "-DCHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=" - -DCHIP_DEVICE_CONFIG_DYNAMIC_ENDPOINT_COUNT=16 -) - target_sources(app PRIVATE src/AppTask.cpp src/ZclCallbacks.cpp @@ -90,3 +85,7 @@ chip_configure_data_model(app INCLUDE_SERVER ZAP_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../bridge-common/bridge-app.zap ) + +if(CONFIG_BOOTLOADER_MCUBOOT) + target_sources(app PRIVATE ${TELINK_COMMON}/util/src/OTAUtil.cpp) +endif() diff --git a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter index 6066dc34eedb2e..df276f6ab3fce3 100644 --- a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter +++ b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter @@ -1177,6 +1177,16 @@ cluster Thermostat = 513 { kCoolingAndHeatingWithReheat = 5; } + enum PresetScenarioEnum : enum8 { + kUnspecified = 0; + kOccupied = 1; + kUnoccupied = 2; + kSleep = 3; + kWake = 4; + kVacation = 5; + kUserDefined = 6; + } + enum SetpointChangeSourceEnum : enum8 { kManual = 0; kSchedule = 1; @@ -1238,6 +1248,10 @@ cluster Thermostat = 513 { kSetback = 0x10; kAutoMode = 0x20; kLocalTemperatureNotExposed = 0x40; + kMatterScheduleConfiguration = 0x80; + kPresets = 0x100; + kSetpoints = 0x200; + kQueuedPresetsSupported = 0x400; } bitmap HVACSystemTypeBitmap : bitmap8 { @@ -1247,6 +1261,11 @@ cluster Thermostat = 513 { kHeatingUsesFuel = 0x20; } + bitmap PresetTypeFeaturesBitmap : bitmap16 { + kAutomatic = 0x1; + kSupportsNames = 0x2; + } + bitmap ProgrammingOperationModeBitmap : bitmap8 { kScheduleActive = 0x1; kAutoRecovery = 0x2; @@ -1285,6 +1304,62 @@ cluster Thermostat = 513 { kCoolSetpointPresent = 0x2; } + bitmap ScheduleTypeFeaturesBitmap : bitmap16 { + kSupportsPresets = 0x1; + kSupportsSetpoints = 0x2; + kSupportsNames = 0x4; + kSupportsOff = 0x8; + } + + bitmap TemperatureSetpointHoldPolicyBitmap : bitmap8 { + kHoldDurationElapsed = 0x1; + kHoldDurationElapsedOrPresetChanged = 0x2; + } + + struct ScheduleTransitionStruct { + ScheduleDayOfWeekBitmap dayOfWeek = 0; + int16u transitionTime = 1; + optional octet_string<16> presetHandle = 2; + optional SystemModeEnum systemMode = 3; + optional temperature coolingSetpoint = 4; + optional temperature heatingSetpoint = 5; + } + + struct ScheduleStruct { + nullable octet_string<16> scheduleHandle = 0; + SystemModeEnum systemMode = 1; + optional char_string<64> name = 2; + optional octet_string<16> presetHandle = 3; + ScheduleTransitionStruct transitions[] = 4; + optional nullable boolean builtIn = 5; + } + + struct PresetStruct { + nullable octet_string<16> presetHandle = 0; + PresetScenarioEnum presetScenario = 1; + optional nullable char_string<64> name = 2; + optional temperature coolingSetpoint = 3; + optional temperature heatingSetpoint = 4; + nullable boolean builtIn = 5; + } + + struct PresetTypeStruct { + PresetScenarioEnum presetScenario = 0; + int8u numberOfPresets = 1; + PresetTypeFeaturesBitmap presetTypeFeatures = 2; + } + + struct QueuedPresetStruct { + nullable octet_string<16> presetHandle = 0; + nullable epoch_s transitionTimestamp = 1; + } + + struct ScheduleTypeStruct { + SystemModeEnum systemMode = 0; + int8u numberOfSchedules = 1; + ScheduleTypeFeaturesBitmap scheduleTypeFeatures = 2; + } + struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; nullable temperature heatSetpoint = 1; @@ -1340,6 +1415,20 @@ cluster Thermostat = 513 { attribute access(write: manage) optional ACLouverPositionEnum ACLouverPosition = 69; readonly attribute optional nullable temperature ACCoilTemperature = 70; attribute access(write: manage) optional ACCapacityFormatEnum ACCapacityformat = 71; + readonly attribute optional PresetTypeStruct presetTypes[] = 72; + readonly attribute optional ScheduleTypeStruct scheduleTypes[] = 73; + readonly attribute optional int8u numberOfPresets = 74; + readonly attribute optional int8u numberOfSchedules = 75; + readonly attribute optional int8u numberOfScheduleTransitions = 76; + readonly attribute optional nullable int8u numberOfScheduleTransitionPerDay = 77; + readonly attribute optional nullable octet_string<16> activePresetHandle = 78; + readonly attribute optional nullable octet_string<16> activeScheduleHandle = 79; + attribute access(write: manage) optional PresetStruct presets[] = 80; + attribute access(write: manage) optional ScheduleStruct schedules[] = 81; + readonly attribute optional boolean presetsSchedulesEditable = 82; + readonly attribute optional TemperatureSetpointHoldPolicyBitmap temperatureSetpointHoldPolicy = 83; + readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 84; + readonly attribute optional nullable QueuedPresetStruct queuedPreset = 85; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1371,14 +1460,45 @@ cluster Thermostat = 513 { ScheduleModeBitmap modeToReturn = 1; } + request struct SetActiveScheduleRequestRequest { + octet_string<16> scheduleHandle = 0; + } + + request struct SetActivePresetRequestRequest { + octet_string<16> presetHandle = 0; + optional int16u delayMinutes = 1; + } + + request struct StartPresetsSchedulesEditRequestRequest { + int16u timeoutSeconds = 0; + } + + request struct SetTemperatureSetpointHoldPolicyRequest { + TemperatureSetpointHoldPolicyBitmap temperatureSetpointHoldPolicy = 0; + } + /** Command description for SetpointRaiseLower */ command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; /** Command description for SetWeeklySchedule */ command access(invoke: manage) SetWeeklySchedule(SetWeeklyScheduleRequest): DefaultSuccess = 1; /** Command description for GetWeeklySchedule */ command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; - /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ + /** This command is used to clear the weekly schedule. The ClearWeeklySchedule command has no payload. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; + /** This command is used to set the active schedule. */ + command SetActiveScheduleRequest(SetActiveScheduleRequestRequest): DefaultSuccess = 5; + /** This command is used to set the active preset. */ + command SetActivePresetRequest(SetActivePresetRequestRequest): DefaultSuccess = 6; + /** This command is used to start editing the presets and schedules. */ + command access(invoke: manage) StartPresetsSchedulesEditRequest(StartPresetsSchedulesEditRequestRequest): DefaultSuccess = 7; + /** This command is used to cancel editing presets and schedules. */ + command access(invoke: manage) CancelPresetsSchedulesEditRequest(): DefaultSuccess = 8; + /** This command is used to notify the server that all edits are done and should be committed. */ + command access(invoke: manage) CommitPresetsSchedulesRequest(): DefaultSuccess = 9; + /** This command is sent to cancel a queued preset. */ + command access(invoke: manage) CancelSetActivePresetRequest(): DefaultSuccess = 10; + /** This command sets the set point hold policy. */ + command SetTemperatureSetpointHoldPolicy(SetTemperatureSetpointHoldPolicyRequest): DefaultSuccess = 11; } /** An interface for controlling a fan in a heating/cooling system. */ diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter index 741d7b25fef7db..ed16842ca4a281 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter @@ -1534,6 +1534,16 @@ cluster Thermostat = 513 { kCoolingAndHeatingWithReheat = 5; } + enum PresetScenarioEnum : enum8 { + kUnspecified = 0; + kOccupied = 1; + kUnoccupied = 2; + kSleep = 3; + kWake = 4; + kVacation = 5; + kUserDefined = 6; + } + enum SetpointChangeSourceEnum : enum8 { kManual = 0; kSchedule = 1; @@ -1595,6 +1605,10 @@ cluster Thermostat = 513 { kSetback = 0x10; kAutoMode = 0x20; kLocalTemperatureNotExposed = 0x40; + kMatterScheduleConfiguration = 0x80; + kPresets = 0x100; + kSetpoints = 0x200; + kQueuedPresetsSupported = 0x400; } bitmap HVACSystemTypeBitmap : bitmap8 { @@ -1604,6 +1618,11 @@ cluster Thermostat = 513 { kHeatingUsesFuel = 0x20; } + bitmap PresetTypeFeaturesBitmap : bitmap16 { + kAutomatic = 0x1; + kSupportsNames = 0x2; + } + bitmap ProgrammingOperationModeBitmap : bitmap8 { kScheduleActive = 0x1; kAutoRecovery = 0x2; @@ -1642,6 +1661,62 @@ cluster Thermostat = 513 { kCoolSetpointPresent = 0x2; } + bitmap ScheduleTypeFeaturesBitmap : bitmap16 { + kSupportsPresets = 0x1; + kSupportsSetpoints = 0x2; + kSupportsNames = 0x4; + kSupportsOff = 0x8; + } + + bitmap TemperatureSetpointHoldPolicyBitmap : bitmap8 { + kHoldDurationElapsed = 0x1; + kHoldDurationElapsedOrPresetChanged = 0x2; + } + + struct ScheduleTransitionStruct { + ScheduleDayOfWeekBitmap dayOfWeek = 0; + int16u transitionTime = 1; + optional octet_string<16> presetHandle = 2; + optional SystemModeEnum systemMode = 3; + optional temperature coolingSetpoint = 4; + optional temperature heatingSetpoint = 5; + } + + struct ScheduleStruct { + nullable octet_string<16> scheduleHandle = 0; + SystemModeEnum systemMode = 1; + optional char_string<64> name = 2; + optional octet_string<16> presetHandle = 3; + ScheduleTransitionStruct transitions[] = 4; + optional nullable boolean builtIn = 5; + } + + struct PresetStruct { + nullable octet_string<16> presetHandle = 0; + PresetScenarioEnum presetScenario = 1; + optional nullable char_string<64> name = 2; + optional temperature coolingSetpoint = 3; + optional temperature heatingSetpoint = 4; + nullable boolean builtIn = 5; + } + + struct PresetTypeStruct { + PresetScenarioEnum presetScenario = 0; + int8u numberOfPresets = 1; + PresetTypeFeaturesBitmap presetTypeFeatures = 2; + } + + struct QueuedPresetStruct { + nullable octet_string<16> presetHandle = 0; + nullable epoch_s transitionTimestamp = 1; + } + + struct ScheduleTypeStruct { + SystemModeEnum systemMode = 0; + int8u numberOfSchedules = 1; + ScheduleTypeFeaturesBitmap scheduleTypeFeatures = 2; + } + struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; nullable temperature heatSetpoint = 1; @@ -1697,6 +1772,20 @@ cluster Thermostat = 513 { attribute access(write: manage) optional ACLouverPositionEnum ACLouverPosition = 69; readonly attribute optional nullable temperature ACCoilTemperature = 70; attribute access(write: manage) optional ACCapacityFormatEnum ACCapacityformat = 71; + readonly attribute optional PresetTypeStruct presetTypes[] = 72; + readonly attribute optional ScheduleTypeStruct scheduleTypes[] = 73; + readonly attribute optional int8u numberOfPresets = 74; + readonly attribute optional int8u numberOfSchedules = 75; + readonly attribute optional int8u numberOfScheduleTransitions = 76; + readonly attribute optional nullable int8u numberOfScheduleTransitionPerDay = 77; + readonly attribute optional nullable octet_string<16> activePresetHandle = 78; + readonly attribute optional nullable octet_string<16> activeScheduleHandle = 79; + attribute access(write: manage) optional PresetStruct presets[] = 80; + attribute access(write: manage) optional ScheduleStruct schedules[] = 81; + readonly attribute optional boolean presetsSchedulesEditable = 82; + readonly attribute optional TemperatureSetpointHoldPolicyBitmap temperatureSetpointHoldPolicy = 83; + readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 84; + readonly attribute optional nullable QueuedPresetStruct queuedPreset = 85; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1728,14 +1817,45 @@ cluster Thermostat = 513 { ScheduleModeBitmap modeToReturn = 1; } + request struct SetActiveScheduleRequestRequest { + octet_string<16> scheduleHandle = 0; + } + + request struct SetActivePresetRequestRequest { + octet_string<16> presetHandle = 0; + optional int16u delayMinutes = 1; + } + + request struct StartPresetsSchedulesEditRequestRequest { + int16u timeoutSeconds = 0; + } + + request struct SetTemperatureSetpointHoldPolicyRequest { + TemperatureSetpointHoldPolicyBitmap temperatureSetpointHoldPolicy = 0; + } + /** Command description for SetpointRaiseLower */ command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; /** Command description for SetWeeklySchedule */ command access(invoke: manage) SetWeeklySchedule(SetWeeklyScheduleRequest): DefaultSuccess = 1; /** Command description for GetWeeklySchedule */ command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; - /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ + /** This command is used to clear the weekly schedule. The ClearWeeklySchedule command has no payload. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; + /** This command is used to set the active schedule. */ + command SetActiveScheduleRequest(SetActiveScheduleRequestRequest): DefaultSuccess = 5; + /** This command is used to set the active preset. */ + command SetActivePresetRequest(SetActivePresetRequestRequest): DefaultSuccess = 6; + /** This command is used to start editing the presets and schedules. */ + command access(invoke: manage) StartPresetsSchedulesEditRequest(StartPresetsSchedulesEditRequestRequest): DefaultSuccess = 7; + /** This command is used to cancel editing presets and schedules. */ + command access(invoke: manage) CancelPresetsSchedulesEditRequest(): DefaultSuccess = 8; + /** This command is used to notify the server that all edits are done and should be committed. */ + command access(invoke: manage) CommitPresetsSchedulesRequest(): DefaultSuccess = 9; + /** This command is sent to cancel a queued preset. */ + command access(invoke: manage) CancelSetActivePresetRequest(): DefaultSuccess = 10; + /** This command sets the set point hold policy. */ + command SetTemperatureSetpointHoldPolicy(SetTemperatureSetpointHoldPolicyRequest): DefaultSuccess = 11; } /** An interface for controlling a fan in a heating/cooling system. */ diff --git a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter index fb79f75aa6244a..cea46e31fad3fc 100644 --- a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter +++ b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter @@ -1005,6 +1005,7 @@ cluster RvcRunMode = 84 { enum ModeTag : enum16 { kIdle = 16384; kCleaning = 16385; + kMapping = 16386; } enum StatusCode : enum8 { diff --git a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter index af70a8875073c9..6797456a6b6091 100644 --- a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter +++ b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter @@ -1117,6 +1117,16 @@ cluster Thermostat = 513 { kCoolingAndHeatingWithReheat = 5; } + enum PresetScenarioEnum : enum8 { + kUnspecified = 0; + kOccupied = 1; + kUnoccupied = 2; + kSleep = 3; + kWake = 4; + kVacation = 5; + kUserDefined = 6; + } + enum SetpointChangeSourceEnum : enum8 { kManual = 0; kSchedule = 1; @@ -1178,6 +1188,10 @@ cluster Thermostat = 513 { kSetback = 0x10; kAutoMode = 0x20; kLocalTemperatureNotExposed = 0x40; + kMatterScheduleConfiguration = 0x80; + kPresets = 0x100; + kSetpoints = 0x200; + kQueuedPresetsSupported = 0x400; } bitmap HVACSystemTypeBitmap : bitmap8 { @@ -1187,6 +1201,11 @@ cluster Thermostat = 513 { kHeatingUsesFuel = 0x20; } + bitmap PresetTypeFeaturesBitmap : bitmap16 { + kAutomatic = 0x1; + kSupportsNames = 0x2; + } + bitmap ProgrammingOperationModeBitmap : bitmap8 { kScheduleActive = 0x1; kAutoRecovery = 0x2; @@ -1225,6 +1244,62 @@ cluster Thermostat = 513 { kCoolSetpointPresent = 0x2; } + bitmap ScheduleTypeFeaturesBitmap : bitmap16 { + kSupportsPresets = 0x1; + kSupportsSetpoints = 0x2; + kSupportsNames = 0x4; + kSupportsOff = 0x8; + } + + bitmap TemperatureSetpointHoldPolicyBitmap : bitmap8 { + kHoldDurationElapsed = 0x1; + kHoldDurationElapsedOrPresetChanged = 0x2; + } + + struct ScheduleTransitionStruct { + ScheduleDayOfWeekBitmap dayOfWeek = 0; + int16u transitionTime = 1; + optional octet_string<16> presetHandle = 2; + optional SystemModeEnum systemMode = 3; + optional temperature coolingSetpoint = 4; + optional temperature heatingSetpoint = 5; + } + + struct ScheduleStruct { + nullable octet_string<16> scheduleHandle = 0; + SystemModeEnum systemMode = 1; + optional char_string<64> name = 2; + optional octet_string<16> presetHandle = 3; + ScheduleTransitionStruct transitions[] = 4; + optional nullable boolean builtIn = 5; + } + + struct PresetStruct { + nullable octet_string<16> presetHandle = 0; + PresetScenarioEnum presetScenario = 1; + optional nullable char_string<64> name = 2; + optional temperature coolingSetpoint = 3; + optional temperature heatingSetpoint = 4; + nullable boolean builtIn = 5; + } + + struct PresetTypeStruct { + PresetScenarioEnum presetScenario = 0; + int8u numberOfPresets = 1; + PresetTypeFeaturesBitmap presetTypeFeatures = 2; + } + + struct QueuedPresetStruct { + nullable octet_string<16> presetHandle = 0; + nullable epoch_s transitionTimestamp = 1; + } + + struct ScheduleTypeStruct { + SystemModeEnum systemMode = 0; + int8u numberOfSchedules = 1; + ScheduleTypeFeaturesBitmap scheduleTypeFeatures = 2; + } + struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; nullable temperature heatSetpoint = 1; @@ -1280,6 +1355,20 @@ cluster Thermostat = 513 { attribute access(write: manage) optional ACLouverPositionEnum ACLouverPosition = 69; readonly attribute optional nullable temperature ACCoilTemperature = 70; attribute access(write: manage) optional ACCapacityFormatEnum ACCapacityformat = 71; + readonly attribute optional PresetTypeStruct presetTypes[] = 72; + readonly attribute optional ScheduleTypeStruct scheduleTypes[] = 73; + readonly attribute optional int8u numberOfPresets = 74; + readonly attribute optional int8u numberOfSchedules = 75; + readonly attribute optional int8u numberOfScheduleTransitions = 76; + readonly attribute optional nullable int8u numberOfScheduleTransitionPerDay = 77; + readonly attribute optional nullable octet_string<16> activePresetHandle = 78; + readonly attribute optional nullable octet_string<16> activeScheduleHandle = 79; + attribute access(write: manage) optional PresetStruct presets[] = 80; + attribute access(write: manage) optional ScheduleStruct schedules[] = 81; + readonly attribute optional boolean presetsSchedulesEditable = 82; + readonly attribute optional TemperatureSetpointHoldPolicyBitmap temperatureSetpointHoldPolicy = 83; + readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 84; + readonly attribute optional nullable QueuedPresetStruct queuedPreset = 85; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1311,14 +1400,45 @@ cluster Thermostat = 513 { ScheduleModeBitmap modeToReturn = 1; } + request struct SetActiveScheduleRequestRequest { + octet_string<16> scheduleHandle = 0; + } + + request struct SetActivePresetRequestRequest { + octet_string<16> presetHandle = 0; + optional int16u delayMinutes = 1; + } + + request struct StartPresetsSchedulesEditRequestRequest { + int16u timeoutSeconds = 0; + } + + request struct SetTemperatureSetpointHoldPolicyRequest { + TemperatureSetpointHoldPolicyBitmap temperatureSetpointHoldPolicy = 0; + } + /** Command description for SetpointRaiseLower */ command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; /** Command description for SetWeeklySchedule */ command access(invoke: manage) SetWeeklySchedule(SetWeeklyScheduleRequest): DefaultSuccess = 1; /** Command description for GetWeeklySchedule */ command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; - /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ + /** This command is used to clear the weekly schedule. The ClearWeeklySchedule command has no payload. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; + /** This command is used to set the active schedule. */ + command SetActiveScheduleRequest(SetActiveScheduleRequestRequest): DefaultSuccess = 5; + /** This command is used to set the active preset. */ + command SetActivePresetRequest(SetActivePresetRequestRequest): DefaultSuccess = 6; + /** This command is used to start editing the presets and schedules. */ + command access(invoke: manage) StartPresetsSchedulesEditRequest(StartPresetsSchedulesEditRequestRequest): DefaultSuccess = 7; + /** This command is used to cancel editing presets and schedules. */ + command access(invoke: manage) CancelPresetsSchedulesEditRequest(): DefaultSuccess = 8; + /** This command is used to notify the server that all edits are done and should be committed. */ + command access(invoke: manage) CommitPresetsSchedulesRequest(): DefaultSuccess = 9; + /** This command is sent to cancel a queued preset. */ + command access(invoke: manage) CancelSetActivePresetRequest(): DefaultSuccess = 10; + /** This command sets the set point hold policy. */ + command SetTemperatureSetpointHoldPolicy(SetTemperatureSetpointHoldPolicyRequest): DefaultSuccess = 11; } /** An interface for controlling a fan in a heating/cooling system. */ diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter index 26bd437442d209..30163a05f14a9a 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter @@ -1337,6 +1337,16 @@ cluster Thermostat = 513 { kCoolingAndHeatingWithReheat = 5; } + enum PresetScenarioEnum : enum8 { + kUnspecified = 0; + kOccupied = 1; + kUnoccupied = 2; + kSleep = 3; + kWake = 4; + kVacation = 5; + kUserDefined = 6; + } + enum SetpointChangeSourceEnum : enum8 { kManual = 0; kSchedule = 1; @@ -1398,6 +1408,10 @@ cluster Thermostat = 513 { kSetback = 0x10; kAutoMode = 0x20; kLocalTemperatureNotExposed = 0x40; + kMatterScheduleConfiguration = 0x80; + kPresets = 0x100; + kSetpoints = 0x200; + kQueuedPresetsSupported = 0x400; } bitmap HVACSystemTypeBitmap : bitmap8 { @@ -1407,6 +1421,11 @@ cluster Thermostat = 513 { kHeatingUsesFuel = 0x20; } + bitmap PresetTypeFeaturesBitmap : bitmap16 { + kAutomatic = 0x1; + kSupportsNames = 0x2; + } + bitmap ProgrammingOperationModeBitmap : bitmap8 { kScheduleActive = 0x1; kAutoRecovery = 0x2; @@ -1445,6 +1464,62 @@ cluster Thermostat = 513 { kCoolSetpointPresent = 0x2; } + bitmap ScheduleTypeFeaturesBitmap : bitmap16 { + kSupportsPresets = 0x1; + kSupportsSetpoints = 0x2; + kSupportsNames = 0x4; + kSupportsOff = 0x8; + } + + bitmap TemperatureSetpointHoldPolicyBitmap : bitmap8 { + kHoldDurationElapsed = 0x1; + kHoldDurationElapsedOrPresetChanged = 0x2; + } + + struct ScheduleTransitionStruct { + ScheduleDayOfWeekBitmap dayOfWeek = 0; + int16u transitionTime = 1; + optional octet_string<16> presetHandle = 2; + optional SystemModeEnum systemMode = 3; + optional temperature coolingSetpoint = 4; + optional temperature heatingSetpoint = 5; + } + + struct ScheduleStruct { + nullable octet_string<16> scheduleHandle = 0; + SystemModeEnum systemMode = 1; + optional char_string<64> name = 2; + optional octet_string<16> presetHandle = 3; + ScheduleTransitionStruct transitions[] = 4; + optional nullable boolean builtIn = 5; + } + + struct PresetStruct { + nullable octet_string<16> presetHandle = 0; + PresetScenarioEnum presetScenario = 1; + optional nullable char_string<64> name = 2; + optional temperature coolingSetpoint = 3; + optional temperature heatingSetpoint = 4; + nullable boolean builtIn = 5; + } + + struct PresetTypeStruct { + PresetScenarioEnum presetScenario = 0; + int8u numberOfPresets = 1; + PresetTypeFeaturesBitmap presetTypeFeatures = 2; + } + + struct QueuedPresetStruct { + nullable octet_string<16> presetHandle = 0; + nullable epoch_s transitionTimestamp = 1; + } + + struct ScheduleTypeStruct { + SystemModeEnum systemMode = 0; + int8u numberOfSchedules = 1; + ScheduleTypeFeaturesBitmap scheduleTypeFeatures = 2; + } + struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; nullable temperature heatSetpoint = 1; @@ -1500,6 +1575,20 @@ cluster Thermostat = 513 { attribute access(write: manage) optional ACLouverPositionEnum ACLouverPosition = 69; readonly attribute optional nullable temperature ACCoilTemperature = 70; attribute access(write: manage) optional ACCapacityFormatEnum ACCapacityformat = 71; + readonly attribute optional PresetTypeStruct presetTypes[] = 72; + readonly attribute optional ScheduleTypeStruct scheduleTypes[] = 73; + readonly attribute optional int8u numberOfPresets = 74; + readonly attribute optional int8u numberOfSchedules = 75; + readonly attribute optional int8u numberOfScheduleTransitions = 76; + readonly attribute optional nullable int8u numberOfScheduleTransitionPerDay = 77; + readonly attribute optional nullable octet_string<16> activePresetHandle = 78; + readonly attribute optional nullable octet_string<16> activeScheduleHandle = 79; + attribute access(write: manage) optional PresetStruct presets[] = 80; + attribute access(write: manage) optional ScheduleStruct schedules[] = 81; + readonly attribute optional boolean presetsSchedulesEditable = 82; + readonly attribute optional TemperatureSetpointHoldPolicyBitmap temperatureSetpointHoldPolicy = 83; + readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 84; + readonly attribute optional nullable QueuedPresetStruct queuedPreset = 85; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1531,14 +1620,45 @@ cluster Thermostat = 513 { ScheduleModeBitmap modeToReturn = 1; } + request struct SetActiveScheduleRequestRequest { + octet_string<16> scheduleHandle = 0; + } + + request struct SetActivePresetRequestRequest { + octet_string<16> presetHandle = 0; + optional int16u delayMinutes = 1; + } + + request struct StartPresetsSchedulesEditRequestRequest { + int16u timeoutSeconds = 0; + } + + request struct SetTemperatureSetpointHoldPolicyRequest { + TemperatureSetpointHoldPolicyBitmap temperatureSetpointHoldPolicy = 0; + } + /** Command description for SetpointRaiseLower */ command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; /** Command description for SetWeeklySchedule */ command access(invoke: manage) SetWeeklySchedule(SetWeeklyScheduleRequest): DefaultSuccess = 1; /** Command description for GetWeeklySchedule */ command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; - /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ + /** This command is used to clear the weekly schedule. The ClearWeeklySchedule command has no payload. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; + /** This command is used to set the active schedule. */ + command SetActiveScheduleRequest(SetActiveScheduleRequestRequest): DefaultSuccess = 5; + /** This command is used to set the active preset. */ + command SetActivePresetRequest(SetActivePresetRequestRequest): DefaultSuccess = 6; + /** This command is used to start editing the presets and schedules. */ + command access(invoke: manage) StartPresetsSchedulesEditRequest(StartPresetsSchedulesEditRequestRequest): DefaultSuccess = 7; + /** This command is used to cancel editing presets and schedules. */ + command access(invoke: manage) CancelPresetsSchedulesEditRequest(): DefaultSuccess = 8; + /** This command is used to notify the server that all edits are done and should be committed. */ + command access(invoke: manage) CommitPresetsSchedulesRequest(): DefaultSuccess = 9; + /** This command is sent to cancel a queued preset. */ + command access(invoke: manage) CancelSetActivePresetRequest(): DefaultSuccess = 10; + /** This command sets the set point hold policy. */ + command SetTemperatureSetpointHoldPolicy(SetTemperatureSetpointHoldPolicyRequest): DefaultSuccess = 11; } /** An interface for controlling a fan in a heating/cooling system. */ 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/chef/telink/CMakeLists.txt b/examples/chef/telink/CMakeLists.txt index 7722f26a11d96e..5d30d424ea3dfd 100755 --- a/examples/chef/telink/CMakeLists.txt +++ b/examples/chef/telink/CMakeLists.txt @@ -92,10 +92,6 @@ if (CONFIG_CHIP_LIB_SHELL) ) endif() -add_definitions( - "-DCHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=" -) - target_sources(app PRIVATE src/AppTask.cpp ${TELINK_COMMON}/common/src/mainCommon.cpp @@ -113,6 +109,10 @@ chip_configure_data_model(app ZAP_FILE ${CHEF}/devices/${SAMPLE_NAME}.zap ) +if(CONFIG_BOOTLOADER_MCUBOOT) + target_sources(app PRIVATE ${TELINK_COMMON}/util/src/OTAUtil.cpp) +endif() + if (CONFIG_CHIP_PW_RPC) # Make all targets created below depend on zephyr_interface to inherit MCU-related compilation flags diff --git a/examples/contact-sensor-app/telink/CMakeLists.txt b/examples/contact-sensor-app/telink/CMakeLists.txt index 128d7afbf89744..c29ef949914036 100755 --- a/examples/contact-sensor-app/telink/CMakeLists.txt +++ b/examples/contact-sensor-app/telink/CMakeLists.txt @@ -68,10 +68,6 @@ target_include_directories(app PRIVATE ${TELINK_COMMON}/common/include ${TELINK_COMMON}/util/include) -add_definitions( - "-DCHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=" -) - target_sources(app PRIVATE src/AppTask.cpp src/ContactSensorManager.cpp @@ -87,3 +83,7 @@ chip_configure_data_model(app INCLUDE_SERVER ZAP_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../contact-sensor-common/contact-sensor-app.zap ) + +if(CONFIG_BOOTLOADER_MCUBOOT) + target_sources(app PRIVATE ${TELINK_COMMON}/util/src/OTAUtil.cpp) +endif() diff --git a/examples/energy-management-app/energy-management-common/energy-management-app.matter b/examples/energy-management-app/energy-management-common/energy-management-app.matter index d48a22c42cc51e..753c428234a038 100644 --- a/examples/energy-management-app/energy-management-common/energy-management-app.matter +++ b/examples/energy-management-app/energy-management-common/energy-management-app.matter @@ -900,6 +900,185 @@ cluster GroupKeyManagement = 63 { fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; } +/** This cluster allows a client to manage the power draw of a device. An example of such a client could be an Energy Management System (EMS) which controls an Energy Smart Appliance (ESA). */ +provisional cluster DeviceEnergyManagement = 152 { + revision 2; + + enum CauseEnum : enum8 { + kNormalCompletion = 0; + kOffline = 1; + kFault = 2; + kUserOptOut = 3; + } + + enum CostTypeEnum : enum8 { + kFinancial = 0; + kGHGEmissions = 1; + kComfort = 2; + kTemperature = 3; + } + + enum ESAStateEnum : enum8 { + kOffline = 0; + kOnline = 1; + kFault = 2; + kUserOptOut = 3; + kPowerAdjustActive = 4; + kPaused = 5; + } + + enum ESATypeEnum : enum8 { + kEVSE = 0; + kSpaceHeating = 1; + kWaterHeating = 2; + kSpaceCooling = 3; + kSpaceHeatingCooling = 4; + kBatteryStorage = 5; + kSolarPV = 6; + kFridgeFreezer = 7; + kWashingMachine = 8; + kDishwasher = 9; + kCooking = 10; + kHomeWaterPump = 11; + kIrrigationWaterPump = 12; + kPoolPump = 13; + kOther = 255; + } + + bitmap Feature : bitmap32 { + kPowerAdjustment = 0x1; + kPowerForecastReporting = 0x2; + kStateForecastReporting = 0x4; + kForecastAdjustment = 0x8; + } + + struct CostStruct { + CostTypeEnum costType = 0; + int32s value = 1; + int8u decimalPoints = 2; + optional int16u currency = 3; + } + + struct SlotStruct { + elapsed_s minDuration = 0; + elapsed_s maxDuration = 1; + elapsed_s defaultDuration = 2; + elapsed_s elapsedSlotTime = 3; + elapsed_s remainingSlotTime = 4; + boolean slotIsPauseable = 5; + elapsed_s minPauseDuration = 6; + elapsed_s maxPauseDuration = 7; + optional int16u manufacturerESAState = 8; + optional power_mw nominalPower = 9; + optional power_mw minPower = 10; + optional power_mw maxPower = 11; + optional energy_mwh nominalEnergy = 12; + optional CostStruct costs[] = 13; + optional power_mw minPowerAdjustment = 14; + optional power_mw maxPowerAdjustment = 15; + optional elapsed_s minDurationAdjustment = 16; + optional elapsed_s maxDurationAdjustment = 17; + } + + struct ForecastStruct { + int16u forecastId = 0; + nullable int16u activeSlotNumber = 1; + epoch_s startTime = 2; + epoch_s endTime = 3; + optional nullable epoch_s earliestStartTime = 4; + optional epoch_s latestEndTime = 5; + boolean isPauseable = 6; + SlotStruct slots[] = 7; + } + + struct ConstraintsStruct { + epoch_s startTime = 0; + elapsed_s duration = 1; + optional power_mw nominalPower = 2; + optional energy_mwh maximumEnergy = 3; + optional int8s loadControl = 4; + } + + struct PowerAdjustStruct { + power_mw minPower = 0; + power_mw maxPower = 1; + elapsed_s minDuration = 2; + elapsed_s maxDuration = 3; + } + + struct SlotAdjustmentStruct { + int8u slotIndex = 0; + power_mw nominalPower = 1; + elapsed_s duration = 2; + } + + info event PowerAdjustStart = 0 { + } + + info event PowerAdjustEnd = 1 { + CauseEnum cause = 0; + elapsed_s duration = 1; + energy_mwh energyUse = 2; + } + + info event Paused = 2 { + } + + info event Resumed = 3 { + } + + readonly attribute ESATypeEnum ESAType = 0; + readonly attribute boolean ESACanGenerate = 1; + readonly attribute ESAStateEnum ESAState = 2; + readonly attribute power_mw absMinPower = 3; + readonly attribute power_mw absMaxPower = 4; + readonly attribute optional nullable PowerAdjustStruct powerAdjustmentCapability[] = 5; + readonly attribute optional nullable ForecastStruct forecast = 6; + 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 PowerAdjustRequestRequest { + power_mw power = 0; + elapsed_s duration = 1; + } + + request struct StartTimeAdjustRequestRequest { + epoch_s requestedStartTime = 0; + } + + request struct PauseRequestRequest { + elapsed_s duration = 0; + } + + request struct ModifyForecastRequestRequest { + int32u forecastId = 0; + SlotAdjustmentStruct slotAdjustments[] = 1; + } + + request struct RequestConstraintBasedForecastRequest { + ConstraintsStruct constraints[] = 0; + } + + /** Allows a client to request an adjustment in the power consumption of an ESA for a specified duration. */ + command PowerAdjustRequest(PowerAdjustRequestRequest): DefaultSuccess = 0; + /** Allows a client to cancel an ongoing PowerAdjustmentRequest operation. */ + command CancelPowerAdjustRequest(): DefaultSuccess = 1; + /** Allows a client to adjust the start time of a Forecast sequence that has not yet started operation (i.e. where the current Forecast StartTime is in the future). */ + command StartTimeAdjustRequest(StartTimeAdjustRequestRequest): DefaultSuccess = 2; + /** Allows a client to temporarily pause an operation and reduce the ESAs energy demand. */ + command PauseRequest(PauseRequestRequest): DefaultSuccess = 3; + /** Allows a client to cancel the PauseRequest command and enable earlier resumption of operation. */ + command ResumeRequest(): DefaultSuccess = 4; + /** Allows a client to modify a Forecast within the limits allowed by the ESA. */ + command ModifyForecastRequest(ModifyForecastRequestRequest): DefaultSuccess = 5; + /** Allows a client to ask the ESA to recompute its Forecast based on power and time constraints. */ + command RequestConstraintBasedForecast(RequestConstraintBasedForecastRequest): DefaultSuccess = 6; +} + /** Electric Vehicle Supply Equipment (EVSE) is equipment used to charge an Electric Vehicle (EV) or Plug-In Hybrid Electric Vehicle. This cluster provides an interface to the functionality of Electric Vehicle Supply Equipment (EVSE) management. */ provisional cluster EnergyEvse = 153 { revision 2; @@ -1290,6 +1469,34 @@ endpoint 1 { callback attribute clusterRevision; } + server cluster DeviceEnergyManagement { + emits event PowerAdjustStart; + emits event PowerAdjustEnd; + emits event Paused; + emits event Resumed; + callback attribute ESAType; + callback attribute ESACanGenerate; + callback attribute ESAState; + callback attribute absMinPower; + callback attribute absMaxPower; + callback attribute powerAdjustmentCapability; + callback attribute forecast; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + callback attribute featureMap; + ram attribute clusterRevision default = 2; + + handle command PowerAdjustRequest; + handle command CancelPowerAdjustRequest; + handle command StartTimeAdjustRequest; + handle command PauseRequest; + handle command ResumeRequest; + handle command ModifyForecastRequest; + handle command RequestConstraintBasedForecast; + } + server cluster EnergyEvse { emits event EVConnected; emits event EVNotDetected; @@ -1300,33 +1507,33 @@ endpoint 1 { callback attribute state; callback attribute supplyState; callback attribute faultState; - callback attribute chargingEnabledUntil default = 0; - callback attribute dischargingEnabledUntil default = 0; - callback attribute circuitCapacity default = 0; - callback attribute minimumChargeCurrent default = 6000; - callback attribute maximumChargeCurrent default = 0; - callback attribute maximumDischargeCurrent default = 0; - callback attribute userMaximumChargeCurrent default = 0; - callback attribute randomizationDelayWindow default = 600; + callback attribute chargingEnabledUntil; + callback attribute dischargingEnabledUntil; + callback attribute circuitCapacity; + callback attribute minimumChargeCurrent; + callback attribute maximumChargeCurrent; + callback attribute maximumDischargeCurrent; + callback attribute userMaximumChargeCurrent; + callback attribute randomizationDelayWindow; callback attribute numberOfWeeklyTargets default = 0; callback attribute numberOfDailyTargets default = 1; callback attribute nextChargeStartTime; callback attribute nextChargeTargetTime; callback attribute nextChargeRequiredEnergy; callback attribute nextChargeTargetSoC; - callback attribute approximateEVEfficiency default = 0xFFFF; + callback attribute approximateEVEfficiency; callback attribute stateOfCharge; callback attribute batteryCapacity; callback attribute vehicleID; - callback attribute sessionID default = 0; - callback attribute sessionDuration default = 0; - callback attribute sessionEnergyCharged default = 0; - callback attribute sessionEnergyDischarged default = 0; + callback attribute sessionID; + callback attribute sessionDuration; + callback attribute sessionEnergyCharged; + callback attribute sessionEnergyDischarged; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 1; + callback attribute featureMap; ram attribute clusterRevision default = 2; handle command GetTargetsResponse; diff --git a/examples/energy-management-app/energy-management-common/energy-management-app.zap b/examples/energy-management-app/energy-management-common/energy-management-app.zap index 55d62101227dab..8ed4aa6e2167d7 100644 --- a/examples/energy-management-app/energy-management-common/energy-management-app.zap +++ b/examples/energy-management-app/energy-management-common/energy-management-app.zap @@ -2517,6 +2517,313 @@ } ] }, + { + "name": "Device Energy Management", + "code": 152, + "mfgCode": null, + "define": "DEVICE_ENERGY_MANAGEMENT_CLUSTER", + "side": "server", + "enabled": 1, + "apiMaturity": "provisional", + "commands": [ + { + "name": "PowerAdjustRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CancelPowerAdjustRequest", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "StartTimeAdjustRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "PauseRequest", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ResumeRequest", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ModifyForecastRequest", + "code": 5, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RequestConstraintBasedForecast", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "ESAType", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "ESATypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ESACanGenerate", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ESAState", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "ESAStateEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AbsMinPower", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "power_mw", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AbsMaxPower", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "power_mw", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PowerAdjustmentCapability", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Forecast", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "ForecastStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "PowerAdjustStart", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "PowerAdjustEnd", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "Paused", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "Resumed", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, { "name": "Energy EVSE", "code": 153, @@ -3063,7 +3370,7 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, "defaultValue": "1", diff --git a/examples/energy-management-app/energy-management-common/include/DeviceEnergyManagementDelegateImpl.h b/examples/energy-management-app/energy-management-common/include/DeviceEnergyManagementDelegateImpl.h new file mode 100644 index 00000000000000..464a683510b3d7 --- /dev/null +++ b/examples/energy-management-app/energy-management-common/include/DeviceEnergyManagementDelegateImpl.h @@ -0,0 +1,83 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include "app/clusters/device-energy-management-server/device-energy-management-server.h" + +#include +#include +#include + +using chip::Protocols::InteractionModel::Status; +namespace chip { +namespace app { +namespace Clusters { +namespace DeviceEnergyManagement { + +/** + * The application delegate. + */ +class DeviceEnergyManagementDelegate : public DeviceEnergyManagement::Delegate +{ +public: + virtual Status PowerAdjustRequest(const int64_t power, const uint32_t duration) override; + virtual Status CancelPowerAdjustRequest() override; + virtual Status StartTimeAdjustRequest(const uint32_t requestedStartTime) override; + virtual Status PauseRequest(const uint32_t duration) override; + virtual Status ResumeRequest() override; + virtual Status + ModifyForecastRequest(const uint32_t forecastId, + const DataModel::DecodableList & slotAdjustments) override; + virtual Status RequestConstraintBasedForecast( + const DataModel::DecodableList & constraints) override; + + // ------------------------------------------------------------------ + // Get attribute methods + virtual ESATypeEnum GetESAType() override; + virtual bool GetESACanGenerate() override; + virtual ESAStateEnum GetESAState() override; + virtual int64_t GetAbsMinPower() override; + virtual int64_t GetAbsMaxPower() override; + virtual Attributes::PowerAdjustmentCapability::TypeInfo::Type GetPowerAdjustmentCapability() override; + virtual DataModel::Nullable GetForecast() override; + + // ------------------------------------------------------------------ + // Set attribute methods + virtual CHIP_ERROR SetESAType(ESATypeEnum) override; + virtual CHIP_ERROR SetESACanGenerate(bool) override; + virtual CHIP_ERROR SetESAState(ESAStateEnum) override; + virtual CHIP_ERROR SetAbsMinPower(int64_t) override; + virtual CHIP_ERROR SetAbsMaxPower(int64_t) override; + virtual CHIP_ERROR SetPowerAdjustmentCapability(Attributes::PowerAdjustmentCapability::TypeInfo::Type) override; + virtual CHIP_ERROR SetForecast(DataModel::Nullable) override; + +private: + ESATypeEnum mEsaType; + bool mEsaCanGenerate; + ESAStateEnum mEsaState; + int64_t mAbsMinPower; + int64_t mAbsMaxPower; + Attributes::PowerAdjustmentCapability::TypeInfo::Type mPowerAdjustmentCapability; + DataModel::Nullable mForecast; +}; + +} // namespace DeviceEnergyManagement +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/examples/energy-management-app/energy-management-common/include/DeviceEnergyManagementManager.h b/examples/energy-management-app/energy-management-common/include/DeviceEnergyManagementManager.h new file mode 100644 index 00000000000000..6d131dd4ae90fa --- /dev/null +++ b/examples/energy-management-app/energy-management-common/include/DeviceEnergyManagementManager.h @@ -0,0 +1,57 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include +#include +#include + +namespace chip { +namespace app { +namespace Clusters { + +using namespace chip::app::Clusters::DeviceEnergyManagement; +class DeviceEnergyManagementManager : public Instance +{ +public: + DeviceEnergyManagementManager(EndpointId aEndpointId, DeviceEnergyManagementDelegate & aDelegate, Feature aFeature, + OptionalCommands aOptionalCmds) : + DeviceEnergyManagement::Instance(aEndpointId, aDelegate, aFeature, aOptionalCmds) + { + mDelegate = &aDelegate; + } + + // Delete copy constructor and assignment operator. + DeviceEnergyManagementManager(const DeviceEnergyManagementManager &) = delete; + DeviceEnergyManagementManager(const DeviceEnergyManagementManager &&) = delete; + DeviceEnergyManagementManager & operator=(const DeviceEnergyManagementManager &) = delete; + + CHIP_ERROR Init(); + void Shutdown(); + + DeviceEnergyManagementDelegate * GetDelegate() { return mDelegate; }; + +private: + DeviceEnergyManagementDelegate * mDelegate; +}; + +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/examples/energy-management-app/energy-management-common/include/EVSECallbacks.h b/examples/energy-management-app/energy-management-common/include/EVSECallbacks.h index 5bdac2f8e853d6..7d288809952ee3 100644 --- a/examples/energy-management-app/energy-management-common/include/EVSECallbacks.h +++ b/examples/energy-management-app/energy-management-common/include/EVSECallbacks.h @@ -30,26 +30,41 @@ using namespace chip::app::Clusters::EnergyEvse; * This is not specific to the EnergyEVSE cluster, but includes DeviceEnergyManagement * and potential future clusters. */ -enum EVSECallbackType +enum class EVSECallbackType : uint8_t { /* * The State has changed (e.g. from Disabled to Charging, or vice-versa) */ StateChanged, /* - * ChargeCurrent has changed + * ChargeCurrent has changed (e.g. maxChargingCurrent so requires an + update to advertise a different charging current to the EV) */ ChargeCurrentChanged, /* * Charging Preferences have changed + * The daily charging target time, SoC / Added Energy schedules have changed + * and may require the local optimiser to re-run. */ ChargingPreferencesChanged, /* - * DeviceEnergyManagement has changed + * Energy Meter Reading requested from the hardware, e.g. so that the session + * information can be updated. + */ + EnergyMeterReadingRequested, + /* + * The associated DeviceEnergyManagement cluster has changed. This may mean + * that the start time, or power profile or power levels have been adjusted */ DeviceEnergyManagementChanged, }; +enum class ChargingDischargingType : uint8_t +{ + kCharging, + kDischarging +}; + struct EVSECbInfo { EVSECallbackType type; @@ -68,6 +83,13 @@ struct EVSECbInfo { int64_t maximumChargeCurrent; } ChargingCurrent; + + /* for type = EnergyMeterReadingRequested */ + struct + { + ChargingDischargingType meterType; + int64_t * energyMeterValuePtr; + } EnergyMeterReadingRequest; }; }; diff --git a/examples/energy-management-app/energy-management-common/include/EVSEManufacturerImpl.h b/examples/energy-management-app/energy-management-common/include/EVSEManufacturerImpl.h index 4ff45e925674aa..df757f7374e672 100644 --- a/examples/energy-management-app/energy-management-common/include/EVSEManufacturerImpl.h +++ b/examples/energy-management-app/energy-management-common/include/EVSEManufacturerImpl.h @@ -18,6 +18,7 @@ #pragma once +#include #include using chip::Protocols::InteractionModel::Status; @@ -33,15 +34,26 @@ namespace EnergyEvse { class EVSEManufacturer { public: + EVSEManufacturer(EnergyEvseManager * aInstance) { mInstance = aInstance; } + EnergyEvseManager * GetInstance() { return mInstance; } + EnergyEvseDelegate * GetDelegate() + { + if (mInstance) + { + return mInstance->GetDelegate(); + } + return nullptr; + } + /** * @brief Called at start up to apply hardware settings */ - CHIP_ERROR Init(EnergyEvseManager * aInstance); + CHIP_ERROR Init(); /** * @brief Called at shutdown */ - CHIP_ERROR Shutdown(EnergyEvseManager * aInstance); + CHIP_ERROR Shutdown(); /** * @brief Main Callback handler from delegate to user code @@ -49,8 +61,23 @@ class EVSEManufacturer static void ApplicationCallbackHandler(const EVSECbInfo * cb, intptr_t arg); private: + EnergyEvseManager * mInstance; + + int64_t mLastChargingEnergyMeter = 0; + int64_t mLastDischargingEnergyMeter = 0; }; +/** @brief Helper function to return the singleton EVSEManufacturer instance + * + * This is needed by the EVSEManufacturer class to support TestEventTriggers + * which are called outside of any class context. This allows the EVSEManufacturer + * class to return the relevant Delegate instance in which to invoke the test + * events on. + * + * This function is typically found in main.cpp or wherever the singleton is created. + */ +EVSEManufacturer * GetEvseManufacturer(); + } // namespace EnergyEvse } // namespace Clusters } // namespace app diff --git a/examples/energy-management-app/energy-management-common/include/EnergyEvseDelegateImpl.h b/examples/energy-management-app/energy-management-common/include/EnergyEvseDelegateImpl.h index f3c003d081fc6e..d27f35ee63201c 100644 --- a/examples/energy-management-app/energy-management-common/include/EnergyEvseDelegateImpl.h +++ b/examples/energy-management-app/energy-management-common/include/EnergyEvseDelegateImpl.h @@ -31,6 +31,68 @@ namespace app { namespace Clusters { namespace EnergyEvse { +/* Local state machine Events to allow simpler handling of state transitions */ +enum EVSEStateMachineEvent +{ + EVPluggedInEvent, /* EV has been plugged in */ + EVNotDetectedEvent, /* EV has been unplugged or detected as not connected */ + EVNoDemandEvent, /* EV has stopped asking for demand */ + EVDemandEvent, /* EV has asked for demand*/ + ChargingEnabledEvent, /* Charging has been enabled */ + DischargingEnabledEvent, /* Discharging has been enabled */ + DisabledEvent, /* EVSE has been disabled */ + FaultRaised, /* Fault has been raised */ + FaultCleared, /* Fault has been cleared */ +}; + +/** + * Helper class to handle all of the session related info + */ +class EvseSession +{ +public: + EvseSession(EndpointId aEndpoint) { mEndpointId = aEndpoint; } + /** + * @brief This function records the start time and provided energy meter values as part of the new session. + * + * @param chargingMeterValue - The current value of the energy meter (charging) in mWh + * @param dischargingMeterValue - The current value of the energy meter (discharging) in mWh + */ + void StartSession(int64_t chargingMeterValue, int64_t dischargingMeterValue); + + /** + * @brief This function updates the session Duration to allow read attributes to return latest values + */ + void RecalculateSessionDuration(); + + /** + * @brief This function updates the EnergyCharged meter value + * + * @param chargingMeterValue - The value of the energy meter (charging) in mWh + */ + void UpdateEnergyCharged(int64_t chargingMeterValue); + + /** + * @brief This function updates the EnergyDischarged meter value + * + * @param dischargingMeterValue - The value of the energy meter (discharging) in mWh + */ + void UpdateEnergyDischarged(int64_t dischargingMeterValue); + + /* Public members - represent attributes in the cluster */ + DataModel::Nullable mSessionID; + DataModel::Nullable mSessionDuration; + DataModel::Nullable mSessionEnergyCharged; + DataModel::Nullable mSessionEnergyDischarged; + +private: + EndpointId mEndpointId = 0; + + uint32_t mStartTime = 0; // Epoch_s - 0 means it hasn't started yet + int64_t mSessionEnergyChargedAtStart = 0; // in mWh - 0 means it hasn't been set yet + int64_t mSessionEnergyDischargedAtStart = 0; // in mWh - 0 means it hasn't been set yet +}; + /** * The application delegate. */ @@ -74,15 +136,41 @@ class EnergyEvseDelegate : public EnergyEvse::Delegate */ Status HwRegisterEvseCallbackHandler(EVSECallbackFunc handler, intptr_t arg); + /** + * @brief Decides if a timer is needed based on EVSE state and sets a callback if needed + * + * In order to ensure the EVSE restarts charging (if enabled) after power loss + * this should be called after the EVSE is initialised + * (e.g. HwSetMaxHardwareCurrentLimit and HwSetCircuitCapacity have been called) + * and the persisted attributes have been loaded, and time has been synchronised. + * + * If time isn't sync'd yet it will call itself back periodically (if required) + * until time is sync'd. + * + * It is also called when a EnableCharging or EnableDischarging command + * is recv'd to schedule when the EVSE should be automatically disabled based + * on ChargingEnabledUntil / DischargingEnabledUntil expiring. + */ + Status ScheduleCheckOnEnabledTimeout(); + // ----------------------------------------------------------------- // Internal API to allow an EVSE to change its internal state etc Status HwSetMaxHardwareCurrentLimit(int64_t currentmA); + int64_t HwGetMaxHardwareCurrentLimit() { return mMaxHardwareCurrentLimit; } Status HwSetCircuitCapacity(int64_t currentmA); Status HwSetCableAssemblyLimit(int64_t currentmA); + int64_t HwGetCableAssemblyLimit() { return mCableAssemblyCurrentLimit; } Status HwSetState(StateEnum state); + StateEnum HwGetState() { return mHwState; }; Status HwSetFault(FaultStateEnum fault); Status HwSetRFID(ByteSpan uid); Status HwSetVehicleID(const CharSpan & vehID); + Status HwDiagnosticsComplete(); + Status SendEVConnectedEvent(); + Status SendEVNotDetectedEvent(); + Status SendEnergyTransferStartedEvent(); + Status SendEnergyTransferStoppedEvent(EnergyTransferStoppedReasonEnum reason); + Status SendFaultEvent(FaultStateEnum newFaultState); // ------------------------------------------------------------------ // Get attribute methods @@ -96,10 +184,10 @@ class EnergyEvseDelegate : public EnergyEvse::Delegate CHIP_ERROR SetFaultState(FaultStateEnum); DataModel::Nullable GetChargingEnabledUntil() override; - CHIP_ERROR SetChargingEnabledUntil(uint32_t); + CHIP_ERROR SetChargingEnabledUntil(DataModel::Nullable); DataModel::Nullable GetDischargingEnabledUntil() override; - CHIP_ERROR SetDischargingEnabledUntil(uint32_t); + CHIP_ERROR SetDischargingEnabledUntil(DataModel::Nullable); int64_t GetCircuitCapacity() override; CHIP_ERROR SetCircuitCapacity(int64_t); @@ -128,7 +216,7 @@ class EnergyEvseDelegate : public EnergyEvse::Delegate DataModel::Nullable GetNextChargeTargetSoC() override; DataModel::Nullable GetApproximateEVEfficiency() override; - CHIP_ERROR SetApproximateEVEfficiency(uint16_t) override; + CHIP_ERROR SetApproximateEVEfficiency(DataModel::Nullable) override; /* SOC attributes */ DataModel::Nullable GetStateOfCharge() override; @@ -143,10 +231,11 @@ class EnergyEvseDelegate : public EnergyEvse::Delegate private: /* Constants */ - static constexpr int DEFAULT_MIN_CHARGE_CURRENT = 6000; /* 6A */ - static constexpr int DEFAULT_USER_MAXIMUM_CHARGE_CURRENT = kMaximumChargeCurrent; /* 80A */ - static constexpr int DEFAULT_RANDOMIZATION_DELAY_WINDOW = 600; /* 600s */ - static constexpr int kMaxVehicleIDBufSize = 32; + static constexpr int kDefaultMinChargeCurrent = 6000; /* 6A */ + static constexpr int kDefaultUserMaximumChargeCurrent = kMaximumChargeCurrent; /* 80A */ + static constexpr int kDefaultRandomizationDelayWindow = 600; /* 600s */ + static constexpr int kMaxVehicleIDBufSize = 32; + static constexpr int kPeriodicCheckIntervalRealTimeClockNotSynced = 30; /* private variables for controlling the hardware - these are not attributes */ int64_t mMaxHardwareCurrentLimit = 0; /* Hardware current limit in mA */ @@ -155,16 +244,42 @@ class EnergyEvseDelegate : public EnergyEvse::Delegate int64_t mActualChargingCurrentLimit = 0; StateEnum mHwState = StateEnum::kNotPluggedIn; /* Hardware state */ + /* Variables to hold State and SupplyState in case a fault is raised */ + StateEnum mStateBeforeFault = StateEnum::kUnknownEnumValue; + SupplyStateEnum mSupplyStateBeforeFault = SupplyStateEnum::kUnknownEnumValue; + /* Callback related */ EVSECallbackWrapper mCallbacks = { .handler = nullptr, .arg = 0 }; /* Wrapper to allow callbacks to be registered */ Status NotifyApplicationCurrentLimitChange(int64_t maximumChargeCurrent); Status NotifyApplicationStateChange(); + Status GetEVSEEnergyMeterValue(ChargingDischargingType meterType, int64_t & aMeterValue); + + /* Local State machine handling */ + Status CheckFaultOrDiagnostic(); + Status HandleStateMachineEvent(EVSEStateMachineEvent event); + Status HandleEVPluggedInEvent(); + Status HandleEVNotDetectedEvent(); + Status HandleEVNoDemandEvent(); + Status HandleEVDemandEvent(); + Status HandleChargingEnabledEvent(); + Status HandleDischargingEnabledEvent(); + Status HandleDisabledEvent(); + Status HandleFaultRaised(); + Status HandleFaultCleared(); /** * @brief Helper function to work out the charge limit based on conditions and settings */ Status ComputeMaxChargeCurrentLimit(); + /** + * @brief This checks if the charging or discharging needs to be disabled + * + * @params pointer to SystemLayer + * @params pointer to EnergyEvseDelegate + */ + static void EvseCheckTimerExpiry(System::Layer * systemLayer, void * delegate); + /* Attributes */ StateEnum mState = StateEnum::kNotPluggedIn; SupplyStateEnum mSupplyState = SupplyStateEnum::kDisabled; @@ -172,11 +287,11 @@ class EnergyEvseDelegate : public EnergyEvse::Delegate DataModel::Nullable mChargingEnabledUntil; // TODO Default to 0 to indicate disabled DataModel::Nullable mDischargingEnabledUntil; // TODO Default to 0 to indicate disabled int64_t mCircuitCapacity = 0; - int64_t mMinimumChargeCurrent = DEFAULT_MIN_CHARGE_CURRENT; + int64_t mMinimumChargeCurrent = kDefaultMinChargeCurrent; int64_t mMaximumChargeCurrent = 0; int64_t mMaximumDischargeCurrent = 0; - int64_t mUserMaximumChargeCurrent = DEFAULT_USER_MAXIMUM_CHARGE_CURRENT; // TODO update spec - uint32_t mRandomizationDelayWindow = DEFAULT_RANDOMIZATION_DELAY_WINDOW; + int64_t mUserMaximumChargeCurrent = kDefaultUserMaximumChargeCurrent; // TODO update spec + uint32_t mRandomizationDelayWindow = kDefaultRandomizationDelayWindow; /* PREF attributes */ uint8_t mNumberOfWeeklyTargets = 0; uint8_t mNumberOfDailyTargets = 1; @@ -193,11 +308,11 @@ class EnergyEvseDelegate : public EnergyEvse::Delegate /* PNC attributes*/ DataModel::Nullable mVehicleID; - /* Session SESS attributes */ - DataModel::Nullable mSessionID; - DataModel::Nullable mSessionDuration; - DataModel::Nullable mSessionEnergyCharged; - DataModel::Nullable mSessionEnergyDischarged; + /* Session Object */ + EvseSession mSession = EvseSession(mEndpointId); + + /* Helper variable to hold meter val since last EnergyTransferStarted event */ + int64_t mMeterValueAtEnergyTransferStart; }; } // namespace EnergyEvse diff --git a/examples/energy-management-app/energy-management-common/include/EnergyEvseManager.h b/examples/energy-management-app/energy-management-common/include/EnergyEvseManager.h index 9875c397990ef2..fc0d41b9259643 100644 --- a/examples/energy-management-app/energy-management-common/include/EnergyEvseManager.h +++ b/examples/energy-management-app/energy-management-common/include/EnergyEvseManager.h @@ -26,8 +26,8 @@ namespace chip { namespace app { namespace Clusters { +namespace EnergyEvse { -using namespace chip::app::Clusters::EnergyEvse; class EnergyEvseManager : public Instance { public: @@ -46,12 +46,15 @@ class EnergyEvseManager : public Instance CHIP_ERROR Init(); void Shutdown(); + CHIP_ERROR LoadPersistentAttributes(); + EnergyEvseDelegate * GetDelegate() { return mDelegate; }; private: EnergyEvseDelegate * mDelegate; }; +} // namespace EnergyEvse } // namespace Clusters } // namespace app } // namespace chip diff --git a/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementDelegateImpl.cpp b/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementDelegateImpl.cpp new file mode 100644 index 00000000000000..4d4d9bf05bbdbb --- /dev/null +++ b/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementDelegateImpl.cpp @@ -0,0 +1,344 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "DeviceEnergyManagementDelegateImpl.h" + +#include +#include +#include + +using namespace chip; +using namespace chip::app; +using namespace chip::app::Clusters; +using namespace chip::app::Clusters::DeviceEnergyManagement; +using namespace chip::app::Clusters::DeviceEnergyManagement::Attributes; + +using chip::Optional; +using namespace chip::app; +using CostsList = DataModel::List; + +/** + * @brief Delegate handler for PowerAdjustRequest + * + * Note: checking of the validity of the PowerAdjustRequest has been done by the lower layer + * + * This function needs to notify the appliance that it should apply a new power setting. + * It should: + * 1) notify the appliance - if the appliance hardware cannot be adjusted, then return Failure + * 2) start a timer (or restart the existing PowerAdjust timer) for duration seconds + * 3) generate a PowerAdjustStart event (if there is not an existing PowerAdjustRequest running) + * 4) if appropriate, update the forecast with the new expected end time + * + * and when the timer expires: + * 5) notify the appliance's that it can resume its intended power setting (or go idle) + * 6) generate a PowerAdjustEnd event with cause NormalCompletion + * 7) if necessary, update the forecast with new expected end time + */ +Status DeviceEnergyManagementDelegate::PowerAdjustRequest(const int64_t power, const uint32_t duration) +{ + Status status = Status::UnsupportedCommand; // Status::Success; + + // TODO: implement + mEsaState = ESAStateEnum::kPowerAdjustActive; + + // TODO: Generate a PowerAdjustStart Event, then begins to adjust its power + // When done, raise PowerAdjustEnd & ESAState set to kOnline. + + MatterReportingAttributeChangeCallback(mEndpointId, DeviceEnergyManagement::Id, ESAState::Id); + + return status; +} +/** + * @brief Delegate handler for CancelPowerAdjustRequest + * + * Note: checking of the validity of the CancelPowerAdjustRequest has been done by the lower layer + * + * This function needs to notify the appliance that it should resume its intended power setting (or go idle). + + * It should: + * 1) notify the appliance's that it can resume its intended power setting (or go idle) + * 2) generate a PowerAdjustEnd event with cause code Cancelled + * 3) if necessary, update the forecast with new expected end time + */ +Status DeviceEnergyManagementDelegate::CancelPowerAdjustRequest() +{ + Status status = Status::UnsupportedCommand; // Status::Success; + + // TODO: implement + /* TODO: If the command is accepted, the ESA SHALL generate an PowerAdjustEnd Event. */ + mEsaState = ESAStateEnum::kOnline; + MatterReportingAttributeChangeCallback(mEndpointId, DeviceEnergyManagement::Id, ESAState::Id); + + return status; +} + +/** + * @brief Delegate handler for StartTimeAdjustRequest + * + * Note: checking of the validity of the StartTimeAdjustRequest has been done by the lower layer + * + * This function needs to notify the appliance that the forecast has been updated by a client. + * + * It should: + * 1) update the forecast attribute with the revised start time + * 2) send a callback notification to the appliance so it can refresh its internal schedule + */ +Status DeviceEnergyManagementDelegate::StartTimeAdjustRequest(const uint32_t requestedStartTime) +{ + DataModel::Nullable forecast = GetForecast(); + + if (forecast.IsNull()) + { + return Status::Failure; + } + + uint32_t duration = forecast.Value().endTime - forecast.Value().startTime; // the current entire forecast duration + + /* Modify start time and end time */ + forecast.Value().startTime = requestedStartTime; + forecast.Value().endTime = requestedStartTime + duration; + + SetForecast(forecast); // This will increment forecast ID + + // TODO: callback to the appliance to notify it of a new start time + + return Status::Success; +} +/** + * @brief Delegate handler for Pause Request + * + * Note: checking of the validity of the Pause Request has been done by the lower layer + * + * This function needs to notify the appliance that it should now pause. + * It should: + * 1) pause the appliance - if the appliance hardware cannot be paused, then return Failure + * 2) start a timer for duration seconds + * 3) generate a Paused event + * 4) update the forecast with the new expected end time + * + * and when the timer expires: + * 5) restore the appliance's operational state + * 6) generate a Resumed event + * 7) if necessary, update the forecast with new expected end time + */ +Status DeviceEnergyManagementDelegate::PauseRequest(const uint32_t duration) +{ + Status status = Status::UnsupportedCommand; // Status::Success; + // TODO: implement the behaviour above + return status; +} + +/** + * @brief Delegate handler for ResumeRequest + * + * Note: checking of the validity of the ResumeRequest has been done by the lower layer + * + * This function needs to notify the appliance that it should now resume operation + * + * It should: + * 1) restore the appliance's operational state + * 2) generate a Resumed event + * 3) update the forecast with new expected end time (given that the pause duration was shorter than originally requested) + * + */ +Status DeviceEnergyManagementDelegate::ResumeRequest() +{ + Status status = Status::UnsupportedCommand; // Status::Success; + + // TODO: implement the behaviour above + SetESAState(ESAStateEnum::kOnline); + + return status; +} + +/** + * @brief Delegate handler for ModifyForecastRequest + * + * Note: Only basic checking of the validity of the ModifyForecastRequest has been + * done by the lower layer. This is a more complex use-case and requires higher-level + * work by the delegate. + * + * It should: + * 1) determine if the new forecast adjustments are acceptable to the appliance + * - if not return Failure. For example, if it may cause the home to be too hot + * or too cold, or a battery to be insufficiently charged + * 2) if the slot adjustments are acceptable, then update the forecast + * 3) notify the appliance to follow the revised schedule + */ +Status DeviceEnergyManagementDelegate::ModifyForecastRequest( + const uint32_t forecastId, const DataModel::DecodableList & slotAdjustments) +{ + Status status = Status::UnsupportedCommand; // Status::Success; + + // TODO: implement the behaviour above + return status; +} + +/** + * @brief Delegate handler for RequestConstraintBasedForecast + * + * Note: Only basic checking of the validity of the RequestConstraintBasedForecast has been + * done by the lower layer. This is a more complex use-case and requires higher-level + * work by the delegate. + * + * It should: + * 1) perform a higher level optimization (e.g. using tariff information, and user preferences) + * 2) if a solution can be found, then update the forecast, else return Failure + * 3) notify the appliance to follow the revised schedule + */ +Status DeviceEnergyManagementDelegate::RequestConstraintBasedForecast( + const DataModel::DecodableList & constraints) +{ + Status status = Status::UnsupportedCommand; // Status::Success; + // TODO: implement the behaviour above + return status; +} + +// ------------------------------------------------------------------ +// Get attribute methods +ESATypeEnum DeviceEnergyManagementDelegate::GetESAType() +{ + return mEsaType; +} + +bool DeviceEnergyManagementDelegate::GetESACanGenerate() +{ + return mEsaCanGenerate; +} + +ESAStateEnum DeviceEnergyManagementDelegate::GetESAState() +{ + return mEsaState; +} + +int64_t DeviceEnergyManagementDelegate::GetAbsMinPower() +{ + return mAbsMinPower; +} + +int64_t DeviceEnergyManagementDelegate::GetAbsMaxPower() +{ + return mAbsMaxPower; +} + +PowerAdjustmentCapability::TypeInfo::Type DeviceEnergyManagementDelegate::GetPowerAdjustmentCapability() +{ + return mPowerAdjustmentCapability; +} + +DataModel::Nullable DeviceEnergyManagementDelegate::GetForecast() +{ + return mForecast; +} + +// ------------------------------------------------------------------ +// Set attribute methods + +CHIP_ERROR DeviceEnergyManagementDelegate::SetESAType(ESATypeEnum newValue) +{ + ESATypeEnum oldValue = mEsaType; + + if (newValue >= ESATypeEnum::kUnknownEnumValue) + { + return CHIP_IM_GLOBAL_STATUS(ConstraintError); + } + + mEsaType = newValue; + if (oldValue != newValue) + { + ChipLogDetail(AppServer, "mEsaType updated to %d", static_cast(mEsaType)); + MatterReportingAttributeChangeCallback(mEndpointId, DeviceEnergyManagement::Id, ESAType::Id); + } + + return CHIP_NO_ERROR; +} + +CHIP_ERROR DeviceEnergyManagementDelegate::SetESACanGenerate(bool newValue) +{ + bool oldValue = mEsaCanGenerate; + + mEsaCanGenerate = newValue; + if (oldValue != newValue) + { + ChipLogDetail(AppServer, "mEsaCanGenerate updated to %d", static_cast(mEsaCanGenerate)); + MatterReportingAttributeChangeCallback(mEndpointId, DeviceEnergyManagement::Id, ESACanGenerate::Id); + } + + return CHIP_NO_ERROR; +} + +CHIP_ERROR DeviceEnergyManagementDelegate::SetESAState(ESAStateEnum newValue) +{ + ESAStateEnum oldValue = mEsaState; + + if (newValue >= ESAStateEnum::kUnknownEnumValue) + { + return CHIP_IM_GLOBAL_STATUS(ConstraintError); + } + + mEsaState = newValue; + if (oldValue != newValue) + { + ChipLogDetail(AppServer, "mEsaState updated to %d", static_cast(mEsaState)); + MatterReportingAttributeChangeCallback(mEndpointId, DeviceEnergyManagement::Id, ESAState::Id); + } + + return CHIP_NO_ERROR; +} + +CHIP_ERROR DeviceEnergyManagementDelegate::SetAbsMinPower(int64_t newValue) +{ + int64_t oldValue = mAbsMinPower; + + mAbsMinPower = newValue; + if (oldValue != newValue) + { + ChipLogDetail(AppServer, "mAbsMinPower updated to %d", static_cast(mAbsMinPower)); + MatterReportingAttributeChangeCallback(mEndpointId, DeviceEnergyManagement::Id, AbsMinPower::Id); + } + + return CHIP_NO_ERROR; +} + +CHIP_ERROR DeviceEnergyManagementDelegate::SetAbsMaxPower(int64_t newValue) +{ + int64_t oldValue = mAbsMaxPower; + + mAbsMaxPower = newValue; + if (oldValue != newValue) + { + ChipLogDetail(AppServer, "mAbsMaxPower updated to %d", static_cast(mAbsMaxPower)); + MatterReportingAttributeChangeCallback(mEndpointId, DeviceEnergyManagement::Id, AbsMaxPower::Id); + } + + return CHIP_NO_ERROR; +} + +CHIP_ERROR +DeviceEnergyManagementDelegate::SetPowerAdjustmentCapability(PowerAdjustmentCapability::TypeInfo::Type powerAdjustmentCapability) +{ + // TODO see Issue #31147 + return CHIP_NO_ERROR; +} + +CHIP_ERROR DeviceEnergyManagementDelegate::SetForecast(DataModel::Nullable forecast) +{ + // TODO see Issue #31147 + + return CHIP_NO_ERROR; +} diff --git a/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementManager.cpp b/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementManager.cpp new file mode 100644 index 00000000000000..c31e0624e4c743 --- /dev/null +++ b/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementManager.cpp @@ -0,0 +1,33 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +using namespace chip::app; +using namespace chip::app::Clusters; +using namespace chip::app::Clusters::DeviceEnergyManagement; + +CHIP_ERROR DeviceEnergyManagementManager::Init() +{ + return Instance::Init(); +} + +void DeviceEnergyManagementManager::Shutdown() +{ + Instance::Shutdown(); +} diff --git a/examples/energy-management-app/energy-management-common/src/EVSEManufacturerImpl.cpp b/examples/energy-management-app/energy-management-common/src/EVSEManufacturerImpl.cpp index 8daf1781103831..fe51c9da664b6d 100644 --- a/examples/energy-management-app/energy-management-common/src/EVSEManufacturerImpl.cpp +++ b/examples/energy-management-app/energy-management-common/src/EVSEManufacturerImpl.cpp @@ -18,53 +18,74 @@ #include #include +#include +using namespace chip; using namespace chip::app; using namespace chip::app::Clusters; using namespace chip::app::Clusters::EnergyEvse; -CHIP_ERROR EVSEManufacturer::Init(EnergyEvseManager * aInstance) +CHIP_ERROR EVSEManufacturer::Init() { /* Manufacturers should modify this to do any custom initialisation */ /* Register callbacks */ - EnergyEvseDelegate * dg = aInstance->GetDelegate(); + EnergyEvseDelegate * dg = GetEvseManufacturer()->GetDelegate(); if (dg == nullptr) { - ChipLogError(AppServer, "Delegate is not initialized"); + ChipLogError(AppServer, "EVSE Delegate is not initialized"); return CHIP_ERROR_UNINITIALIZED; } - dg->HwRegisterEvseCallbackHandler(ApplicationCallbackHandler, reinterpret_cast(nullptr)); + dg->HwRegisterEvseCallbackHandler(ApplicationCallbackHandler, reinterpret_cast(this)); - /* Set the EVSE Hardware Maximum current limit */ - // For Manufacturer to specify the hardware capability in mA - dg->HwSetMaxHardwareCurrentLimit(32000); - - // For Manufacturer to specify the CircuitCapacity (e.g. from DIP switches) - dg->HwSetCircuitCapacity(20000); - - /* For now let's pretend the EV is plugged in, and asking for demand */ - dg->HwSetState(StateEnum::kPluggedInDemand); - dg->HwSetCableAssemblyLimit(63000); - - /* For now let's pretend the vehicle ID is set */ - dg->HwSetVehicleID(CharSpan::fromCharString("TEST_VEHICLE_123456789")); - dg->HwSetVehicleID(CharSpan::fromCharString("TEST_VEHICLE_9876543210")); + /* + * This is an example implementation for manufacturers to consider + * + * For Manufacturer to specify the hardware capability in mA: + * dg->HwSetMaxHardwareCurrentLimit(32000); // 32A + * + * For Manufacturer to specify the CircuitCapacity in mA (e.g. from DIP switches) + * dg->HwSetCircuitCapacity(20000); // 20A + * + */ - /* This next one will fail because it is too long */ - dg->HwSetVehicleID(CharSpan::fromCharString("TEST_VEHICLE_9876543210TOOOOOOOOOOOOOOOOOOO")); - - /* For now let's pretend the RFID sensor was triggered - send an event */ - uint8_t uid[10] = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE }; - dg->HwSetRFID(ByteSpan(uid)); + /* Once the system is initialised then check to see if the state was restored + * (e.g. after a power outage), and if the Enable timer check needs to be started + */ + dg->ScheduleCheckOnEnabledTimeout(); return CHIP_NO_ERROR; } -CHIP_ERROR EVSEManufacturer::Shutdown(EnergyEvseManager * aInstance) -{ +/* + * When the EV is plugged in, and asking for demand change the state + * and set the CableAssembly current limit + * + * EnergyEvseDelegate * dg = GetEvseManufacturer()->GetDelegate(); + * if (dg == nullptr) + * { + * ChipLogError(AppServer, "Delegate is not initialized"); + * return CHIP_ERROR_UNINITIALIZED; + * } + * + * dg->HwSetState(StateEnum::kPluggedInDemand); + * dg->HwSetCableAssemblyLimit(63000); // 63A = 63000mA + * + * + * If the vehicle ID can be retrieved (e.g. over Powerline) + * dg->HwSetVehicleID(CharSpan::fromCharString("TEST_VEHICLE_123456789")); + * + * + * If the EVSE has an RFID sensor, the RFID value read can cause an event to be sent + * (e.g. can be used to indicate if a user as tried to activate the charging) + * + * uint8_t uid[10] = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xAA, 0xBB, 0xCC, 0xDD, 0xEE }; + * dg->HwSetRFID(ByteSpan(uid)); + */ +CHIP_ERROR EVSEManufacturer::Shutdown() +{ return CHIP_NO_ERROR; } @@ -78,6 +99,8 @@ CHIP_ERROR EVSEManufacturer::Shutdown(EnergyEvseManager * aInstance) */ void EVSEManufacturer::ApplicationCallbackHandler(const EVSECbInfo * cb, intptr_t arg) { + EVSEManufacturer * pClass = reinterpret_cast(arg); + switch (cb->type) { case EVSECallbackType::StateChanged: @@ -87,7 +110,177 @@ void EVSEManufacturer::ApplicationCallbackHandler(const EVSECbInfo * cb, intptr_ ChipLogProgress(AppServer, "EVSE callback - maxChargeCurrent changed to %ld", static_cast(cb->ChargingCurrent.maximumChargeCurrent)); break; + case EVSECallbackType::EnergyMeterReadingRequested: + ChipLogProgress(AppServer, "EVSE callback - EnergyMeterReadingRequested"); + if (cb->EnergyMeterReadingRequest.meterType == ChargingDischargingType::kCharging) + { + *(cb->EnergyMeterReadingRequest.energyMeterValuePtr) = pClass->mLastChargingEnergyMeter; + } + else + { + *(cb->EnergyMeterReadingRequest.energyMeterValuePtr) = pClass->mLastDischargingEnergyMeter; + } + break; + + default: + ChipLogError(AppServer, "Unhandled EVSE Callback type %d", static_cast(cb->type)); + } +} + +struct EVSETestEventSaveData +{ + int64_t mOldMaxHardwareCurrentLimit; + int64_t mOldCircuitCapacity; + int64_t mOldUserMaximumChargeCurrent; + int64_t mOldCableAssemblyLimit; + StateEnum mOldHwStateBasic; /* For storing hwState before Basic Func event */ + StateEnum mOldHwStatePluggedIn; /* For storing hwState before PluggedIn event */ + StateEnum mOldHwStatePluggedInDemand; /* For storing hwState before PluggedInDemand event */ +}; + +static EVSETestEventSaveData sEVSETestEventSaveData; + +EnergyEvseDelegate * GetEvseDelegate() +{ + EVSEManufacturer * mn = GetEvseManufacturer(); + VerifyOrDieWithMsg(mn != nullptr, AppServer, "EVSEManufacturer is null"); + EnergyEvseDelegate * dg = mn->GetDelegate(); + VerifyOrDieWithMsg(dg != nullptr, AppServer, "EVSE Delegate is null"); + + return dg; +} + +void SetTestEventTrigger_BasicFunctionality() +{ + EnergyEvseDelegate * dg = GetEvseDelegate(); + + sEVSETestEventSaveData.mOldMaxHardwareCurrentLimit = dg->HwGetMaxHardwareCurrentLimit(); + sEVSETestEventSaveData.mOldCircuitCapacity = dg->GetCircuitCapacity(); + sEVSETestEventSaveData.mOldUserMaximumChargeCurrent = dg->GetUserMaximumChargeCurrent(); + sEVSETestEventSaveData.mOldHwStateBasic = dg->HwGetState(); + + dg->HwSetMaxHardwareCurrentLimit(32000); + dg->HwSetCircuitCapacity(32000); + dg->SetUserMaximumChargeCurrent(32000); + dg->HwSetState(StateEnum::kNotPluggedIn); +} +void SetTestEventTrigger_BasicFunctionalityClear() +{ + EnergyEvseDelegate * dg = GetEvseDelegate(); + + dg->HwSetMaxHardwareCurrentLimit(sEVSETestEventSaveData.mOldMaxHardwareCurrentLimit); + dg->HwSetCircuitCapacity(sEVSETestEventSaveData.mOldCircuitCapacity); + dg->SetUserMaximumChargeCurrent(sEVSETestEventSaveData.mOldUserMaximumChargeCurrent); + dg->HwSetState(sEVSETestEventSaveData.mOldHwStateBasic); +} +void SetTestEventTrigger_EVPluggedIn() +{ + EnergyEvseDelegate * dg = GetEvseDelegate(); + + sEVSETestEventSaveData.mOldCableAssemblyLimit = dg->HwGetCableAssemblyLimit(); + sEVSETestEventSaveData.mOldHwStatePluggedIn = dg->HwGetState(); + + dg->HwSetCableAssemblyLimit(63000); + dg->HwSetState(StateEnum::kPluggedInNoDemand); +} +void SetTestEventTrigger_EVPluggedInClear() +{ + EnergyEvseDelegate * dg = GetEvseDelegate(); + dg->HwSetCableAssemblyLimit(sEVSETestEventSaveData.mOldCableAssemblyLimit); + dg->HwSetState(sEVSETestEventSaveData.mOldHwStatePluggedIn); +} + +void SetTestEventTrigger_EVChargeDemand() +{ + EnergyEvseDelegate * dg = GetEvseDelegate(); + + sEVSETestEventSaveData.mOldHwStatePluggedInDemand = dg->HwGetState(); + dg->HwSetState(StateEnum::kPluggedInDemand); +} +void SetTestEventTrigger_EVChargeDemandClear() +{ + EnergyEvseDelegate * dg = GetEvseDelegate(); + + dg->HwSetState(sEVSETestEventSaveData.mOldHwStatePluggedInDemand); +} +void SetTestEventTrigger_EVSEGroundFault() +{ + EnergyEvseDelegate * dg = GetEvseDelegate(); + + dg->HwSetFault(FaultStateEnum::kGroundFault); +} + +void SetTestEventTrigger_EVSEOverTemperatureFault() +{ + EnergyEvseDelegate * dg = GetEvseDelegate(); + + dg->HwSetFault(FaultStateEnum::kOverTemperature); +} + +void SetTestEventTrigger_EVSEFaultClear() +{ + EnergyEvseDelegate * dg = GetEvseDelegate(); + + dg->HwSetFault(FaultStateEnum::kNoError); +} + +void SetTestEventTrigger_EVSEDiagnosticsComplete() +{ + EnergyEvseDelegate * dg = GetEvseDelegate(); + + dg->HwDiagnosticsComplete(); +} + +bool HandleEnergyEvseTestEventTrigger(uint64_t eventTrigger) +{ + EnergyEvseTrigger trigger = static_cast(eventTrigger); + + switch (trigger) + { + case EnergyEvseTrigger::kBasicFunctionality: + ChipLogProgress(Support, "[EnergyEVSE-Test-Event] => Basic Functionality install"); + SetTestEventTrigger_BasicFunctionality(); + break; + case EnergyEvseTrigger::kBasicFunctionalityClear: + ChipLogProgress(Support, "[EnergyEVSE-Test-Event] => Basic Functionality clear"); + SetTestEventTrigger_BasicFunctionalityClear(); + break; + case EnergyEvseTrigger::kEVPluggedIn: + ChipLogProgress(Support, "[EnergyEVSE-Test-Event] => EV plugged in"); + SetTestEventTrigger_EVPluggedIn(); + break; + case EnergyEvseTrigger::kEVPluggedInClear: + ChipLogProgress(Support, "[EnergyEVSE-Test-Event] => EV unplugged"); + SetTestEventTrigger_EVPluggedInClear(); + break; + case EnergyEvseTrigger::kEVChargeDemand: + ChipLogProgress(Support, "[EnergyEVSE-Test-Event] => EV Charge Demand"); + SetTestEventTrigger_EVChargeDemand(); + break; + case EnergyEvseTrigger::kEVChargeDemandClear: + ChipLogProgress(Support, "[EnergyEVSE-Test-Event] => EV Charge NoDemand"); + SetTestEventTrigger_EVChargeDemandClear(); + break; + case EnergyEvseTrigger::kEVSEGroundFault: + ChipLogProgress(Support, "[EnergyEVSE-Test-Event] => EVSE has a GroundFault fault"); + SetTestEventTrigger_EVSEGroundFault(); + break; + case EnergyEvseTrigger::kEVSEOverTemperatureFault: + ChipLogProgress(Support, "[EnergyEVSE-Test-Event] => EVSE has a OverTemperature fault"); + SetTestEventTrigger_EVSEOverTemperatureFault(); + break; + case EnergyEvseTrigger::kEVSEFaultClear: + ChipLogProgress(Support, "[EnergyEVSE-Test-Event] => EVSE faults have cleared"); + SetTestEventTrigger_EVSEFaultClear(); + break; + case EnergyEvseTrigger::kEVSEDiagnosticsComplete: + ChipLogProgress(Support, "[EnergyEVSE-Test-Event] => EVSE Diagnostics Completed"); + SetTestEventTrigger_EVSEDiagnosticsComplete(); + break; + default: - ChipLogError(AppServer, "Unhandler EVSE Callback type %d", static_cast(cb->type)); + return false; } + + return true; } diff --git a/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp b/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp index 4cc83eaaf8a835..2b4a6e44f5fcea 100644 --- a/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp +++ b/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp @@ -20,6 +20,7 @@ #include #include #include +#include using namespace chip; using namespace chip::app; @@ -41,6 +42,13 @@ EnergyEvseDelegate::~EnergyEvseDelegate() } } +/** + * @brief Helper function to get current timestamp in Epoch format + * + * @param chipEpoch reference to hold return timestamp + */ +CHIP_ERROR GetEpochTS(uint32_t & chipEpoch); + /** * @brief Called when EVSE cluster receives Disable command */ @@ -48,33 +56,10 @@ Status EnergyEvseDelegate::Disable() { ChipLogProgress(AppServer, "EnergyEvseDelegate::Disable()"); - /* Update State */ - switch (mHwState) - { - case StateEnum::kNotPluggedIn: - SetState(StateEnum::kNotPluggedIn); - break; - - case StateEnum::kPluggedInNoDemand: - SetState(StateEnum::kPluggedInNoDemand); - break; - - case StateEnum::kPluggedInDemand: - SetState(StateEnum::kPluggedInDemand); - break; - - default: - ChipLogError(AppServer, "Unexpected EVSE hardware state"); - SetState(StateEnum::kFault); - break; - } - - /* update SupplyState */ - SetSupplyState(SupplyStateEnum::kDisabled); - + DataModel::Nullable disableTime(0); /* update ChargingEnabledUntil & DischargingEnabledUntil to show 0 */ - SetChargingEnabledUntil(0); - SetDischargingEnabledUntil(0); + SetChargingEnabledUntil(disableTime); + SetDischargingEnabledUntil(disableTime); /* update MinimumChargeCurrent & MaximumChargeCurrent to 0 */ SetMinimumChargeCurrent(0); @@ -83,10 +68,7 @@ Status EnergyEvseDelegate::Disable() /* update MaximumDischargeCurrent to 0 */ SetMaximumDischargeCurrent(0); - NotifyApplicationStateChange(); - // TODO: Generate events - - return Status::Success; + return HandleStateMachineEvent(EVSEStateMachineEvent::DisabledEvent); } /** @@ -123,95 +105,131 @@ Status EnergyEvseDelegate::EnableCharging(const DataModel::Nullable & { /* Charging enabled indefinitely */ ChipLogError(AppServer, "Charging enabled indefinitely"); + SetChargingEnabledUntil(chargingEnabledUntil); } else { /* check chargingEnabledUntil is in the future */ ChipLogError(AppServer, "Charging enabled until: %lu", static_cast(chargingEnabledUntil.Value())); - // TODO - // if (checkChargingEnabled) + SetChargingEnabledUntil(chargingEnabledUntil); } - /* Check current state isn't already enabled */ - - /* If charging is already enabled, check that the parameters may have - changed, these may override an existing charging command */ - switch (mHwState) - { - case StateEnum::kNotPluggedIn: - // TODO handle errors here - SetState(StateEnum::kNotPluggedIn); - break; - - case StateEnum::kPluggedInNoDemand: - // TODO handle errors here - // TODO REFACTOR per Andrei's comment in PR30857 - can we collapse this switch statement? - SetState(StateEnum::kPluggedInNoDemand); - break; - - case StateEnum::kPluggedInDemand: - /* If the EVSE is asking for demand then enable charging */ - SetState(StateEnum::kPluggedInCharging); - break; - - default: - ChipLogError(AppServer, "Unexpected EVSE hardware state"); - SetState(StateEnum::kFault); - break; - } - - /* update SupplyState to say that charging is now enabled */ - SetSupplyState(SupplyStateEnum::kChargingEnabled); - /* If it looks ok, store the min & max charging current */ mMaximumChargingCurrentLimitFromCommand = maximumChargeCurrent; SetMinimumChargeCurrent(minimumChargeCurrent); // TODO persist these to KVS - // TODO: Generate events + ComputeMaxChargeCurrentLimit(); - NotifyApplicationStateChange(); - - return this->ComputeMaxChargeCurrentLimit(); + return HandleStateMachineEvent(EVSEStateMachineEvent::ChargingEnabledEvent); } /** * @brief Called when EVSE cluster receives EnableDischarging command * * @param dischargingEnabledUntil (can be null to indefinite discharging) - * @param maximumChargeCurrent (in mA) + * @param maximumDischargeCurrent (in mA) */ Status EnergyEvseDelegate::EnableDischarging(const DataModel::Nullable & dischargingEnabledUntil, const int64_t & maximumDischargeCurrent) { ChipLogProgress(AppServer, "EnergyEvseDelegate::EnableDischarging() called."); - /* update SupplyState */ - SetSupplyState(SupplyStateEnum::kDischargingEnabled); + // TODO save the maxDischarging Current + // TODO Do something with timestamp - // TODO: Generate events + return HandleStateMachineEvent(EVSEStateMachineEvent::DischargingEnabledEvent); +} - NotifyApplicationStateChange(); +/** + * @brief Routine to help schedule a timer callback to check if the EVSE should go disabled + * + * If the clock is sync'd we can work out when to call back to check when to disable the EVSE + * automatically. If the clock isn't sync'd the we just set a timer to check once every 30s. + * + * We first check the SupplyState to check if it is EnabledCharging or EnabledDischarging + * Then if the EnabledCharging/DischargingUntil is not Null, then we compute a delay to come + * back and check. + */ +Status EnergyEvseDelegate::ScheduleCheckOnEnabledTimeout() +{ + + uint32_t chipEpoch = 0; + DataModel::Nullable enabledUntilTime; + if (mSupplyState == SupplyStateEnum::kChargingEnabled) + { + enabledUntilTime = GetChargingEnabledUntil(); + } + else if (mSupplyState == SupplyStateEnum::kDischargingEnabled) + { + enabledUntilTime = GetDischargingEnabledUntil(); + } + else + { + // In all other states the EVSE is disabled + return Status::Success; + } + + if (enabledUntilTime.IsNull()) + { + /* This is enabled indefinitely so don't schedule a callback */ + return Status::Success; + } + + CHIP_ERROR err = GetEpochTS(chipEpoch); + if (err == CHIP_NO_ERROR) + { + /* time is sync'd */ + int32_t delta = static_cast(enabledUntilTime.Value() - chipEpoch); + if (delta > 0) + { + /* The timer hasn't expired yet - set a timer to check in the future */ + ChipLogDetail(AppServer, "Setting EVSE Enable check timer for %ld seconds", static_cast(delta)); + DeviceLayer::SystemLayer().StartTimer(System::Clock::Seconds32(delta), EvseCheckTimerExpiry, this); + } + else + { + /* we have gone past the enabledUntilTime - so we need to disable */ + ChipLogDetail(AppServer, "EVSE enable time expired, disabling charging"); + Disable(); + } + } + else if (err == CHIP_ERROR_REAL_TIME_NOT_SYNCED) + { + /* Real time isn't sync'd -lets check again in 30 seconds - otherwise keep the charger enabled */ + DeviceLayer::SystemLayer().StartTimer(System::Clock::Seconds32(kPeriodicCheckIntervalRealTimeClockNotSynced), + EvseCheckTimerExpiry, this); + } return Status::Success; } +void EnergyEvseDelegate::EvseCheckTimerExpiry(System::Layer * systemLayer, void * delegate) +{ + EnergyEvseDelegate * dg = reinterpret_cast(delegate); + + dg->ScheduleCheckOnEnabledTimeout(); +} + /** * @brief Called when EVSE cluster receives StartDiagnostics command + * + * NOTE: Application code needs to call HwDiagnosticsComplete + * once diagnostics have been completed. */ Status EnergyEvseDelegate::StartDiagnostics() { /* For EVSE manufacturers to customize */ ChipLogProgress(AppServer, "EnergyEvseDelegate::StartDiagnostics()"); - /* update SupplyState to indicate we are now in Diagnostics mode */ - SetSupplyState(SupplyStateEnum::kDisabledDiagnostics); - - // TODO: Generate events - - // TODO: Notify Application to implement Diagnostics + if (mSupplyState != SupplyStateEnum::kDisabled) + { + ChipLogError(AppServer, "EVSE: cannot be put into diagnostics mode if it is not Disabled!"); + return Status::Failure; + } - NotifyApplicationStateChange(); + // Update the SupplyState - this will automatically callback the Application StateChanged callback + SetSupplyState(SupplyStateEnum::kDisabledDiagnostics); return Status::Success; } @@ -259,7 +277,7 @@ Status EnergyEvseDelegate::HwSetMaxHardwareCurrentLimit(int64_t currentmA) /* there is no attribute to store this so store in private variable */ mMaxHardwareCurrentLimit = currentmA; - return this->ComputeMaxChargeCurrentLimit(); + return ComputeMaxChargeCurrentLimit(); } /** @@ -281,7 +299,7 @@ Status EnergyEvseDelegate::HwSetCircuitCapacity(int64_t currentmA) mCircuitCapacity = currentmA; MatterReportingAttributeChangeCallback(mEndpointId, EnergyEvse::Id, CircuitCapacity::Id); - return this->ComputeMaxChargeCurrentLimit(); + return ComputeMaxChargeCurrentLimit(); } /** @@ -306,40 +324,99 @@ Status EnergyEvseDelegate::HwSetCableAssemblyLimit(int64_t currentmA) /* there is no attribute to store this so store in private variable */ mCableAssemblyCurrentLimit = currentmA; - return this->ComputeMaxChargeCurrentLimit(); + return ComputeMaxChargeCurrentLimit(); } /** * @brief Called by EVSE Hardware to indicate if EV is detected * - * The only allowed states that the EVSE hardware can set are: + * The only allowed states that the EVSE hardware can tell us about are: * kNotPluggedIn * kPluggedInNoDemand * kPluggedInDemand * + * The actual overall state is more complex and includes faults, + * enable & disable charging or discharging etc. + * * @param StateEnum - the state of the EV being plugged in and asking for demand etc */ -Status EnergyEvseDelegate::HwSetState(StateEnum state) +Status EnergyEvseDelegate::HwSetState(StateEnum newState) { - switch (state) + switch (newState) { case StateEnum::kNotPluggedIn: - // TODO - work out logic here - mHwState = state; + switch (mHwState) + { + case StateEnum::kNotPluggedIn: + // No change + break; + case StateEnum::kPluggedInNoDemand: + case StateEnum::kPluggedInDemand: + /* EVSE has been unplugged now */ + mHwState = newState; + HandleStateMachineEvent(EVSEStateMachineEvent::EVNotDetectedEvent); + break; + + default: + // invalid value for mHwState + ChipLogError(AppServer, "HwSetState newstate(kNotPluggedIn) - Invalid value for mHwState"); + mHwState = newState; // set it to the new state anyway + break; + } break; + case StateEnum::kPluggedInNoDemand: - // TODO - work out logic here - mHwState = state; + switch (mHwState) + { + case StateEnum::kNotPluggedIn: + /* EV was unplugged, now is plugged in */ + mHwState = newState; + HandleStateMachineEvent(EVSEStateMachineEvent::EVPluggedInEvent); + break; + case StateEnum::kPluggedInNoDemand: + // No change + break; + case StateEnum::kPluggedInDemand: + /* EV was plugged in and wanted demand, now doesn't want demand */ + mHwState = newState; + HandleStateMachineEvent(EVSEStateMachineEvent::EVNoDemandEvent); + break; + default: + // invalid value for mHwState + ChipLogError(AppServer, "HwSetState newstate(kPluggedInNoDemand) - Invalid value for mHwState"); + mHwState = newState; // set it to the new state anyway + break; + } break; case StateEnum::kPluggedInDemand: - // TODO - work out logic here - mHwState = state; + switch (mHwState) + { + case StateEnum::kNotPluggedIn: + /* EV was unplugged, now is plugged in and wants demand */ + mHwState = newState; + HandleStateMachineEvent(EVSEStateMachineEvent::EVPluggedInEvent); + HandleStateMachineEvent(EVSEStateMachineEvent::EVDemandEvent); + break; + case StateEnum::kPluggedInNoDemand: + /* EV was plugged in and didn't want demand, now does want demand */ + mHwState = newState; + HandleStateMachineEvent(EVSEStateMachineEvent::EVDemandEvent); + break; + case StateEnum::kPluggedInDemand: + // No change + break; + default: + // invalid value for mHwState + ChipLogError(AppServer, "HwSetState newstate(kPluggedInDemand) - Invalid value for mHwState"); + mHwState = newState; // set it to the new state anyway + break; + } break; default: /* All other states should be managed by the Delegate */ - // TODO (assert?) - break; + ChipLogError(AppServer, "HwSetState received invalid enum from caller"); + return Status::Failure; } return Status::Success; @@ -350,29 +427,35 @@ Status EnergyEvseDelegate::HwSetState(StateEnum state) * * @param FaultStateEnum - the fault condition detected */ -Status EnergyEvseDelegate::HwSetFault(FaultStateEnum fault) +Status EnergyEvseDelegate::HwSetFault(FaultStateEnum newFaultState) { ChipLogProgress(AppServer, "EnergyEvseDelegate::Fault()"); - if (fault == FaultStateEnum::kNoError) + if (mFaultState == newFaultState) { - /* Update State to previous state */ - // TODO: need to work out the logic here! + ChipLogError(AppServer, "No change in fault state, ignoring call"); + return Status::Failure; + } + + /** Before we do anything we log the fault + * any change in FaultState reports previous fault and new fault + * and the state prior to the fault being raised */ + SendFaultEvent(newFaultState); + + /* Updated FaultState before we call into the handlers */ + SetFaultState(newFaultState); - /* Update SupplyState to previous state */ + if (newFaultState == FaultStateEnum::kNoError) + { + /* Fault has been cleared */ + HandleStateMachineEvent(EVSEStateMachineEvent::FaultCleared); } else { - /* Update State & SupplyState */ - SetState(StateEnum::kFault); - SetSupplyState(SupplyStateEnum::kDisabledError); + /* a new Fault has been raised */ + HandleStateMachineEvent(EVSEStateMachineEvent::FaultRaised); } - /* Update FaultState */ - SetFaultState(fault); - - // TODO: Generate events - return Status::Success; } @@ -436,10 +519,329 @@ Status EnergyEvseDelegate::HwSetVehicleID(const CharSpan & newValue) return Status::Success; } +/** + * @brief Called by EVSE Hardware to indicate that it has finished its diagnostics test + */ +Status EnergyEvseDelegate::HwDiagnosticsComplete() +{ + if (mSupplyState != SupplyStateEnum::kDisabledDiagnostics) + { + ChipLogError(AppServer, "Incorrect state to be completing diagnostics"); + return Status::Failure; + } + + /* Restore the SupplyState to Disabled (per spec) - client will need to + * re-enable charging or discharging to get out of this state */ + SetSupplyState(SupplyStateEnum::kDisabled); + + return Status::Success; +} /* --------------------------------------------------------------------------- * Functions below are private helper functions internal to the delegate */ +/** + * @brief Main EVSE state machine + * + * This routine handles state transition events to determine behaviour + * + * + */ +Status EnergyEvseDelegate::HandleStateMachineEvent(EVSEStateMachineEvent event) +{ + switch (event) + { + case EVSEStateMachineEvent::EVPluggedInEvent: + ChipLogDetail(AppServer, "EVSE: EV PluggedIn event"); + return HandleEVPluggedInEvent(); + break; + case EVSEStateMachineEvent::EVNotDetectedEvent: + ChipLogDetail(AppServer, "EVSE: EV NotDetected event"); + return HandleEVNotDetectedEvent(); + break; + case EVSEStateMachineEvent::EVNoDemandEvent: + ChipLogDetail(AppServer, "EVSE: EV NoDemand event"); + return HandleEVNoDemandEvent(); + break; + case EVSEStateMachineEvent::EVDemandEvent: + ChipLogDetail(AppServer, "EVSE: EV Demand event"); + return HandleEVDemandEvent(); + break; + case EVSEStateMachineEvent::ChargingEnabledEvent: + ChipLogDetail(AppServer, "EVSE: ChargingEnabled event"); + return HandleChargingEnabledEvent(); + break; + case EVSEStateMachineEvent::DischargingEnabledEvent: + ChipLogDetail(AppServer, "EVSE: DischargingEnabled event"); + return HandleDischargingEnabledEvent(); + break; + case EVSEStateMachineEvent::DisabledEvent: + ChipLogDetail(AppServer, "EVSE: Disabled event"); + return HandleDisabledEvent(); + break; + case EVSEStateMachineEvent::FaultRaised: + ChipLogDetail(AppServer, "EVSE: FaultRaised event"); + return HandleFaultRaised(); + break; + case EVSEStateMachineEvent::FaultCleared: + ChipLogDetail(AppServer, "EVSE: FaultCleared event"); + return HandleFaultCleared(); + break; + default: + return Status::Failure; + } + return Status::Success; +} + +Status EnergyEvseDelegate::HandleEVPluggedInEvent() +{ + /* check if we are already plugged in or not */ + if (mState == StateEnum::kNotPluggedIn) + { + /* EV was not plugged in - start a new session */ + // TODO get energy meter readings + mSession.StartSession(0, 0); + SendEVConnectedEvent(); + + /* Set the state to either PluggedInNoDemand or PluggedInDemand as indicated by mHwState */ + SetState(mHwState); + } + // else we are already plugged in - ignore + return Status::Success; +} + +Status EnergyEvseDelegate::HandleEVNotDetectedEvent() +{ + if (mState == StateEnum::kPluggedInCharging || mState == StateEnum::kPluggedInDischarging) + { + /* + * EV was transferring current - unusual to get to this case without + * first having the state set to kPluggedInNoDemand or kPluggedInDemand + */ + SendEnergyTransferStoppedEvent(EnergyTransferStoppedReasonEnum::kOther); + } + + SendEVNotDetectedEvent(); + SetState(StateEnum::kNotPluggedIn); + return Status::Success; +} + +Status EnergyEvseDelegate::HandleEVNoDemandEvent() +{ + if (mState == StateEnum::kPluggedInCharging || mState == StateEnum::kPluggedInDischarging) + { + /* + * EV was transferring current - EV decided to stop + */ + mSession.RecalculateSessionDuration(); + SendEnergyTransferStoppedEvent(EnergyTransferStoppedReasonEnum::kEVStopped); + } + /* We must still be plugged in to get here - so no need to check if we are plugged in! */ + SetState(StateEnum::kPluggedInNoDemand); + return Status::Success; +} +Status EnergyEvseDelegate::HandleEVDemandEvent() +{ + /* Check to see if the supply is enabled for charging / discharging*/ + switch (mSupplyState) + { + case SupplyStateEnum::kChargingEnabled: + ComputeMaxChargeCurrentLimit(); + SetState(StateEnum::kPluggedInCharging); + SendEnergyTransferStartedEvent(); + break; + case SupplyStateEnum::kDischargingEnabled: + // TODO ComputeMaxDischargeCurrentLimit() - Needs to be implemented + SetState(StateEnum::kPluggedInDischarging); + SendEnergyTransferStartedEvent(); + break; + case SupplyStateEnum::kDisabled: + case SupplyStateEnum::kDisabledError: + case SupplyStateEnum::kDisabledDiagnostics: + /* We must be plugged in, and the event is asking for demand + * but we can't charge or discharge now - leave it as kPluggedInDemand */ + SetState(StateEnum::kPluggedInDemand); + break; + default: + break; + } + return Status::Success; +} + +Status EnergyEvseDelegate::CheckFaultOrDiagnostic() +{ + if (mFaultState != FaultStateEnum::kNoError) + { + ChipLogError(AppServer, "EVSE: Trying to handle command when fault is present"); + return Status::Failure; + } + + if (mSupplyState == SupplyStateEnum::kDisabledDiagnostics) + { + ChipLogError(AppServer, "EVSE: Trying to handle command when in diagnostics mode"); + return Status::Failure; + } + return Status::Success; +} + +Status EnergyEvseDelegate::HandleChargingEnabledEvent() +{ + /* Check there is no Fault or Diagnostics condition */ + Status status = CheckFaultOrDiagnostic(); + if (status != Status::Success) + { + return status; + } + + /* update SupplyState to say that charging is now enabled */ + SetSupplyState(SupplyStateEnum::kChargingEnabled); + + switch (mState) + { + case StateEnum::kNotPluggedIn: + case StateEnum::kPluggedInNoDemand: + break; + case StateEnum::kPluggedInDemand: + ComputeMaxChargeCurrentLimit(); + SetState(StateEnum::kPluggedInCharging); + SendEnergyTransferStartedEvent(); + break; + case StateEnum::kPluggedInCharging: + break; + case StateEnum::kPluggedInDischarging: + /* Switched from discharging to charging */ + SendEnergyTransferStoppedEvent(EnergyTransferStoppedReasonEnum::kEVSEStopped); + + ComputeMaxChargeCurrentLimit(); + SetState(StateEnum::kPluggedInCharging); + SendEnergyTransferStartedEvent(); + break; + default: + break; + } + + ScheduleCheckOnEnabledTimeout(); + + return Status::Success; +} +Status EnergyEvseDelegate::HandleDischargingEnabledEvent() +{ + /* Check there is no Fault or Diagnostics condition */ + Status status = CheckFaultOrDiagnostic(); + if (status != Status::Success) + { + return status; + } + /* update SupplyState to say that charging is now enabled */ + SetSupplyState(SupplyStateEnum::kDischargingEnabled); + + switch (mState) + { + case StateEnum::kNotPluggedIn: + case StateEnum::kPluggedInNoDemand: + break; + case StateEnum::kPluggedInDemand: + // TODO call ComputeMaxDischargeCurrentLimit() + SetState(StateEnum::kPluggedInDischarging); + SendEnergyTransferStartedEvent(); + break; + case StateEnum::kPluggedInCharging: + /* Switched from charging to discharging */ + SendEnergyTransferStoppedEvent(EnergyTransferStoppedReasonEnum::kEVSEStopped); + + // TODO call ComputeMaxDischargeCurrentLimit() + SetState(StateEnum::kPluggedInDischarging); + SendEnergyTransferStartedEvent(); + break; + case StateEnum::kPluggedInDischarging: + default: + break; + } + + ScheduleCheckOnEnabledTimeout(); + + return Status::Success; +} +Status EnergyEvseDelegate::HandleDisabledEvent() +{ + /* Check there is no Fault or Diagnostics condition */ + Status status = CheckFaultOrDiagnostic(); + if (status != Status::Success) + { + return status; + } + + /* update SupplyState to say that charging is now enabled */ + SetSupplyState(SupplyStateEnum::kDisabled); + + switch (mState) + { + case StateEnum::kNotPluggedIn: + case StateEnum::kPluggedInNoDemand: + case StateEnum::kPluggedInDemand: + break; + case StateEnum::kPluggedInCharging: + case StateEnum::kPluggedInDischarging: + SendEnergyTransferStoppedEvent(EnergyTransferStoppedReasonEnum::kEVSEStopped); + SetState(mHwState); + break; + default: + break; + } + + return Status::Success; +} + +/** + * @brief This handles the new fault + * + * Note that if multiple faults happen and this is called repeatedly + * We only save the previous State and SupplyState if its the first raising + * of the fault, so we can restore the state back once all faults have cleared +)*/ +Status EnergyEvseDelegate::HandleFaultRaised() +{ + /* Save the current State and SupplyState so we can restore them if the fault clears */ + if (mStateBeforeFault == StateEnum::kUnknownEnumValue) + { + /* No existing fault - save this value to restore it later if it clears */ + mStateBeforeFault = mState; + } + + if (mSupplyStateBeforeFault == SupplyStateEnum::kUnknownEnumValue) + { + /* No existing fault */ + mSupplyStateBeforeFault = mSupplyState; + } + + /* Update State & SupplyState */ + SetState(StateEnum::kFault); + SetSupplyState(SupplyStateEnum::kDisabledError); + + return Status::Success; +} +Status EnergyEvseDelegate::HandleFaultCleared() +{ + /* Check that something strange hasn't happened */ + if ((mStateBeforeFault == StateEnum::kUnknownEnumValue) || (mSupplyStateBeforeFault == SupplyStateEnum::kUnknownEnumValue)) + { + ChipLogError(AppServer, "EVSE: Something wrong trying to clear fault"); + return Status::Failure; + } + + /* Restore the State and SupplyState back to old values once all the faults have cleared + * Changing the State should notify the application, so it can continue charging etc + */ + SetState(mStateBeforeFault); + SetSupplyState(mSupplyStateBeforeFault); + + /* put back the sentinel to catch new faults if more are raised */ + mStateBeforeFault = StateEnum::kUnknownEnumValue; + mSupplyStateBeforeFault = SupplyStateEnum::kUnknownEnumValue; + + return Status::Success; +} + /** * @brief Called to compute the safe charging current limit * @@ -507,6 +909,172 @@ Status EnergyEvseDelegate::NotifyApplicationStateChange() return Status::Success; } +Status EnergyEvseDelegate::GetEVSEEnergyMeterValue(ChargingDischargingType meterType, int64_t & aMeterValue) +{ + EVSECbInfo cbInfo; + + cbInfo.type = EVSECallbackType::EnergyMeterReadingRequested; + + cbInfo.EnergyMeterReadingRequest.meterType = meterType; + cbInfo.EnergyMeterReadingRequest.energyMeterValuePtr = &aMeterValue; + + if (mCallbacks.handler != nullptr) + { + mCallbacks.handler(&cbInfo, mCallbacks.arg); + } + + return Status::Success; +} + +Status EnergyEvseDelegate::SendEVConnectedEvent() +{ + Events::EVConnected::Type event; + EventNumber eventNumber; + + if (mSession.mSessionID.IsNull()) + { + ChipLogError(AppServer, "SessionID is Null"); + return Status::Failure; + } + + event.sessionID = mSession.mSessionID.Value(); + + CHIP_ERROR err = LogEvent(event, mEndpointId, eventNumber); + if (CHIP_NO_ERROR != err) + { + ChipLogError(AppServer, "Unable to send notify event: %" CHIP_ERROR_FORMAT, err.Format()); + return Status::Failure; + } + return Status::Success; +} + +Status EnergyEvseDelegate::SendEVNotDetectedEvent() +{ + Events::EVNotDetected::Type event; + EventNumber eventNumber; + + if (mSession.mSessionID.IsNull()) + { + ChipLogError(AppServer, "SessionID is Null"); + return Status::Failure; + } + + event.sessionID = mSession.mSessionID.Value(); + event.state = mState; + event.sessionDuration = mSession.mSessionDuration.Value(); + event.sessionEnergyCharged = mSession.mSessionEnergyCharged.Value(); + event.sessionEnergyDischarged = MakeOptional(mSession.mSessionEnergyDischarged.Value()); + + CHIP_ERROR err = LogEvent(event, mEndpointId, eventNumber); + if (CHIP_NO_ERROR != err) + { + ChipLogError(AppServer, "Unable to send notify event: %" CHIP_ERROR_FORMAT, err.Format()); + return Status::Failure; + } + return Status::Success; +} + +Status EnergyEvseDelegate::SendEnergyTransferStartedEvent() +{ + Events::EnergyTransferStarted::Type event; + EventNumber eventNumber; + + if (mSession.mSessionID.IsNull()) + { + ChipLogError(AppServer, "SessionID is Null"); + return Status::Failure; + } + + event.sessionID = mSession.mSessionID.Value(); + event.state = mState; + /** + * A positive value indicates the EV has been enabled for charging and the value is + * taken directly from the MaximumChargeCurrent attribute. + * A negative value indicates that the EV has been enabled for discharging and the value can be taken + * from the MaximumDischargeCurrent attribute with its sign inverted. + */ + + if (mState == StateEnum::kPluggedInCharging) + { + /* Sample the energy meter for charging */ + GetEVSEEnergyMeterValue(ChargingDischargingType::kCharging, mMeterValueAtEnergyTransferStart); + event.maximumCurrent = mMaximumChargeCurrent; + } + else if (mState == StateEnum::kPluggedInDischarging) + { + /* Sample the energy meter for discharging */ + GetEVSEEnergyMeterValue(ChargingDischargingType::kDischarging, mMeterValueAtEnergyTransferStart); + + /* discharging should have a negative current */ + event.maximumCurrent = -mMaximumDischargeCurrent; + } + + CHIP_ERROR err = LogEvent(event, mEndpointId, eventNumber); + if (CHIP_NO_ERROR != err) + { + ChipLogError(AppServer, "Unable to send notify event: %" CHIP_ERROR_FORMAT, err.Format()); + return Status::Failure; + } + + return Status::Success; +} +Status EnergyEvseDelegate::SendEnergyTransferStoppedEvent(EnergyTransferStoppedReasonEnum reason) +{ + Events::EnergyTransferStopped::Type event; + EventNumber eventNumber; + + if (mSession.mSessionID.IsNull()) + { + ChipLogError(AppServer, "SessionID is Null"); + return Status::Failure; + } + + event.sessionID = mSession.mSessionID.Value(); + event.state = mState; + event.reason = reason; + int64_t meterValueNow = 0; + + if (mState == StateEnum::kPluggedInCharging) + { + GetEVSEEnergyMeterValue(ChargingDischargingType::kCharging, meterValueNow); + event.energyTransferred = meterValueNow - mMeterValueAtEnergyTransferStart; + } + else if (mState == StateEnum::kPluggedInDischarging) + { + GetEVSEEnergyMeterValue(ChargingDischargingType::kDischarging, meterValueNow); + + /* discharging should have a negative value */ + event.energyTransferred = mMeterValueAtEnergyTransferStart - meterValueNow; + } + + CHIP_ERROR err = LogEvent(event, mEndpointId, eventNumber); + if (CHIP_NO_ERROR != err) + { + ChipLogError(AppServer, "Unable to send notify event: %" CHIP_ERROR_FORMAT, err.Format()); + return Status::Failure; + } + return Status::Success; +} + +Status EnergyEvseDelegate::SendFaultEvent(FaultStateEnum newFaultState) +{ + Events::Fault::Type event; + EventNumber eventNumber; + + event.sessionID = mSession.mSessionID; // Note here the event sessionID can be Null! + event.state = mState; // This is the state prior to the fault being raised + event.faultStatePreviousState = mFaultState; + event.faultStateCurrentState = newFaultState; + + CHIP_ERROR err = LogEvent(event, mEndpointId, eventNumber); + if (CHIP_NO_ERROR != err) + { + ChipLogError(AppServer, "Unable to send notify event: %" CHIP_ERROR_FORMAT, err.Format()); + return Status::Failure; + } + return Status::Success; +} + /** * Attribute methods */ @@ -529,6 +1097,7 @@ CHIP_ERROR EnergyEvseDelegate::SetState(StateEnum newValue) { ChipLogDetail(AppServer, "State updated to %d", static_cast(mState)); MatterReportingAttributeChangeCallback(mEndpointId, EnergyEvse::Id, State::Id); + NotifyApplicationStateChange(); } return CHIP_NO_ERROR; @@ -554,6 +1123,7 @@ CHIP_ERROR EnergyEvseDelegate::SetSupplyState(SupplyStateEnum newValue) { ChipLogDetail(AppServer, "SupplyState updated to %d", static_cast(mSupplyState)); MatterReportingAttributeChangeCallback(mEndpointId, EnergyEvse::Id, SupplyState::Id); + NotifyApplicationStateChange(); } return CHIP_NO_ERROR; } @@ -588,17 +1158,30 @@ DataModel::Nullable EnergyEvseDelegate::GetChargingEnabledUntil() return mChargingEnabledUntil; } -CHIP_ERROR EnergyEvseDelegate::SetChargingEnabledUntil(uint32_t newValue) +CHIP_ERROR EnergyEvseDelegate::SetChargingEnabledUntil(DataModel::Nullable newValue) { DataModel::Nullable oldValue = mChargingEnabledUntil; - mChargingEnabledUntil = MakeNullable(newValue); - if ((oldValue.IsNull()) || (oldValue.Value() != newValue)) + mChargingEnabledUntil = newValue; + if (oldValue != newValue) { - ChipLogDetail(AppServer, "ChargingEnabledUntil updated to %lu", - static_cast(mChargingEnabledUntil.Value())); + if (newValue.IsNull()) + { + ChipLogDetail(AppServer, "ChargingEnabledUntil updated to Null"); + } + else + { + ChipLogDetail(AppServer, "ChargingEnabledUntil updated to %lu", + static_cast(mChargingEnabledUntil.Value())); + } + + // Write new value to persistent storage. + ConcreteAttributePath path = ConcreteAttributePath(mEndpointId, EnergyEvse::Id, ChargingEnabledUntil::Id); + GetSafeAttributePersistenceProvider()->WriteScalarValue(path, mChargingEnabledUntil); + MatterReportingAttributeChangeCallback(mEndpointId, EnergyEvse::Id, ChargingEnabledUntil::Id); } + return CHIP_NO_ERROR; } @@ -608,17 +1191,29 @@ DataModel::Nullable EnergyEvseDelegate::GetDischargingEnabledUntil() return mDischargingEnabledUntil; } -CHIP_ERROR EnergyEvseDelegate::SetDischargingEnabledUntil(uint32_t newValue) +CHIP_ERROR EnergyEvseDelegate::SetDischargingEnabledUntil(DataModel::Nullable newValue) { DataModel::Nullable oldValue = mDischargingEnabledUntil; - mDischargingEnabledUntil = MakeNullable(newValue); - if ((oldValue.IsNull()) || (oldValue.Value() != newValue)) + mDischargingEnabledUntil = newValue; + if (oldValue != newValue) { - ChipLogDetail(AppServer, "DischargingEnabledUntil updated to %lu", - static_cast(mDischargingEnabledUntil.Value())); + if (newValue.IsNull()) + { + ChipLogDetail(AppServer, "DischargingEnabledUntil updated to Null"); + } + else + { + ChipLogDetail(AppServer, "DischargingEnabledUntil updated to %lu", + static_cast(mDischargingEnabledUntil.Value())); + } + // Write new value to persistent storage. + ConcreteAttributePath path = ConcreteAttributePath(mEndpointId, EnergyEvse::Id, DischargingEnabledUntil::Id); + GetSafeAttributePersistenceProvider()->WriteScalarValue(path, mDischargingEnabledUntil); + MatterReportingAttributeChangeCallback(mEndpointId, EnergyEvse::Id, DischargingEnabledUntil::Id); } + return CHIP_NO_ERROR; } @@ -736,6 +1331,13 @@ CHIP_ERROR EnergyEvseDelegate::SetUserMaximumChargeCurrent(int64_t newValue) if (oldValue != newValue) { ChipLogDetail(AppServer, "UserMaximumChargeCurrent updated to %ld", static_cast(mUserMaximumChargeCurrent)); + + ComputeMaxChargeCurrentLimit(); + + // Write new value to persistent storage. + ConcreteAttributePath path = ConcreteAttributePath(mEndpointId, EnergyEvse::Id, UserMaximumChargeCurrent::Id); + GetSafeAttributePersistenceProvider()->WriteScalarValue(path, mUserMaximumChargeCurrent); + MatterReportingAttributeChangeCallback(mEndpointId, EnergyEvse::Id, UserMaximumChargeCurrent::Id); } @@ -761,6 +1363,11 @@ CHIP_ERROR EnergyEvseDelegate::SetRandomizationDelayWindow(uint32_t newValue) { ChipLogDetail(AppServer, "RandomizationDelayWindow updated to %lu", static_cast(mRandomizationDelayWindow)); + + // Write new value to persistent storage. + ConcreteAttributePath path = ConcreteAttributePath(mEndpointId, EnergyEvse::Id, RandomizationDelayWindow::Id); + GetSafeAttributePersistenceProvider()->WriteScalarValue(path, mRandomizationDelayWindow); + MatterReportingAttributeChangeCallback(mEndpointId, EnergyEvse::Id, RandomizationDelayWindow::Id); } return CHIP_NO_ERROR; @@ -798,14 +1405,25 @@ DataModel::Nullable EnergyEvseDelegate::GetApproximateEVEfficiency() return mApproximateEVEfficiency; } -CHIP_ERROR EnergyEvseDelegate::SetApproximateEVEfficiency(uint16_t newValue) +CHIP_ERROR EnergyEvseDelegate::SetApproximateEVEfficiency(DataModel::Nullable newValue) { DataModel::Nullable oldValue = mApproximateEVEfficiency; - mApproximateEVEfficiency = MakeNullable(newValue); - if ((oldValue.IsNull()) || (oldValue.Value() != newValue)) + mApproximateEVEfficiency = newValue; + if ((oldValue != newValue)) { - ChipLogDetail(AppServer, "ApproximateEVEfficiency updated to %d", mApproximateEVEfficiency.Value()); + if (newValue.IsNull()) + { + ChipLogDetail(AppServer, "ApproximateEVEfficiency updated to Null"); + } + else + { + ChipLogDetail(AppServer, "ApproximateEVEfficiency updated to %d", mApproximateEVEfficiency.Value()); + } + // Write new value to persistent storage. + ConcreteAttributePath path = ConcreteAttributePath(mEndpointId, EnergyEvse::Id, ApproximateEVEfficiency::Id); + GetSafeAttributePersistenceProvider()->WriteScalarValue(path, mApproximateEVEfficiency); + MatterReportingAttributeChangeCallback(mEndpointId, EnergyEvse::Id, ApproximateEVEfficiency::Id); } @@ -831,17 +1449,149 @@ DataModel::Nullable EnergyEvseDelegate::GetVehicleID() /* Session SESS attributes */ DataModel::Nullable EnergyEvseDelegate::GetSessionID() { - return mSessionID; + return mSession.mSessionID; } DataModel::Nullable EnergyEvseDelegate::GetSessionDuration() { - return mSessionDuration; + mSession.RecalculateSessionDuration(); + return mSession.mSessionDuration; } DataModel::Nullable EnergyEvseDelegate::GetSessionEnergyCharged() { - return mSessionEnergyCharged; + return mSession.mSessionEnergyCharged; } DataModel::Nullable EnergyEvseDelegate::GetSessionEnergyDischarged() { - return mSessionEnergyDischarged; + return mSession.mSessionEnergyDischarged; +} + +/** + * @brief Helper function to get current timestamp in Epoch format + * + * @param chipEpoch reference to hold return timestamp + */ +CHIP_ERROR GetEpochTS(uint32_t & chipEpoch) +{ + chipEpoch = 0; + + System::Clock::Milliseconds64 cTMs; + CHIP_ERROR err = System::SystemClock().GetClock_RealTimeMS(cTMs); + + /* If the GetClock_RealTimeMS returns CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE, then + * This platform cannot ever report real time ! + * This should not be certifiable since getting time is a Mandatory + * feature of EVSE Cluster + */ + VerifyOrDie(err != CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE); + + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "EVSE: Unable to get current time - err:%" CHIP_ERROR_FORMAT, err.Format()); + return err; + } + + auto unixEpoch = std::chrono::duration_cast(cTMs).count(); + if (!UnixEpochToChipEpochTime(unixEpoch, chipEpoch)) + { + ChipLogError(Zcl, "EVSE: unable to convert Unix Epoch time to Matter Epoch Time"); + return err; + } + + return CHIP_NO_ERROR; +} + +/** + * @brief This function samples the start-time, and energy meter to hold the session info + * + * @param chargingMeterValue - The current value of the energy meter (charging) in mWh + * @param dischargingMeterValue - The current value of the energy meter (discharging) in mWh + */ +void EvseSession::StartSession(int64_t chargingMeterValue, int64_t dischargingMeterValue) +{ + /* Get Timestamp */ + uint32_t chipEpoch = 0; + CHIP_ERROR err = GetEpochTS(chipEpoch); + if (err != CHIP_NO_ERROR) + { + /* Note that the error will be also be logged inside GetErrorTS() - + * adding context here to help debugging */ + ChipLogError(AppServer, "EVSE: Unable to get current time when starting session - err:%" CHIP_ERROR_FORMAT, err.Format()); + return; + } + mStartTime = chipEpoch; + + mSessionEnergyChargedAtStart = chargingMeterValue; + mSessionEnergyDischargedAtStart = dischargingMeterValue; + + if (mSessionID.IsNull()) + { + mSessionID = MakeNullable(static_cast(0)); + } + else + { + uint32_t sessionID = mSessionID.Value() + 1; + mSessionID = MakeNullable(sessionID); + } + + /* Reset other session values */ + mSessionDuration = MakeNullable(static_cast(0)); + mSessionEnergyCharged = MakeNullable(static_cast(0)); + mSessionEnergyDischarged = MakeNullable(static_cast(0)); + + MatterReportingAttributeChangeCallback(mEndpointId, EnergyEvse::Id, SessionID::Id); + MatterReportingAttributeChangeCallback(mEndpointId, EnergyEvse::Id, SessionDuration::Id); + MatterReportingAttributeChangeCallback(mEndpointId, EnergyEvse::Id, SessionEnergyCharged::Id); + MatterReportingAttributeChangeCallback(mEndpointId, EnergyEvse::Id, SessionEnergyDischarged::Id); + + // Write values to persistent storage. + ConcreteAttributePath path = ConcreteAttributePath(mEndpointId, EnergyEvse::Id, SessionID::Id); + GetSafeAttributePersistenceProvider()->WriteScalarValue(path, mSessionID); + + // TODO persist mStartTime + // TODO persist mSessionEnergyChargedAtStart + // TODO persist mSessionEnergyDischargedAtStart +} + +/** + * @brief This function updates the session attrs to allow read attributes to return latest values + */ +void EvseSession::RecalculateSessionDuration() +{ + /* Get Timestamp */ + uint32_t chipEpoch = 0; + CHIP_ERROR err = GetEpochTS(chipEpoch); + if (err != CHIP_NO_ERROR) + { + /* Note that the error will be also be logged inside GetErrorTS() - + * adding context here to help debugging */ + ChipLogError(AppServer, "EVSE: Unable to get current time when updating session duration - err:%" CHIP_ERROR_FORMAT, + err.Format()); + return; + } + + uint32_t duration = chipEpoch - mStartTime; + mSessionDuration = MakeNullable(duration); + MatterReportingAttributeChangeCallback(mEndpointId, EnergyEvse::Id, SessionDuration::Id); +} + +/** + * @brief This function updates the EnergyCharged meter value + * + * @param chargingMeterValue - The value of the energy meter (charging) in mWh + */ +void EvseSession::UpdateEnergyCharged(int64_t chargingMeterValue) +{ + mSessionEnergyCharged = MakeNullable(chargingMeterValue - mSessionEnergyChargedAtStart); + MatterReportingAttributeChangeCallback(mEndpointId, EnergyEvse::Id, SessionEnergyCharged::Id); +} + +/** + * @brief This function updates the EnergyDischarged meter value + * + * @param dischargingMeterValue - The value of the energy meter (discharging) in mWh + */ +void EvseSession::UpdateEnergyDischarged(int64_t dischargingMeterValue) +{ + mSessionEnergyDischarged = MakeNullable(dischargingMeterValue - mSessionEnergyDischargedAtStart); + MatterReportingAttributeChangeCallback(mEndpointId, EnergyEvse::Id, SessionEnergyDischarged::Id); } diff --git a/examples/energy-management-app/energy-management-common/src/EnergyEvseManager.cpp b/examples/energy-management-app/energy-management-common/src/EnergyEvseManager.cpp index 0d84d8856212e0..710b13f9d342b8 100644 --- a/examples/energy-management-app/energy-management-common/src/EnergyEvseManager.cpp +++ b/examples/energy-management-app/energy-management-common/src/EnergyEvseManager.cpp @@ -17,14 +17,96 @@ */ #include +#include using namespace chip::app; using namespace chip::app::Clusters; using namespace chip::app::Clusters::EnergyEvse; +CHIP_ERROR EnergyEvseManager::LoadPersistentAttributes() +{ + + SafeAttributePersistenceProvider * aProvider = GetSafeAttributePersistenceProvider(); + EndpointId aEndpointId = mDelegate->GetEndpointId(); + CHIP_ERROR err; + + // Restore ChargingEnabledUntil value + DataModel::Nullable tempChargingEnabledUntil; + err = aProvider->ReadScalarValue(ConcreteAttributePath(aEndpointId, EnergyEvse::Id, Attributes::ChargingEnabledUntil::Id), + tempChargingEnabledUntil); + if (err == CHIP_NO_ERROR) + { + ChipLogDetail(AppServer, "EVSE: successfully loaded ChargingEnabledUntil from NVM"); + mDelegate->SetChargingEnabledUntil(tempChargingEnabledUntil); + } + else + { + ChipLogError(AppServer, "EVSE: Unable to restore persisted ChargingEnabledUntil value"); + } + + // Restore DischargingEnabledUntil value + DataModel::Nullable tempDischargingEnabledUntil; + err = aProvider->ReadScalarValue(ConcreteAttributePath(aEndpointId, EnergyEvse::Id, Attributes::DischargingEnabledUntil::Id), + tempDischargingEnabledUntil); + if (err == CHIP_NO_ERROR) + { + ChipLogDetail(AppServer, "EVSE: successfully loaded DischargingEnabledUntil from NVM"); + mDelegate->SetDischargingEnabledUntil(tempDischargingEnabledUntil); + } + else + { + ChipLogError(AppServer, "EVSE: Unable to restore persisted DischargingEnabledUntil value"); + } + + // Restore UserMaximumChargeCurrent value + int64_t tempUserMaximumChargeCurrent; + err = aProvider->ReadScalarValue(ConcreteAttributePath(aEndpointId, EnergyEvse::Id, Attributes::UserMaximumChargeCurrent::Id), + tempUserMaximumChargeCurrent); + if (err == CHIP_NO_ERROR) + { + ChipLogDetail(AppServer, "EVSE: successfully loaded UserMaximumChargeCurrent from NVM"); + mDelegate->SetUserMaximumChargeCurrent(tempUserMaximumChargeCurrent); + } + else + { + ChipLogError(AppServer, "EVSE: Unable to restore persisted UserMaximumChargeCurrent value"); + } + + // Restore RandomizationDelayWindow value + uint32_t tempRandomizationDelayWindow; + err = aProvider->ReadScalarValue(ConcreteAttributePath(aEndpointId, EnergyEvse::Id, Attributes::RandomizationDelayWindow::Id), + tempRandomizationDelayWindow); + if (err == CHIP_NO_ERROR) + { + ChipLogDetail(AppServer, "EVSE: successfully loaded RandomizationDelayWindow from NVM"); + mDelegate->SetRandomizationDelayWindow(tempRandomizationDelayWindow); + } + else + { + ChipLogError(AppServer, "EVSE: Unable to restore persisted RandomizationDelayWindow value"); + } + + // Restore ApproximateEVEfficiency value + DataModel::Nullable tempApproxEVEfficiency; + err = aProvider->ReadScalarValue(ConcreteAttributePath(aEndpointId, EnergyEvse::Id, Attributes::ApproximateEVEfficiency::Id), + tempApproxEVEfficiency); + if (err == CHIP_NO_ERROR) + { + ChipLogDetail(AppServer, "EVSE: successfully loaded ApproximateEVEfficiency from NVM"); + mDelegate->SetApproximateEVEfficiency(tempApproxEVEfficiency); + } + else + { + ChipLogError(AppServer, "EVSE: Unable to restore persisted ApproximateEVEfficiency value"); + } + + return CHIP_NO_ERROR; // It is ok to have no value loaded here +} + CHIP_ERROR EnergyEvseManager::Init() { - return Instance::Init(); + ReturnErrorOnFailure(Instance::Init()); + return LoadPersistentAttributes(); } void EnergyEvseManager::Shutdown() diff --git a/examples/energy-management-app/linux/BUILD.gn b/examples/energy-management-app/linux/BUILD.gn index 8597caabfc35b9..8fb53878129c60 100644 --- a/examples/energy-management-app/linux/BUILD.gn +++ b/examples/energy-management-app/linux/BUILD.gn @@ -36,6 +36,8 @@ config("includes") { executable("chip-energy-management-app") { sources = [ + "${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementDelegateImpl.cpp", + "${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementManager.cpp", "${chip_root}/examples/energy-management-app/energy-management-common/src/EVSEManufacturerImpl.cpp", "${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp", "${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseManager.cpp", diff --git a/examples/energy-management-app/linux/README.md b/examples/energy-management-app/linux/README.md index 9671ab073b12a8..d316dd807c13e2 100644 --- a/examples/energy-management-app/linux/README.md +++ b/examples/energy-management-app/linux/README.md @@ -13,10 +13,17 @@ To cross-compile this example on x64 host and run on **NXP i.MX 8M Mini** - [CHIP Linux Energy Management Example](#chip-linux-energy-management-example) - [Building](#building) - - [Commandline Arguments](#commandline-arguments) + - [Commandline arguments](#commandline-arguments) - [Running the Complete Example on Raspberry Pi 4](#running-the-complete-example-on-raspberry-pi-4) - - [Running RPC console](#running-rpc-console) + - [Running RPC Console](#running-rpc-console) - [Device Tracing](#device-tracing) + - [Python Test Cases](#python-test-cases) + - [Running the test cases:](#running-the-test-cases) + - [CHIP-REPL Interaction](#chip-repl-interaction) + - [Building chip-repl:](#building-chip-repl) + - [Activating python virtual env](#activating-python-virtual-env) + - [Interacting with CHIP-REPL and the example app](#interacting-with-chip-repl-and-the-example-app) + - [Using chip-repl to Fake a charging session](#using-chip-repl-to-fake-a-charging-session)
@@ -141,3 +148,361 @@ Obtain tracing json file. $ ./{PIGWEED_REPO}/pw_trace_tokenized/py/pw_trace_tokenized/get_trace.py -s localhost:33000 \ -o {OUTPUT_FILE} -t {ELF_FILE} {PIGWEED_REPO}/pw_trace_tokenized/pw_trace_protos/trace_rpc.proto ``` + +## Python Test Cases + +When you want to test this cluster you can use chip-repl or chip-tool by hand. +CHIP-REPL is slightly easier to interact with when dealing with some of the +complex structures. + +There are several test scripts provided for EVSE (in +[src/python_testing](src/python_testing)): + +- `TC_EEVSE_2_2`: This validates the primary functionality +- `TC_EEVSE_2_3`: This validates Get/Set/Clear target commands +- `TC_EEVSE_2_4`: This validates Faults +- `TC_EEVSE_2_5`: This validates EVSE diagnostic command (optional) + +These scripts require the use of Test Event Triggers via the GeneralDiagnostics +cluster on Endpoint 0. This requires an `enableKey` (16 bytes) and a set of +reserved int64_t test event trigger codes. + +By default the test event support is not enabled, and when compiling the example +app you need to add `chip_enable_energy_evse_trigger=true` to the gn args. + + $ gn gen out/debug --args='chip_enable_energy_evse_trigger=true' + $ ninja -C out/debug + +Once the application is built you also need to tell it at runtime what the +chosen enable key is using the `--enable-key` command line option. + + $ ./chip-energy-management-app --enable-key 000102030405060708090a0b0c0d0e0f + +### Running the test cases: + +From the top-level of the connectedhomeip repo type: + +```bash + $ python src/python_testing/TC_EEVSE_2_2.py --endpoint 1 -m on-network -n 1234 -p 20202021 -d 3840 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f +``` + +- Note that the `--endpoint 1` must be used with the example, since the EVSE + cluster is on endpoint 1. The `--hex-arg enableKey:` value must match + the `--enable-key ` used on chip-energy-management-app args. + +## CHIP-REPL Interaction + +- See chip-repl documentation in + [Matter_REPL_Intro](../../../docs/guides/repl/Matter_REPL_Intro.ipynb) + +### Building chip-repl: + +```bash + $ ./build_python.sh -i +``` + +### Activating python virtual env + +- You need to repeat this step each time you start a new shell. + +```bash + $ source /bin/activate +``` + +### Interacting with CHIP-REPL and the example app + +- Step 1: Launch the example app + +```bash + $ ./chip-energy-management-app --enable-key 000102030405060708090a0b0c0d0e0f +``` + +- Step 2: Launch CHIP-REPL + +```bash + $ chip-repl +``` + +- Step 3: (In chip-repl) Commissioning OnNetwork + +```python + devCtrl.CommissionOnNetwork(1234,20202021) # Commission with NodeID 1234 +Established secure session with Device +Commissioning complete +Out[2]: +``` + +- Step 4: (In chip-repl) Read EVSE attributes + +```python + # Read from NodeID 1234, Endpoint 1, all attributes on EnergyEvse cluster + await devCtrl.ReadAttribute(1234,[(1, chip.clusters.EnergyEvse)]) +``` + +``` +{ +│ 1: { +│ │ : { +│ │ │ : 3790455237, +│ │ │ : Null, +│ │ │ : , +│ │ │ : Null, +│ │ │ : Null, +│ │ │ : 0, +│ │ │ : Null, +│ │ │ : Null, +│ │ │ : [ +... │ │ ], +│ │ │ : 6000, +│ │ │ : Null, +│ │ │ : 758415333, +│ │ │ : 0, +│ │ │ : 1, +│ │ │ : [ +... +│ │ │ ], +│ │ │ : , +│ │ │ : Null, +│ │ │ : Null, +│ │ │ : Null, +│ │ │ : Null, +│ │ │ : Null, +│ │ │ : [ +... │ │ ], +│ │ │ : Null, +│ │ │ : 0, +│ │ │ : Null, +│ │ │ : , +│ │ │ : 600, +│ │ │ : 0, +│ │ │ : 1, +│ │ │ : 80000, +│ │ │ : 2 +│ │ } +│ } +} + +``` + +- Step 5: Setting up a subscription so that attributes updates are sent + automatically + +```python + reportingTimingParams = (3, 60) # MinInterval = 3s, MaxInterval = 60s + subscription = await devCtrl.ReadAttribute(1234,[(1, chip.clusters.EnergyEvse)], reportInterval=reportingTimingParams) +``` + +- Step 6: Send an `EnableCharging` command which lasts for 60 seconds The + `EnableCharging` takes an optional `chargingEnabledUntil` parameter which + allows the charger to automatically disable itself at some preset time in + the future. Note that it uses Epoch_s (which is from Jan 1 2000) which is a + uint32_t in seconds. + +```python + from datetime import datetime, timezone, timedelta + epoch_end = int((datetime.now(tz=timezone.utc) + timedelta(seconds=60) - datetime(2000, 1, 1, 0, 0, 0, 0, timezone.utc)).total_seconds()) + + await devCtrl.SendCommand(1234, 1, chip.clusters.EnergyEvse.Commands.EnableCharging(chargingEnabledUntil=epoch_end,minimumChargeCurrent=2000,maximumChargeCurrent=25000),timedRequestTimeoutMs=3000) +``` + +The output should look like: + +``` +Attribute Changed: +{ +│ 'Endpoint': 1, +│ 'Attribute': , +│ 'Value': +} +Attribute Changed: +{ +│ 'Endpoint': 1, +│ 'Attribute': , +│ 'Value': 2000 +} +Attribute Changed: +{ +│ 'Endpoint': 1, +│ 'Attribute': , +│ 'Value': 758416066 +} +``` + +After 60 seconds the charging should automatically become disabled: + +``` +Attribute Changed: +{ +│ 'Endpoint': 1, +│ 'Attribute': , +│ 'Value': +} +Attribute Changed: +{ +│ 'Endpoint': 1, +│ 'Attribute': , +│ 'Value': 0 +} +Attribute Changed: +{ +│ 'Endpoint': 1, +│ 'Attribute': , +│ 'Value': 0 +} +Attribute Changed: +{ +│ 'Endpoint': 1, +│ 'Attribute': , +│ 'Value': 0 +} +``` + +Note that you can omit the `chargingEnabledUntil` argument and it will charge +indefinitely. + +### Using chip-repl to Fake a charging session + +If you haven't implemented a real EVSE but want to simulate plugging in an EV +then you can use a few of the test event triggers to simulate these scenarios. + +The test event triggers values can be found in: +[EnergyEvseTestEventTriggerDelegate.h](../../../src/app/clusters/energy-evse-server/EnergyEvseTestEventTriggerDelegate.h) + +- 0x0099000000000000 - Simulates the EVSE being installed on a 32A supply +- 0x0099000000000002 - Simulates the EVSE being plugged in (this should + generate an `EVConnected` event) +- 0x0099000000000004 - Simulates the EVSE requesting power + +To send a test event trigger to the app, use the following commands (in +chip-repl): + +```python + # send 1st event trigger to 'install' the EVSE on a 32A supply + await devCtrl.SendCommand(1234, 0, chip.clusters.GeneralDiagnostics.Commands.TestEventTrigger(enableKey=bytes([b for b in range(16)]), eventTrigger=0x0099000000000000)) + + # send 2nd event trigger to plug the EV in + await devCtrl.SendCommand(1234, 0, chip.clusters.GeneralDiagnostics.Commands.TestEventTrigger(enableKey=bytes([b for b in range(16)]), eventTrigger=0x0099000000000002)) + +``` + +Now send the enable charging command (omit the `chargingEnabledUntil` arg this +time): + +```python + await devCtrl.SendCommand(1234, 1, chip.clusters.EnergyEvse.Commands.EnableCharging(minimumChargeCurrent=2000,maximumChargeCurrent=25000),timedRequestTimeoutMs=3000) +``` + +Now send the test event trigger to simulate the EV asking for demand: + +```python + # send 2nd event trigger to plug the EV in + await devCtrl.SendCommand(1234, 0, chip.clusters.GeneralDiagnostics.Commands.TestEventTrigger(enableKey=bytes([b for b in range(16)]), eventTrigger=0x0099000000000004)) + + # Read the events + await devCtrl.ReadEvent(1234,[(1, chip.clusters.EnergyEvse,1)]) +``` + +``` +[ +│ EventReadResult( +│ │ Header=EventHeader( +│ │ │ EndpointId=1, +│ │ │ ClusterId=153, +│ │ │ EventId=0, +│ │ │ EventNumber=65538, +│ │ │ Priority=, +│ │ │ Timestamp=1705102500069, +│ │ │ TimestampType= +│ │ ), +│ │ Status=, +│ │ Data=EVConnected( +│ │ │ sessionID=0 +│ │ ) +│ ), +│ EventReadResult( +│ │ Header=EventHeader( +│ │ │ EndpointId=1, +│ │ │ ClusterId=153, +│ │ │ EventId=2, +│ │ │ EventNumber=65539, +│ │ │ Priority=, +│ │ │ Timestamp=1705102801764, +│ │ │ TimestampType= +│ │ ), +│ │ Status=, +│ │ Data=EnergyTransferStarted( +│ │ │ sessionID=0, +│ │ │ state=, +│ │ │ maximumCurrent=25000 +│ │ ) +│ ) +] +``` + +- We can see that the `EventNumber 65538` was sent when the vehicle was + plugged in, and a new `sessionID=0` was created. +- We can also see that the `EnergyTransferStarted` was sent in + `EventNumber 65539` + +What happens when we unplug the vehicle? + +```python + await devCtrl.SendCommand(1234, 0, chip.clusters.GeneralDiagnostics.Commands.TestEventTrigger(enableKey=bytes([b for b in range(16)]), eventTrigger=0x0099000000000001)) +``` + +When we re-read the events: + +``` +[ +│ EventReadResult( +│ │ Header=EventHeader( +│ │ │ EndpointId=1, +│ │ │ ClusterId=153, +│ │ │ EventId=3, +│ │ │ EventNumber=65540, +│ │ │ Priority=, +│ │ │ Timestamp=1705102996749, +│ │ │ TimestampType= +│ │ ), +│ │ Status=, +│ │ Data=EnergyTransferStopped( +│ │ │ sessionID=0, +│ │ │ state=, +│ │ │ reason=, +│ │ │ energyTransferred=0 +│ │ ) +│ ), +│ EventReadResult( +│ │ Header=EventHeader( +│ │ │ EndpointId=1, +│ │ │ ClusterId=153, +│ │ │ EventId=1, +│ │ │ EventNumber=65541, +│ │ │ Priority=, +│ │ │ Timestamp=1705102996749, +│ │ │ TimestampType= +│ │ ), +│ │ Status=, +│ │ Data=EVNotDetected( +│ │ │ sessionID=0, +│ │ │ state=, +│ │ │ sessionDuration=0, +│ │ │ sessionEnergyCharged=0, +│ │ │ sessionEnergyDischarged=0 +│ │ ) +│ ) +] + +``` + +- In `EventNumber 65540` we had an `EnergyTransferStopped` event with reason + `kOther`. + + This was a rather abrupt end to a charging session (normally we would see + the EVSE or EV decide to stop charging), but this demonstrates the cable + being pulled out without a graceful charging shutdown. + +- In `EventNumber 65541` we had an `EvNotDetected` event showing that the + state was `kPluggedInCharging` prior to the EV being not detected (normally + in a graceful shutdown this would be `kPluggedInNoDemand` or + `kPluggedInDemand`). diff --git a/examples/energy-management-app/linux/include/CHIPProjectAppConfig.h b/examples/energy-management-app/linux/include/CHIPProjectAppConfig.h index f22628d0f69def..e091fa9cf7c91c 100644 --- a/examples/energy-management-app/linux/include/CHIPProjectAppConfig.h +++ b/examples/energy-management-app/linux/include/CHIPProjectAppConfig.h @@ -32,15 +32,13 @@ #define CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY 0 -// Bulbs do not typically use this - enabled so we can use shell to discover commissioners #define CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONER_DISCOVERY_CLIENT 1 #define CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY 1 #define CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONABLE_DEVICE_TYPE 1 -// TODO We don’t have one yet - but we’d need to change this -#define CHIP_DEVICE_CONFIG_DEVICE_TYPE 257 // 0x0101 = 257 = Dimmable Bulb +#define CHIP_DEVICE_CONFIG_DEVICE_TYPE 0x050C // Energy EVSE #define CHIP_DEVICE_CONFIG_ENABLE_COMMISSIONABLE_DEVICE_NAME 1 diff --git a/examples/energy-management-app/linux/main.cpp b/examples/energy-management-app/linux/main.cpp index dddc6f53d76b20..23ec97e267f45d 100644 --- a/examples/energy-management-app/linux/main.cpp +++ b/examples/energy-management-app/linux/main.cpp @@ -17,6 +17,7 @@ */ #include +#include #include #include #include @@ -35,80 +36,227 @@ using namespace chip; using namespace chip::app; using namespace chip::app::Clusters; -static EnergyEvseDelegate * gDelegate = nullptr; -static EnergyEvseManager * gInstance = nullptr; -static EVSEManufacturer * gEvseManufacturer = nullptr; +static std::unique_ptr gEvseDelegate; +static std::unique_ptr gEvseInstance; +static std::unique_ptr gDEMDelegate; +static std::unique_ptr gDEMInstance; +static std::unique_ptr gEvseManufacturer; -void ApplicationInit() +EVSEManufacturer * EnergyEvse::GetEvseManufacturer() +{ + return gEvseManufacturer.get(); +} + +/* + * @brief Creates a Delegate and Instance for DEM + * + * The Instance is a container around the Delegate, so + * create the Delegate first, then wrap it in the Instance + * Then call the Instance->Init() to register the attribute and command handlers + */ +CHIP_ERROR DeviceEnergyManagementInit() +{ + if (gDEMDelegate || gDEMInstance) + { + ChipLogError(AppServer, "DEM Instance or Delegate already exist."); + return CHIP_ERROR_INCORRECT_STATE; + } + + gDEMDelegate = std::make_unique(); + if (!gDEMDelegate) + { + ChipLogError(AppServer, "Failed to allocate memory for DeviceEnergyManagementDelegate"); + return CHIP_ERROR_NO_MEMORY; + } + + /* Manufacturer may optionally not support all features, commands & attributes */ + gDEMInstance = std::make_unique( + EndpointId(ENERGY_EVSE_ENDPOINT), *gDEMDelegate, + BitMask( + DeviceEnergyManagement::Feature::kPowerForecastReporting, DeviceEnergyManagement::Feature::kStateForecastReporting, + DeviceEnergyManagement::Feature::kPowerAdjustment, DeviceEnergyManagement::Feature::kForecastAdjustment), + BitMask( + DeviceEnergyManagement::OptionalCommands::kSupportsModifyForecastRequest, + DeviceEnergyManagement::OptionalCommands::kSupportsRequestConstraintBasedForecast)); + + if (!gDEMInstance) + { + ChipLogError(AppServer, "Failed to allocate memory for DeviceEnergyManagementManager"); + gDEMDelegate.reset(); + return CHIP_ERROR_NO_MEMORY; + } + + CHIP_ERROR err = gDEMInstance->Init(); /* Register Attribute & Command handlers */ + if (err != CHIP_NO_ERROR) + { + ChipLogError(AppServer, "Init failed on gDEMInstance"); + gDEMInstance.reset(); + gDEMDelegate.reset(); + return err; + } + + return CHIP_NO_ERROR; +} + +CHIP_ERROR DeviceEnergyManagementShutdown() +{ + /* Do this in the order Instance first, then delegate + * Ensure we call the Instance->Shutdown to free attribute & command handlers first + */ + if (gDEMInstance) + { + /* deregister attribute & command handlers */ + gDEMInstance->Shutdown(); + gDEMInstance.reset(); + } + if (gDEMDelegate) + { + gDEMDelegate.reset(); + } + return CHIP_NO_ERROR; +} + +/* + * @brief Creates a Delegate and Instance for EVSE cluster + * + * The Instance is a container around the Delegate, so + * create the Delegate first, then wrap it in the Instance + * Then call the Instance->Init() to register the attribute and command handlers + */ +CHIP_ERROR EnergyEvseInit() { CHIP_ERROR err; - if ((gDelegate != nullptr) || (gInstance != nullptr) || (gEvseManufacturer != nullptr)) + if (gEvseDelegate || gEvseInstance) { - ChipLogError(AppServer, "EVSE Instance or Delegate, EvseManufacturer already exist."); - return; + ChipLogError(AppServer, "EVSE Instance or Delegate already exist."); + return CHIP_ERROR_INCORRECT_STATE; } - gDelegate = new EnergyEvseDelegate(); - if (gDelegate == nullptr) + gEvseDelegate = std::make_unique(); + if (!gEvseDelegate) { ChipLogError(AppServer, "Failed to allocate memory for EnergyEvseDelegate"); - return; + return CHIP_ERROR_NO_MEMORY; } /* Manufacturer may optionally not support all features, commands & attributes */ - gInstance = - new EnergyEvseManager(EndpointId(ENERGY_EVSE_ENDPOINT), *gDelegate, - BitMask( - EnergyEvse::Feature::kChargingPreferences, EnergyEvse::Feature::kPlugAndCharge, - EnergyEvse::Feature::kRfid, EnergyEvse::Feature::kSoCReporting, EnergyEvse::Feature::kV2x), - BitMask(OptionalAttributes::kSupportsUserMaximumChargingCurrent, - OptionalAttributes::kSupportsRandomizationWindow, - OptionalAttributes::kSupportsApproximateEvEfficiency), - BitMask(OptionalCommands::kSupportsStartDiagnostics)); - - if (gInstance == nullptr) + gEvseInstance = std::make_unique( + EndpointId(ENERGY_EVSE_ENDPOINT), *gEvseDelegate, + BitMask(EnergyEvse::Feature::kChargingPreferences, EnergyEvse::Feature::kPlugAndCharge, + EnergyEvse::Feature::kRfid, EnergyEvse::Feature::kSoCReporting, + EnergyEvse::Feature::kV2x), + BitMask(EnergyEvse::OptionalAttributes::kSupportsUserMaximumChargingCurrent, + EnergyEvse::OptionalAttributes::kSupportsRandomizationWindow, + EnergyEvse::OptionalAttributes::kSupportsApproximateEvEfficiency), + BitMask(EnergyEvse::OptionalCommands::kSupportsStartDiagnostics)); + + if (!gEvseInstance) { ChipLogError(AppServer, "Failed to allocate memory for EnergyEvseManager"); - delete gDelegate; - gDelegate = nullptr; - return; + gEvseDelegate.reset(); + return CHIP_ERROR_NO_MEMORY; } - err = gInstance->Init(); /* Register Attribute & Command handlers */ + err = gEvseInstance->Init(); /* Register Attribute & Command handlers */ if (err != CHIP_NO_ERROR) { - ChipLogError(AppServer, "Init failed on gInstance"); - delete gInstance; - delete gDelegate; - gInstance = nullptr; - gDelegate = nullptr; - return; + ChipLogError(AppServer, "Init failed on gEvseInstance"); + gEvseInstance.reset(); + gEvseDelegate.reset(); + return err; + } + + return CHIP_NO_ERROR; +} + +CHIP_ERROR EnergyEvseShutdown() +{ + /* Do this in the order Instance first, then delegate + * Ensure we call the Instance->Shutdown to free attribute & command handlers first + */ + if (gEvseInstance) + { + /* deregister attribute & command handlers */ + gEvseInstance->Shutdown(); + gEvseInstance.reset(); } - /* Now create EVSEManufacturer*/ - gEvseManufacturer = new EVSEManufacturer(); - if (gEvseManufacturer == nullptr) + if (gEvseDelegate) + { + gEvseDelegate.reset(); + } + + return CHIP_NO_ERROR; +} + +/* + * @brief Creates a EVSEManufacturer class to hold the EVSE & DEM clusters + * + * The Instance is a container around the Delegate, so + * create the Delegate first, then wrap it in the Instance + * Then call the Instance->Init() to register the attribute and command handlers + */ +CHIP_ERROR EVSEManufacturerInit() +{ + CHIP_ERROR err; + + if (gEvseManufacturer) + { + ChipLogError(AppServer, "EvseManufacturer already exist."); + return CHIP_ERROR_INCORRECT_STATE; + } + + /* Now create EVSEManufacturer */ + // TODO this takes just the EVSE Instance for now, but will need the DEM adding + gEvseManufacturer = std::make_unique(gEvseInstance.get()); + if (!gEvseManufacturer) { ChipLogError(AppServer, "Failed to allocate memory for EvseManufacturer"); - delete gInstance; - delete gDelegate; - gInstance = nullptr; - gDelegate = nullptr; - return; + return CHIP_ERROR_NO_MEMORY; } /* Call Manufacturer specific init */ - err = gEvseManufacturer->Init(gInstance); + err = gEvseManufacturer->Init(); if (err != CHIP_NO_ERROR) { ChipLogError(AppServer, "Init failed on gEvseManufacturer"); - delete gEvseManufacturer; - delete gInstance; - delete gDelegate; - gEvseManufacturer = nullptr; - gInstance = nullptr; - gDelegate = nullptr; + gEvseManufacturer.reset(); + return err; + } + + return CHIP_NO_ERROR; +} + +CHIP_ERROR EVSEManufacturerShutdown() +{ + if (gEvseManufacturer) + { + /* Shutdown the EVSEManufacturer */ + gEvseManufacturer->Shutdown(); + gEvseManufacturer.reset(); + } + + return CHIP_NO_ERROR; +} + +void ApplicationInit() +{ + if (DeviceEnergyManagementInit() != CHIP_NO_ERROR) + { + return; + } + + if (EnergyEvseInit() != CHIP_NO_ERROR) + { + DeviceEnergyManagementShutdown(); + return; + } + + if (EVSEManufacturerInit() != CHIP_NO_ERROR) + { + DeviceEnergyManagementShutdown(); + EnergyEvseShutdown(); return; } } @@ -117,18 +265,10 @@ void ApplicationShutdown() { ChipLogDetail(AppServer, "Energy Management App: ApplicationShutdown()"); - /* Shutdown the EVSEManufacturer*/ - gEvseManufacturer->Shutdown(gInstance); - - /* Shutdown the Instance - deregister attribute & command handler */ - gInstance->Shutdown(); - - delete gEvseManufacturer; - delete gInstance; - delete gDelegate; - gEvseManufacturer = nullptr; - gInstance = nullptr; - gDelegate = nullptr; + /* Shutdown in reverse order that they were created */ + EVSEManufacturerShutdown(); /* Free the EVSEManufacturer */ + EnergyEvseShutdown(); /* Free the EnergyEvse */ + DeviceEnergyManagementShutdown(); /* Free the DEM */ } int main(int argc, char * argv[]) 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/light-switch-app/qpg/.gn b/examples/light-switch-app/qpg/.gn new file mode 100644 index 00000000000000..3d48789e30ab3d --- /dev/null +++ b/examples/light-switch-app/qpg/.gn @@ -0,0 +1,28 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/build.gni") + +# The location of the build configuration file. +buildconfig = "${build_root}/config/BUILDCONFIG.gn" + +# CHIP uses angle bracket includes. +check_system_includes = true + +default_args = { + target_cpu = "arm" + target_os = "freertos" + + import("//args.gni") +} diff --git a/examples/light-switch-app/qpg/APPLICATION.md b/examples/light-switch-app/qpg/APPLICATION.md new file mode 100644 index 00000000000000..487a8cbab22ed1 --- /dev/null +++ b/examples/light-switch-app/qpg/APPLICATION.md @@ -0,0 +1,17 @@ +# Matter QPG6105 Light Switch Example Application + +## Light-switch-app + +A light switch example application showing the use of +[Matter](https://github.com/project-chip/connectedhomeip) on the Qorvo QPG6105 +can be found in this folder. + +## Qorvo SDK + +More detailed information on the Qorvo SDK can be found in the +[Qorvo Matter SDK](https://github.com/Qorvo/QMatter). + +## More information + +For more information on our product line and support options, please visit +[www.qorvo.com](https://www.qorvo.com) or contact us at diff --git a/examples/light-switch-app/qpg/BUILD.gn b/examples/light-switch-app/qpg/BUILD.gn new file mode 100644 index 00000000000000..a5488d27b33dbc --- /dev/null +++ b/examples/light-switch-app/qpg/BUILD.gn @@ -0,0 +1,154 @@ +# Copyright(c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/build.gni") +import("//build_overrides/chip.gni") +import("//build_overrides/openthread.gni") +import("//build_overrides/qpg_sdk.gni") + +import("${build_root}/config/defaults.gni") +import("${chip_root}/src/platform/device.gni") +import("${qpg_sdk_build_root}/qpg_executable.gni") +import("${qpg_sdk_build_root}/qpg_sdk.gni") + +# declares chip_build_libshell = false +import("${chip_root}/src/lib/lib.gni") + +# declares chip_enable_pw_rpc = false +import("${chip_root}/examples/common/pigweed/pigweed_rpcs.gni") +if (chip_enable_pw_rpc) { + import("//build_overrides/pigweed.gni") + import("$dir_pw_build/target_types.gni") +} + +assert(current_os == "freertos") + +qpg_project_dir = "${chip_root}/examples/light-switch-app/qpg" +examples_plat_dir = "${chip_root}/examples/platform/qpg" + +qpg_sdk("sdk") { + include_dirs = [ + "${chip_root}/src/platform/qpg", + "${examples_plat_dir}", + "${qpg_project_dir}/include", + ] + + defines = [ "PW_RPC_ENABLED=${chip_enable_pw_rpc}" ] +} + +qpg_executable("light_switch_app") { + output_name = "chip-${qpg_target_ic}-light-switch-example.out" + + sources = [ + "${chip_root}/src/app/clusters/general-diagnostics-server/GenericFaultTestEventTriggerDelegate.cpp", + "${examples_plat_dir}/app/main.cpp", + "${examples_plat_dir}/ota/ota.cpp", + "src/AppTask.cpp", + "src/SwitchManager.cpp", + "src/ZclCallbacks.cpp", + "src/binding-handler.cpp", + ] + + deps = [ + ":sdk", + "${chip_root}/examples/light-switch-app/qpg/zap/", + "${chip_root}/examples/providers:device_info_provider", + "${chip_root}/src/lib", + "${chip_root}/src/setup_payload", + "${chip_root}/third_party/openthread/platforms:libopenthread-platform", + "${chip_root}/third_party/openthread/platforms:libopenthread-platform-utils", + "${chip_root}/third_party/qpg_sdk:qpg_switch_factorydata_lib", + "${chip_root}/third_party/qpg_sdk:qpg_switch_firmwaredata_lib", + ] + + if (chip_openthread_ftd) { + deps += [ "${chip_root}/third_party/openthread/repo:libopenthread-ftd" ] + } else { + deps += [ "${chip_root}/third_party/openthread/repo:libopenthread-mtd" ] + } + + include_dirs = [ + "include", + "${examples_plat_dir}/ota", + ] + + defines = [] + + if (chip_enable_pw_rpc) { + defines += [ + "PW_RPC_ATTRIBUTE_SERVICE=1", + "PW_RPC_BUTTON_SERVICE=1", + "PW_RPC_DEVICE_SERVICE=1", + "PW_RPC_LOCKING_SERVICE=1", + ] + + sources += [ + "${chip_root}/examples/common/pigweed/RpcService.cpp", + "${chip_root}/examples/common/pigweed/qpg/PigweedLoggerMutex.cpp", + "${examples_plat_dir}/PigweedLogger.cpp", + "${examples_plat_dir}/Rpc.cpp", + "${examples_plat_dir}/uart.c", + ] + + deps += [ + "$dir_pw_hdlc:rpc_channel_output", + "$dir_pw_stream:sys_io_stream", + "${chip_root}/config/qpg/lib/pw_rpc:pw_rpc", + "${chip_root}/examples/common/pigweed:attributes_service.nanopb_rpc", + "${chip_root}/examples/common/pigweed:button_service.nanopb_rpc", + "${chip_root}/examples/common/pigweed:device_service.nanopb_rpc", + "${chip_root}/examples/common/pigweed:locking_service.nanopb_rpc", + "${examples_plat_dir}/pw_sys_io:pw_sys_io_qpg", + ] + + deps += pw_build_LINK_DEPS + + include_dirs += [ + "${chip_root}/examples/common", + "${chip_root}/examples/common/pigweed/qpg", + ] + } else { + # The below gives compiler erros in pigweed, therefore it is only enabled + # when rpc is not + cflags = [ "-Wconversion" ] + } + + if (chip_build_libshell) { + deps += [ "${examples_plat_dir}:qpg-matter-shell" ] + } else { + if (chip_openthread_ftd) { + deps += + [ "${chip_root}/third_party/openthread/repo:libopenthread-cli-ftd" ] + } else { + deps += + [ "${chip_root}/third_party/openthread/repo:libopenthread-cli-mtd" ] + } + } + + ldscript = "${qpg_sdk_root}/Libraries/Qorvo/QorvoStack/gen/QorvoStack_${qpg_target_ic}/QorvoStack_${qpg_target_ic}.ld" + + inputs = [ ldscript ] + + ldflags = [ "-T" + rebase_path(ldscript, root_build_dir) ] + + output_dir = root_out_dir +} + +group("qpg") { + deps = [ ":light_switch_app" ] +} + +group("default") { + deps = [ ":qpg" ] +} diff --git a/examples/light-switch-app/qpg/README.md b/examples/light-switch-app/qpg/README.md new file mode 100644 index 00000000000000..d8e070848f540c --- /dev/null +++ b/examples/light-switch-app/qpg/README.md @@ -0,0 +1,15 @@ +--- +orphan: true +--- + +# Matter QPG6105 SDK + +## Qorvo SDK + +More detailed information on the Qorvo SDK can be found in the +[Qorvo Matter SDK](https://github.com/Qorvo/QMatter). + +## More information + +For more information on our product line and support options, please visit +[www.qorvo.com](https://www.qorvo.com) or contact us at diff --git a/examples/light-switch-app/qpg/args.gni b/examples/light-switch-app/qpg/args.gni new file mode 100644 index 00000000000000..d5dcdfe217c635 --- /dev/null +++ b/examples/light-switch-app/qpg/args.gni @@ -0,0 +1,35 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/chip.gni") +import("//build_overrides/pigweed.gni") +import("${chip_root}/config/standalone/args.gni") +import("${chip_root}/examples/platform/qpg/args.gni") + +qpg_sdk_target = get_label_info(":sdk", "label_no_toolchain") + +chip_enable_ota_requestor = true +chip_openthread_ftd = false +enable_sleepy_device = true +chip_enable_icd_server = true + +# Disable lock tracking, since our FreeRTOS configuration does not set +# INCLUDE_xSemaphoreGetMutexHolder +chip_stack_lock_tracking = "none" + +matter_device_vid = "0xFFF1" +matter_device_pid = "0x8006" + +pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" +pw_assert_BACKEND = "$dir_pw_assert_log:check_backend" diff --git a/examples/light-switch-app/qpg/build_overrides b/examples/light-switch-app/qpg/build_overrides new file mode 120000 index 00000000000000..e578e73312ebd1 --- /dev/null +++ b/examples/light-switch-app/qpg/build_overrides @@ -0,0 +1 @@ +../../build_overrides \ No newline at end of file diff --git a/examples/light-switch-app/qpg/include/AppConfig.h b/examples/light-switch-app/qpg/include/AppConfig.h new file mode 100644 index 00000000000000..dfe8b494ea548c --- /dev/null +++ b/examples/light-switch-app/qpg/include/AppConfig.h @@ -0,0 +1,34 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef APP_CONFIG_H +#define APP_CONFIG_H + +#define APP_TASK_NAME "APP" + +// Mapping of Functional buttons +#define APP_FUNCTION1_BUTTON BTN_SW1 +#define APP_FUNCTION2_SWITCH BTN_SW2 +#define APP_FUNCTION3_BUTTON BTN_SW3 +#define APP_FUNCTION4_BUTTON BTN_SW4 +#define APP_FUNCTION5_BUTTON BTN_SW5 + +// Mapping of LEDs +#define SYSTEM_STATE_LED LED_GREEN + +#endif // APP_CONFIG_H diff --git a/examples/light-switch-app/qpg/include/AppEvent.h b/examples/light-switch-app/qpg/include/AppEvent.h new file mode 100644 index 00000000000000..92f5b0ae5a1933 --- /dev/null +++ b/examples/light-switch-app/qpg/include/AppEvent.h @@ -0,0 +1,51 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef APP_EVENT_H +#define APP_EVENT_H + +struct AppEvent; +typedef void (*EventHandler)(AppEvent *); + +struct AppEvent +{ + enum AppEventTypes + { + kEventType_Button = 0, + kEventType_Timer, + }; + + uint16_t Type; + + union + { + struct + { + uint8_t ButtonIdx; + uint8_t Action; + } ButtonEvent; + struct + { + void * Context; + } TimerEvent; + }; + + EventHandler Handler; +}; + +#endif // APP_EVENT_H diff --git a/examples/light-switch-app/qpg/include/AppTask.h b/examples/light-switch-app/qpg/include/AppTask.h new file mode 100644 index 00000000000000..9284e068ab8509 --- /dev/null +++ b/examples/light-switch-app/qpg/include/AppTask.h @@ -0,0 +1,89 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef APP_TASK_H +#define APP_TASK_H + +#include +#include + +#include "AppEvent.h" + +#include "FreeRTOS.h" +#include "SwitchManager.h" +#include "timers.h" // provides FreeRTOS timer support +#include + +#include + +#define APP_NAME "Light-Switch-app" + +class AppTask +{ +public: + CHIP_ERROR Init(); + CHIP_ERROR StartAppTask(); + static void AppTaskMain(void * pvParameter); + + void PostEvent(const AppEvent * event); + + void UpdateClusterState(); + + static void ButtonEventHandler(uint8_t btnIdx, bool btnPressed); + +private: + friend AppTask & GetAppTask(void); + + static void InitServer(intptr_t arg); + static void OpenCommissioning(intptr_t arg); + + void DispatchEvent(AppEvent * event); + + static void FunctionTimerEventHandler(AppEvent * aEvent); + static void FunctionHandler(AppEvent * aEvent); + + static void TimerEventHandler(chip::System::Layer * aLayer, void * aAppState); + + static void MatterEventHandler(const chip::DeviceLayer::ChipDeviceEvent * event, intptr_t arg); + static void UpdateLEDs(void); + + void StartTimer(uint32_t aTimeoutMs); + void CancelTimer(void); + + enum Function_t + { + kFunction_NoneSelected = 0, + kFunction_SoftwareUpdate = 1, + kFunction_FactoryReset = 2, + kFunction_Invalid + } Function; + + Function_t mFunction; + bool mFunctionTimerActive; + + chip::DeviceLayer::FactoryDataProvider mFactoryDataProvider; + + static AppTask sAppTask; +}; + +inline AppTask & GetAppTask(void) +{ + return AppTask::sAppTask; +} + +#endif // APP_TASK_H diff --git a/examples/light-switch-app/qpg/include/CHIPProjectConfig.h b/examples/light-switch-app/qpg/include/CHIPProjectConfig.h new file mode 100644 index 00000000000000..0cce04bad354c0 --- /dev/null +++ b/examples/light-switch-app/qpg/include/CHIPProjectConfig.h @@ -0,0 +1,121 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2019 Google LLC. + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * Example project configuration file for CHIP. + * + * This is a place to put application or project-specific overrides + * to the default configuration values for general CHIP features. + * + */ + +#pragma once + +// For convenience, enable Chip Security Test Mode and disable the requirement for +// authentication in various protocols. +// +// WARNING: These options make it possible to circumvent basic Chip security functionality, +// including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. +// +#define CHIP_CONFIG_SECURITY_TEST_MODE 0 + +/** + * CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION + * + * A uint32_t identifying the software version running on the device. + */ +#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION +#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION 0x0003 // Can't be removed, needed for OTA file generation. +#endif + +/** + * CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING + * + * A string identifying the software version running on the device. + * CHIP service currently expects the software version to be in the format + * {MAJOR_VERSION}.0d{MINOR_VERSION} + */ +#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING +#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING "1.1" // Can't be removed, needed for OTA file generation. +#endif + +/** + * CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE + * + * Enable support for Chip-over-BLE (CHIPoBLE). + */ +#define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE 1 + +/** + * @name Interaction Model object pool configuration. + * + * @brief + * The following definitions sets the maximum number of corresponding interaction model object pool size. + * + * * #CHIP_IM_MAX_NUM_COMMAND_HANDLER + * * #CHIP_IM_MAX_REPORTS_IN_FLIGHT + * * #CHIP_IM_MAX_NUM_WRITE_HANDLER + * * #CHIP_IM_MAX_NUM_WRITE_CLIENT + * + * @{ + */ + +/** + * @def CHIP_IM_MAX_NUM_COMMAND_HANDLER + * + * @brief Defines the maximum number of CommandHandler, limits the number of active commands transactions on server. + */ +#define CHIP_IM_MAX_NUM_COMMAND_HANDLER 2 + +/** + * @def CHIP_IM_MAX_REPORTS_IN_FLIGHT + * + * @brief Defines the maximum number of Reports, limits the traffic of read and subscription transactions. + */ +#define CHIP_IM_MAX_REPORTS_IN_FLIGHT 2 + +/** + * @def CHIP_IM_MAX_NUM_WRITE_HANDLER + * + * @brief Defines the maximum number of WriteHandler, limits the number of active write transactions on server. + */ +#define CHIP_IM_MAX_NUM_WRITE_HANDLER 2 + +/** + * @def CHIP_IM_MAX_NUM_WRITE_CLIENT + * + * @brief Defines the maximum number of WriteClient, limits the number of active write transactions on client. + */ +#define CHIP_IM_MAX_NUM_WRITE_CLIENT 2 + +#define CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY 1 + +/** + * @def CHIP_DEVICE_CONFIG_ENABLE_SED + * + * @brief Defines if a matter device is acting as a Sleepy End Device(SED) + */ +#ifndef CHIP_DEVICE_CONFIG_ENABLE_SED +#define CHIP_DEVICE_CONFIG_ENABLE_SED 1 +#endif + +#ifndef CHIP_DEVICE_CONFIG_THREAD_FTD +#define CHIP_DEVICE_CONFIG_THREAD_FTD 0 +#endif diff --git a/examples/light-switch-app/qpg/include/SwitchManager.h b/examples/light-switch-app/qpg/include/SwitchManager.h new file mode 100644 index 00000000000000..3f429f0c79a54e --- /dev/null +++ b/examples/light-switch-app/qpg/include/SwitchManager.h @@ -0,0 +1,72 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#pragma once + +#include +#include + +#include + +#include "AppEvent.h" + +#include "FreeRTOS.h" +#include "timers.h" // provides FreeRTOS timer support + +#include + +#include +#include +#include +#include +#include + +#define SWITCH_ENDPOINT_ID 1 +#define GENERICSWITCH_ENDPOINT_ID 2 + +class SwitchManager +{ +public: + enum Level_t + { + MIN_LEVEL = 0x40, + MAX_LEVEL = 0xfe, + }; + + enum Color_t + { + COLOR_AMBER = 1, + COLOR_GREEN, + }; + + void Init(void); + static void GenericSwitchInitialPress(void); + static void GenericSwitchReleasePress(void); + static void ToggleHandler(AppEvent * aEvent); + static void LevelHandler(AppEvent * aEvent); + static void ColorHandler(AppEvent * aEvent); + +private: + friend SwitchManager & SwitchMgr(void); + + static SwitchManager sSwitch; +}; + +inline SwitchManager & SwitchMgr(void) +{ + return SwitchManager::sSwitch; +} diff --git a/examples/light-switch-app/qpg/include/binding-handler.h b/examples/light-switch-app/qpg/include/binding-handler.h new file mode 100644 index 00000000000000..30a40701092959 --- /dev/null +++ b/examples/light-switch-app/qpg/include/binding-handler.h @@ -0,0 +1,42 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include + +void InitBindingManager(intptr_t context); +void SwitchWorkerFunction(intptr_t context); + +typedef struct ColorXYData +{ + uint16_t x; + uint16_t y; +} colorXYData_s; + +struct BindingCommandData +{ + chip::EndpointId localEndpointId = 1; + chip::CommandId commandId; + chip::ClusterId clusterId; + bool isGroup = false; + union + { + uint8_t level; + colorXYData_s colorXY; + }; +}; diff --git a/examples/light-switch-app/qpg/src/AppTask.cpp b/examples/light-switch-app/qpg/src/AppTask.cpp new file mode 100644 index 00000000000000..9f6662206f2e74 --- /dev/null +++ b/examples/light-switch-app/qpg/src/AppTask.cpp @@ -0,0 +1,571 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// TODO - Intentionally grouped together +#include "binding-handler.h" +#include +using namespace ::chip; + +#include "gpSched.h" +#include "qvIO.h" + +#include "AppConfig.h" +#include "AppEvent.h" +#include "AppTask.h" +#include "ota.h" + +#include + +#include +#include +#include +#include +#include +#include + +#include +#include + +#include + +#include +#include +#include + +using namespace ::chip; +using namespace ::chip::app; +using namespace ::chip::TLV; +using namespace ::chip::Credentials; +using namespace ::chip::DeviceLayer; + +#include + +#define FACTORY_RESET_TRIGGER_TIMEOUT 3000 +#define FACTORY_RESET_CANCEL_WINDOW_TIMEOUT 3000 +#define APP_TASK_STACK_SIZE (2 * 1024) +#define APP_TASK_PRIORITY 2 +#define APP_EVENT_QUEUE_SIZE 10 + +namespace { +TaskHandle_t sAppTaskHandle; +QueueHandle_t sAppEventQueue; + +bool sIsThreadProvisioned = false; +bool sIsThreadEnabled = false; +bool sHaveBLEConnections = false; +bool sIsBLEAdvertisingEnabled = false; + +// NOTE! This key is for test/certification only and should not be available in production devices! +uint8_t sTestEventTriggerEnableKey[TestEventTriggerDelegate::kEnableKeyLength] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, + 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff }; + +uint8_t sAppEventQueueBuffer[APP_EVENT_QUEUE_SIZE * sizeof(AppEvent)]; + +StaticQueue_t sAppEventQueueStruct; + +StackType_t appStack[APP_TASK_STACK_SIZE / sizeof(StackType_t)]; +StaticTask_t appTaskStruct; + +chip::DeviceLayer::DeviceInfoProviderImpl gExampleDeviceInfoProvider; +} // namespace + +AppTask AppTask::sAppTask; + +namespace { +constexpr int extDiscTimeoutSecs = 20; +} + +Clusters::Identify::EffectIdentifierEnum sIdentifyEffect = Clusters::Identify::EffectIdentifierEnum::kStopEffect; + +/********************************************************** + * Identify Callbacks + *********************************************************/ + +namespace { +void OnTriggerIdentifyEffectCompleted(chip::System::Layer * systemLayer, void * appState) +{ + sIdentifyEffect = Clusters::Identify::EffectIdentifierEnum::kStopEffect; +} +} // namespace + +void OnTriggerIdentifyEffect(Identify * identify) +{ + sIdentifyEffect = identify->mCurrentEffectIdentifier; + + if (identify->mEffectVariant != Clusters::Identify::EffectVariantEnum::kDefault) + { + ChipLogDetail(AppServer, "Identify Effect Variant unsupported. Using default"); + } + + switch (sIdentifyEffect) + { + case Clusters::Identify::EffectIdentifierEnum::kBlink: + case Clusters::Identify::EffectIdentifierEnum::kBreathe: + case Clusters::Identify::EffectIdentifierEnum::kOkay: + case Clusters::Identify::EffectIdentifierEnum::kChannelChange: + SystemLayer().ScheduleLambda([identify] { + (void) chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds16(5), OnTriggerIdentifyEffectCompleted, + identify); + }); + break; + case Clusters::Identify::EffectIdentifierEnum::kFinishEffect: + SystemLayer().ScheduleLambda([identify] { + (void) chip::DeviceLayer::SystemLayer().CancelTimer(OnTriggerIdentifyEffectCompleted, identify); + (void) chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds16(1), OnTriggerIdentifyEffectCompleted, + identify); + }); + break; + case Clusters::Identify::EffectIdentifierEnum::kStopEffect: + SystemLayer().ScheduleLambda( + [identify] { (void) chip::DeviceLayer::SystemLayer().CancelTimer(OnTriggerIdentifyEffectCompleted, identify); }); + sIdentifyEffect = Clusters::Identify::EffectIdentifierEnum::kStopEffect; + break; + default: + ChipLogProgress(Zcl, "No identifier effect"); + } +} + +Identify gIdentify = { + chip::EndpointId{ 1 }, + [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStart"); }, + [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStop"); }, + Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator, + OnTriggerIdentifyEffect, +}; + +void LockOpenThreadTask(void) +{ + chip::DeviceLayer::ThreadStackMgr().LockThreadStack(); +} + +void UnlockOpenThreadTask(void) +{ + chip::DeviceLayer::ThreadStackMgr().UnlockThreadStack(); +} + +CHIP_ERROR AppTask::StartAppTask() +{ + sAppEventQueue = xQueueCreateStatic(APP_EVENT_QUEUE_SIZE, sizeof(AppEvent), sAppEventQueueBuffer, &sAppEventQueueStruct); + if (sAppEventQueue == nullptr) + { + ChipLogError(NotSpecified, "Failed to allocate app event queue"); + return CHIP_ERROR_NO_MEMORY; + } + + // Start App task. + sAppTaskHandle = xTaskCreateStatic(AppTaskMain, APP_TASK_NAME, ArraySize(appStack), nullptr, 1, appStack, &appTaskStruct); + if (sAppTaskHandle == nullptr) + { + return CHIP_ERROR_NO_MEMORY; + } + + return CHIP_NO_ERROR; +} + +void AppTask::InitServer(intptr_t arg) +{ + static chip::CommonCaseDeviceServerInitParams initParams; + (void) initParams.InitializeStaticResourcesBeforeServerInit(); + + gExampleDeviceInfoProvider.SetStorageDelegate(initParams.persistentStorageDelegate); + chip::DeviceLayer::SetDeviceInfoProvider(&gExampleDeviceInfoProvider); + + chip::Inet::EndPointStateOpenThread::OpenThreadEndpointInitParam nativeParams; + nativeParams.lockCb = LockOpenThreadTask; + nativeParams.unlockCb = UnlockOpenThreadTask; + nativeParams.openThreadInstancePtr = chip::DeviceLayer::ThreadStackMgrImpl().OTInstance(); + initParams.endpointNativeParams = static_cast(&nativeParams); + + // Use GenericFaultTestEventTriggerDelegate to inject faults + static GenericFaultTestEventTriggerDelegate testEventTriggerDelegate{ ByteSpan(sTestEventTriggerEnableKey) }; + (void) initParams.InitializeStaticResourcesBeforeServerInit(); + initParams.testEventTriggerDelegate = &testEventTriggerDelegate; + + chip::Server::GetInstance().Init(initParams); + +#if CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY + chip::app::DnssdServer::Instance().SetExtendedDiscoveryTimeoutSecs(extDiscTimeoutSecs); +#endif + + // Open commissioning after boot if no fabric was available + if (chip::Server::GetInstance().GetFabricTable().FabricCount() == 0) + { + PlatformMgr().ScheduleWork(OpenCommissioning, 0); + } +} + +void AppTask::OpenCommissioning(intptr_t arg) +{ + // Enable BLE advertisements + chip::Server::GetInstance().GetCommissioningWindowManager().OpenBasicCommissioningWindow(); + ChipLogProgress(NotSpecified, "BLE advertising started. Waiting for Pairing."); +} + +CHIP_ERROR AppTask::Init() +{ + CHIP_ERROR err = CHIP_NO_ERROR; + + PlatformMgr().AddEventHandler(MatterEventHandler, 0); + + ChipLogProgress(NotSpecified, "Current Software Version: %s", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING); + + // Init ZCL Data Model and start server + PlatformMgr().ScheduleWork(InitServer, 0); + + ReturnErrorOnFailure(mFactoryDataProvider.Init()); + SetDeviceInstanceInfoProvider(&mFactoryDataProvider); + SetCommissionableDataProvider(&mFactoryDataProvider); + + SetDeviceAttestationCredentialsProvider(&mFactoryDataProvider); + + SwitchMgr().Init(); + UpdateClusterState(); + + // Setup button handler + qvIO_SetBtnCallback(ButtonEventHandler); + + DeviceLayer::PlatformMgr().ScheduleWork(InitBindingManager); + + // Log device configuration + ConfigurationMgr().LogDeviceConfig(); + PrintOnboardingCodes(chip::RendezvousInformationFlags(chip::RendezvousInformationFlag::kBLE)); + + sIsThreadProvisioned = ConnectivityMgr().IsThreadProvisioned(); + sIsThreadEnabled = ConnectivityMgr().IsThreadEnabled(); + sHaveBLEConnections = (ConnectivityMgr().NumBLEConnections() != 0); + sIsBLEAdvertisingEnabled = ConnectivityMgr().IsBLEAdvertisingEnabled(); + UpdateLEDs(); + + return err; +} + +void AppTask::AppTaskMain(void * pvParameter) +{ + AppEvent event; + + while (true) + { + BaseType_t eventReceived = xQueueReceive(sAppEventQueue, &event, portMAX_DELAY); + while (eventReceived == pdTRUE) + { + sAppTask.DispatchEvent(&event); + eventReceived = xQueueReceive(sAppEventQueue, &event, 0); + } + } +} + +void AppTask::ButtonEventHandler(uint8_t btnIdx, bool btnPressed) +{ + ChipLogProgress(NotSpecified, "ButtonEventHandler %d, %d", btnIdx, btnPressed); + + AppEvent button_event = {}; + button_event.Type = AppEvent::kEventType_Button; + button_event.ButtonEvent.ButtonIdx = btnIdx; + button_event.ButtonEvent.Action = btnPressed; + + switch (btnIdx) + { + case APP_FUNCTION1_BUTTON: { + if (!btnPressed) + { + return; + } + + ChipLogProgress(NotSpecified, "Level Button pressed"); + button_event.Handler = SwitchMgr().LevelHandler; + break; + } + case APP_FUNCTION2_SWITCH: { + if (!btnPressed) + { + ChipLogProgress(NotSpecified, "Switch initial press"); + SwitchMgr().GenericSwitchInitialPress(); + } + else + { + ChipLogProgress(NotSpecified, "Switch release press"); + SwitchMgr().GenericSwitchReleasePress(); + } + break; + } + case APP_FUNCTION3_BUTTON: { + if (!btnPressed) + { + return; + } + ChipLogProgress(NotSpecified, "Color button pressed"); + button_event.Handler = SwitchMgr().ColorHandler; + break; + } + case APP_FUNCTION4_BUTTON: { + if (!btnPressed) + { + return; + } + + ChipLogProgress(NotSpecified, "Toggle Button pressed"); + button_event.Handler = SwitchMgr().ToggleHandler; + break; + } + case APP_FUNCTION5_BUTTON: { + button_event.Handler = FunctionHandler; + break; + } + default: { + // invalid button + return; + } + } + + sAppTask.PostEvent(&button_event); +} + +void AppTask::TimerEventHandler(chip::System::Layer * aLayer, void * aAppState) +{ + AppEvent event; + event.Type = AppEvent::kEventType_Timer; + event.TimerEvent.Context = aAppState; + event.Handler = FunctionTimerEventHandler; + sAppTask.PostEvent(&event); +} + +void AppTask::FunctionTimerEventHandler(AppEvent * aEvent) +{ + if (aEvent->Type != AppEvent::kEventType_Timer) + { + return; + } + + // If we reached here, the button was held past FACTORY_RESET_TRIGGER_TIMEOUT, + // initiate factory reset + if (sAppTask.mFunctionTimerActive && sAppTask.mFunction == kFunction_SoftwareUpdate) + { + ChipLogProgress(NotSpecified, "[BTN] Factory Reset selected. Release within %us to cancel.", + FACTORY_RESET_CANCEL_WINDOW_TIMEOUT / 1000); + + // Start timer for FACTORY_RESET_CANCEL_WINDOW_TIMEOUT to allow user to + // cancel, if required. + sAppTask.StartTimer(FACTORY_RESET_CANCEL_WINDOW_TIMEOUT); + + sAppTask.mFunction = kFunction_FactoryReset; + + // Turn off all LEDs before starting blink to make sure blink is + // co-ordinated. + qvIO_LedSet(SYSTEM_STATE_LED, false); + + qvIO_LedBlink(SYSTEM_STATE_LED, 500, 500); + } + else if (sAppTask.mFunctionTimerActive && sAppTask.mFunction == kFunction_FactoryReset) + { + // Actually trigger Factory Reset + sAppTask.mFunction = kFunction_NoneSelected; + chip::Server::GetInstance().ScheduleFactoryReset(); + } +} + +void AppTask::FunctionHandler(AppEvent * aEvent) +{ + if (aEvent->ButtonEvent.ButtonIdx != APP_FUNCTION5_BUTTON) + { + return; + } + + // To trigger software update: press the APP_FUNCTION_BUTTON button briefly (< + // FACTORY_RESET_TRIGGER_TIMEOUT) To initiate factory reset: press the + // APP_FUNCTION_BUTTON for FACTORY_RESET_TRIGGER_TIMEOUT + + // FACTORY_RESET_CANCEL_WINDOW_TIMEOUT All LEDs start blinking after + // FACTORY_RESET_TRIGGER_TIMEOUT to signal factory reset has been initiated. + // To cancel factory reset: release the APP_FUNCTION_BUTTON once all LEDs + // start blinking within the FACTORY_RESET_CANCEL_WINDOW_TIMEOUT + if (aEvent->ButtonEvent.Action == true) + { + if (!sAppTask.mFunctionTimerActive && sAppTask.mFunction == kFunction_NoneSelected) + { + ChipLogProgress(NotSpecified, "[BTN] Hold to select function:"); + ChipLogProgress(NotSpecified, "[BTN] - Trigger OTA (0-3s)"); + ChipLogProgress(NotSpecified, "[BTN] - Factory Reset (>6s)"); + + sAppTask.StartTimer(FACTORY_RESET_TRIGGER_TIMEOUT); + + sAppTask.mFunction = kFunction_SoftwareUpdate; + } + } + else + { + // If the button was released before factory reset got initiated, trigger a + // software update. + if (sAppTask.mFunctionTimerActive && sAppTask.mFunction == kFunction_SoftwareUpdate) + { + sAppTask.CancelTimer(); + + sAppTask.mFunction = kFunction_NoneSelected; + + ChipLogProgress(NotSpecified, "[BTN] Triggering OTA Query"); + + TriggerOTAQuery(); + } + else if (sAppTask.mFunctionTimerActive && sAppTask.mFunction == kFunction_FactoryReset) + { + sAppTask.CancelTimer(); + + // Change the function to none selected since factory reset has been + // canceled. + sAppTask.mFunction = kFunction_NoneSelected; + + ChipLogProgress(NotSpecified, "[BTN] Factory Reset has been Canceled"); + } + } +} + +void AppTask::CancelTimer() +{ + chip::DeviceLayer::SystemLayer().CancelTimer(TimerEventHandler, this); + mFunctionTimerActive = false; +} + +void AppTask::StartTimer(uint32_t aTimeoutInMs) +{ + CHIP_ERROR err; + + chip::DeviceLayer::SystemLayer().CancelTimer(TimerEventHandler, this); + err = chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Milliseconds32(aTimeoutInMs), TimerEventHandler, this); + SuccessOrExit(err); + + mFunctionTimerActive = true; +exit: + if (err != CHIP_NO_ERROR) + { + ChipLogError(NotSpecified, "StartTimer failed %s: ", chip::ErrorStr(err)); + } +} + +void AppTask::PostEvent(const AppEvent * aEvent) +{ + if (sAppEventQueue != nullptr) + { + if (!xQueueSend(sAppEventQueue, aEvent, 1)) + { + ChipLogError(NotSpecified, "Failed to post event to app task event queue"); + } + } + else + { + ChipLogError(NotSpecified, "Event Queue is nullptr should never happen"); + } +} + +void AppTask::DispatchEvent(AppEvent * aEvent) +{ + if (aEvent->Handler) + { + aEvent->Handler(aEvent); + } + else + { + ChipLogError(NotSpecified, "Event received with no handler. Dropping event."); + } +} + +/** + * Update cluster status after application level changes + */ +void AppTask::UpdateClusterState(void) +{ + ChipLogProgress(NotSpecified, "UpdateClusterState"); + + /* write the new attribute value based on attribute setter API. + example API usage of on-off attribute: + + EmberAfStatus status = Clusters::OnOff::Attributes::OnOff::Set(QPG_LIGHT_ENDPOINT_ID, LightingMgr().IsTurnedOn()); + + if (status != EMBER_ZCL_STATUS_SUCCESS) + { + ChipLogError(NotSpecified, "ERR: updating on/off %x", status); + } + */ +} + +void AppTask::UpdateLEDs(void) +{ + // If system has "full connectivity", keep the LED On constantly. + // + // If thread and service provisioned, but not attached to the thread network + // yet OR no connectivity to the service OR subscriptions are not fully + // established THEN blink the LED Off for a short period of time. + // + // If the system has ble connection(s) uptill the stage above, THEN blink + // the LEDs at an even rate of 100ms. + // + // Otherwise, blink the LED ON for a very short time. + if (sIsThreadProvisioned && sIsThreadEnabled) + { + qvIO_LedSet(SYSTEM_STATE_LED, true); + } + else if (sHaveBLEConnections) + { + qvIO_LedBlink(SYSTEM_STATE_LED, 100, 100); + } + else if (sIsBLEAdvertisingEnabled) + { + qvIO_LedBlink(SYSTEM_STATE_LED, 50, 50); + } + else + { + // not commissioned yet + qvIO_LedBlink(SYSTEM_STATE_LED, 50, 950); + } +} + +void AppTask::MatterEventHandler(const ChipDeviceEvent * event, intptr_t) +{ + switch (event->Type) + { + case DeviceEventType::kServiceProvisioningChange: { + sIsThreadProvisioned = event->ServiceProvisioningChange.IsServiceProvisioned; + UpdateLEDs(); + break; + } + + case DeviceEventType::kThreadConnectivityChange: { + sIsThreadEnabled = (event->ThreadConnectivityChange.Result == kConnectivity_Established); + UpdateLEDs(); + break; + } + + case DeviceEventType::kCHIPoBLEConnectionEstablished: { + sHaveBLEConnections = true; + UpdateLEDs(); + break; + } + + case DeviceEventType::kCHIPoBLEConnectionClosed: { + sHaveBLEConnections = false; + UpdateLEDs(); + break; + } + + case DeviceEventType::kCHIPoBLEAdvertisingChange: { + sIsBLEAdvertisingEnabled = (event->CHIPoBLEAdvertisingChange.Result == kActivity_Started); + UpdateLEDs(); + break; + } + + default: + break; + } +} diff --git a/examples/light-switch-app/qpg/src/SwitchManager.cpp b/examples/light-switch-app/qpg/src/SwitchManager.cpp new file mode 100644 index 00000000000000..45d7079b578598 --- /dev/null +++ b/examples/light-switch-app/qpg/src/SwitchManager.cpp @@ -0,0 +1,126 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * Copyright (c) 2019 Google LLC. + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "SwitchManager.h" +#include "binding-handler.h" +#include "qvIO.h" +#include +#include + +SwitchManager SwitchManager::sSwitch; +using namespace ::chip; +using namespace chip::DeviceLayer; + +void SwitchManager::Init(void) +{ + // init - TODO +} + +void SwitchManager::ToggleHandler(AppEvent * aEvent) +{ + if (aEvent->Type != AppEvent::kEventType_Button) + { + ChipLogError(NotSpecified, "Event type not supported!"); + return; + } + + BindingCommandData * data = Platform::New(); + VerifyOrReturn(data != nullptr, ChipLogError(NotSpecified, "CHIP_ERROR_NO_MEMORY")); + + data->localEndpointId = SWITCH_ENDPOINT_ID; + data->clusterId = chip::app::Clusters::OnOff::Id; + data->commandId = chip::app::Clusters::OnOff::Commands::Toggle::Id; + + DeviceLayer::PlatformMgr().ScheduleWork(SwitchWorkerFunction, reinterpret_cast(data)); +} + +void SwitchManager::LevelHandler(AppEvent * aEvent) +{ + static uint8_t sLevel; + + if (aEvent->Type != AppEvent::kEventType_Button) + { + ChipLogError(NotSpecified, "Event type not supported!"); + return; + } + + BindingCommandData * data = Platform::New(); + VerifyOrReturn(data != nullptr, ChipLogError(NotSpecified, "CHIP_ERROR_NO_MEMORY")); + + data->localEndpointId = SWITCH_ENDPOINT_ID; + data->clusterId = chip::app::Clusters::LevelControl::Id; + data->commandId = chip::app::Clusters::LevelControl::Commands::MoveToLevel::Id; + data->level = (sLevel == MIN_LEVEL) ? MAX_LEVEL : MIN_LEVEL; + sLevel = data->level; + + ChipLogProgress(NotSpecified, "Level - %d", sLevel); + DeviceLayer::PlatformMgr().ScheduleWork(SwitchWorkerFunction, reinterpret_cast(data)); +} + +void SwitchManager::ColorHandler(AppEvent * aEvent) +{ + static uint8_t color; + + if (aEvent->Type != AppEvent::kEventType_Button) + { + ChipLogError(NotSpecified, "Event type not supported!"); + return; + } + + BindingCommandData * data = Platform::New(); + VerifyOrReturn(data != nullptr, ChipLogError(NotSpecified, "CHIP_ERROR_NO_MEMORY")); + + data->localEndpointId = SWITCH_ENDPOINT_ID; + data->clusterId = chip::app::Clusters::ColorControl::Id; + data->commandId = chip::app::Clusters::ColorControl::Commands::MoveToColor::Id; + if (color == COLOR_AMBER) + { + color = COLOR_GREEN; + data->colorXY.x = 36044; + data->colorXY.y = 29490; + ChipLogProgress(NotSpecified, "Color - AMBER"); + } + else + { + color = COLOR_AMBER; + data->colorXY.x = 7536; + data->colorXY.y = 54131; + ChipLogProgress(NotSpecified, "Color - GREEN"); + } + + DeviceLayer::PlatformMgr().ScheduleWork(SwitchWorkerFunction, reinterpret_cast(data)); +} + +void SwitchManager::GenericSwitchInitialPress(void) +{ + // Press moves Position from 0 (idle) to 1 (press) + uint8_t newPosition = 1; + + SystemLayer().ScheduleLambda( + [newPosition] { chip::app::Clusters::Switch::Attributes::CurrentPosition::Set(GENERICSWITCH_ENDPOINT_ID, newPosition); }); +} + +void SwitchManager::GenericSwitchReleasePress(void) +{ + // Release moves Position from 1 (press) to 0 + uint8_t newPosition = 0; + + SystemLayer().ScheduleLambda( + [newPosition] { chip::app::Clusters::Switch::Attributes::CurrentPosition::Set(GENERICSWITCH_ENDPOINT_ID, newPosition); }); +} diff --git a/examples/light-switch-app/qpg/src/ZclCallbacks.cpp b/examples/light-switch-app/qpg/src/ZclCallbacks.cpp new file mode 100644 index 00000000000000..373932454cc972 --- /dev/null +++ b/examples/light-switch-app/qpg/src/ZclCallbacks.cpp @@ -0,0 +1,38 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +#include "AppTask.h" + +#include +#include +#include +#include +#include +#include +#include + +using namespace ::chip; +using namespace chip::app::Clusters; + +void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size, + uint8_t * value) +{ + return; +} diff --git a/examples/light-switch-app/qpg/src/binding-handler.cpp b/examples/light-switch-app/qpg/src/binding-handler.cpp new file mode 100644 index 00000000000000..6369aa0ab06c25 --- /dev/null +++ b/examples/light-switch-app/qpg/src/binding-handler.cpp @@ -0,0 +1,133 @@ +/* + * + * Copyright (c) 2022 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "binding-handler.h" +#include "app/ConcreteCommandPath.h" +#include "app/clusters/bindings/BindingManager.h" +#include "controller/InvokeInteraction.h" +#include + +using namespace chip; +using namespace chip::app; + +static bool sEnabled = false; + +static void ProcessSwitchUnicastBindingCommand(CommandId commandId, const EmberBindingTableEntry & binding, + Messaging::ExchangeManager * exchangeMgr, const SessionHandle & sessionHandle, + BindingCommandData * data) +{ + auto onSuccess = [](const ConcreteCommandPath & commandPath, const StatusIB & status, const auto & dataResponse) { + ChipLogProgress(NotSpecified, "Switch command succeeds"); + }; + + auto onFailure = [](CHIP_ERROR error) { + ChipLogError(NotSpecified, "Switch command failed: %" CHIP_ERROR_FORMAT, error.Format()); + }; + + switch (commandId) + { + case Clusters::OnOff::Commands::Toggle::Id: + Clusters::OnOff::Commands::Toggle::Type toggleCommand; + Controller::InvokeCommandRequest(exchangeMgr, sessionHandle, binding.remote, toggleCommand, onSuccess, onFailure); + break; + + case Clusters::LevelControl::Commands::MoveToLevel::Id: { + Clusters::LevelControl::Commands::MoveToLevel::Type moveToLevelCommand; + moveToLevelCommand.level = data->level; + Controller::InvokeCommandRequest(exchangeMgr, sessionHandle, binding.remote, moveToLevelCommand, onSuccess, onFailure); + } + break; + case Clusters::ColorControl::Commands::MoveToColor::Id: { + + Clusters::ColorControl::Commands::MoveToColor::Type moveToColorCommand; + + moveToColorCommand.colorX = data->colorXY.x; + moveToColorCommand.colorY = data->colorXY.y; + Controller::InvokeCommandRequest(exchangeMgr, sessionHandle, binding.remote, moveToColorCommand, onSuccess, onFailure); + } + break; + + default: + ChipLogError(NotSpecified, "Unsupported Command Id"); + break; + } +} + +static void LightSwitchChangedHandler(const EmberBindingTableEntry & binding, OperationalDeviceProxy * peer_device, void * context) +{ + VerifyOrReturn(context != nullptr, ChipLogError(NotSpecified, "nullptr pointer passed")); + + BindingCommandData * data = static_cast(context); + + if (binding.type == EMBER_UNICAST_BINDING) + { + switch (data->clusterId) + { + case Clusters::OnOff::Id: + case Clusters::LevelControl::Id: + case Clusters::ColorControl::Id: + // TODO should not happen? + VerifyOrReturn(peer_device != nullptr, ChipLogError(NotSpecified, "Peer is nullptr")); + + ProcessSwitchUnicastBindingCommand(data->commandId, binding, peer_device->GetExchangeManager(), + peer_device->GetSecureSession().Value(), data); + break; + + default: + ChipLogError(NotSpecified, "Unsupported Cluster Id"); + break; + } + } +} + +static void LightSwitchContextReleaseHandler(void * context) +{ + VerifyOrReturn(context != nullptr, ChipLogError(NotSpecified, "nullptr pointer passed")); + + Platform::Delete(static_cast(context)); +} + +void InitBindingManager(intptr_t context) +{ + auto & server = chip::Server::GetInstance(); + BindingManagerInitParams bindingParams = { &server.GetFabricTable(), server.GetCASESessionManager(), + &server.GetPersistentStorage() }; + CHIP_ERROR error = BindingManager::GetInstance().Init(bindingParams); + if (error != CHIP_NO_ERROR) + { + ChipLogError(NotSpecified, "BindingManager initialization failed: %" CHIP_ERROR_FORMAT, error.Format()); + return; + } + BindingManager::GetInstance().RegisterBoundDeviceChangedHandler(LightSwitchChangedHandler); + BindingManager::GetInstance().RegisterBoundDeviceContextReleaseHandler(LightSwitchContextReleaseHandler); + sEnabled = true; +} + +void SwitchWorkerFunction(intptr_t context) +{ + VerifyOrReturn(context != 0, ChipLogError(NotSpecified, "nullptr pointer passed")); + + BindingCommandData * data = reinterpret_cast(context); + + if (!sEnabled) + { + ChipLogProgress(NotSpecified, "BindingManager not initialized"); + Platform::Delete(data); + } + + BindingManager::GetInstance().NotifyBoundClusterChanged(data->localEndpointId, data->clusterId, static_cast(data)); +} diff --git a/examples/light-switch-app/qpg/third_party/connectedhomeip b/examples/light-switch-app/qpg/third_party/connectedhomeip new file mode 120000 index 00000000000000..c866b86874994d --- /dev/null +++ b/examples/light-switch-app/qpg/third_party/connectedhomeip @@ -0,0 +1 @@ +../../../.. \ No newline at end of file diff --git a/examples/light-switch-app/qpg/with_pw_rpc.gni b/examples/light-switch-app/qpg/with_pw_rpc.gni new file mode 100644 index 00000000000000..6f195eee957169 --- /dev/null +++ b/examples/light-switch-app/qpg/with_pw_rpc.gni @@ -0,0 +1,24 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# add this gni as import in your build args to use pigweed in the example +# 'import("//with_pw_rpc.gni")' + +import("//build_overrides/chip.gni") +import("${chip_root}/config/qpg/lib/pw_rpc/pw_rpc.gni") +import("${chip_root}/examples/platform/qpg/args.gni") + +qpg_sdk_target = get_label_info(":sdk", "label_no_toolchain") + +chip_enable_pw_rpc = true diff --git a/examples/light-switch-app/qpg/zap/BUILD.gn b/examples/light-switch-app/qpg/zap/BUILD.gn new file mode 100644 index 00000000000000..35ac7ff5f28346 --- /dev/null +++ b/examples/light-switch-app/qpg/zap/BUILD.gn @@ -0,0 +1,24 @@ +# Copyright (c) 2022 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/chip.gni") +import("${chip_root}/src/app/chip_data_model.gni") + +chip_data_model("zap") { + zap_file = "switch.zap" + + zap_pregenerated_dir = + "${chip_root}/zzz_generated/light-switch-app/qpg/zap-generated" + is_server = true +} diff --git a/examples/light-switch-app/qpg/zap/switch.matter b/examples/light-switch-app/qpg/zap/switch.matter new file mode 100644 index 00000000000000..b0e5f87deffa58 --- /dev/null +++ b/examples/light-switch-app/qpg/zap/switch.matter @@ -0,0 +1,2580 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ +cluster Identify = 3 { + revision 4; + + enum EffectIdentifierEnum : enum8 { + kBlink = 0; + kBreathe = 1; + kOkay = 2; + kChannelChange = 11; + kFinishEffect = 254; + kStopEffect = 255; + } + + enum EffectVariantEnum : enum8 { + kDefault = 0; + } + + enum IdentifyTypeEnum : enum8 { + kNone = 0; + kLightOutput = 1; + kVisibleIndicator = 2; + kAudibleBeep = 3; + kDisplay = 4; + kActuator = 5; + } + + attribute int16u identifyTime = 0; + readonly attribute IdentifyTypeEnum identifyType = 1; + 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 IdentifyRequest { + int16u identifyTime = 0; + } + + request struct TriggerEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; + } + + /** Command description for Identify */ + command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; +} + +/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ +cluster Identify = 3 { + revision 4; + + enum EffectIdentifierEnum : enum8 { + kBlink = 0; + kBreathe = 1; + kOkay = 2; + kChannelChange = 11; + kFinishEffect = 254; + kStopEffect = 255; + } + + enum EffectVariantEnum : enum8 { + kDefault = 0; + } + + enum IdentifyTypeEnum : enum8 { + kNone = 0; + kLightOutput = 1; + kVisibleIndicator = 2; + kAudibleBeep = 3; + kDisplay = 4; + kActuator = 5; + } + + attribute int16u identifyTime = 0; + readonly attribute IdentifyTypeEnum identifyType = 1; + 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 IdentifyRequest { + int16u identifyTime = 0; + } + + request struct TriggerEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; + } + + /** Command description for Identify */ + command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; +} + +/** Attributes and commands for group configuration and manipulation. */ +cluster Groups = 4 { + revision 4; + + bitmap Feature : bitmap32 { + kGroupNames = 0x1; + } + + bitmap NameSupportBitmap : bitmap8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; + 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 AddGroupRequest { + group_id groupID = 0; + char_string<16> groupName = 1; + } + + response struct AddGroupResponse = 0 { + enum8 status = 0; + group_id groupID = 1; + } + + request struct ViewGroupRequest { + group_id groupID = 0; + } + + response struct ViewGroupResponse = 1 { + enum8 status = 0; + group_id groupID = 1; + char_string<16> groupName = 2; + } + + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + + response struct GetGroupMembershipResponse = 2 { + nullable int8u capacity = 0; + group_id groupList[] = 1; + } + + request struct RemoveGroupRequest { + group_id groupID = 0; + } + + response struct RemoveGroupResponse = 3 { + enum8 status = 0; + group_id groupID = 1; + } + + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + char_string<16> groupName = 1; + } + + /** Command description for AddGroup */ + fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + /** Command description for ViewGroup */ + fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + /** Command description for GetGroupMembership */ + fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + /** Command description for RemoveGroup */ + fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + /** Command description for RemoveAllGroups */ + fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + /** Command description for AddGroupIfIdentifying */ + 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; + + enum DelayedAllOffEffectVariantEnum : enum8 { + kDelayedOffFastFade = 0; + kNoFade = 1; + kDelayedOffSlowFade = 2; + } + + enum DyingLightEffectVariantEnum : enum8 { + kDyingLightFadeOff = 0; + } + + enum EffectIdentifierEnum : enum8 { + kDelayedAllOff = 0; + kDyingLight = 1; + } + + enum StartUpOnOffEnum : enum8 { + kOff = 0; + kOn = 1; + kToggle = 2; + } + + bitmap Feature : bitmap32 { + kLighting = 0x1; + kDeadFrontBehavior = 0x2; + kOffOnly = 0x4; + } + + bitmap OnOffControlBitmap : bitmap8 { + kAcceptOnlyWhenOn = 0x1; + } + + readonly attribute boolean onOff = 0; + readonly attribute optional boolean globalSceneControl = 16384; + attribute optional int16u onTime = 16385; + attribute optional int16u offWaitTime = 16386; + attribute access(write: manage) optional nullable StartUpOnOffEnum startUpOnOff = 16387; + 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 OffWithEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + enum8 effectVariant = 1; + } + + request struct OnWithTimedOffRequest { + OnOffControlBitmap onOffControl = 0; + int16u onTime = 1; + int16u offWaitTime = 2; + } + + /** On receipt of this command, a device SHALL enter its ‘Off’ state. This state is device dependent, but it is recommended that it is used for power off or similar functions. On receipt of the Off command, the OnTime attribute SHALL be set to 0. */ + command Off(): DefaultSuccess = 0; + /** On receipt of this command, a device SHALL enter its ‘On’ state. This state is device dependent, but it is recommended that it is used for power on or similar functions. On receipt of the On command, if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. */ + command On(): DefaultSuccess = 1; + /** On receipt of this command, if a device is in its ‘Off’ state it SHALL enter its ‘On’ state. Otherwise, if it is in its ‘On’ state it SHALL enter its ‘Off’ state. On receipt of the Toggle command, if the value of the OnOff attribute is equal to FALSE and if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. If the value of the OnOff attribute is equal to TRUE, the OnTime attribute SHALL be set to 0. */ + command Toggle(): DefaultSuccess = 2; + /** The OffWithEffect command allows devices to be turned off using enhanced ways of fading. */ + command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; + /** The OnWithRecallGlobalScene command allows the recall of the settings when the device was turned off. */ + command OnWithRecallGlobalScene(): DefaultSuccess = 65; + /** The OnWithTimedOff command allows devices to be turned on for a specific duration with a guarded off duration so that SHOULD the device be subsequently switched off, further OnWithTimedOff commands, received during this time, are prevented from turning the devices back on. */ + command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 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; + + bitmap Feature : bitmap32 { + kTagList = 0x1; + } + + struct DeviceTypeStruct { + devtype_id deviceType = 0; + int16u revision = 1; + } + + struct SemanticTagStruct { + nullable vendor_id mfgCode = 0; + enum8 namespaceID = 1; + enum8 tag = 2; + optional nullable char_string label = 3; + } + + readonly attribute DeviceTypeStruct deviceTypeList[] = 0; + readonly attribute cluster_id serverList[] = 1; + readonly attribute cluster_id clientList[] = 2; + readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; + 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; +} + +/** The Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. */ +cluster Binding = 30 { + revision 1; // NOTE: Default/not specifically set + + fabric_scoped struct TargetStruct { + optional node_id node = 1; + optional group_id group = 2; + optional endpoint_no endpoint = 3; + optional cluster_id cluster = 4; + fabric_idx fabricIndex = 254; + } + + attribute access(write: manage) TargetStruct binding[] = 0; + 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; +} + +/** The Access Control Cluster exposes a data model view of a + Node's Access Control List (ACL), which codifies the rules used to manage + and enforce Access Control for the Node's endpoints and their associated + cluster instances. */ +cluster AccessControl = 31 { + revision 1; // NOTE: Default/not specifically set + + enum AccessControlEntryAuthModeEnum : enum8 { + kPASE = 1; + kCASE = 2; + kGroup = 3; + } + + enum AccessControlEntryPrivilegeEnum : enum8 { + kView = 1; + kProxyView = 2; + kOperate = 3; + kManage = 4; + kAdminister = 5; + } + + enum ChangeTypeEnum : enum8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + struct AccessControlTargetStruct { + nullable cluster_id cluster = 0; + nullable endpoint_no endpoint = 1; + nullable devtype_id deviceType = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; + nullable fabric_sensitive int64u subjects[] = 3; + nullable fabric_sensitive AccessControlTargetStruct targets[] = 4; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct AccessControlExtensionStruct { + fabric_sensitive octet_string<128> data = 1; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) AccessControlEntryChanged = 0 { + nullable node_id adminNodeID = 1; + nullable int16u adminPasscodeID = 2; + ChangeTypeEnum changeType = 3; + nullable AccessControlEntryStruct latestValue = 4; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) AccessControlExtensionChanged = 1 { + nullable node_id adminNodeID = 1; + nullable int16u adminPasscodeID = 2; + ChangeTypeEnum changeType = 3; + nullable AccessControlExtensionStruct latestValue = 4; + fabric_idx fabricIndex = 254; + } + + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; + readonly attribute int16u subjectsPerAccessControlEntry = 2; + readonly attribute int16u targetsPerAccessControlEntry = 3; + readonly attribute int16u accessControlEntriesPerFabric = 4; + 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; +} + +/** This cluster provides attributes and events for determining basic information about Nodes, which supports both + Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, + which apply to the whole Node. Also allows setting user device information such as location. */ +cluster BasicInformation = 40 { + revision 3; + + enum ColorEnum : enum8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : enum8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + + struct CapabilityMinimaStruct { + int16u caseSessionsPerFabric = 0; + int16u subscriptionsPerFabric = 1; + } + + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + + critical event StartUp = 0 { + int32u softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + fabric_idx fabricIndex = 0; + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + readonly attribute int16u dataModelRevision = 0; + readonly attribute char_string<32> vendorName = 1; + readonly attribute vendor_id vendorID = 2; + readonly attribute char_string<32> productName = 3; + readonly attribute int16u productID = 4; + attribute access(write: manage) char_string<32> nodeLabel = 5; + attribute access(write: administer) char_string<2> location = 6; + readonly attribute int16u hardwareVersion = 7; + readonly attribute char_string<64> hardwareVersionString = 8; + readonly attribute int32u softwareVersion = 9; + readonly attribute char_string<64> softwareVersionString = 10; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; + readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; + readonly attribute int32u specificationVersion = 21; + readonly attribute int16u maxPathsPerInvoke = 22; + 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; + + command MfgSpecificPing(): DefaultSuccess = 0; +} + +/** Provides an interface for providing OTA software updates */ +cluster OtaSoftwareUpdateProvider = 41 { + revision 1; // NOTE: Default/not specifically set + + enum ApplyUpdateActionEnum : enum8 { + kProceed = 0; + kAwaitNextAction = 1; + kDiscontinue = 2; + } + + enum DownloadProtocolEnum : enum8 { + kBDXSynchronous = 0; + kBDXAsynchronous = 1; + kHTTPS = 2; + kVendorSpecific = 3; + } + + enum StatusEnum : enum8 { + kUpdateAvailable = 0; + kBusy = 1; + kNotAvailable = 2; + kDownloadProtocolNotSupported = 3; + } + + 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 QueryImageRequest { + vendor_id vendorID = 0; + int16u productID = 1; + int32u softwareVersion = 2; + DownloadProtocolEnum protocolsSupported[] = 3; + optional int16u hardwareVersion = 4; + optional char_string<2> location = 5; + optional boolean requestorCanConsent = 6; + optional octet_string<512> metadataForProvider = 7; + } + + response struct QueryImageResponse = 1 { + StatusEnum status = 0; + optional int32u delayedActionTime = 1; + optional char_string<256> imageURI = 2; + optional int32u softwareVersion = 3; + optional char_string<64> softwareVersionString = 4; + optional octet_string<32> updateToken = 5; + optional boolean userConsentNeeded = 6; + optional octet_string<512> metadataForRequestor = 7; + } + + request struct ApplyUpdateRequestRequest { + octet_string<32> updateToken = 0; + int32u newVersion = 1; + } + + response struct ApplyUpdateResponse = 3 { + ApplyUpdateActionEnum action = 0; + int32u delayedActionTime = 1; + } + + request struct NotifyUpdateAppliedRequest { + octet_string<32> updateToken = 0; + int32u softwareVersion = 1; + } + + /** Determine availability of a new Software Image */ + command QueryImage(QueryImageRequest): QueryImageResponse = 0; + /** Determine next action to take for a downloaded Software Image */ + command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; + /** Notify OTA Provider that an update was applied */ + command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; +} + +/** Provides an interface for downloading and applying OTA software updates */ +cluster OtaSoftwareUpdateRequestor = 42 { + revision 1; // NOTE: Default/not specifically set + + enum AnnouncementReasonEnum : enum8 { + kSimpleAnnouncement = 0; + kUpdateAvailable = 1; + kUrgentUpdateAvailable = 2; + } + + enum ChangeReasonEnum : enum8 { + kUnknown = 0; + kSuccess = 1; + kFailure = 2; + kTimeOut = 3; + kDelayByProvider = 4; + } + + enum UpdateStateEnum : enum8 { + kUnknown = 0; + kIdle = 1; + kQuerying = 2; + kDelayedOnQuery = 3; + kDownloading = 4; + kApplying = 5; + kDelayedOnApply = 6; + kRollingBack = 7; + kDelayedOnUserConsent = 8; + } + + fabric_scoped struct ProviderLocation { + node_id providerNodeID = 1; + endpoint_no endpoint = 2; + fabric_idx fabricIndex = 254; + } + + info event StateTransition = 0 { + UpdateStateEnum previousState = 0; + UpdateStateEnum newState = 1; + ChangeReasonEnum reason = 2; + nullable int32u targetSoftwareVersion = 3; + } + + critical event VersionApplied = 1 { + int32u softwareVersion = 0; + int16u productID = 1; + } + + info event DownloadError = 2 { + int32u softwareVersion = 0; + int64u bytesDownloaded = 1; + nullable int8u progressPercent = 2; + nullable int64s platformCode = 3; + } + + attribute access(write: administer) ProviderLocation defaultOTAProviders[] = 0; + readonly attribute boolean updatePossible = 1; + readonly attribute UpdateStateEnum updateState = 2; + readonly attribute nullable int8u updateStateProgress = 3; + 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 AnnounceOTAProviderRequest { + node_id providerNodeID = 0; + vendor_id vendorID = 1; + AnnouncementReasonEnum announcementReason = 2; + optional octet_string<512> metadataForNode = 3; + endpoint_no endpoint = 4; + } + + /** Announce the presence of an OTA Provider */ + command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; +} + +/** This cluster is used to manage global aspects of the Commissioning flow. */ +cluster GeneralCommissioning = 48 { + revision 1; // NOTE: Default/not specifically set + + enum CommissioningErrorEnum : enum8 { + kOK = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNoFailSafe = 3; + kBusyWithOtherAdmin = 4; + } + + enum RegulatoryLocationTypeEnum : enum8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + struct BasicCommissioningInfo { + int16u failSafeExpiryLengthSeconds = 0; + int16u maxCumulativeFailsafeSeconds = 1; + } + + attribute access(write: administer) int64u breadcrumb = 0; + readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1; + readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; + readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; + readonly attribute boolean supportsConcurrentConnection = 4; + 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 ArmFailSafeRequest { + int16u expiryLengthSeconds = 0; + int64u breadcrumb = 1; + } + + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationTypeEnum newRegulatoryConfig = 0; + char_string<2> countryCode = 1; + int64u breadcrumb = 2; + } + + response struct SetRegulatoryConfigResponse = 3 { + CommissioningErrorEnum errorCode = 0; + char_string debugText = 1; + } + + response struct CommissioningCompleteResponse = 5 { + CommissioningErrorEnum errorCode = 0; + char_string debugText = 1; + } + + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ + command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ + command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; +} + +/** Functionality to configure, enable, disable network credentials and access on a Matter device. */ +cluster NetworkCommissioning = 49 { + revision 1; // NOTE: Default/not specifically set + + enum NetworkCommissioningStatusEnum : enum8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBandEnum : enum8 { + k2G4 = 0; + k3G65 = 1; + k5G = 2; + k6G = 3; + k60G = 4; + k1G = 5; + } + + bitmap Feature : bitmap32 { + kWiFiNetworkInterface = 0x1; + kThreadNetworkInterface = 0x2; + kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; + } + + bitmap ThreadCapabilitiesBitmap : bitmap16 { + kIsBorderRouterCapable = 0x1; + kIsRouterCapable = 0x2; + kIsSleepyEndDeviceCapable = 0x4; + kIsFullThreadDevice = 0x8; + kIsSynchronizedSleepyEndDeviceCapable = 0x10; + } + + bitmap WiFiSecurityBitmap : bitmap8 { + kUnencrypted = 0x1; + kWEP = 0x2; + kWPAPersonal = 0x4; + kWPA2Personal = 0x8; + kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; + } + + struct NetworkInfoStruct { + octet_string<32> networkID = 0; + boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; + } + + struct ThreadInterfaceScanResultStruct { + int16u panId = 0; + int64u extendedPanId = 1; + char_string<16> networkName = 2; + int16u channel = 3; + int8u version = 4; + octet_string<8> extendedAddress = 5; + int8s rssi = 6; + int8u lqi = 7; + } + + struct WiFiInterfaceScanResultStruct { + WiFiSecurityBitmap security = 0; + octet_string<32> ssid = 1; + octet_string<6> bssid = 2; + int16u channel = 3; + WiFiBandEnum wiFiBand = 4; + int8s rssi = 5; + } + + readonly attribute access(read: administer) int8u maxNetworks = 0; + readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; + attribute access(write: administer) boolean interfaceEnabled = 4; + readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; + readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; + readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; + 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 ScanNetworksRequest { + optional nullable octet_string<32> ssid = 0; + optional int64u breadcrumb = 1; + } + + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + + request struct AddOrUpdateWiFiNetworkRequest { + octet_string<32> ssid = 0; + octet_string<64> credentials = 1; + optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; + } + + request struct AddOrUpdateThreadNetworkRequest { + octet_string<254> operationalDataset = 0; + optional int64u breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + octet_string<32> networkID = 0; + optional int64u breadcrumb = 1; + } + + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + + request struct ConnectNetworkRequest { + octet_string<32> networkID = 0; + optional int64u breadcrumb = 1; + } + + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + + request struct ReorderNetworkRequest { + octet_string<32> networkID = 0; + int8u networkIndex = 1; + optional int64u breadcrumb = 2; + } + + request struct QueryIdentityRequest { + octet_string<20> keyIdentifier = 0; + optional octet_string<32> possessionNonce = 1; + } + + response struct QueryIdentityResponse = 10 { + octet_string<140> identity = 0; + optional octet_string<64> possessionSignature = 1; + } + + /** Detemine the set of networks the device sees as available. */ + command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ + command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ + command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ + command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ + command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ + command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; +} + +/** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ +cluster DiagnosticLogs = 50 { + revision 1; // NOTE: Default/not specifically set + + enum IntentEnum : enum8 { + kEndUserSupport = 0; + kNetworkDiag = 1; + kCrashLogs = 2; + } + + enum StatusEnum : enum8 { + kSuccess = 0; + kExhausted = 1; + kNoLogs = 2; + kBusy = 3; + kDenied = 4; + } + + enum TransferProtocolEnum : enum8 { + kResponsePayload = 0; + kBDX = 1; + } + + 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 RetrieveLogsRequestRequest { + IntentEnum intent = 0; + TransferProtocolEnum requestedProtocol = 1; + optional char_string<32> transferFileDesignator = 2; + } + + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + long_octet_string logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; +} + +/** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ +cluster GeneralDiagnostics = 51 { + revision 2; + + enum BootReasonEnum : enum8 { + kUnspecified = 0; + kPowerOnReboot = 1; + kBrownOutReset = 2; + kSoftwareWatchdogReset = 3; + kHardwareWatchdogReset = 4; + kSoftwareUpdateCompleted = 5; + kSoftwareReset = 6; + } + + enum HardwareFaultEnum : enum8 { + kUnspecified = 0; + kRadio = 1; + kSensor = 2; + kResettableOverTemp = 3; + kNonResettableOverTemp = 4; + kPowerSource = 5; + kVisualDisplayFault = 6; + kAudioOutputFault = 7; + kUserInterfaceFault = 8; + kNonVolatileMemoryError = 9; + kTamperDetected = 10; + } + + enum InterfaceTypeEnum : enum8 { + kUnspecified = 0; + kWiFi = 1; + kEthernet = 2; + kCellular = 3; + kThread = 4; + } + + enum NetworkFaultEnum : enum8 { + kUnspecified = 0; + kHardwareFailure = 1; + kNetworkJammed = 2; + kConnectionFailed = 3; + } + + enum RadioFaultEnum : enum8 { + kUnspecified = 0; + kWiFiFault = 1; + kCellularFault = 2; + kThreadFault = 3; + kNFCFault = 4; + kBLEFault = 5; + kEthernetFault = 6; + } + + struct NetworkInterface { + char_string<32> name = 0; + boolean isOperational = 1; + nullable boolean offPremiseServicesReachableIPv4 = 2; + nullable boolean offPremiseServicesReachableIPv6 = 3; + octet_string<8> hardwareAddress = 4; + octet_string IPv4Addresses[] = 5; + octet_string IPv6Addresses[] = 6; + InterfaceTypeEnum type = 7; + } + + critical event HardwareFaultChange = 0 { + HardwareFaultEnum current[] = 0; + HardwareFaultEnum previous[] = 1; + } + + critical event RadioFaultChange = 1 { + RadioFaultEnum current[] = 0; + RadioFaultEnum previous[] = 1; + } + + critical event NetworkFaultChange = 2 { + NetworkFaultEnum current[] = 0; + NetworkFaultEnum previous[] = 1; + } + + critical event BootReason = 3 { + BootReasonEnum bootReason = 0; + } + + readonly attribute NetworkInterface networkInterfaces[] = 0; + readonly attribute int16u rebootCount = 1; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute boolean testEventTriggersEnabled = 8; + 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 TestEventTriggerRequest { + octet_string<16> enableKey = 0; + int64u eventTrigger = 1; + } + + response struct TimeSnapshotResponse = 2 { + systime_ms systemTimeMs = 0; + nullable posix_ms posixTimeMs = 1; + } + + /** Provide a means for certification tests to trigger some test-plan-specific events */ + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ + command TimeSnapshot(): TimeSnapshotResponse = 1; +} + +/** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ +cluster SoftwareDiagnostics = 52 { + revision 1; // NOTE: Default/not specifically set + + bitmap Feature : bitmap32 { + kWatermarks = 0x1; + } + + struct ThreadMetricsStruct { + int64u id = 0; + optional char_string<8> name = 1; + optional int32u stackFreeCurrent = 2; + optional int32u stackFreeMinimum = 3; + optional int32u stackSize = 4; + } + + info event SoftwareFault = 0 { + int64u id = 0; + optional char_string name = 1; + optional octet_string faultRecording = 2; + } + + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; + 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; + + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ + command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; +} + +/** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */ +cluster ThreadNetworkDiagnostics = 53 { + revision 1; // NOTE: Default/not specifically set + + enum ConnectionStatusEnum : enum8 { + kConnected = 0; + kNotConnected = 1; + } + + enum NetworkFaultEnum : enum8 { + kUnspecified = 0; + kLinkDown = 1; + kHardwareFailure = 2; + kNetworkJammed = 3; + } + + enum RoutingRoleEnum : enum8 { + kUnspecified = 0; + kUnassigned = 1; + kSleepyEndDevice = 2; + kEndDevice = 3; + kREED = 4; + kRouter = 5; + kLeader = 6; + } + + bitmap Feature : bitmap32 { + kPacketCounts = 0x1; + kErrorCounts = 0x2; + kMLECounts = 0x4; + kMACCounts = 0x8; + } + + struct NeighborTableStruct { + int64u extAddress = 0; + int32u age = 1; + int16u rloc16 = 2; + int32u linkFrameCounter = 3; + int32u mleFrameCounter = 4; + int8u lqi = 5; + nullable int8s averageRssi = 6; + nullable int8s lastRssi = 7; + int8u frameErrorRate = 8; + int8u messageErrorRate = 9; + boolean rxOnWhenIdle = 10; + boolean fullThreadDevice = 11; + boolean fullNetworkData = 12; + boolean isChild = 13; + } + + struct OperationalDatasetComponents { + boolean activeTimestampPresent = 0; + boolean pendingTimestampPresent = 1; + boolean masterKeyPresent = 2; + boolean networkNamePresent = 3; + boolean extendedPanIdPresent = 4; + boolean meshLocalPrefixPresent = 5; + boolean delayPresent = 6; + boolean panIdPresent = 7; + boolean channelPresent = 8; + boolean pskcPresent = 9; + boolean securityPolicyPresent = 10; + boolean channelMaskPresent = 11; + } + + struct RouteTableStruct { + int64u extAddress = 0; + int16u rloc16 = 1; + int8u routerId = 2; + int8u nextHop = 3; + int8u pathCost = 4; + int8u LQIIn = 5; + int8u LQIOut = 6; + int8u age = 7; + boolean allocated = 8; + boolean linkEstablished = 9; + } + + struct SecurityPolicy { + int16u rotationTime = 0; + int16u flags = 1; + } + + info event ConnectionStatus = 0 { + ConnectionStatusEnum connectionStatus = 0; + } + + info event NetworkFaultChange = 1 { + NetworkFaultEnum current[] = 0; + NetworkFaultEnum previous[] = 1; + } + + readonly attribute nullable int16u channel = 0; + readonly attribute nullable RoutingRoleEnum routingRole = 1; + readonly attribute nullable char_string<16> networkName = 2; + readonly attribute nullable int16u panId = 3; + readonly attribute nullable int64u extendedPanId = 4; + readonly attribute nullable octet_string<17> meshLocalPrefix = 5; + readonly attribute optional int64u overrunCount = 6; + readonly attribute NeighborTableStruct neighborTable[] = 7; + readonly attribute RouteTableStruct routeTable[] = 8; + readonly attribute nullable int32u partitionId = 9; + readonly attribute nullable int16u weighting = 10; + readonly attribute nullable int16u dataVersion = 11; + readonly attribute nullable int16u stableDataVersion = 12; + readonly attribute nullable int8u leaderRouterId = 13; + readonly attribute optional int16u detachedRoleCount = 14; + readonly attribute optional int16u childRoleCount = 15; + readonly attribute optional int16u routerRoleCount = 16; + readonly attribute optional int16u leaderRoleCount = 17; + readonly attribute optional int16u attachAttemptCount = 18; + readonly attribute optional int16u partitionIdChangeCount = 19; + readonly attribute optional int16u betterPartitionAttachAttemptCount = 20; + readonly attribute optional int16u parentChangeCount = 21; + readonly attribute optional int32u txTotalCount = 22; + readonly attribute optional int32u txUnicastCount = 23; + readonly attribute optional int32u txBroadcastCount = 24; + readonly attribute optional int32u txAckRequestedCount = 25; + readonly attribute optional int32u txAckedCount = 26; + readonly attribute optional int32u txNoAckRequestedCount = 27; + readonly attribute optional int32u txDataCount = 28; + readonly attribute optional int32u txDataPollCount = 29; + readonly attribute optional int32u txBeaconCount = 30; + readonly attribute optional int32u txBeaconRequestCount = 31; + readonly attribute optional int32u txOtherCount = 32; + readonly attribute optional int32u txRetryCount = 33; + readonly attribute optional int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute optional int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute optional int32u txErrCcaCount = 36; + readonly attribute optional int32u txErrAbortCount = 37; + readonly attribute optional int32u txErrBusyChannelCount = 38; + readonly attribute optional int32u rxTotalCount = 39; + readonly attribute optional int32u rxUnicastCount = 40; + readonly attribute optional int32u rxBroadcastCount = 41; + readonly attribute optional int32u rxDataCount = 42; + readonly attribute optional int32u rxDataPollCount = 43; + readonly attribute optional int32u rxBeaconCount = 44; + readonly attribute optional int32u rxBeaconRequestCount = 45; + readonly attribute optional int32u rxOtherCount = 46; + readonly attribute optional int32u rxAddressFilteredCount = 47; + readonly attribute optional int32u rxDestAddrFilteredCount = 48; + readonly attribute optional int32u rxDuplicatedCount = 49; + readonly attribute optional int32u rxErrNoFrameCount = 50; + readonly attribute optional int32u rxErrUnknownNeighborCount = 51; + readonly attribute optional int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute optional int32u rxErrSecCount = 53; + readonly attribute optional int32u rxErrFcsCount = 54; + readonly attribute optional int32u rxErrOtherCount = 55; + readonly attribute optional nullable int64u activeTimestamp = 56; + readonly attribute optional nullable int64u pendingTimestamp = 57; + readonly attribute optional nullable int32u delay = 58; + readonly attribute nullable SecurityPolicy securityPolicy = 59; + readonly attribute nullable octet_string<4> channelPage0Mask = 60; + readonly attribute nullable OperationalDatasetComponents operationalDatasetComponents = 61; + readonly attribute NetworkFaultEnum activeNetworkFaultsList[] = 62; + 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; + + /** Reception of this command SHALL reset the OverrunCount attributes to 0 */ + command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; +} + +/** This cluster exposes interactions with a switch device, for the purpose of using those interactions by other devices. +Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. +Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ +cluster Switch = 59 { + revision 1; + + bitmap Feature : bitmap32 { + kLatchingSwitch = 0x1; + kMomentarySwitch = 0x2; + kMomentarySwitchRelease = 0x4; + kMomentarySwitchLongPress = 0x8; + kMomentarySwitchMultiPress = 0x10; + } + + info event SwitchLatched = 0 { + int8u newPosition = 0; + } + + info event InitialPress = 1 { + int8u newPosition = 0; + } + + info event LongPress = 2 { + int8u newPosition = 0; + } + + info event ShortRelease = 3 { + int8u previousPosition = 0; + } + + info event LongRelease = 4 { + int8u previousPosition = 0; + } + + info event MultiPressOngoing = 5 { + int8u newPosition = 0; + int8u currentNumberOfPressesCounted = 1; + } + + info event MultiPressComplete = 6 { + int8u previousPosition = 0; + int8u totalNumberOfPressesCounted = 1; + } + + readonly attribute int8u numberOfPositions = 0; + readonly attribute int8u currentPosition = 1; + readonly attribute optional int8u multiPressMax = 2; + 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; +} + +/** Commands to trigger a Node to allow a new Administrator to commission it. */ +cluster AdministratorCommissioning = 60 { + revision 1; // NOTE: Default/not specifically set + + enum CommissioningWindowStatusEnum : enum8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : enum8 { + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; + } + + bitmap Feature : bitmap32 { + kBasic = 0x1; + } + + readonly attribute CommissioningWindowStatusEnum windowStatus = 0; + readonly attribute nullable fabric_idx adminFabricIndex = 1; + readonly attribute nullable vendor_id adminVendorId = 2; + 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 OpenCommissioningWindowRequest { + int16u commissioningTimeout = 0; + octet_string PAKEPasscodeVerifier = 1; + int16u discriminator = 2; + int32u iterations = 3; + octet_string<32> salt = 4; + } + + request struct OpenBasicCommissioningWindowRequest { + int16u commissioningTimeout = 0; + } + + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ + timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ + timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ + timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; +} + +/** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ +cluster OperationalCredentials = 62 { + revision 1; // NOTE: Default/not specifically set + + enum CertificateChainTypeEnum : enum8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : enum8 { + kOK = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInvalidAdminSubject = 6; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + fabric_scoped struct FabricDescriptorStruct { + octet_string<65> rootPublicKey = 1; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; + char_string<32> label = 5; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct NOCStruct { + fabric_sensitive octet_string noc = 1; + nullable fabric_sensitive octet_string icac = 2; + fabric_idx fabricIndex = 254; + } + + readonly attribute access(read: administer) NOCStruct NOCs[] = 0; + readonly attribute FabricDescriptorStruct fabrics[] = 1; + readonly attribute int8u supportedFabrics = 2; + readonly attribute int8u commissionedFabrics = 3; + readonly attribute octet_string trustedRootCertificates[] = 4; + readonly attribute int8u currentFabricIndex = 5; + 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 AttestationRequestRequest { + octet_string<32> attestationNonce = 0; + } + + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + + request struct CertificateChainRequestRequest { + CertificateChainTypeEnum certificateType = 0; + } + + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + + request struct CSRRequestRequest { + octet_string<32> CSRNonce = 0; + optional boolean isForUpdateNOC = 1; + } + + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + + request struct AddNOCRequest { + octet_string<400> NOCValue = 0; + optional octet_string<400> ICACValue = 1; + octet_string<16> IPKValue = 2; + int64u caseAdminSubject = 3; + vendor_id adminVendorId = 4; + } + + request struct UpdateNOCRequest { + octet_string NOCValue = 0; + optional octet_string ICACValue = 1; + } + + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + + request struct UpdateFabricLabelRequest { + char_string<32> label = 0; + } + + request struct RemoveFabricRequest { + fabric_idx fabricIndex = 0; + } + + request struct AddTrustedRootCertificateRequest { + octet_string rootCACertificate = 0; + } + + /** Sender is requesting attestation information from the receiver. */ + command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ + command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ + command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ + command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ + fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ + fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ + command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ + command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; +} + +/** The Group Key Management Cluster is the mechanism by which group keys are managed. */ +cluster GroupKeyManagement = 63 { + revision 1; // NOTE: Default/not specifically set + + enum GroupKeySecurityPolicyEnum : enum8 { + kTrustFirst = 0; + kCacheAndSync = 1; + } + + bitmap Feature : bitmap32 { + kCacheAndSync = 0x1; + } + + fabric_scoped struct GroupInfoMapStruct { + group_id groupId = 1; + endpoint_no endpoints[] = 2; + optional char_string<16> groupName = 3; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct GroupKeyMapStruct { + group_id groupId = 1; + int16u groupKeySetID = 2; + fabric_idx fabricIndex = 254; + } + + struct GroupKeySetStruct { + int16u groupKeySetID = 0; + GroupKeySecurityPolicyEnum groupKeySecurityPolicy = 1; + nullable octet_string<16> epochKey0 = 2; + nullable epoch_us epochStartTime0 = 3; + nullable octet_string<16> epochKey1 = 4; + nullable epoch_us epochStartTime1 = 5; + nullable octet_string<16> epochKey2 = 6; + nullable epoch_us epochStartTime2 = 7; + } + + attribute access(write: manage) GroupKeyMapStruct groupKeyMap[] = 0; + readonly attribute GroupInfoMapStruct groupTable[] = 1; + readonly attribute int16u maxGroupsPerFabric = 2; + readonly attribute int16u maxGroupKeysPerFabric = 3; + 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 KeySetWriteRequest { + GroupKeySetStruct groupKeySet = 0; + } + + request struct KeySetReadRequest { + int16u groupKeySetID = 0; + } + + response struct KeySetReadResponse = 2 { + GroupKeySetStruct groupKeySet = 0; + } + + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + + response struct KeySetReadAllIndicesResponse = 5 { + int16u groupKeySetIDs[] = 0; + } + + /** Write a new set of keys for the given key set id. */ + fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ + fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ + fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; +} + +/** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only +labels. */ +cluster FixedLabel = 64 { + revision 1; // NOTE: Default/not specifically set + + struct LabelStruct { + char_string<16> label = 0; + char_string<16> value = 1; + } + + readonly attribute LabelStruct labelList[] = 0; + 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; +} + +/** The User Label Cluster provides a feature to tag an endpoint with zero or more labels. */ +cluster UserLabel = 65 { + revision 1; // NOTE: Default/not specifically set + + struct LabelStruct { + char_string<16> label = 0; + char_string<16> value = 1; + } + + attribute access(write: manage) LabelStruct labelList[] = 0; + 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; +} + +/** Allows servers to ensure that listed clients are notified when a server is available for communication. */ +cluster IcdManagement = 70 { + revision 2; + + enum OperatingModeEnum : enum8 { + kSIT = 0; + kLIT = 1; + } + + bitmap Feature : bitmap32 { + kCheckInProtocolSupport = 0x1; + kUserActiveModeTrigger = 0x2; + kLongIdleTimeSupport = 0x4; + } + + bitmap UserActiveModeTriggerBitmap : bitmap32 { + kPowerCycle = 0x1; + kSettingsMenu = 0x2; + kCustomInstruction = 0x4; + kDeviceManual = 0x8; + kActuateSensor = 0x10; + kActuateSensorSeconds = 0x20; + kActuateSensorTimes = 0x40; + kActuateSensorLightsBlink = 0x80; + kResetButton = 0x100; + kResetButtonLightsBlink = 0x200; + kResetButtonSeconds = 0x400; + kResetButtonTimes = 0x800; + kSetupButton = 0x1000; + kSetupButtonSeconds = 0x2000; + kSetupButtonLightsBlink = 0x4000; + kSetupButtonTimes = 0x8000; + kAppDefinedButton = 0x10000; + } + + fabric_scoped struct MonitoringRegistrationStruct { + fabric_sensitive node_id checkInNodeID = 1; + fabric_sensitive int64u monitoredSubject = 2; + fabric_idx fabricIndex = 254; + } + + critical event OnTransitionToActiveMode = 0 { + } + + readonly attribute int32u idleModeDuration = 0; + readonly attribute int32u activeModeDuration = 1; + readonly attribute int16u activeModeThreshold = 2; + readonly attribute access(read: administer) optional MonitoringRegistrationStruct registeredClients[] = 3; + readonly attribute access(read: administer) optional int32u ICDCounter = 4; + readonly attribute optional int16u clientsSupportedPerFabric = 5; + readonly attribute optional UserActiveModeTriggerBitmap userActiveModeTriggerHint = 6; + readonly attribute optional char_string<128> userActiveModeTriggerInstruction = 7; + readonly attribute optional OperatingModeEnum operatingMode = 8; + 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 RegisterClientRequest { + node_id checkInNodeID = 0; + int64u monitoredSubject = 1; + octet_string<16> key = 2; + optional octet_string<16> verificationKey = 3; + } + + response struct RegisterClientResponse = 1 { + int32u ICDCounter = 0; + } + + request struct UnregisterClientRequest { + node_id checkInNodeID = 0; + optional octet_string<16> verificationKey = 1; + } + + response struct StayActiveResponse = 4 { + int32u promisedActiveDuration = 0; + } + + /** Register a client to the end device */ + fabric command access(invoke: manage) RegisterClient(RegisterClientRequest): RegisterClientResponse = 0; + /** Unregister a client from an end device */ + fabric command access(invoke: manage) UnregisterClient(UnregisterClientRequest): DefaultSuccess = 2; + /** Request the end device to stay in Active Mode for an additional ActiveModeThreshold */ + command access(invoke: manage) StayActiveRequest(): StayActiveResponse = 3; +} + +/** Attributes and commands for controlling the color properties of a color-capable light. */ +cluster ColorControl = 768 { + revision 6; + + enum ColorLoopAction : enum8 { + kDeactivate = 0; + kActivateFromColorLoopStartEnhancedHue = 1; + kActivateFromEnhancedCurrentHue = 2; + } + + enum ColorLoopDirection : enum8 { + kDecrementHue = 0; + kIncrementHue = 1; + } + + enum ColorMode : enum8 { + kCurrentHueAndCurrentSaturation = 0; + kCurrentXAndCurrentY = 1; + kColorTemperature = 2; + } + + enum HueDirection : enum8 { + kShortestDistance = 0; + kLongestDistance = 1; + kUp = 2; + kDown = 3; + } + + enum HueMoveMode : enum8 { + kStop = 0; + kUp = 1; + kDown = 3; + } + + enum HueStepMode : enum8 { + kUp = 1; + kDown = 3; + } + + enum SaturationMoveMode : enum8 { + kStop = 0; + kUp = 1; + kDown = 3; + } + + enum SaturationStepMode : enum8 { + kUp = 1; + kDown = 3; + } + + bitmap ColorCapabilities : bitmap16 { + kHueSaturationSupported = 0x1; + kEnhancedHueSupported = 0x2; + kColorLoopSupported = 0x4; + kXYAttributesSupported = 0x8; + kColorTemperatureSupported = 0x10; + } + + bitmap ColorLoopUpdateFlags : bitmap8 { + kUpdateAction = 0x1; + kUpdateDirection = 0x2; + kUpdateTime = 0x4; + kUpdateStartHue = 0x8; + } + + bitmap Feature : bitmap32 { + kHueAndSaturation = 0x1; + kEnhancedHue = 0x2; + kColorLoop = 0x4; + kXY = 0x8; + kColorTemperature = 0x10; + } + + readonly attribute optional int8u currentHue = 0; + readonly attribute optional int8u currentSaturation = 1; + readonly attribute optional int16u remainingTime = 2; + readonly attribute optional int16u currentX = 3; + readonly attribute optional int16u currentY = 4; + readonly attribute optional enum8 driftCompensation = 5; + readonly attribute optional char_string<254> compensationText = 6; + readonly attribute optional int16u colorTemperatureMireds = 7; + readonly attribute enum8 colorMode = 8; + attribute bitmap8 options = 15; + readonly attribute nullable int8u numberOfPrimaries = 16; + readonly attribute optional int16u primary1X = 17; + readonly attribute optional int16u primary1Y = 18; + readonly attribute optional nullable int8u primary1Intensity = 19; + readonly attribute optional int16u primary2X = 21; + readonly attribute optional int16u primary2Y = 22; + readonly attribute optional nullable int8u primary2Intensity = 23; + readonly attribute optional int16u primary3X = 25; + readonly attribute optional int16u primary3Y = 26; + readonly attribute optional nullable int8u primary3Intensity = 27; + readonly attribute optional int16u primary4X = 32; + readonly attribute optional int16u primary4Y = 33; + readonly attribute optional nullable int8u primary4Intensity = 34; + readonly attribute optional int16u primary5X = 36; + readonly attribute optional int16u primary5Y = 37; + readonly attribute optional nullable int8u primary5Intensity = 38; + readonly attribute optional int16u primary6X = 40; + readonly attribute optional int16u primary6Y = 41; + readonly attribute optional nullable int8u primary6Intensity = 42; + attribute access(write: manage) optional int16u whitePointX = 48; + attribute access(write: manage) optional int16u whitePointY = 49; + attribute access(write: manage) optional int16u colorPointRX = 50; + attribute access(write: manage) optional int16u colorPointRY = 51; + attribute access(write: manage) optional nullable int8u colorPointRIntensity = 52; + attribute access(write: manage) optional int16u colorPointGX = 54; + attribute access(write: manage) optional int16u colorPointGY = 55; + attribute access(write: manage) optional nullable int8u colorPointGIntensity = 56; + attribute access(write: manage) optional int16u colorPointBX = 58; + attribute access(write: manage) optional int16u colorPointBY = 59; + attribute access(write: manage) optional nullable int8u colorPointBIntensity = 60; + readonly attribute optional int16u enhancedCurrentHue = 16384; + readonly attribute enum8 enhancedColorMode = 16385; + readonly attribute optional int8u colorLoopActive = 16386; + readonly attribute optional int8u colorLoopDirection = 16387; + readonly attribute optional int16u colorLoopTime = 16388; + readonly attribute optional int16u colorLoopStartEnhancedHue = 16389; + readonly attribute optional int16u colorLoopStoredEnhancedHue = 16390; + readonly attribute bitmap16 colorCapabilities = 16394; + readonly attribute optional int16u colorTempPhysicalMinMireds = 16395; + readonly attribute optional int16u colorTempPhysicalMaxMireds = 16396; + readonly attribute optional int16u coupleColorTempToLevelMinMireds = 16397; + attribute access(write: manage) optional nullable int16u startUpColorTemperatureMireds = 16400; + 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 MoveToHueRequest { + int8u hue = 0; + HueDirection direction = 1; + int16u transitionTime = 2; + bitmap8 optionsMask = 3; + bitmap8 optionsOverride = 4; + } + + request struct MoveHueRequest { + HueMoveMode moveMode = 0; + int8u rate = 1; + bitmap8 optionsMask = 2; + bitmap8 optionsOverride = 3; + } + + request struct StepHueRequest { + HueStepMode stepMode = 0; + int8u stepSize = 1; + int8u transitionTime = 2; + bitmap8 optionsMask = 3; + bitmap8 optionsOverride = 4; + } + + request struct MoveToSaturationRequest { + int8u saturation = 0; + int16u transitionTime = 1; + bitmap8 optionsMask = 2; + bitmap8 optionsOverride = 3; + } + + request struct MoveSaturationRequest { + SaturationMoveMode moveMode = 0; + int8u rate = 1; + bitmap8 optionsMask = 2; + bitmap8 optionsOverride = 3; + } + + request struct StepSaturationRequest { + SaturationStepMode stepMode = 0; + int8u stepSize = 1; + int8u transitionTime = 2; + bitmap8 optionsMask = 3; + bitmap8 optionsOverride = 4; + } + + request struct MoveToHueAndSaturationRequest { + int8u hue = 0; + int8u saturation = 1; + int16u transitionTime = 2; + bitmap8 optionsMask = 3; + bitmap8 optionsOverride = 4; + } + + request struct MoveToColorRequest { + int16u colorX = 0; + int16u colorY = 1; + int16u transitionTime = 2; + bitmap8 optionsMask = 3; + bitmap8 optionsOverride = 4; + } + + request struct MoveColorRequest { + int16s rateX = 0; + int16s rateY = 1; + bitmap8 optionsMask = 2; + bitmap8 optionsOverride = 3; + } + + request struct StepColorRequest { + int16s stepX = 0; + int16s stepY = 1; + int16u transitionTime = 2; + bitmap8 optionsMask = 3; + bitmap8 optionsOverride = 4; + } + + request struct MoveToColorTemperatureRequest { + int16u colorTemperatureMireds = 0; + int16u transitionTime = 1; + bitmap8 optionsMask = 2; + bitmap8 optionsOverride = 3; + } + + request struct EnhancedMoveToHueRequest { + int16u enhancedHue = 0; + HueDirection direction = 1; + int16u transitionTime = 2; + bitmap8 optionsMask = 3; + bitmap8 optionsOverride = 4; + } + + request struct EnhancedMoveHueRequest { + HueMoveMode moveMode = 0; + int16u rate = 1; + bitmap8 optionsMask = 2; + bitmap8 optionsOverride = 3; + } + + request struct EnhancedStepHueRequest { + HueStepMode stepMode = 0; + int16u stepSize = 1; + int16u transitionTime = 2; + bitmap8 optionsMask = 3; + bitmap8 optionsOverride = 4; + } + + request struct EnhancedMoveToHueAndSaturationRequest { + int16u enhancedHue = 0; + int8u saturation = 1; + int16u transitionTime = 2; + bitmap8 optionsMask = 3; + bitmap8 optionsOverride = 4; + } + + request struct ColorLoopSetRequest { + ColorLoopUpdateFlags updateFlags = 0; + ColorLoopAction action = 1; + ColorLoopDirection direction = 2; + int16u time = 3; + int16u startHue = 4; + bitmap8 optionsMask = 5; + bitmap8 optionsOverride = 6; + } + + request struct StopMoveStepRequest { + bitmap8 optionsMask = 0; + bitmap8 optionsOverride = 1; + } + + request struct MoveColorTemperatureRequest { + HueMoveMode moveMode = 0; + int16u rate = 1; + int16u colorTemperatureMinimumMireds = 2; + int16u colorTemperatureMaximumMireds = 3; + bitmap8 optionsMask = 4; + bitmap8 optionsOverride = 5; + } + + request struct StepColorTemperatureRequest { + HueStepMode stepMode = 0; + int16u stepSize = 1; + int16u transitionTime = 2; + int16u colorTemperatureMinimumMireds = 3; + int16u colorTemperatureMaximumMireds = 4; + bitmap8 optionsMask = 5; + bitmap8 optionsOverride = 6; + } + + /** Move to specified hue. */ + command MoveToHue(MoveToHueRequest): DefaultSuccess = 0; + /** Move hue up or down at specified rate. */ + command MoveHue(MoveHueRequest): DefaultSuccess = 1; + /** Step hue up or down by specified size at specified rate. */ + command StepHue(StepHueRequest): DefaultSuccess = 2; + /** Move to specified saturation. */ + command MoveToSaturation(MoveToSaturationRequest): DefaultSuccess = 3; + /** Move saturation up or down at specified rate. */ + command MoveSaturation(MoveSaturationRequest): DefaultSuccess = 4; + /** Step saturation up or down by specified size at specified rate. */ + command StepSaturation(StepSaturationRequest): DefaultSuccess = 5; + /** Move to hue and saturation. */ + command MoveToHueAndSaturation(MoveToHueAndSaturationRequest): DefaultSuccess = 6; + /** Move to specified color. */ + command MoveToColor(MoveToColorRequest): DefaultSuccess = 7; + /** Moves the color. */ + command MoveColor(MoveColorRequest): DefaultSuccess = 8; + /** Steps the lighting to a specific color. */ + command StepColor(StepColorRequest): DefaultSuccess = 9; + /** Move to a specific color temperature. */ + command MoveToColorTemperature(MoveToColorTemperatureRequest): DefaultSuccess = 10; + /** Command description for EnhancedMoveToHue */ + command EnhancedMoveToHue(EnhancedMoveToHueRequest): DefaultSuccess = 64; + /** Command description for EnhancedMoveHue */ + command EnhancedMoveHue(EnhancedMoveHueRequest): DefaultSuccess = 65; + /** Command description for EnhancedStepHue */ + command EnhancedStepHue(EnhancedStepHueRequest): DefaultSuccess = 66; + /** Command description for EnhancedMoveToHueAndSaturation */ + command EnhancedMoveToHueAndSaturation(EnhancedMoveToHueAndSaturationRequest): DefaultSuccess = 67; + /** Command description for ColorLoopSet */ + command ColorLoopSet(ColorLoopSetRequest): DefaultSuccess = 68; + /** Command description for StopMoveStep */ + command StopMoveStep(StopMoveStepRequest): DefaultSuccess = 71; + /** Command description for MoveColorTemperature */ + command MoveColorTemperature(MoveColorTemperatureRequest): DefaultSuccess = 75; + /** Command description for StepColorTemperature */ + command StepColorTemperature(StepColorTemperatureRequest): DefaultSuccess = 76; +} + +endpoint 0 { + device type ma_rootdevice = 22, version 1; + + binding cluster OtaSoftwareUpdateProvider; + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + ram attribute featureMap default = 0; + callback attribute clusterRevision; + } + + server cluster Binding { + callback attribute binding; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster AccessControl { + emits event AccessControlEntryChanged; + emits event AccessControlExtensionChanged; + callback attribute acl; + callback attribute extension; + callback attribute subjectsPerAccessControlEntry; + callback attribute targetsPerAccessControlEntry; + callback attribute accessControlEntriesPerFabric; + callback attribute attributeList; + ram attribute featureMap default = 0; + callback attribute clusterRevision; + } + + server cluster BasicInformation { + emits event StartUp; + emits event ShutDown; + emits event Leave; + callback attribute dataModelRevision; + callback attribute vendorName; + callback attribute vendorID; + callback attribute productName; + callback attribute productID; + persist attribute nodeLabel; + callback attribute location; + callback attribute hardwareVersion; + callback attribute hardwareVersionString; + callback attribute softwareVersion; + callback attribute softwareVersionString; + callback attribute manufacturingDate; + callback attribute partNumber; + callback attribute productURL; + callback attribute productLabel; + callback attribute serialNumber; + persist attribute localConfigDisabled default = 0; + callback attribute uniqueID; + callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 3; + } + + server cluster OtaSoftwareUpdateRequestor { + emits event StateTransition; + emits event VersionApplied; + emits event DownloadError; + callback attribute defaultOTAProviders; + ram attribute updatePossible default = 1; + ram attribute updateState default = 0; + ram attribute updateStateProgress default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command AnnounceOTAProvider; + } + + server cluster GeneralCommissioning { + ram attribute breadcrumb default = 0x0000000000000000; + callback attribute basicCommissioningInfo; + callback attribute regulatoryConfig; + callback attribute locationCapability; + callback attribute supportsConcurrentConnection; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command ArmFailSafe; + handle command ArmFailSafeResponse; + handle command SetRegulatoryConfig; + handle command SetRegulatoryConfigResponse; + handle command CommissioningComplete; + handle command CommissioningCompleteResponse; + } + + server cluster NetworkCommissioning { + ram attribute maxNetworks; + callback attribute networks; + ram attribute scanMaxTimeSeconds; + ram attribute connectMaxTimeSeconds; + ram attribute interfaceEnabled; + ram attribute lastNetworkingStatus; + ram attribute lastNetworkID; + ram attribute lastConnectErrorValue; + ram attribute featureMap default = 2; + ram attribute clusterRevision default = 1; + + handle command ScanNetworks; + handle command ScanNetworksResponse; + handle command AddOrUpdateWiFiNetwork; + handle command AddOrUpdateThreadNetwork; + handle command RemoveNetwork; + handle command NetworkConfigResponse; + handle command ConnectNetwork; + handle command ConnectNetworkResponse; + handle command ReorderNetwork; + } + + server cluster DiagnosticLogs { + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command RetrieveLogsRequest; + handle command RetrieveLogsResponse; + } + + server cluster GeneralDiagnostics { + emits event BootReason; + callback attribute networkInterfaces; + callback attribute rebootCount; + callback attribute upTime; + callback attribute totalOperationalHours; + callback attribute bootReason; + callback attribute activeHardwareFaults; + callback attribute activeRadioFaults; + callback attribute activeNetworkFaults; + callback attribute testEventTriggersEnabled default = false; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 0x0002; + + handle command TestEventTrigger; + handle command TimeSnapshot; + handle command TimeSnapshotResponse; + } + + server cluster SoftwareDiagnostics { + callback attribute threadMetrics; + callback attribute currentHeapFree; + callback attribute currentHeapUsed; + callback attribute currentHeapHighWatermark; + callback attribute featureMap; + ram attribute clusterRevision default = 1; + + handle command ResetWatermarks; + } + + server cluster ThreadNetworkDiagnostics { + callback attribute channel; + callback attribute routingRole; + callback attribute networkName; + callback attribute panId; + callback attribute extendedPanId; + callback attribute meshLocalPrefix; + callback attribute overrunCount; + callback attribute neighborTable; + callback attribute routeTable; + callback attribute partitionId; + callback attribute weighting; + callback attribute dataVersion; + callback attribute stableDataVersion; + callback attribute leaderRouterId; + callback attribute detachedRoleCount; + callback attribute childRoleCount; + callback attribute routerRoleCount; + callback attribute leaderRoleCount; + callback attribute attachAttemptCount; + callback attribute partitionIdChangeCount; + callback attribute betterPartitionAttachAttemptCount; + callback attribute parentChangeCount; + callback attribute txTotalCount; + callback attribute txUnicastCount; + callback attribute txBroadcastCount; + callback attribute txAckRequestedCount; + callback attribute txAckedCount; + callback attribute txNoAckRequestedCount; + callback attribute txDataCount; + callback attribute txDataPollCount; + callback attribute txBeaconCount; + callback attribute txBeaconRequestCount; + callback attribute txOtherCount; + callback attribute txRetryCount; + callback attribute txDirectMaxRetryExpiryCount; + callback attribute txIndirectMaxRetryExpiryCount; + callback attribute txErrCcaCount; + callback attribute txErrAbortCount; + callback attribute txErrBusyChannelCount; + callback attribute rxTotalCount; + callback attribute rxUnicastCount; + callback attribute rxBroadcastCount; + callback attribute rxDataCount; + callback attribute rxDataPollCount; + callback attribute rxBeaconCount; + callback attribute rxBeaconRequestCount; + callback attribute rxOtherCount; + callback attribute rxAddressFilteredCount; + callback attribute rxDestAddrFilteredCount; + callback attribute rxDuplicatedCount; + callback attribute rxErrNoFrameCount; + callback attribute rxErrUnknownNeighborCount; + callback attribute rxErrInvalidSrcAddrCount; + callback attribute rxErrSecCount; + callback attribute rxErrFcsCount; + callback attribute rxErrOtherCount; + callback attribute securityPolicy; + callback attribute channelPage0Mask; + callback attribute operationalDatasetComponents; + callback attribute activeNetworkFaultsList; + ram attribute featureMap default = 0x000F; + ram attribute clusterRevision default = 1; + + handle command ResetCounts; + } + + server cluster AdministratorCommissioning { + callback attribute windowStatus; + callback attribute adminFabricIndex; + callback attribute adminVendorId; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command OpenCommissioningWindow; + handle command OpenBasicCommissioningWindow; + handle command RevokeCommissioning; + } + + server cluster OperationalCredentials { + callback attribute NOCs; + callback attribute fabrics; + callback attribute supportedFabrics; + callback attribute commissionedFabrics; + callback attribute trustedRootCertificates; + callback attribute currentFabricIndex; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command AttestationRequest; + handle command AttestationResponse; + handle command CertificateChainRequest; + handle command CertificateChainResponse; + handle command CSRRequest; + handle command CSRResponse; + handle command AddNOC; + handle command UpdateNOC; + handle command NOCResponse; + handle command UpdateFabricLabel; + handle command RemoveFabric; + handle command AddTrustedRootCertificate; + } + + server cluster GroupKeyManagement { + callback attribute groupKeyMap; + callback attribute groupTable; + callback attribute maxGroupsPerFabric; + callback attribute maxGroupKeysPerFabric; + callback attribute featureMap; + callback attribute clusterRevision; + + handle command KeySetWrite; + handle command KeySetRead; + handle command KeySetReadResponse; + handle command KeySetRemove; + handle command KeySetReadAllIndices; + handle command KeySetReadAllIndicesResponse; + } + + server cluster FixedLabel { + callback attribute labelList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster UserLabel { + callback attribute labelList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster IcdManagement { + callback attribute idleModeDuration; + callback attribute activeModeDuration; + callback attribute activeModeThreshold; + ram attribute featureMap default = 0x0000; + ram attribute clusterRevision default = 2; + } +} +endpoint 1 { + device type ma_onofflightswitch = 259, version 1; + + binding cluster Identify; + binding cluster Scenes; + binding cluster OnOff; + binding cluster ColorControl; + + server cluster Identify { + ram attribute identifyTime default = 0x0000; + ram attribute identifyType default = 0x0; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 4; + + handle command Identify; + handle command TriggerEffect; + } + + server cluster Groups { + ram attribute nameSupport; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 4; + + handle command AddGroup; + handle command AddGroupResponse; + handle command ViewGroup; + handle command ViewGroupResponse; + handle command GetGroupMembership; + handle command GetGroupMembershipResponse; + handle command RemoveGroup; + handle command RemoveGroupResponse; + handle command RemoveAllGroups; + handle command AddGroupIfIdentifying; + } + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute attributeList; + ram attribute featureMap default = 0; + callback attribute clusterRevision; + } + + server cluster Binding { + callback attribute binding; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } +} +endpoint 2 { + device type ma_genericswitch = 15, version 1; + + + server cluster Identify { + ram attribute identifyTime default = 0x0; + ram attribute identifyType default = 0x0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 2; + + handle command Identify; + handle command TriggerEffect; + } + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + callback attribute clusterRevision; + } + + server cluster Switch { + emits event InitialPress; + ram attribute numberOfPositions default = 2; + ram attribute currentPosition default = 0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 2; + ram attribute clusterRevision default = 1; + } +} + + diff --git a/examples/light-switch-app/qpg/zap/switch.zap b/examples/light-switch-app/qpg/zap/switch.zap new file mode 100644 index 00000000000000..6553dc2d3a3399 --- /dev/null +++ b/examples/light-switch-app/qpg/zap/switch.zap @@ -0,0 +1,5893 @@ +{ + "fileFormat": 2, + "featureLevel": 99, + "creator": "zap", + "keyValuePairs": [ + { + "key": "commandDiscovery", + "value": "1" + }, + { + "key": "defaultResponsePolicy", + "value": "always" + }, + { + "key": "manufacturerCodes", + "value": "0x1002" + } + ], + "package": [ + { + "pathRelativity": "relativeToZap", + "path": "../../../../src/app/zap-templates/zcl/zcl.json", + "type": "zcl-properties", + "category": "matter", + "version": 1, + "description": "Matter SDK ZCL data" + }, + { + "pathRelativity": "relativeToZap", + "path": "../../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "version": "chip-v1" + } + ], + "endpointTypes": [ + { + "id": 1, + "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], + "deviceTypeName": "MA-rootdevice", + "deviceTypeCode": 22, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Binding", + "code": 30, + "mfgCode": null, + "define": "BINDING_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "Binding", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Access Control", + "code": 31, + "mfgCode": null, + "define": "ACCESS_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "ACL", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Extension", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SubjectsPerAccessControlEntry", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TargetsPerAccessControlEntry", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AccessControlEntriesPerFabric", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "AccessControlEntryChanged", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "AccessControlExtensionChanged", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Basic Information", + "code": 40, + "mfgCode": null, + "define": "BASIC_INFORMATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DataModelRevision", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorName", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorID", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "vendor_id", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductName", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductID", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NodeLabel", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "NVM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Location", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersion", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersionString", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersion", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersionString", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ManufacturingDate", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartNumber", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductURL", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "long_char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductLabel", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SerialNumber", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LocalConfigDisabled", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "NVM", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UniqueID", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CapabilityMinima", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "CapabilityMinimaStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxPathsPerInvoke", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "StartUp", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "ShutDown", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "Leave", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "OTA Software Update Provider", + "code": 41, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [ + { + "name": "QueryImage", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "QueryImageResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ApplyUpdateRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ApplyUpdateResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "NotifyUpdateApplied", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "OTA Software Update Requestor", + "code": 42, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AnnounceOTAProvider", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "DefaultOTAProviders", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UpdatePossible", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpdateState", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "UpdateStateEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpdateStateProgress", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "StateTransition", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "VersionApplied", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "DownloadError", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "ActiveLocale", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Time Format Localization", + "code": 44, + "mfgCode": null, + "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "HourFormat", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "HourFormatEnum", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveCalendarType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "CalendarTypeEnum", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedCalendarTypes", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "General Commissioning", + "code": 48, + "mfgCode": null, + "define": "GENERAL_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ArmFailSafe", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ArmFailSafeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "SetRegulatoryConfig", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "SetRegulatoryConfigResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CommissioningComplete", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CommissioningCompleteResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "Breadcrumb", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BasicCommissioningInfo", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "BasicCommissioningInfo", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RegulatoryConfig", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "RegulatoryLocationTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LocationCapability", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "RegulatoryLocationTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportsConcurrentConnection", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Network Commissioning", + "code": 49, + "mfgCode": null, + "define": "NETWORK_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ScanNetworks", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ScanNetworksResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "AddOrUpdateWiFiNetwork", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 0 + }, + { + "name": "AddOrUpdateThreadNetwork", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveNetwork", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "NetworkConfigResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ConnectNetwork", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ConnectNetworkResponse", + "code": 7, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ReorderNetwork", + "code": 8, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "MaxNetworks", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Networks", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ScanMaxTimeSeconds", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ConnectMaxTimeSeconds", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "InterfaceEnabled", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastNetworkingStatus", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "NetworkCommissioningStatusEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastNetworkID", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastConnectErrorValue", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int32s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Diagnostic Logs", + "code": 50, + "mfgCode": null, + "define": "DIAGNOSTIC_LOGS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "RetrieveLogsRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RetrieveLogsRequestResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "General Diagnostics", + "code": 51, + "mfgCode": null, + "define": "GENERAL_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "TestEventTrigger", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TimeSnapshot", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TimeSnapshotResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 0 + } + ], + "attributes": [ + { + "name": "NetworkInterfaces", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RebootCount", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpTime", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TotalOperationalHours", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BootReason", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "BootReasonEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveHardwareFaults", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveRadioFaults", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveNetworkFaults", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TestEventTriggersEnabled", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "false", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0002", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "BootReason", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Software Diagnostics", + "code": 52, + "mfgCode": null, + "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ResetWatermarks", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "ThreadMetrics", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapFree", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapUsed", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapHighWatermark", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Thread Network Diagnostics", + "code": 53, + "mfgCode": null, + "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "Channel", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RoutingRole", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "RoutingRoleEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NetworkName", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PanId", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ExtendedPanId", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "MeshLocalPrefix", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OverrunCount", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NeighborTable", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RouteTable", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartitionId", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Weighting", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "DataVersion", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "StableDataVersion", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LeaderRouterId", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "DetachedRoleCount", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ChildRoleCount", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RouterRoleCount", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LeaderRoleCount", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "AttachAttemptCount", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartitionIdChangeCount", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BetterPartitionAttachAttemptCount", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ParentChangeCount", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxTotalCount", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxUnicastCount", + "code": 23, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxBroadcastCount", + "code": 24, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxAckRequestedCount", + "code": 25, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxAckedCount", + "code": 26, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxNoAckRequestedCount", + "code": 27, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxDataCount", + "code": 28, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxDataPollCount", + "code": 29, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxBeaconCount", + "code": 30, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxBeaconRequestCount", + "code": 31, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxOtherCount", + "code": 32, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxRetryCount", + "code": 33, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxDirectMaxRetryExpiryCount", + "code": 34, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxIndirectMaxRetryExpiryCount", + "code": 35, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrCcaCount", + "code": 36, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrAbortCount", + "code": 37, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrBusyChannelCount", + "code": 38, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxTotalCount", + "code": 39, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxUnicastCount", + "code": 40, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxBroadcastCount", + "code": 41, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDataCount", + "code": 42, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDataPollCount", + "code": 43, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxBeaconCount", + "code": 44, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxBeaconRequestCount", + "code": 45, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxOtherCount", + "code": 46, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxAddressFilteredCount", + "code": 47, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDestAddrFilteredCount", + "code": 48, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDuplicatedCount", + "code": 49, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrNoFrameCount", + "code": 50, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrUnknownNeighborCount", + "code": 51, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrInvalidSrcAddrCount", + "code": 52, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrSecCount", + "code": 53, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrFcsCount", + "code": 54, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrOtherCount", + "code": 55, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ActiveTimestamp", + "code": 56, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PendingTimestamp", + "code": 57, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Delay", + "code": 58, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SecurityPolicy", + "code": 59, + "mfgCode": null, + "side": "server", + "type": "SecurityPolicy", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ChannelPage0Mask", + "code": 60, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OperationalDatasetComponents", + "code": 61, + "mfgCode": null, + "side": "server", + "type": "OperationalDatasetComponents", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ActiveNetworkFaultsList", + "code": 62, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x000F", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "WiFi Network Diagnostics", + "code": 54, + "mfgCode": null, + "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "BSSID", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SecurityType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "SecurityTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "WiFiVersion", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "WiFiVersionEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ChannelNumber", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RSSI", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int8s", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BeaconLostCount", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BeaconRxCount", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketMulticastRxCount", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketMulticastTxCount", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketUnicastRxCount", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketUnicastTxCount", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentMaxRate", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "OverrunCount", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "Disconnection", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "AssociationFailure", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "ConnectionStatus", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Ethernet Network Diagnostics", + "code": 55, + "mfgCode": null, + "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "PHYRate", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "PHYRateEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FullDuplex", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketRxCount", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PacketTxCount", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrCount", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CollisionCount", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OverrunCount", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CarrierDetect", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TimeSinceReset", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Time Synchronization", + "code": 56, + "mfgCode": null, + "define": "TIME_SYNCHRONIZATION_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "SetUTCTime", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "SetTrustedTimeSource", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "SetTimeZone", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "SetTimeZoneResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "SetDSTOffset", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "SetDefaultNTP", + "code": 5, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "UTCTime", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "epoch_us", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Granularity", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "GranularityEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TimeSource", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "TimeSourceEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TrustedTimeSource", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "TrustedTimeSourceStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DefaultNTP", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TimeZone", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DSTOffset", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LocalTime", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "epoch_us", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TimeZoneDatabase", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "TimeZoneDatabaseEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TimeZoneListMaxSize", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "DSTOffsetListMaxSize", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportsDNSResolve", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "false", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0B", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "DSTTableEmpty", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "DSTStatus", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "TimeZoneStatus", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "TimeFailure", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "MissingTrustedTimeSource", + "code": 4, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Administrator Commissioning", + "code": 60, + "mfgCode": null, + "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "OpenCommissioningWindow", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "OpenBasicCommissioningWindow", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RevokeCommissioning", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "WindowStatus", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "CommissioningWindowStatusEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminFabricIndex", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "fabric_idx", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminVendorId", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "vendor_id", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Operational Credentials", + "code": 62, + "mfgCode": null, + "define": "OPERATIONAL_CREDENTIALS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AttestationRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AttestationResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CertificateChainRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CertificateChainResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CSRRequest", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CSRResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "AddNOC", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "UpdateNOC", + "code": 7, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "NOCResponse", + "code": 8, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "UpdateFabricLabel", + "code": 9, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveFabric", + "code": 10, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddTrustedRootCertificate", + "code": 11, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Fabrics", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SupportedFabrics", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CommissionedFabrics", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TrustedRootCertificates", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentFabricIndex", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Group Key Management", + "code": 63, + "mfgCode": null, + "define": "GROUP_KEY_MANAGEMENT_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "KeySetWrite", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetRead", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetReadResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "KeySetRemove", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetReadAllIndices", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetReadAllIndicesResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "GroupKeyMap", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GroupTable", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxGroupsPerFabric", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxGroupKeysPerFabric", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Fixed Label", + "code": 64, + "mfgCode": null, + "define": "FIXED_LABEL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "LabelList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "User Label", + "code": 65, + "mfgCode": null, + "define": "USER_LABEL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "LabelList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "ICD Management", + "code": 70, + "mfgCode": null, + "define": "ICD_MANAGEMENT_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "IdleModeDuration", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveModeDuration", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveModeThreshold", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + }, + { + "id": 2, + "name": "MA-onofflightswitch", + "deviceTypeRef": { + "code": 261, + "profileId": 259, + "label": "MA-colordimmerswitch", + "name": "MA-colordimmerswitch" + }, + "deviceTypes": [ + { + "code": 259, + "profileId": 259, + "label": "MA-onofflightswitch", + "name": "MA-onofflightswitch" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 259 + ], + "deviceTypeName": "MA-onofflightswitch", + "deviceTypeCode": 259, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "client", + "enabled": 1, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TriggerEffect", + "code": 64, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "IdentifyTime", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "IdentifyType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "IdentifyTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AddGroup", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddGroupResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ViewGroup", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ViewGroupResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "GetGroupMembership", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetGroupMembershipResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RemoveGroup", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveGroupResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RemoveAllGroups", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddGroupIfIdentifying", + "code": 5, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "NameSupport", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "NameSupportBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Scenes", + "code": 5, + "mfgCode": null, + "define": "SCENES_CLUSTER", + "side": "client", + "enabled": 1, + "apiMaturity": "provisional", + "commands": [ + { + "name": "AddScene", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "AddSceneResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ViewScene", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ViewSceneResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveScene", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RemoveSceneResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveAllScenes", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RemoveAllScenesResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "StoreScene", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "StoreSceneResponse", + "code": 4, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RecallScene", + "code": 5, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "GetSceneMembership", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "GetSceneMembershipResponse", + "code": 6, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "On/Off", + "code": 6, + "mfgCode": null, + "define": "ON_OFF_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [ + { + "name": "Off", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 0 + }, + { + "name": "On", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 0 + }, + { + "name": "Toggle", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "5", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Binding", + "code": 30, + "mfgCode": null, + "define": "BINDING_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "Binding", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Color Control", + "code": 768, + "mfgCode": null, + "define": "COLOR_CONTROL_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [ + { + "name": "MoveToHue", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 0 + }, + { + "name": "MoveHue", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 0 + }, + { + "name": "StepHue", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 0 + }, + { + "name": "MoveToSaturation", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 0 + }, + { + "name": "MoveSaturation", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 0 + }, + { + "name": "StepSaturation", + "code": 5, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 0 + }, + { + "name": "MoveToHueAndSaturation", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 0 + }, + { + "name": "MoveToColor", + "code": 7, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "MoveColor", + "code": 8, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 0 + }, + { + "name": "StepColor", + "code": 9, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 0 + }, + { + "name": "MoveToColorTemperature", + "code": 10, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 0 + }, + { + "name": "EnhancedMoveToHue", + "code": 64, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 0 + }, + { + "name": "EnhancedMoveHue", + "code": 65, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 0 + }, + { + "name": "EnhancedStepHue", + "code": 66, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 0 + }, + { + "name": "EnhancedMoveToHueAndSaturation", + "code": 67, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 0 + }, + { + "name": "ColorLoopSet", + "code": 68, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 0 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "6", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + } + ] + }, + { + "id": 3, + "name": "MA-genericswitch", + "deviceTypeRef": { + "code": 15, + "profileId": 259, + "label": "MA-genericswitch", + "name": "MA-genericswitch" + }, + "deviceTypes": [ + { + "code": 15, + "profileId": 259, + "label": "MA-genericswitch", + "name": "MA-genericswitch" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 15 + ], + "deviceTypeName": "MA-genericswitch", + "deviceTypeCode": 15, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TriggerEffect", + "code": 64, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "IdentifyTime", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "IdentifyType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "IdentifyTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Switch", + "code": 59, + "mfgCode": null, + "define": "SWITCH_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "NumberOfPositions", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentPosition", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "InitialPress", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + } + ] + } + ], + "endpoints": [ + { + "endpointTypeName": "MA-rootdevice", + "endpointTypeIndex": 0, + "profileId": 259, + "endpointId": 0, + "networkId": 0 + }, + { + "endpointTypeName": "MA-onofflightswitch", + "endpointTypeIndex": 1, + "profileId": 259, + "endpointId": 1, + "networkId": 0 + }, + { + "endpointTypeName": "MA-genericswitch", + "endpointTypeIndex": 2, + "profileId": 259, + "endpointId": 2, + "networkId": 0 + } + ], + "log": [] +} \ No newline at end of file diff --git a/examples/light-switch-app/telink/CMakeLists.txt b/examples/light-switch-app/telink/CMakeLists.txt index dd2bfed8dae203..5dd8720ce8d59f 100755 --- a/examples/light-switch-app/telink/CMakeLists.txt +++ b/examples/light-switch-app/telink/CMakeLists.txt @@ -69,10 +69,6 @@ target_include_directories(app PRIVATE ${TELINK_COMMON}/util/include ${TELINK_COMMON}/app/include) -add_definitions( - "-DCHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=" -) - target_sources(app PRIVATE src/AppTask.cpp src/ZclCallbacks.cpp @@ -89,6 +85,10 @@ chip_configure_data_model(app ZAP_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../light-switch-common/light-switch-app.zap ) +if(CONFIG_BOOTLOADER_MCUBOOT) + target_sources(app PRIVATE ${TELINK_COMMON}/util/src/OTAUtil.cpp) +endif() + # Fix for unused swap parameter in: zephyr/include/zephyr/arch/riscv/irq.h:70 add_compile_options(-Wno-error=unused-parameter) 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..41e79a344f7d9b 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; @@ -2438,6 +2438,7 @@ endpoint 0 { ram attribute lastNetworkingStatus; ram attribute lastNetworkID; ram attribute lastConnectErrorValue; + callback attribute supportedWiFiBands; ram attribute featureMap default = 2; ram attribute clusterRevision default = 1; @@ -2614,36 +2615,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 +2701,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..82940a361a1ecd 100644 --- a/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap +++ b/examples/lighting-app/silabs/data_model/lighting-wifi-app.zap @@ -1428,6 +1428,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SupportedWiFiBands", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -3142,8 +3158,8 @@ ] }, { - "name": "Scenes", - "code": 5, + "name": "Scenes Management", + "code": 98, "mfgCode": null, "define": "SCENES_CLUSTER", "side": "server", diff --git a/examples/lighting-app/telink/CMakeLists.txt b/examples/lighting-app/telink/CMakeLists.txt index 2a7e46fc3d8076..2017d797558eb6 100644 --- a/examples/lighting-app/telink/CMakeLists.txt +++ b/examples/lighting-app/telink/CMakeLists.txt @@ -101,10 +101,6 @@ target_include_directories(app PRIVATE ${TELINK_COMMON}/util/include ${TELINK_COMMON}/app/include) -add_definitions( - "-DCHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=" -) - target_sources(app PRIVATE src/AppTask.cpp src/ZclCallbacks.cpp @@ -122,6 +118,10 @@ chip_configure_data_model(app ZAP_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../lighting-common/lighting-app.zap ) +if(CONFIG_BOOTLOADER_MCUBOOT) + target_sources(app PRIVATE ${TELINK_COMMON}/util/src/OTAUtil.cpp) +endif() + # Fix for unused swap parameter in: zephyr/include/zephyr/arch/riscv/irq.h:70 add_compile_options(-Wno-error=unused-parameter) diff --git a/examples/lock-app/telink/CMakeLists.txt b/examples/lock-app/telink/CMakeLists.txt index 70ac496507afe7..58a9e4fb5bab8f 100755 --- a/examples/lock-app/telink/CMakeLists.txt +++ b/examples/lock-app/telink/CMakeLists.txt @@ -69,10 +69,6 @@ target_include_directories(app PRIVATE ${TELINK_COMMON}/util/include ${TELINK_COMMON}/app/include) -add_definitions( - "-DCHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=" -) - target_sources(app PRIVATE src/AppTask.cpp src/ZclCallbacks.cpp @@ -89,3 +85,7 @@ chip_configure_data_model(app INCLUDE_SERVER ZAP_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../lock-common/lock-app.zap ) + +if(CONFIG_BOOTLOADER_MCUBOOT) + target_sources(app PRIVATE ${TELINK_COMMON}/util/src/OTAUtil.cpp) +endif() diff --git a/examples/microwave-oven-app/microwave-oven-common/include/microwave-oven-device.h b/examples/microwave-oven-app/microwave-oven-common/include/microwave-oven-device.h index c42c36ac5a4077..2775d2a3227812 100644 --- a/examples/microwave-oven-app/microwave-oven-common/include/microwave-oven-device.h +++ b/examples/microwave-oven-app/microwave-oven-common/include/microwave-oven-device.h @@ -32,16 +32,6 @@ namespace chip { namespace app { namespace Clusters { -/** - * set default value for the optional attributes - */ -constexpr uint8_t kDefaultMinPower = 10u; -constexpr uint8_t kDefaultMaxPower = 100u; -constexpr uint8_t kDefaultPowerStep = 10u; - -constexpr uint8_t ModeNormal = 0; -constexpr uint8_t ModeDefrost = 1; - class ExampleMicrowaveOvenDevice : public MicrowaveOvenControl::Delegate, public ModeBase::Delegate, public OperationalState::Delegate @@ -56,8 +46,10 @@ class ExampleMicrowaveOvenDevice : public MicrowaveOvenControl::Delegate, explicit ExampleMicrowaveOvenDevice(EndpointId aClustersEndpoint) : mOperationalStateInstance(this, aClustersEndpoint), mMicrowaveOvenModeInstance(this, aClustersEndpoint, MicrowaveOvenMode::Id, 0), - mMicrowaveOvenControlInstance(this, aClustersEndpoint, MicrowaveOvenControl::Id, mOperationalStateInstance, - mMicrowaveOvenModeInstance) + mMicrowaveOvenControlInstance(this, aClustersEndpoint, MicrowaveOvenControl::Id, + BitMask(MicrowaveOvenControl::Feature::kPowerAsNumber, + MicrowaveOvenControl::Feature::kPowerNumberLimits), + mOperationalStateInstance, mMicrowaveOvenModeInstance) {} /** @@ -69,28 +61,60 @@ class ExampleMicrowaveOvenDevice : public MicrowaveOvenControl::Delegate, /** * handle command for microwave oven control: set cooking parameters */ - Protocols::InteractionModel::Status HandleSetCookingParametersCallback(uint8_t cookMode, uint32_t cookTime, - uint8_t powerSetting) override; + Protocols::InteractionModel::Status HandleSetCookingParametersCallback(uint8_t cookMode, uint32_t cookTimeSec, + bool startAfterSetting, + Optional powerSettingNum, + Optional wattSettingIndex) override; /** * handle command for microwave oven control: add more time */ - Protocols::InteractionModel::Status HandleModifyCookTimeCallback(uint32_t finalCookTime) override; + Protocols::InteractionModel::Status HandleModifyCookTimeSecondsCallback(uint32_t finalcookTimeSec) override; + + /** + * Get the watt setting from the supported watts array. + * @param index The index of the watt setting to be returned. It is assumed that watt setting are indexable from 0 and with no + * gaps. + * @param wattSetting A reference to receive the watt setting on success. + * @return Returns a CHIP_NO_ERROR if there was no error and the label was returned successfully. + * CHIP_ERROR_NOT_FOUND if the index in beyond the list of available labels. + */ + CHIP_ERROR GetWattSettingByIndex(uint8_t index, uint16_t & wattSetting) override; + + /** + * Get the value of power setting number. + */ + uint8_t GetPowerSettingNum() const override { return mPowerSettingNum; } + + /** + * Get the value of min power number. + */ + uint8_t GetMinPowerNum() const override { return kMinPowerNum; } /** - * Get the value of MinPower. + * Get the value of max power number. */ - uint8_t GetMinPower() const override { return kDefaultMinPower; } + uint8_t GetMaxPowerNum() const override { return kMaxPowerNum; } /** - * Get the value of MaxPower. + * Get the value of power step number. */ - uint8_t GetMaxPower() const override { return kDefaultMaxPower; } + uint8_t GetPowerStepNum() const override { return kPowerStepNum; } /** - * Get the value of PowerStep. + * Get the value of max cook time in seconds. */ - uint8_t GetPowerStep() const override { return kDefaultPowerStep; } + uint32_t GetMaxCookTimeSec() const override { return kMaxCookTimeSec; } + + /** + * Get the value of selected watt index. + */ + uint8_t GetCurrentWattIndex() const override { return mSelectedWattIndex; }; + + /** + * Get the value of watt rating. + */ + uint16_t GetWattRating() const override { return mWattRating; }; // delegates from OperationalState cluster using ModeTagStructType = detail::Structs::ModeTagStruct::Type; @@ -201,16 +225,41 @@ class ExampleMicrowaveOvenDevice : public MicrowaveOvenControl::Delegate, ModeBase::Instance mMicrowaveOvenModeInstance; MicrowaveOvenControl::Instance mMicrowaveOvenControlInstance; + // set default value for the optional attributes + static constexpr uint8_t kMinPowerNum = 20u; + static constexpr uint8_t kMaxPowerNum = 90u; + static constexpr uint8_t kPowerStepNum = 10u; + static constexpr uint32_t kMaxCookTimeSec = 86400u; + static constexpr uint8_t kDefaultPowerSettingNum = 100u; + + // define the mode value + static constexpr uint8_t kModeNormal = 0u; + static constexpr uint8_t kModeDefrost = 1u; + + // define the example watts + static constexpr uint16_t kExampleWatt1 = 100u; + static constexpr uint16_t kExampleWatt2 = 300u; + static constexpr uint16_t kExampleWatt3 = 500u; + static constexpr uint16_t kExampleWatt4 = 800u; + static constexpr uint16_t kExampleWatt5 = 1000u; + + // MicrowaveOvenControl variables + uint8_t mPowerSettingNum = kDefaultPowerSettingNum; + uint8_t mSelectedWattIndex = 0; + uint16_t mWattRating = 0; + + const uint16_t mWattSettingList[5] = { kExampleWatt1, kExampleWatt2, kExampleWatt3, kExampleWatt4, kExampleWatt5 }; + // MicrowaveOvenMode types ModeTagStructType modeTagsNormal[1] = { { .value = to_underlying(MicrowaveOvenMode::ModeTag::kNormal) } }; ModeTagStructType modeTagsDefrost[1] = { { .value = to_underlying(MicrowaveOvenMode::ModeTag::kDefrost) } }; const detail::Structs::ModeOptionStruct::Type kModeOptions[2] = { detail::Structs::ModeOptionStruct::Type{ .label = CharSpan::fromCharString("Normal"), - .mode = ModeNormal, + .mode = kModeNormal, .modeTags = DataModel::List(modeTagsNormal) }, detail::Structs::ModeOptionStruct::Type{ .label = CharSpan::fromCharString("Defrost"), - .mode = ModeDefrost, + .mode = kModeDefrost, .modeTags = DataModel::List(modeTagsDefrost) } }; diff --git a/examples/microwave-oven-app/microwave-oven-common/microwave-oven-app.matter b/examples/microwave-oven-app/microwave-oven-common/microwave-oven-app.matter index fec61bc7a38add..70d2b496e213fa 100644 --- a/examples/microwave-oven-app/microwave-oven-common/microwave-oven-app.matter +++ b/examples/microwave-oven-app/microwave-oven-common/microwave-oven-app.matter @@ -1033,11 +1033,21 @@ provisional cluster MicrowaveOvenMode = 94 { provisional cluster MicrowaveOvenControl = 95 { revision 1; // NOTE: Default/not specifically set - readonly attribute elapsed_s cookTime = 1; - readonly attribute int8u powerSetting = 2; + bitmap Feature : bitmap32 { + kPowerAsNumber = 0x1; + kPowerInWatts = 0x2; + kPowerNumberLimits = 0x4; + } + + readonly attribute elapsed_s cookTime = 0; + readonly attribute elapsed_s maxCookTime = 1; + readonly attribute optional int8u powerSetting = 2; readonly attribute optional int8u minPower = 3; readonly attribute optional int8u maxPower = 4; readonly attribute optional int8u powerStep = 5; + readonly attribute optional int16u supportedWatts[] = 6; + readonly attribute optional int8u selectedWattIndex = 7; + readonly attribute optional int16u wattRating = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1049,6 +1059,8 @@ provisional cluster MicrowaveOvenControl = 95 { optional int8u cookMode = 0; optional elapsed_s cookTime = 1; optional int8u powerSetting = 2; + optional int8u wattSettingIndex = 3; + optional boolean startAfterSetting = 4; } request struct AddMoreTimeRequest { @@ -1396,15 +1408,17 @@ endpoint 1 { server cluster MicrowaveOvenControl { callback attribute cookTime; + callback attribute maxCookTime; callback attribute powerSetting; callback attribute minPower; callback attribute maxPower; callback attribute powerStep; + callback attribute wattRating; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; callback attribute attributeList; - ram attribute featureMap default = 0; + callback attribute featureMap; ram attribute clusterRevision default = 1; handle command SetCookingParameters; diff --git a/examples/microwave-oven-app/microwave-oven-common/microwave-oven-app.zap b/examples/microwave-oven-app/microwave-oven-common/microwave-oven-app.zap index b5bab9d8a6443f..c0cb802e0f4b29 100644 --- a/examples/microwave-oven-app/microwave-oven-common/microwave-oven-app.zap +++ b/examples/microwave-oven-app/microwave-oven-common/microwave-oven-app.zap @@ -3183,6 +3183,22 @@ "attributes": [ { "name": "CookTime", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "elapsed_s", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxCookTime", "code": 1, "mfgCode": null, "side": "server", @@ -3261,6 +3277,22 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "WattRating", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "GeneratedCommandList", "code": 65528, @@ -3332,10 +3364,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/microwave-oven-app/microwave-oven-common/src/microwave-oven-device.cpp b/examples/microwave-oven-app/microwave-oven-common/src/microwave-oven-device.cpp index 2b584701e42192..39e8ab2bf98b73 100644 --- a/examples/microwave-oven-app/microwave-oven-common/src/microwave-oven-device.cpp +++ b/examples/microwave-oven-app/microwave-oven-common/src/microwave-oven-device.cpp @@ -35,38 +35,83 @@ void ExampleMicrowaveOvenDevice::MicrowaveOvenInit() mOperationalStateInstance.Init(); mMicrowaveOvenModeInstance.Init(); mMicrowaveOvenControlInstance.Init(); + + // set default value for attribute SelectedWattIndex and WattRating + if (mMicrowaveOvenControlInstance.HasFeature(MicrowaveOvenControl::Feature::kPowerInWatts)) + { + static_assert(ArraySize(mWattSettingList) > 0, "Watt setting list is empty!"); + mSelectedWattIndex = ArraySize(mWattSettingList) - 1; + mWattRating = mWattSettingList[mSelectedWattIndex]; + } + else + { + mWattRating = kExampleWatt5; + } } /** * MicrowaveOvenControl cluster */ Protocols::InteractionModel::Status -ExampleMicrowaveOvenDevice::HandleSetCookingParametersCallback(uint8_t cookMode, uint32_t cookTime, uint8_t powerSetting) +ExampleMicrowaveOvenDevice::HandleSetCookingParametersCallback(uint8_t cookMode, uint32_t cookTimeSec, bool startAfterSetting, + Optional powerSettingNum, + Optional wattSettingIndex) { // placeholder implementation Status status; + // Update cook mode. if ((status = mMicrowaveOvenModeInstance.UpdateCurrentMode(cookMode)) != Status::Success) { return status; } - mMicrowaveOvenControlInstance.SetCookTime(cookTime); - mMicrowaveOvenControlInstance.SetPowerSetting(powerSetting); + + mMicrowaveOvenControlInstance.SetCookTimeSec(cookTimeSec); + + // If using power as number, check if powerSettingNum has value before setting the power number. + // If powerSetting field is missing in the command, the powerSettingNum passed here is handled to the max value + // and user can use this value directly. + if (powerSettingNum.HasValue()) + { + mPowerSettingNum = powerSettingNum.Value(); + } + + // If using power in watt, check if wattSettingIndex has value before setting the watt rating and watt list index. + // If wattSettinIndex field is missing in the command, the wattSettingIndex passed here is handled to the max value + // and user can use this value directly. + if (wattSettingIndex.HasValue()) + { + mSelectedWattIndex = wattSettingIndex.Value(); + mWattRating = mWattSettingList[mSelectedWattIndex]; + } + + if (startAfterSetting) + { + mOperationalStateInstance.SetOperationalState(to_underlying(OperationalStateEnum::kRunning)); + } return Status::Success; } -Protocols::InteractionModel::Status ExampleMicrowaveOvenDevice::HandleModifyCookTimeCallback(uint32_t finalCookTime) +Protocols::InteractionModel::Status ExampleMicrowaveOvenDevice::HandleModifyCookTimeSecondsCallback(uint32_t finalCookTimeSec) { // placeholder implementation - mMicrowaveOvenControlInstance.SetCookTime(finalCookTime); + mMicrowaveOvenControlInstance.SetCookTimeSec(finalCookTimeSec); return Status::Success; } +CHIP_ERROR ExampleMicrowaveOvenDevice::GetWattSettingByIndex(uint8_t index, uint16_t & wattSetting) +{ + VerifyOrReturnError(index < ArraySize(mWattSettingList), CHIP_ERROR_NOT_FOUND); + + wattSetting = mWattSettingList[index]; + return CHIP_NO_ERROR; +} + /** * OperationalState cluster */ app::DataModel::Nullable ExampleMicrowaveOvenDevice::GetCountdownTime() { - return DataModel::MakeNullable(mMicrowaveOvenControlInstance.GetCookTime()); + return DataModel::MakeNullable(mMicrowaveOvenControlInstance.GetCookTimeSec()); } CHIP_ERROR ExampleMicrowaveOvenDevice::GetOperationalStateAtIndex(size_t index, diff --git a/examples/ota-requestor-app/telink/CMakeLists.txt b/examples/ota-requestor-app/telink/CMakeLists.txt index 81c559cfa73127..31be460d8a346c 100644 --- a/examples/ota-requestor-app/telink/CMakeLists.txt +++ b/examples/ota-requestor-app/telink/CMakeLists.txt @@ -69,10 +69,6 @@ target_include_directories(app PRIVATE ${TELINK_COMMON}/util/include ${TELINK_COMMON}/app/include) -add_definitions( - "-DCHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=" -) - target_sources(app PRIVATE src/AppTask.cpp src/ZclCallbacks.cpp @@ -87,3 +83,7 @@ chip_configure_data_model(app INCLUDE_SERVER ZAP_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../ota-requestor-common/ota-requestor-app.zap ) + +if(CONFIG_BOOTLOADER_MCUBOOT) + target_sources(app PRIVATE ${TELINK_COMMON}/util/src/OTAUtil.cpp) +endif() diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index 63d8ce3b2975a9..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; @@ -4809,6 +4809,16 @@ cluster Thermostat = 513 { kCoolingAndHeatingWithReheat = 5; } + enum PresetScenarioEnum : enum8 { + kUnspecified = 0; + kOccupied = 1; + kUnoccupied = 2; + kSleep = 3; + kWake = 4; + kVacation = 5; + kUserDefined = 6; + } + enum SetpointChangeSourceEnum : enum8 { kManual = 0; kSchedule = 1; @@ -4870,6 +4880,10 @@ cluster Thermostat = 513 { kSetback = 0x10; kAutoMode = 0x20; kLocalTemperatureNotExposed = 0x40; + kMatterScheduleConfiguration = 0x80; + kPresets = 0x100; + kSetpoints = 0x200; + kQueuedPresetsSupported = 0x400; } bitmap HVACSystemTypeBitmap : bitmap8 { @@ -4879,6 +4893,11 @@ cluster Thermostat = 513 { kHeatingUsesFuel = 0x20; } + bitmap PresetTypeFeaturesBitmap : bitmap16 { + kAutomatic = 0x1; + kSupportsNames = 0x2; + } + bitmap ProgrammingOperationModeBitmap : bitmap8 { kScheduleActive = 0x1; kAutoRecovery = 0x2; @@ -4917,6 +4936,62 @@ cluster Thermostat = 513 { kCoolSetpointPresent = 0x2; } + bitmap ScheduleTypeFeaturesBitmap : bitmap16 { + kSupportsPresets = 0x1; + kSupportsSetpoints = 0x2; + kSupportsNames = 0x4; + kSupportsOff = 0x8; + } + + bitmap TemperatureSetpointHoldPolicyBitmap : bitmap8 { + kHoldDurationElapsed = 0x1; + kHoldDurationElapsedOrPresetChanged = 0x2; + } + + struct ScheduleTransitionStruct { + ScheduleDayOfWeekBitmap dayOfWeek = 0; + int16u transitionTime = 1; + optional octet_string<16> presetHandle = 2; + optional SystemModeEnum systemMode = 3; + optional temperature coolingSetpoint = 4; + optional temperature heatingSetpoint = 5; + } + + struct ScheduleStruct { + nullable octet_string<16> scheduleHandle = 0; + SystemModeEnum systemMode = 1; + optional char_string<64> name = 2; + optional octet_string<16> presetHandle = 3; + ScheduleTransitionStruct transitions[] = 4; + optional nullable boolean builtIn = 5; + } + + struct PresetStruct { + nullable octet_string<16> presetHandle = 0; + PresetScenarioEnum presetScenario = 1; + optional nullable char_string<64> name = 2; + optional temperature coolingSetpoint = 3; + optional temperature heatingSetpoint = 4; + nullable boolean builtIn = 5; + } + + struct PresetTypeStruct { + PresetScenarioEnum presetScenario = 0; + int8u numberOfPresets = 1; + PresetTypeFeaturesBitmap presetTypeFeatures = 2; + } + + struct QueuedPresetStruct { + nullable octet_string<16> presetHandle = 0; + nullable epoch_s transitionTimestamp = 1; + } + + struct ScheduleTypeStruct { + SystemModeEnum systemMode = 0; + int8u numberOfSchedules = 1; + ScheduleTypeFeaturesBitmap scheduleTypeFeatures = 2; + } + struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; nullable temperature heatSetpoint = 1; @@ -4972,6 +5047,20 @@ cluster Thermostat = 513 { attribute access(write: manage) optional ACLouverPositionEnum ACLouverPosition = 69; readonly attribute optional nullable temperature ACCoilTemperature = 70; attribute access(write: manage) optional ACCapacityFormatEnum ACCapacityformat = 71; + readonly attribute optional PresetTypeStruct presetTypes[] = 72; + readonly attribute optional ScheduleTypeStruct scheduleTypes[] = 73; + readonly attribute optional int8u numberOfPresets = 74; + readonly attribute optional int8u numberOfSchedules = 75; + readonly attribute optional int8u numberOfScheduleTransitions = 76; + readonly attribute optional nullable int8u numberOfScheduleTransitionPerDay = 77; + readonly attribute optional nullable octet_string<16> activePresetHandle = 78; + readonly attribute optional nullable octet_string<16> activeScheduleHandle = 79; + attribute access(write: manage) optional PresetStruct presets[] = 80; + attribute access(write: manage) optional ScheduleStruct schedules[] = 81; + readonly attribute optional boolean presetsSchedulesEditable = 82; + readonly attribute optional TemperatureSetpointHoldPolicyBitmap temperatureSetpointHoldPolicy = 83; + readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 84; + readonly attribute optional nullable QueuedPresetStruct queuedPreset = 85; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -5003,14 +5092,45 @@ cluster Thermostat = 513 { ScheduleModeBitmap modeToReturn = 1; } + request struct SetActiveScheduleRequestRequest { + octet_string<16> scheduleHandle = 0; + } + + request struct SetActivePresetRequestRequest { + octet_string<16> presetHandle = 0; + optional int16u delayMinutes = 1; + } + + request struct StartPresetsSchedulesEditRequestRequest { + int16u timeoutSeconds = 0; + } + + request struct SetTemperatureSetpointHoldPolicyRequest { + TemperatureSetpointHoldPolicyBitmap temperatureSetpointHoldPolicy = 0; + } + /** Command description for SetpointRaiseLower */ command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; /** Command description for SetWeeklySchedule */ command access(invoke: manage) SetWeeklySchedule(SetWeeklyScheduleRequest): DefaultSuccess = 1; /** Command description for GetWeeklySchedule */ command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; - /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ + /** This command is used to clear the weekly schedule. The ClearWeeklySchedule command has no payload. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; + /** This command is used to set the active schedule. */ + command SetActiveScheduleRequest(SetActiveScheduleRequestRequest): DefaultSuccess = 5; + /** This command is used to set the active preset. */ + command SetActivePresetRequest(SetActivePresetRequestRequest): DefaultSuccess = 6; + /** This command is used to start editing the presets and schedules. */ + command access(invoke: manage) StartPresetsSchedulesEditRequest(StartPresetsSchedulesEditRequestRequest): DefaultSuccess = 7; + /** This command is used to cancel editing presets and schedules. */ + command access(invoke: manage) CancelPresetsSchedulesEditRequest(): DefaultSuccess = 8; + /** This command is used to notify the server that all edits are done and should be committed. */ + command access(invoke: manage) CommitPresetsSchedulesRequest(): DefaultSuccess = 9; + /** This command is sent to cancel a queued preset. */ + command access(invoke: manage) CancelSetActivePresetRequest(): DefaultSuccess = 10; + /** This command sets the set point hold policy. */ + command SetTemperatureSetpointHoldPolicy(SetTemperatureSetpointHoldPolicyRequest): DefaultSuccess = 11; } /** An interface for configuring and controlling the functionality of a thermostat. */ @@ -5060,6 +5180,16 @@ cluster Thermostat = 513 { kCoolingAndHeatingWithReheat = 5; } + enum PresetScenarioEnum : enum8 { + kUnspecified = 0; + kOccupied = 1; + kUnoccupied = 2; + kSleep = 3; + kWake = 4; + kVacation = 5; + kUserDefined = 6; + } + enum SetpointChangeSourceEnum : enum8 { kManual = 0; kSchedule = 1; @@ -5121,6 +5251,10 @@ cluster Thermostat = 513 { kSetback = 0x10; kAutoMode = 0x20; kLocalTemperatureNotExposed = 0x40; + kMatterScheduleConfiguration = 0x80; + kPresets = 0x100; + kSetpoints = 0x200; + kQueuedPresetsSupported = 0x400; } bitmap HVACSystemTypeBitmap : bitmap8 { @@ -5130,6 +5264,11 @@ cluster Thermostat = 513 { kHeatingUsesFuel = 0x20; } + bitmap PresetTypeFeaturesBitmap : bitmap16 { + kAutomatic = 0x1; + kSupportsNames = 0x2; + } + bitmap ProgrammingOperationModeBitmap : bitmap8 { kScheduleActive = 0x1; kAutoRecovery = 0x2; @@ -5168,6 +5307,62 @@ cluster Thermostat = 513 { kCoolSetpointPresent = 0x2; } + bitmap ScheduleTypeFeaturesBitmap : bitmap16 { + kSupportsPresets = 0x1; + kSupportsSetpoints = 0x2; + kSupportsNames = 0x4; + kSupportsOff = 0x8; + } + + bitmap TemperatureSetpointHoldPolicyBitmap : bitmap8 { + kHoldDurationElapsed = 0x1; + kHoldDurationElapsedOrPresetChanged = 0x2; + } + + struct ScheduleTransitionStruct { + ScheduleDayOfWeekBitmap dayOfWeek = 0; + int16u transitionTime = 1; + optional octet_string<16> presetHandle = 2; + optional SystemModeEnum systemMode = 3; + optional temperature coolingSetpoint = 4; + optional temperature heatingSetpoint = 5; + } + + struct ScheduleStruct { + nullable octet_string<16> scheduleHandle = 0; + SystemModeEnum systemMode = 1; + optional char_string<64> name = 2; + optional octet_string<16> presetHandle = 3; + ScheduleTransitionStruct transitions[] = 4; + optional nullable boolean builtIn = 5; + } + + struct PresetStruct { + nullable octet_string<16> presetHandle = 0; + PresetScenarioEnum presetScenario = 1; + optional nullable char_string<64> name = 2; + optional temperature coolingSetpoint = 3; + optional temperature heatingSetpoint = 4; + nullable boolean builtIn = 5; + } + + struct PresetTypeStruct { + PresetScenarioEnum presetScenario = 0; + int8u numberOfPresets = 1; + PresetTypeFeaturesBitmap presetTypeFeatures = 2; + } + + struct QueuedPresetStruct { + nullable octet_string<16> presetHandle = 0; + nullable epoch_s transitionTimestamp = 1; + } + + struct ScheduleTypeStruct { + SystemModeEnum systemMode = 0; + int8u numberOfSchedules = 1; + ScheduleTypeFeaturesBitmap scheduleTypeFeatures = 2; + } + struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; nullable temperature heatSetpoint = 1; @@ -5223,6 +5418,20 @@ cluster Thermostat = 513 { attribute access(write: manage) optional ACLouverPositionEnum ACLouverPosition = 69; readonly attribute optional nullable temperature ACCoilTemperature = 70; attribute access(write: manage) optional ACCapacityFormatEnum ACCapacityformat = 71; + readonly attribute optional PresetTypeStruct presetTypes[] = 72; + readonly attribute optional ScheduleTypeStruct scheduleTypes[] = 73; + readonly attribute optional int8u numberOfPresets = 74; + readonly attribute optional int8u numberOfSchedules = 75; + readonly attribute optional int8u numberOfScheduleTransitions = 76; + readonly attribute optional nullable int8u numberOfScheduleTransitionPerDay = 77; + readonly attribute optional nullable octet_string<16> activePresetHandle = 78; + readonly attribute optional nullable octet_string<16> activeScheduleHandle = 79; + attribute access(write: manage) optional PresetStruct presets[] = 80; + attribute access(write: manage) optional ScheduleStruct schedules[] = 81; + readonly attribute optional boolean presetsSchedulesEditable = 82; + readonly attribute optional TemperatureSetpointHoldPolicyBitmap temperatureSetpointHoldPolicy = 83; + readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 84; + readonly attribute optional nullable QueuedPresetStruct queuedPreset = 85; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -5254,14 +5463,45 @@ cluster Thermostat = 513 { ScheduleModeBitmap modeToReturn = 1; } + request struct SetActiveScheduleRequestRequest { + octet_string<16> scheduleHandle = 0; + } + + request struct SetActivePresetRequestRequest { + octet_string<16> presetHandle = 0; + optional int16u delayMinutes = 1; + } + + request struct StartPresetsSchedulesEditRequestRequest { + int16u timeoutSeconds = 0; + } + + request struct SetTemperatureSetpointHoldPolicyRequest { + TemperatureSetpointHoldPolicyBitmap temperatureSetpointHoldPolicy = 0; + } + /** Command description for SetpointRaiseLower */ command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; /** Command description for SetWeeklySchedule */ command access(invoke: manage) SetWeeklySchedule(SetWeeklyScheduleRequest): DefaultSuccess = 1; /** Command description for GetWeeklySchedule */ command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; - /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ + /** This command is used to clear the weekly schedule. The ClearWeeklySchedule command has no payload. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; + /** This command is used to set the active schedule. */ + command SetActiveScheduleRequest(SetActiveScheduleRequestRequest): DefaultSuccess = 5; + /** This command is used to set the active preset. */ + command SetActivePresetRequest(SetActivePresetRequestRequest): DefaultSuccess = 6; + /** This command is used to start editing the presets and schedules. */ + command access(invoke: manage) StartPresetsSchedulesEditRequest(StartPresetsSchedulesEditRequestRequest): DefaultSuccess = 7; + /** This command is used to cancel editing presets and schedules. */ + command access(invoke: manage) CancelPresetsSchedulesEditRequest(): DefaultSuccess = 8; + /** This command is used to notify the server that all edits are done and should be committed. */ + command access(invoke: manage) CommitPresetsSchedulesRequest(): DefaultSuccess = 9; + /** This command is sent to cancel a queued preset. */ + command access(invoke: manage) CancelSetActivePresetRequest(): DefaultSuccess = 10; + /** This command sets the set point hold policy. */ + command SetTemperatureSetpointHoldPolicy(SetTemperatureSetpointHoldPolicyRequest): DefaultSuccess = 11; } /** An interface for configuring the user interface of a thermostat (which may be remote from the thermostat). */ @@ -8808,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; @@ -8945,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 fe9b811c1bea1d..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; @@ -4766,6 +4766,16 @@ cluster Thermostat = 513 { kCoolingAndHeatingWithReheat = 5; } + enum PresetScenarioEnum : enum8 { + kUnspecified = 0; + kOccupied = 1; + kUnoccupied = 2; + kSleep = 3; + kWake = 4; + kVacation = 5; + kUserDefined = 6; + } + enum SetpointChangeSourceEnum : enum8 { kManual = 0; kSchedule = 1; @@ -4827,6 +4837,10 @@ cluster Thermostat = 513 { kSetback = 0x10; kAutoMode = 0x20; kLocalTemperatureNotExposed = 0x40; + kMatterScheduleConfiguration = 0x80; + kPresets = 0x100; + kSetpoints = 0x200; + kQueuedPresetsSupported = 0x400; } bitmap HVACSystemTypeBitmap : bitmap8 { @@ -4836,6 +4850,11 @@ cluster Thermostat = 513 { kHeatingUsesFuel = 0x20; } + bitmap PresetTypeFeaturesBitmap : bitmap16 { + kAutomatic = 0x1; + kSupportsNames = 0x2; + } + bitmap ProgrammingOperationModeBitmap : bitmap8 { kScheduleActive = 0x1; kAutoRecovery = 0x2; @@ -4874,6 +4893,62 @@ cluster Thermostat = 513 { kCoolSetpointPresent = 0x2; } + bitmap ScheduleTypeFeaturesBitmap : bitmap16 { + kSupportsPresets = 0x1; + kSupportsSetpoints = 0x2; + kSupportsNames = 0x4; + kSupportsOff = 0x8; + } + + bitmap TemperatureSetpointHoldPolicyBitmap : bitmap8 { + kHoldDurationElapsed = 0x1; + kHoldDurationElapsedOrPresetChanged = 0x2; + } + + struct ScheduleTransitionStruct { + ScheduleDayOfWeekBitmap dayOfWeek = 0; + int16u transitionTime = 1; + optional octet_string<16> presetHandle = 2; + optional SystemModeEnum systemMode = 3; + optional temperature coolingSetpoint = 4; + optional temperature heatingSetpoint = 5; + } + + struct ScheduleStruct { + nullable octet_string<16> scheduleHandle = 0; + SystemModeEnum systemMode = 1; + optional char_string<64> name = 2; + optional octet_string<16> presetHandle = 3; + ScheduleTransitionStruct transitions[] = 4; + optional nullable boolean builtIn = 5; + } + + struct PresetStruct { + nullable octet_string<16> presetHandle = 0; + PresetScenarioEnum presetScenario = 1; + optional nullable char_string<64> name = 2; + optional temperature coolingSetpoint = 3; + optional temperature heatingSetpoint = 4; + nullable boolean builtIn = 5; + } + + struct PresetTypeStruct { + PresetScenarioEnum presetScenario = 0; + int8u numberOfPresets = 1; + PresetTypeFeaturesBitmap presetTypeFeatures = 2; + } + + struct QueuedPresetStruct { + nullable octet_string<16> presetHandle = 0; + nullable epoch_s transitionTimestamp = 1; + } + + struct ScheduleTypeStruct { + SystemModeEnum systemMode = 0; + int8u numberOfSchedules = 1; + ScheduleTypeFeaturesBitmap scheduleTypeFeatures = 2; + } + struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; nullable temperature heatSetpoint = 1; @@ -4929,6 +5004,20 @@ cluster Thermostat = 513 { attribute access(write: manage) optional ACLouverPositionEnum ACLouverPosition = 69; readonly attribute optional nullable temperature ACCoilTemperature = 70; attribute access(write: manage) optional ACCapacityFormatEnum ACCapacityformat = 71; + readonly attribute optional PresetTypeStruct presetTypes[] = 72; + readonly attribute optional ScheduleTypeStruct scheduleTypes[] = 73; + readonly attribute optional int8u numberOfPresets = 74; + readonly attribute optional int8u numberOfSchedules = 75; + readonly attribute optional int8u numberOfScheduleTransitions = 76; + readonly attribute optional nullable int8u numberOfScheduleTransitionPerDay = 77; + readonly attribute optional nullable octet_string<16> activePresetHandle = 78; + readonly attribute optional nullable octet_string<16> activeScheduleHandle = 79; + attribute access(write: manage) optional PresetStruct presets[] = 80; + attribute access(write: manage) optional ScheduleStruct schedules[] = 81; + readonly attribute optional boolean presetsSchedulesEditable = 82; + readonly attribute optional TemperatureSetpointHoldPolicyBitmap temperatureSetpointHoldPolicy = 83; + readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 84; + readonly attribute optional nullable QueuedPresetStruct queuedPreset = 85; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -4960,14 +5049,45 @@ cluster Thermostat = 513 { ScheduleModeBitmap modeToReturn = 1; } + request struct SetActiveScheduleRequestRequest { + octet_string<16> scheduleHandle = 0; + } + + request struct SetActivePresetRequestRequest { + octet_string<16> presetHandle = 0; + optional int16u delayMinutes = 1; + } + + request struct StartPresetsSchedulesEditRequestRequest { + int16u timeoutSeconds = 0; + } + + request struct SetTemperatureSetpointHoldPolicyRequest { + TemperatureSetpointHoldPolicyBitmap temperatureSetpointHoldPolicy = 0; + } + /** Command description for SetpointRaiseLower */ command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; /** Command description for SetWeeklySchedule */ command access(invoke: manage) SetWeeklySchedule(SetWeeklyScheduleRequest): DefaultSuccess = 1; /** Command description for GetWeeklySchedule */ command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; - /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ + /** This command is used to clear the weekly schedule. The ClearWeeklySchedule command has no payload. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; + /** This command is used to set the active schedule. */ + command SetActiveScheduleRequest(SetActiveScheduleRequestRequest): DefaultSuccess = 5; + /** This command is used to set the active preset. */ + command SetActivePresetRequest(SetActivePresetRequestRequest): DefaultSuccess = 6; + /** This command is used to start editing the presets and schedules. */ + command access(invoke: manage) StartPresetsSchedulesEditRequest(StartPresetsSchedulesEditRequestRequest): DefaultSuccess = 7; + /** This command is used to cancel editing presets and schedules. */ + command access(invoke: manage) CancelPresetsSchedulesEditRequest(): DefaultSuccess = 8; + /** This command is used to notify the server that all edits are done and should be committed. */ + command access(invoke: manage) CommitPresetsSchedulesRequest(): DefaultSuccess = 9; + /** This command is sent to cancel a queued preset. */ + command access(invoke: manage) CancelSetActivePresetRequest(): DefaultSuccess = 10; + /** This command sets the set point hold policy. */ + command SetTemperatureSetpointHoldPolicy(SetTemperatureSetpointHoldPolicyRequest): DefaultSuccess = 11; } /** An interface for configuring and controlling the functionality of a thermostat. */ @@ -5017,6 +5137,16 @@ cluster Thermostat = 513 { kCoolingAndHeatingWithReheat = 5; } + enum PresetScenarioEnum : enum8 { + kUnspecified = 0; + kOccupied = 1; + kUnoccupied = 2; + kSleep = 3; + kWake = 4; + kVacation = 5; + kUserDefined = 6; + } + enum SetpointChangeSourceEnum : enum8 { kManual = 0; kSchedule = 1; @@ -5078,6 +5208,10 @@ cluster Thermostat = 513 { kSetback = 0x10; kAutoMode = 0x20; kLocalTemperatureNotExposed = 0x40; + kMatterScheduleConfiguration = 0x80; + kPresets = 0x100; + kSetpoints = 0x200; + kQueuedPresetsSupported = 0x400; } bitmap HVACSystemTypeBitmap : bitmap8 { @@ -5087,6 +5221,11 @@ cluster Thermostat = 513 { kHeatingUsesFuel = 0x20; } + bitmap PresetTypeFeaturesBitmap : bitmap16 { + kAutomatic = 0x1; + kSupportsNames = 0x2; + } + bitmap ProgrammingOperationModeBitmap : bitmap8 { kScheduleActive = 0x1; kAutoRecovery = 0x2; @@ -5125,6 +5264,62 @@ cluster Thermostat = 513 { kCoolSetpointPresent = 0x2; } + bitmap ScheduleTypeFeaturesBitmap : bitmap16 { + kSupportsPresets = 0x1; + kSupportsSetpoints = 0x2; + kSupportsNames = 0x4; + kSupportsOff = 0x8; + } + + bitmap TemperatureSetpointHoldPolicyBitmap : bitmap8 { + kHoldDurationElapsed = 0x1; + kHoldDurationElapsedOrPresetChanged = 0x2; + } + + struct ScheduleTransitionStruct { + ScheduleDayOfWeekBitmap dayOfWeek = 0; + int16u transitionTime = 1; + optional octet_string<16> presetHandle = 2; + optional SystemModeEnum systemMode = 3; + optional temperature coolingSetpoint = 4; + optional temperature heatingSetpoint = 5; + } + + struct ScheduleStruct { + nullable octet_string<16> scheduleHandle = 0; + SystemModeEnum systemMode = 1; + optional char_string<64> name = 2; + optional octet_string<16> presetHandle = 3; + ScheduleTransitionStruct transitions[] = 4; + optional nullable boolean builtIn = 5; + } + + struct PresetStruct { + nullable octet_string<16> presetHandle = 0; + PresetScenarioEnum presetScenario = 1; + optional nullable char_string<64> name = 2; + optional temperature coolingSetpoint = 3; + optional temperature heatingSetpoint = 4; + nullable boolean builtIn = 5; + } + + struct PresetTypeStruct { + PresetScenarioEnum presetScenario = 0; + int8u numberOfPresets = 1; + PresetTypeFeaturesBitmap presetTypeFeatures = 2; + } + + struct QueuedPresetStruct { + nullable octet_string<16> presetHandle = 0; + nullable epoch_s transitionTimestamp = 1; + } + + struct ScheduleTypeStruct { + SystemModeEnum systemMode = 0; + int8u numberOfSchedules = 1; + ScheduleTypeFeaturesBitmap scheduleTypeFeatures = 2; + } + struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; nullable temperature heatSetpoint = 1; @@ -5180,6 +5375,20 @@ cluster Thermostat = 513 { attribute access(write: manage) optional ACLouverPositionEnum ACLouverPosition = 69; readonly attribute optional nullable temperature ACCoilTemperature = 70; attribute access(write: manage) optional ACCapacityFormatEnum ACCapacityformat = 71; + readonly attribute optional PresetTypeStruct presetTypes[] = 72; + readonly attribute optional ScheduleTypeStruct scheduleTypes[] = 73; + readonly attribute optional int8u numberOfPresets = 74; + readonly attribute optional int8u numberOfSchedules = 75; + readonly attribute optional int8u numberOfScheduleTransitions = 76; + readonly attribute optional nullable int8u numberOfScheduleTransitionPerDay = 77; + readonly attribute optional nullable octet_string<16> activePresetHandle = 78; + readonly attribute optional nullable octet_string<16> activeScheduleHandle = 79; + attribute access(write: manage) optional PresetStruct presets[] = 80; + attribute access(write: manage) optional ScheduleStruct schedules[] = 81; + readonly attribute optional boolean presetsSchedulesEditable = 82; + readonly attribute optional TemperatureSetpointHoldPolicyBitmap temperatureSetpointHoldPolicy = 83; + readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 84; + readonly attribute optional nullable QueuedPresetStruct queuedPreset = 85; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -5211,14 +5420,45 @@ cluster Thermostat = 513 { ScheduleModeBitmap modeToReturn = 1; } + request struct SetActiveScheduleRequestRequest { + octet_string<16> scheduleHandle = 0; + } + + request struct SetActivePresetRequestRequest { + octet_string<16> presetHandle = 0; + optional int16u delayMinutes = 1; + } + + request struct StartPresetsSchedulesEditRequestRequest { + int16u timeoutSeconds = 0; + } + + request struct SetTemperatureSetpointHoldPolicyRequest { + TemperatureSetpointHoldPolicyBitmap temperatureSetpointHoldPolicy = 0; + } + /** Command description for SetpointRaiseLower */ command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; /** Command description for SetWeeklySchedule */ command access(invoke: manage) SetWeeklySchedule(SetWeeklyScheduleRequest): DefaultSuccess = 1; /** Command description for GetWeeklySchedule */ command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; - /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ + /** This command is used to clear the weekly schedule. The ClearWeeklySchedule command has no payload. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; + /** This command is used to set the active schedule. */ + command SetActiveScheduleRequest(SetActiveScheduleRequestRequest): DefaultSuccess = 5; + /** This command is used to set the active preset. */ + command SetActivePresetRequest(SetActivePresetRequestRequest): DefaultSuccess = 6; + /** This command is used to start editing the presets and schedules. */ + command access(invoke: manage) StartPresetsSchedulesEditRequest(StartPresetsSchedulesEditRequestRequest): DefaultSuccess = 7; + /** This command is used to cancel editing presets and schedules. */ + command access(invoke: manage) CancelPresetsSchedulesEditRequest(): DefaultSuccess = 8; + /** This command is used to notify the server that all edits are done and should be committed. */ + command access(invoke: manage) CommitPresetsSchedulesRequest(): DefaultSuccess = 9; + /** This command is sent to cancel a queued preset. */ + command access(invoke: manage) CancelSetActivePresetRequest(): DefaultSuccess = 10; + /** This command sets the set point hold policy. */ + command SetTemperatureSetpointHoldPolicy(SetTemperatureSetpointHoldPolicyRequest): DefaultSuccess = 11; } /** An interface for configuring the user interface of a thermostat (which may be remote from the thermostat). */ @@ -8770,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; @@ -8886,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/platform/linux/AppMain.cpp b/examples/platform/linux/AppMain.cpp index 86382f75665c06..56098c7c490548 100644 --- a/examples/platform/linux/AppMain.cpp +++ b/examples/platform/linux/AppMain.cpp @@ -83,6 +83,9 @@ #if CHIP_DEVICE_CONFIG_ENABLE_BOOLEAN_STATE_CONFIGURATION_TRIGGER #include #endif +#if CHIP_DEVICE_CONFIG_ENABLE_ENERGY_EVSE_TRIGGER +#include +#endif #include #include @@ -561,6 +564,13 @@ void ChipLinuxAppMainLoop(AppMainLoopImplementation * impl) }; otherDelegate = &booleanStateConfigurationTestEventTriggerDelegate; #endif +#if CHIP_DEVICE_CONFIG_ENABLE_ENERGY_EVSE_TRIGGER + static EnergyEvseTestEventTriggerDelegate energyEvseTestEventTriggerDelegate{ + ByteSpan(LinuxDeviceOptions::GetInstance().testEventTriggerEnableKey), otherDelegate + }; + otherDelegate = &energyEvseTestEventTriggerDelegate; +#endif + // For general testing of TestEventTrigger, we have a common "core" event trigger delegate. static SampleTestEventTriggerDelegate testEventTriggerDelegate; VerifyOrDie(testEventTriggerDelegate.Init(ByteSpan(LinuxDeviceOptions::GetInstance().testEventTriggerEnableKey), diff --git a/examples/platform/linux/BUILD.gn b/examples/platform/linux/BUILD.gn index 4a4099c4150bf5..fbbf7e1833894e 100644 --- a/examples/platform/linux/BUILD.gn +++ b/examples/platform/linux/BUILD.gn @@ -21,8 +21,8 @@ import("${chip_root}/src/tracing/tracing_args.gni") declare_args() { chip_enable_smoke_co_trigger = false - chip_enable_boolean_state_configuration_trigger = false + chip_enable_energy_evse_trigger = false } config("app-main-config") { @@ -43,6 +43,10 @@ source_set("boolean-state-configuration-test-event-trigger") { sources = [ "${chip_root}/src/app/clusters/boolean-state-configuration-server/BooleanStateConfigurationTestEventTriggerDelegate.h" ] } +source_set("energy-evse-test-event-trigger") { + sources = [ "${chip_root}/src/app/clusters/energy-evse-server/EnergyEvseTestEventTriggerDelegate.h" ] +} + source_set("app-main") { defines = [ "ENABLE_TRACING=${matter_enable_tracing_support}" ] sources = [ @@ -66,6 +70,7 @@ source_set("app-main") { public_deps = [ ":boolean-state-configuration-test-event-trigger", + ":energy-evse-test-event-trigger", ":smco-test-event-trigger", "${chip_root}/src/lib", "${chip_root}/src/platform/logging:force_stdio", @@ -104,6 +109,7 @@ source_set("app-main") { defines += [ "CHIP_DEVICE_CONFIG_ENABLE_SMOKE_CO_TRIGGER=${chip_enable_smoke_co_trigger}", "CHIP_DEVICE_CONFIG_ENABLE_BOOLEAN_STATE_CONFIGURATION_TRIGGER=${chip_enable_boolean_state_configuration_trigger}", + "CHIP_DEVICE_CONFIG_ENABLE_ENERGY_EVSE_TRIGGER=${chip_enable_energy_evse_trigger}", ] public_configs = [ ":app-main-config" ] diff --git a/examples/platform/qpg/project_include/OpenThreadConfig.h b/examples/platform/qpg/project_include/OpenThreadConfig.h index 585d10f3d0ea3d..d6955a90a55734 100644 --- a/examples/platform/qpg/project_include/OpenThreadConfig.h +++ b/examples/platform/qpg/project_include/OpenThreadConfig.h @@ -74,7 +74,7 @@ #define OPENTHREAD_CONFIG_TCP_ENABLE 0 #define OPENTHREAD_CONFIG_BLE_TCAT_ENABLE 0 #define OPENTHREAD_CONFIG_TLS_ENABLE 0 -#define OPENTHREAD_CONFIG_DTLS_ENABLE 0 +#define OPENTHREAD_CONFIG_SECURE_TRANSPORT_ENABLE 0 #define OPENTHREAD_ENABLE_VENDOR_EXTENSION 0 #define OPENTHREAD_EXAMPLES_SIMULATION 0 diff --git a/examples/platform/telink/common/src/AppTaskCommon.cpp b/examples/platform/telink/common/src/AppTaskCommon.cpp index 1ba800e5e1bcf0..a77f4363df65f5 100644 --- a/examples/platform/telink/common/src/AppTaskCommon.cpp +++ b/examples/platform/telink/common/src/AppTaskCommon.cpp @@ -30,6 +30,10 @@ #include #include +#if CONFIG_BOOTLOADER_MCUBOOT +#include +#endif + #if CONFIG_CHIP_OTA_REQUESTOR #include #endif @@ -246,6 +250,14 @@ CHIP_ERROR AppTaskCommon::StartApp(void) StartThreadButtonEventHandler(); #endif +#ifdef CONFIG_BOOTLOADER_MCUBOOT + if (!chip::DeviceLayer::ConnectivityMgr().IsThreadProvisioned()) + { + LOG_INF("Confirm image."); + OtaConfirmNewImage(); + } +#endif /* CONFIG_BOOTLOADER_MCUBOOT */ + while (true) { GetEvent(&event); diff --git a/src/platform/telink/OTAUtil.h b/examples/platform/telink/util/include/OTAUtil.h similarity index 100% rename from src/platform/telink/OTAUtil.h rename to examples/platform/telink/util/include/OTAUtil.h diff --git a/src/platform/telink/OTAUtil.cpp b/examples/platform/telink/util/src/OTAUtil.cpp similarity index 100% rename from src/platform/telink/OTAUtil.cpp rename to examples/platform/telink/util/src/OTAUtil.cpp diff --git a/examples/pump-app/telink/CMakeLists.txt b/examples/pump-app/telink/CMakeLists.txt index 8d42d5f79762c5..5c3ad5d3d3f41e 100755 --- a/examples/pump-app/telink/CMakeLists.txt +++ b/examples/pump-app/telink/CMakeLists.txt @@ -69,10 +69,6 @@ target_include_directories(app PRIVATE ${TELINK_COMMON}/util/include ${TELINK_COMMON}/app/include) -add_definitions( - "-DCHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=" -) - target_sources(app PRIVATE src/AppTask.cpp src/PumpManager.cpp @@ -87,3 +83,7 @@ chip_configure_data_model(app INCLUDE_SERVER ZAP_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../pump-common/pump-app.zap ) + +if(CONFIG_BOOTLOADER_MCUBOOT) + target_sources(app PRIVATE ${TELINK_COMMON}/util/src/OTAUtil.cpp) +endif() diff --git a/examples/pump-controller-app/telink/CMakeLists.txt b/examples/pump-controller-app/telink/CMakeLists.txt index dca66f8dd31702..684bb89776eed5 100755 --- a/examples/pump-controller-app/telink/CMakeLists.txt +++ b/examples/pump-controller-app/telink/CMakeLists.txt @@ -69,10 +69,6 @@ target_include_directories(app PRIVATE ${TELINK_COMMON}/util/include ${TELINK_COMMON}/app/include) -add_definitions( - "-DCHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=" -) - target_sources(app PRIVATE src/AppTask.cpp src/PumpManager.cpp @@ -87,3 +83,7 @@ chip_configure_data_model(app INCLUDE_SERVER ZAP_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../pump-controller-common/pump-controller-app.zap ) + +if(CONFIG_BOOTLOADER_MCUBOOT) + target_sources(app PRIVATE ${TELINK_COMMON}/util/src/OTAUtil.cpp) +endif() diff --git a/examples/rvc-app/rvc-common/rvc-app.matter b/examples/rvc-app/rvc-common/rvc-app.matter index 682b5ef6f5dd54..6db104d8eac315 100644 --- a/examples/rvc-app/rvc-common/rvc-app.matter +++ b/examples/rvc-app/rvc-common/rvc-app.matter @@ -928,6 +928,7 @@ cluster RvcRunMode = 84 { enum ModeTag : enum16 { kIdle = 16384; kCleaning = 16385; + kMapping = 16386; } enum StatusCode : enum8 { diff --git a/examples/shell/shell_common/BUILD.gn b/examples/shell/shell_common/BUILD.gn index a54df29c798955..28b26af3ae211f 100644 --- a/examples/shell/shell_common/BUILD.gn +++ b/examples/shell/shell_common/BUILD.gn @@ -65,10 +65,13 @@ static_library("shell_common") { sources += [ "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", + "${chip_root}/examples/all-clusters-app/all-clusters-common/src/device-energy-management-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/energy-evse-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp", + "${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementDelegateImpl.cpp", + "${chip_root}/examples/energy-management-app/energy-management-common/src/DeviceEnergyManagementManager.cpp", "${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseDelegateImpl.cpp", "${chip_root}/examples/energy-management-app/energy-management-common/src/EnergyEvseManager.cpp", ] diff --git a/examples/shell/telink/CMakeLists.txt b/examples/shell/telink/CMakeLists.txt index 0bd2d490411bec..c5cb3eb65be136 100755 --- a/examples/shell/telink/CMakeLists.txt +++ b/examples/shell/telink/CMakeLists.txt @@ -66,12 +66,12 @@ target_include_directories(app PRIVATE ${GEN_DIR}/app-common ${APP_ROOT}/shell_common/include) -add_definitions( - "-DCHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=" -) - target_sources(app PRIVATE ${APP_ROOT}/shell_common/globals.cpp ${APP_ROOT}/shell_common/cmd_misc.cpp ${APP_ROOT}/shell_common/cmd_otcli.cpp ${APP_ROOT}/standalone/main.cpp) + +if(CONFIG_BOOTLOADER_MCUBOOT) + target_sources(app PRIVATE ${TELINK_COMMON}/util/src/OTAUtil.cpp) +endif() diff --git a/examples/smoke-co-alarm-app/telink/CMakeLists.txt b/examples/smoke-co-alarm-app/telink/CMakeLists.txt index e916aa52f9425b..96cb66c2ac19e7 100755 --- a/examples/smoke-co-alarm-app/telink/CMakeLists.txt +++ b/examples/smoke-co-alarm-app/telink/CMakeLists.txt @@ -68,10 +68,6 @@ target_include_directories(app PRIVATE ${TELINK_COMMON}/common/include ${TELINK_COMMON}/util/include) -add_definitions( - "-DCHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=" -) - target_sources(app PRIVATE src/AppTask.cpp src/SmokeCoAlarmManager.cpp @@ -87,3 +83,7 @@ chip_configure_data_model(app INCLUDE_SERVER ZAP_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../smoke-co-alarm-common/smoke-co-alarm-app.zap ) + +if(CONFIG_BOOTLOADER_MCUBOOT) + target_sources(app PRIVATE ${TELINK_COMMON}/util/src/OTAUtil.cpp) +endif() diff --git a/examples/temperature-measurement-app/telink/CMakeLists.txt b/examples/temperature-measurement-app/telink/CMakeLists.txt index e409b2e2bc59de..fe847592ed985f 100644 --- a/examples/temperature-measurement-app/telink/CMakeLists.txt +++ b/examples/temperature-measurement-app/telink/CMakeLists.txt @@ -85,10 +85,6 @@ target_include_directories(app PRIVATE ${TELINK_COMMON}/app/include ) -add_definitions( - "-DCHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=" -) - target_sources(app PRIVATE src/AppTask.cpp ${TELINK_COMMON}/common/src/mainCommon.cpp @@ -104,3 +100,7 @@ chip_configure_data_model(app INCLUDE_SERVER ZAP_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../temperature-measurement-common/temperature-measurement.zap ) + +if(CONFIG_BOOTLOADER_MCUBOOT) + target_sources(app PRIVATE ${TELINK_COMMON}/util/src/OTAUtil.cpp) +endif() diff --git a/examples/thermostat/asr/src/TemperatureManager.cpp b/examples/thermostat/asr/src/TemperatureManager.cpp index b560e5c22970f7..fd90fb7541a29c 100644 --- a/examples/thermostat/asr/src/TemperatureManager.cpp +++ b/examples/thermostat/asr/src/TemperatureManager.cpp @@ -26,6 +26,7 @@ using namespace ::chip::DeviceLayer; constexpr EndpointId kThermostatEndpoint = 1; using namespace ::chip::app::Clusters::Thermostat; +using namespace ::chip::app::Clusters::Thermostat; namespace ThermAttr = chip::app::Clusters::Thermostat::Attributes; TemperatureManager TemperatureManager::sTempMgr; diff --git a/examples/thermostat/nxp/zap/thermostat_matter_thread.matter b/examples/thermostat/nxp/zap/thermostat_matter_thread.matter index 01267c685050b1..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; @@ -1965,6 +1965,16 @@ cluster Thermostat = 513 { kCoolingAndHeatingWithReheat = 5; } + enum PresetScenarioEnum : enum8 { + kUnspecified = 0; + kOccupied = 1; + kUnoccupied = 2; + kSleep = 3; + kWake = 4; + kVacation = 5; + kUserDefined = 6; + } + enum SetpointChangeSourceEnum : enum8 { kManual = 0; kSchedule = 1; @@ -2026,6 +2036,10 @@ cluster Thermostat = 513 { kSetback = 0x10; kAutoMode = 0x20; kLocalTemperatureNotExposed = 0x40; + kMatterScheduleConfiguration = 0x80; + kPresets = 0x100; + kSetpoints = 0x200; + kQueuedPresetsSupported = 0x400; } bitmap HVACSystemTypeBitmap : bitmap8 { @@ -2035,6 +2049,11 @@ cluster Thermostat = 513 { kHeatingUsesFuel = 0x20; } + bitmap PresetTypeFeaturesBitmap : bitmap16 { + kAutomatic = 0x1; + kSupportsNames = 0x2; + } + bitmap ProgrammingOperationModeBitmap : bitmap8 { kScheduleActive = 0x1; kAutoRecovery = 0x2; @@ -2073,6 +2092,62 @@ cluster Thermostat = 513 { kCoolSetpointPresent = 0x2; } + bitmap ScheduleTypeFeaturesBitmap : bitmap16 { + kSupportsPresets = 0x1; + kSupportsSetpoints = 0x2; + kSupportsNames = 0x4; + kSupportsOff = 0x8; + } + + bitmap TemperatureSetpointHoldPolicyBitmap : bitmap8 { + kHoldDurationElapsed = 0x1; + kHoldDurationElapsedOrPresetChanged = 0x2; + } + + struct ScheduleTransitionStruct { + ScheduleDayOfWeekBitmap dayOfWeek = 0; + int16u transitionTime = 1; + optional octet_string<16> presetHandle = 2; + optional SystemModeEnum systemMode = 3; + optional temperature coolingSetpoint = 4; + optional temperature heatingSetpoint = 5; + } + + struct ScheduleStruct { + nullable octet_string<16> scheduleHandle = 0; + SystemModeEnum systemMode = 1; + optional char_string<64> name = 2; + optional octet_string<16> presetHandle = 3; + ScheduleTransitionStruct transitions[] = 4; + optional nullable boolean builtIn = 5; + } + + struct PresetStruct { + nullable octet_string<16> presetHandle = 0; + PresetScenarioEnum presetScenario = 1; + optional nullable char_string<64> name = 2; + optional temperature coolingSetpoint = 3; + optional temperature heatingSetpoint = 4; + nullable boolean builtIn = 5; + } + + struct PresetTypeStruct { + PresetScenarioEnum presetScenario = 0; + int8u numberOfPresets = 1; + PresetTypeFeaturesBitmap presetTypeFeatures = 2; + } + + struct QueuedPresetStruct { + nullable octet_string<16> presetHandle = 0; + nullable epoch_s transitionTimestamp = 1; + } + + struct ScheduleTypeStruct { + SystemModeEnum systemMode = 0; + int8u numberOfSchedules = 1; + ScheduleTypeFeaturesBitmap scheduleTypeFeatures = 2; + } + struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; nullable temperature heatSetpoint = 1; @@ -2128,6 +2203,20 @@ cluster Thermostat = 513 { attribute access(write: manage) optional ACLouverPositionEnum ACLouverPosition = 69; readonly attribute optional nullable temperature ACCoilTemperature = 70; attribute access(write: manage) optional ACCapacityFormatEnum ACCapacityformat = 71; + readonly attribute optional PresetTypeStruct presetTypes[] = 72; + readonly attribute optional ScheduleTypeStruct scheduleTypes[] = 73; + readonly attribute optional int8u numberOfPresets = 74; + readonly attribute optional int8u numberOfSchedules = 75; + readonly attribute optional int8u numberOfScheduleTransitions = 76; + readonly attribute optional nullable int8u numberOfScheduleTransitionPerDay = 77; + readonly attribute optional nullable octet_string<16> activePresetHandle = 78; + readonly attribute optional nullable octet_string<16> activeScheduleHandle = 79; + attribute access(write: manage) optional PresetStruct presets[] = 80; + attribute access(write: manage) optional ScheduleStruct schedules[] = 81; + readonly attribute optional boolean presetsSchedulesEditable = 82; + readonly attribute optional TemperatureSetpointHoldPolicyBitmap temperatureSetpointHoldPolicy = 83; + readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 84; + readonly attribute optional nullable QueuedPresetStruct queuedPreset = 85; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2159,14 +2248,45 @@ cluster Thermostat = 513 { ScheduleModeBitmap modeToReturn = 1; } + request struct SetActiveScheduleRequestRequest { + octet_string<16> scheduleHandle = 0; + } + + request struct SetActivePresetRequestRequest { + octet_string<16> presetHandle = 0; + optional int16u delayMinutes = 1; + } + + request struct StartPresetsSchedulesEditRequestRequest { + int16u timeoutSeconds = 0; + } + + request struct SetTemperatureSetpointHoldPolicyRequest { + TemperatureSetpointHoldPolicyBitmap temperatureSetpointHoldPolicy = 0; + } + /** Command description for SetpointRaiseLower */ command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; /** Command description for SetWeeklySchedule */ command access(invoke: manage) SetWeeklySchedule(SetWeeklyScheduleRequest): DefaultSuccess = 1; /** Command description for GetWeeklySchedule */ command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; - /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ + /** This command is used to clear the weekly schedule. The ClearWeeklySchedule command has no payload. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; + /** This command is used to set the active schedule. */ + command SetActiveScheduleRequest(SetActiveScheduleRequestRequest): DefaultSuccess = 5; + /** This command is used to set the active preset. */ + command SetActivePresetRequest(SetActivePresetRequestRequest): DefaultSuccess = 6; + /** This command is used to start editing the presets and schedules. */ + command access(invoke: manage) StartPresetsSchedulesEditRequest(StartPresetsSchedulesEditRequestRequest): DefaultSuccess = 7; + /** This command is used to cancel editing presets and schedules. */ + command access(invoke: manage) CancelPresetsSchedulesEditRequest(): DefaultSuccess = 8; + /** This command is used to notify the server that all edits are done and should be committed. */ + command access(invoke: manage) CommitPresetsSchedulesRequest(): DefaultSuccess = 9; + /** This command is sent to cancel a queued preset. */ + command access(invoke: manage) CancelSetActivePresetRequest(): DefaultSuccess = 10; + /** This command sets the set point hold policy. */ + command SetTemperatureSetpointHoldPolicy(SetTemperatureSetpointHoldPolicyRequest): DefaultSuccess = 11; } endpoint 0 { @@ -2482,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; @@ -2553,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 8c75a3585d8f4c..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; @@ -1876,6 +1876,16 @@ cluster Thermostat = 513 { kCoolingAndHeatingWithReheat = 5; } + enum PresetScenarioEnum : enum8 { + kUnspecified = 0; + kOccupied = 1; + kUnoccupied = 2; + kSleep = 3; + kWake = 4; + kVacation = 5; + kUserDefined = 6; + } + enum SetpointChangeSourceEnum : enum8 { kManual = 0; kSchedule = 1; @@ -1937,6 +1947,10 @@ cluster Thermostat = 513 { kSetback = 0x10; kAutoMode = 0x20; kLocalTemperatureNotExposed = 0x40; + kMatterScheduleConfiguration = 0x80; + kPresets = 0x100; + kSetpoints = 0x200; + kQueuedPresetsSupported = 0x400; } bitmap HVACSystemTypeBitmap : bitmap8 { @@ -1946,6 +1960,11 @@ cluster Thermostat = 513 { kHeatingUsesFuel = 0x20; } + bitmap PresetTypeFeaturesBitmap : bitmap16 { + kAutomatic = 0x1; + kSupportsNames = 0x2; + } + bitmap ProgrammingOperationModeBitmap : bitmap8 { kScheduleActive = 0x1; kAutoRecovery = 0x2; @@ -1984,6 +2003,62 @@ cluster Thermostat = 513 { kCoolSetpointPresent = 0x2; } + bitmap ScheduleTypeFeaturesBitmap : bitmap16 { + kSupportsPresets = 0x1; + kSupportsSetpoints = 0x2; + kSupportsNames = 0x4; + kSupportsOff = 0x8; + } + + bitmap TemperatureSetpointHoldPolicyBitmap : bitmap8 { + kHoldDurationElapsed = 0x1; + kHoldDurationElapsedOrPresetChanged = 0x2; + } + + struct ScheduleTransitionStruct { + ScheduleDayOfWeekBitmap dayOfWeek = 0; + int16u transitionTime = 1; + optional octet_string<16> presetHandle = 2; + optional SystemModeEnum systemMode = 3; + optional temperature coolingSetpoint = 4; + optional temperature heatingSetpoint = 5; + } + + struct ScheduleStruct { + nullable octet_string<16> scheduleHandle = 0; + SystemModeEnum systemMode = 1; + optional char_string<64> name = 2; + optional octet_string<16> presetHandle = 3; + ScheduleTransitionStruct transitions[] = 4; + optional nullable boolean builtIn = 5; + } + + struct PresetStruct { + nullable octet_string<16> presetHandle = 0; + PresetScenarioEnum presetScenario = 1; + optional nullable char_string<64> name = 2; + optional temperature coolingSetpoint = 3; + optional temperature heatingSetpoint = 4; + nullable boolean builtIn = 5; + } + + struct PresetTypeStruct { + PresetScenarioEnum presetScenario = 0; + int8u numberOfPresets = 1; + PresetTypeFeaturesBitmap presetTypeFeatures = 2; + } + + struct QueuedPresetStruct { + nullable octet_string<16> presetHandle = 0; + nullable epoch_s transitionTimestamp = 1; + } + + struct ScheduleTypeStruct { + SystemModeEnum systemMode = 0; + int8u numberOfSchedules = 1; + ScheduleTypeFeaturesBitmap scheduleTypeFeatures = 2; + } + struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; nullable temperature heatSetpoint = 1; @@ -2039,6 +2114,20 @@ cluster Thermostat = 513 { attribute access(write: manage) optional ACLouverPositionEnum ACLouverPosition = 69; readonly attribute optional nullable temperature ACCoilTemperature = 70; attribute access(write: manage) optional ACCapacityFormatEnum ACCapacityformat = 71; + readonly attribute optional PresetTypeStruct presetTypes[] = 72; + readonly attribute optional ScheduleTypeStruct scheduleTypes[] = 73; + readonly attribute optional int8u numberOfPresets = 74; + readonly attribute optional int8u numberOfSchedules = 75; + readonly attribute optional int8u numberOfScheduleTransitions = 76; + readonly attribute optional nullable int8u numberOfScheduleTransitionPerDay = 77; + readonly attribute optional nullable octet_string<16> activePresetHandle = 78; + readonly attribute optional nullable octet_string<16> activeScheduleHandle = 79; + attribute access(write: manage) optional PresetStruct presets[] = 80; + attribute access(write: manage) optional ScheduleStruct schedules[] = 81; + readonly attribute optional boolean presetsSchedulesEditable = 82; + readonly attribute optional TemperatureSetpointHoldPolicyBitmap temperatureSetpointHoldPolicy = 83; + readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 84; + readonly attribute optional nullable QueuedPresetStruct queuedPreset = 85; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -2070,14 +2159,45 @@ cluster Thermostat = 513 { ScheduleModeBitmap modeToReturn = 1; } + request struct SetActiveScheduleRequestRequest { + octet_string<16> scheduleHandle = 0; + } + + request struct SetActivePresetRequestRequest { + octet_string<16> presetHandle = 0; + optional int16u delayMinutes = 1; + } + + request struct StartPresetsSchedulesEditRequestRequest { + int16u timeoutSeconds = 0; + } + + request struct SetTemperatureSetpointHoldPolicyRequest { + TemperatureSetpointHoldPolicyBitmap temperatureSetpointHoldPolicy = 0; + } + /** Command description for SetpointRaiseLower */ command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; /** Command description for SetWeeklySchedule */ command access(invoke: manage) SetWeeklySchedule(SetWeeklyScheduleRequest): DefaultSuccess = 1; /** Command description for GetWeeklySchedule */ command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; - /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ + /** This command is used to clear the weekly schedule. The ClearWeeklySchedule command has no payload. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; + /** This command is used to set the active schedule. */ + command SetActiveScheduleRequest(SetActiveScheduleRequestRequest): DefaultSuccess = 5; + /** This command is used to set the active preset. */ + command SetActivePresetRequest(SetActivePresetRequestRequest): DefaultSuccess = 6; + /** This command is used to start editing the presets and schedules. */ + command access(invoke: manage) StartPresetsSchedulesEditRequest(StartPresetsSchedulesEditRequestRequest): DefaultSuccess = 7; + /** This command is used to cancel editing presets and schedules. */ + command access(invoke: manage) CancelPresetsSchedulesEditRequest(): DefaultSuccess = 8; + /** This command is used to notify the server that all edits are done and should be committed. */ + command access(invoke: manage) CommitPresetsSchedulesRequest(): DefaultSuccess = 9; + /** This command is sent to cancel a queued preset. */ + command access(invoke: manage) CancelSetActivePresetRequest(): DefaultSuccess = 10; + /** This command sets the set point hold policy. */ + command SetTemperatureSetpointHoldPolicy(SetTemperatureSetpointHoldPolicyRequest): DefaultSuccess = 11; } endpoint 0 { @@ -2338,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; @@ -2409,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/thermostat/qpg/.gn b/examples/thermostat/qpg/.gn new file mode 100644 index 00000000000000..3d48789e30ab3d --- /dev/null +++ b/examples/thermostat/qpg/.gn @@ -0,0 +1,28 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/build.gni") + +# The location of the build configuration file. +buildconfig = "${build_root}/config/BUILDCONFIG.gn" + +# CHIP uses angle bracket includes. +check_system_includes = true + +default_args = { + target_cpu = "arm" + target_os = "freertos" + + import("//args.gni") +} diff --git a/examples/thermostat/qpg/APPLICATION.md b/examples/thermostat/qpg/APPLICATION.md new file mode 100644 index 00000000000000..1a6a7558b4cc26 --- /dev/null +++ b/examples/thermostat/qpg/APPLICATION.md @@ -0,0 +1,17 @@ +# Matter QPG6105 Thermostat Example Application + +## Thermostat + +A thermostat example application showing the use of +[Matter](https://github.com/project-chip/connectedhomeip) on the Qorvo QPG6105 +can be found in this folder. + +## Qorvo SDK + +More detailed information on the Qorvo SDK can be found in the +[Qorvo Matter SDK](https://github.com/Qorvo/QMatter). + +## More information + +For more information on our product line and support options, please visit +[www.qorvo.com](https://www.qorvo.com) or contact us at diff --git a/examples/thermostat/qpg/BUILD.gn b/examples/thermostat/qpg/BUILD.gn new file mode 100644 index 00000000000000..4c82da60be8be9 --- /dev/null +++ b/examples/thermostat/qpg/BUILD.gn @@ -0,0 +1,153 @@ +# Copyright(c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/build.gni") +import("//build_overrides/chip.gni") +import("//build_overrides/openthread.gni") +import("//build_overrides/qpg_sdk.gni") + +import("${build_root}/config/defaults.gni") +import("${chip_root}/src/platform/device.gni") +import("${qpg_sdk_build_root}/qpg_executable.gni") +import("${qpg_sdk_build_root}/qpg_sdk.gni") + +# declares chip_build_libshell = false +import("${chip_root}/src/lib/lib.gni") + +# declares chip_enable_pw_rpc = false +import("${chip_root}/examples/common/pigweed/pigweed_rpcs.gni") +if (chip_enable_pw_rpc) { + import("//build_overrides/pigweed.gni") + import("$dir_pw_build/target_types.gni") +} + +assert(current_os == "freertos") + +qpg_project_dir = "${chip_root}/examples/thermostat/qpg" +examples_plat_dir = "${chip_root}/examples/platform/qpg" + +qpg_sdk("sdk") { + include_dirs = [ + "${chip_root}/src/platform/qpg", + "${examples_plat_dir}", + "${qpg_project_dir}/include", + ] + + defines = [ "PW_RPC_ENABLED=${chip_enable_pw_rpc}" ] +} + +qpg_executable("thermostat") { + output_name = "chip-${qpg_target_ic}-thermostat-example.out" + + sources = [ + "${chip_root}/src/app/clusters/general-diagnostics-server/GenericFaultTestEventTriggerDelegate.cpp", + "${examples_plat_dir}/app/main.cpp", + "${examples_plat_dir}/ota/ota.cpp", + "src/AppTask.cpp", + "src/ThermostaticRadiatorValveManager.cpp", + "src/ZclCallbacks.cpp", + ] + + deps = [ + ":sdk", + "${chip_root}/examples/providers:device_info_provider", + "${chip_root}/examples/thermostat/qpg/zap/", + "${chip_root}/src/lib", + "${chip_root}/src/setup_payload", + "${chip_root}/third_party/openthread/platforms:libopenthread-platform", + "${chip_root}/third_party/openthread/platforms:libopenthread-platform-utils", + "${chip_root}/third_party/qpg_sdk:qpg_thermostat_factorydata_lib", + "${chip_root}/third_party/qpg_sdk:qpg_thermostat_firmwaredata_lib", + ] + + if (chip_openthread_ftd) { + deps += [ "${chip_root}/third_party/openthread/repo:libopenthread-ftd" ] + } else { + deps += [ "${chip_root}/third_party/openthread/repo:libopenthread-mtd" ] + } + + include_dirs = [ + "include", + "${examples_plat_dir}/ota", + ] + + defines = [] + + if (chip_enable_pw_rpc) { + defines += [ + "PW_RPC_ATTRIBUTE_SERVICE=1", + "PW_RPC_BUTTON_SERVICE=1", + "PW_RPC_DEVICE_SERVICE=1", + "PW_RPC_LOCKING_SERVICE=1", + ] + + sources += [ + "${chip_root}/examples/common/pigweed/RpcService.cpp", + "${chip_root}/examples/common/pigweed/qpg/PigweedLoggerMutex.cpp", + "${examples_plat_dir}/PigweedLogger.cpp", + "${examples_plat_dir}/Rpc.cpp", + "${examples_plat_dir}/uart.c", + ] + + deps += [ + "$dir_pw_hdlc:rpc_channel_output", + "$dir_pw_stream:sys_io_stream", + "${chip_root}/config/qpg/lib/pw_rpc:pw_rpc", + "${chip_root}/examples/common/pigweed:attributes_service.nanopb_rpc", + "${chip_root}/examples/common/pigweed:button_service.nanopb_rpc", + "${chip_root}/examples/common/pigweed:device_service.nanopb_rpc", + "${chip_root}/examples/common/pigweed:locking_service.nanopb_rpc", + "${examples_plat_dir}/pw_sys_io:pw_sys_io_qpg", + ] + + deps += pw_build_LINK_DEPS + + include_dirs += [ + "${chip_root}/examples/common", + "${chip_root}/examples/common/pigweed/qpg", + ] + } else { + # The below gives compiler erros in pigweed, therefore it is only enabled + # when rpc is not + cflags = [ "-Wconversion" ] + } + + if (chip_build_libshell) { + deps += [ "${examples_plat_dir}:qpg-matter-shell" ] + } else { + if (chip_openthread_ftd) { + deps += + [ "${chip_root}/third_party/openthread/repo:libopenthread-cli-ftd" ] + } else { + deps += + [ "${chip_root}/third_party/openthread/repo:libopenthread-cli-mtd" ] + } + } + + ldscript = "${qpg_sdk_root}/Libraries/Qorvo/QorvoStack/gen/QorvoStack_${qpg_target_ic}/QorvoStack_${qpg_target_ic}.ld" + + inputs = [ ldscript ] + + ldflags = [ "-T" + rebase_path(ldscript, root_build_dir) ] + + output_dir = root_out_dir +} + +group("qpg") { + deps = [ ":thermostat" ] +} + +group("default") { + deps = [ ":qpg" ] +} diff --git a/examples/thermostat/qpg/README.md b/examples/thermostat/qpg/README.md new file mode 100644 index 00000000000000..d8e070848f540c --- /dev/null +++ b/examples/thermostat/qpg/README.md @@ -0,0 +1,15 @@ +--- +orphan: true +--- + +# Matter QPG6105 SDK + +## Qorvo SDK + +More detailed information on the Qorvo SDK can be found in the +[Qorvo Matter SDK](https://github.com/Qorvo/QMatter). + +## More information + +For more information on our product line and support options, please visit +[www.qorvo.com](https://www.qorvo.com) or contact us at diff --git a/examples/thermostat/qpg/args.gni b/examples/thermostat/qpg/args.gni new file mode 100644 index 00000000000000..d5dcdfe217c635 --- /dev/null +++ b/examples/thermostat/qpg/args.gni @@ -0,0 +1,35 @@ +# Copyright (c) 2020 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/chip.gni") +import("//build_overrides/pigweed.gni") +import("${chip_root}/config/standalone/args.gni") +import("${chip_root}/examples/platform/qpg/args.gni") + +qpg_sdk_target = get_label_info(":sdk", "label_no_toolchain") + +chip_enable_ota_requestor = true +chip_openthread_ftd = false +enable_sleepy_device = true +chip_enable_icd_server = true + +# Disable lock tracking, since our FreeRTOS configuration does not set +# INCLUDE_xSemaphoreGetMutexHolder +chip_stack_lock_tracking = "none" + +matter_device_vid = "0xFFF1" +matter_device_pid = "0x8006" + +pw_log_BACKEND = "${chip_root}/src/lib/support/pw_log_chip" +pw_assert_BACKEND = "$dir_pw_assert_log:check_backend" diff --git a/examples/thermostat/qpg/build_overrides b/examples/thermostat/qpg/build_overrides new file mode 120000 index 00000000000000..e578e73312ebd1 --- /dev/null +++ b/examples/thermostat/qpg/build_overrides @@ -0,0 +1 @@ +../../build_overrides \ No newline at end of file diff --git a/examples/thermostat/qpg/include/AppConfig.h b/examples/thermostat/qpg/include/AppConfig.h new file mode 100644 index 00000000000000..9824d9323ac60b --- /dev/null +++ b/examples/thermostat/qpg/include/AppConfig.h @@ -0,0 +1,33 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef APP_CONFIG_H +#define APP_CONFIG_H + +#define APP_TASK_NAME "APP" + +// Mapping of Functional buttons +#define APP_READ_TEMPERATURE_BUTTON BTN_SW1 +#define APP_COMMISSION_BUTTON BTN_SW3 +#define APP_FUNCTION5_BUTTON BTN_SW5 + +// Mapping of LEDs +#define SYSTEM_STATE_LED LED_GREEN +#define SYSTEM_OPERATING_LED LED_WHITE + +#endif // APP_CONFIG_H diff --git a/examples/thermostat/qpg/include/AppEvent.h b/examples/thermostat/qpg/include/AppEvent.h new file mode 100644 index 00000000000000..92f5b0ae5a1933 --- /dev/null +++ b/examples/thermostat/qpg/include/AppEvent.h @@ -0,0 +1,51 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef APP_EVENT_H +#define APP_EVENT_H + +struct AppEvent; +typedef void (*EventHandler)(AppEvent *); + +struct AppEvent +{ + enum AppEventTypes + { + kEventType_Button = 0, + kEventType_Timer, + }; + + uint16_t Type; + + union + { + struct + { + uint8_t ButtonIdx; + uint8_t Action; + } ButtonEvent; + struct + { + void * Context; + } TimerEvent; + }; + + EventHandler Handler; +}; + +#endif // APP_EVENT_H diff --git a/examples/thermostat/qpg/include/AppTask.h b/examples/thermostat/qpg/include/AppTask.h new file mode 100644 index 00000000000000..557f83d08636c9 --- /dev/null +++ b/examples/thermostat/qpg/include/AppTask.h @@ -0,0 +1,92 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef APP_TASK_H +#define APP_TASK_H + +#include +#include + +#include "AppEvent.h" +#include "ThermostaticRadiatorValveManager.h" + +#include "FreeRTOS.h" +#include "timers.h" // provides FreeRTOS timer support +#include + +#include + +// Application-defined error codes in the CHIP_ERROR space. +#define APP_ERROR_CREATE_TIMER_FAILED CHIP_APPLICATION_ERROR(0x01) + +#define APP_NAME "thermostaticRadiatorValve-app" + +class AppTask +{ + +public: + CHIP_ERROR Init(); + CHIP_ERROR StartAppTask(); + static void AppTaskMain(void * pvParameter); + + void PostEvent(const AppEvent * event); + + void UpdateClusterState(); + + static void ButtonEventHandler(uint8_t btnIdx, bool btnPressed); + +private: + friend AppTask & GetAppTask(void); + + static void InitServer(intptr_t arg); + static void OpenCommissioning(intptr_t arg); + + void DispatchEvent(AppEvent * event); + + static void FunctionTimerEventHandler(AppEvent * aEvent); + static void FunctionHandler(AppEvent * aEvent); + static void TimerEventHandler(chip::System::Layer * aLayer, void * aAppState); + + static void MatterEventHandler(const chip::DeviceLayer::ChipDeviceEvent * event, intptr_t arg); + static void UpdateLEDs(void); + + void StartTimer(uint32_t aTimeoutMs); + void CancelTimer(void); + + enum Function_t + { + kFunction_NoneSelected = 0, + kFunction_SoftwareUpdate = 1, + kFunction_FactoryReset = 2, + kFunction_Invalid + } Function; + + Function_t mFunction; + bool mFunctionTimerActive; + + chip::DeviceLayer::FactoryDataProvider mFactoryDataProvider; + + static AppTask sAppTask; +}; + +inline AppTask & GetAppTask(void) +{ + return AppTask::sAppTask; +} + +#endif // APP_TASK_H diff --git a/examples/thermostat/qpg/include/CHIPProjectConfig.h b/examples/thermostat/qpg/include/CHIPProjectConfig.h new file mode 100644 index 00000000000000..afab6cdbd8ee89 --- /dev/null +++ b/examples/thermostat/qpg/include/CHIPProjectConfig.h @@ -0,0 +1,126 @@ +/* + * + * Copyright (c) 2020 Project CHIP Authors + * Copyright (c) 2019 Google LLC. + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @file + * Example project configuration file for CHIP. + * + * This is a place to put application or project-specific overrides + * to the default configuration values for general CHIP features. + * + */ + +#pragma once + +// For convenience, enable Chip Security Test Mode and disable the requirement for +// authentication in various protocols. +// +// WARNING: These options make it possible to circumvent basic Chip security functionality, +// including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS. +// +#define CHIP_CONFIG_SECURITY_TEST_MODE 0 + +/** + * CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION + * + * A uint32_t identifying the software version running on the device. + */ +#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION +#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION 0x0003 // Can't be removed, needed for OTA file generation. +#endif + +/** + * CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING + * + * A string identifying the software version running on the device. + * CHIP service currently expects the software version to be in the format + * {MAJOR_VERSION}.0d{MINOR_VERSION} + */ +#ifndef CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING +#define CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING "1.1" // Can't be removed, needed for OTA file generation. +#endif + +/** + * CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE + * + * Enable support for Chip-over-BLE (CHIPoBLE). + */ +#define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE 1 + +/** + * @name Interaction Model object pool configuration. + * + * @brief + * The following definitions sets the maximum number of corresponding interaction model object pool size. + * + * * #CHIP_IM_MAX_NUM_COMMAND_HANDLER + * * #CHIP_IM_MAX_REPORTS_IN_FLIGHT + * * #CHIP_IM_MAX_NUM_WRITE_HANDLER + * * #CHIP_IM_MAX_NUM_WRITE_CLIENT + * + * @{ + */ + +/** + * @def CHIP_IM_MAX_NUM_COMMAND_HANDLER + * + * @brief Defines the maximum number of CommandHandler, limits the number of active commands transactions on server. + */ +#define CHIP_IM_MAX_NUM_COMMAND_HANDLER 2 + +/** + * @def CHIP_IM_MAX_REPORTS_IN_FLIGHT + * + * @brief Defines the maximum number of Reports, limits the traffic of read and subscription transactions. + */ +#define CHIP_IM_MAX_REPORTS_IN_FLIGHT 2 + +/** + * @def CHIP_IM_MAX_NUM_WRITE_HANDLER + * + * @brief Defines the maximum number of WriteHandler, limits the number of active write transactions on server. + */ +#define CHIP_IM_MAX_NUM_WRITE_HANDLER 2 + +/** + * @def CHIP_IM_MAX_NUM_WRITE_CLIENT + * + * @brief Defines the maximum number of WriteClient, limits the number of active write transactions on client. + */ +#define CHIP_IM_MAX_NUM_WRITE_CLIENT 2 + +/** + * @def CHIP_DEVICE_CONFIG_ENABLE_SED + * + * @brief Defines if a matter device is acting as a Sleepy End Device(SED) + */ +#ifndef CHIP_DEVICE_CONFIG_ENABLE_SED +#define CHIP_DEVICE_CONFIG_ENABLE_SED 1 +#endif + +/** + * @def CHIP_DEVICE_CONFIG_THREAD_FTD + * + * @brief Defines if a matter device is acting as Full Thread Device (FTD) + */ +#ifndef CHIP_DEVICE_CONFIG_THREAD_FTD +#define CHIP_DEVICE_CONFIG_THREAD_FTD 0 +#endif + +#define CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY 1 diff --git a/examples/thermostat/qpg/include/ThermostaticRadiatorValveManager.h b/examples/thermostat/qpg/include/ThermostaticRadiatorValveManager.h new file mode 100644 index 00000000000000..e39445d836e379 --- /dev/null +++ b/examples/thermostat/qpg/include/ThermostaticRadiatorValveManager.h @@ -0,0 +1,108 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include + +#include + +#include "AppEvent.h" + +#include "FreeRTOS.h" +#include "timers.h" // provides FreeRTOS timer support + +#include + +#include +#include +#include + +class ThermostaticRadiatorValveManager +{ +public: + enum Action_t + { + TRV_OFF_ACTION = 0, + TRV_IDLE_ACTION, + TRV_HEATING_ACTION, + TRV_COOLING_ACTION, + + UNKNOWN_ACTION = 0xFF, + } Action; + + typedef chip::app::Clusters::Thermostat::ControlSequenceOfOperationEnum Operation_t; + typedef chip::app::Clusters::Thermostat::SystemModeEnum SystemMode_t; + typedef chip::app::Clusters::ThermostatUserInterfaceConfiguration::TemperatureDisplayModeEnum TempDisplayMode_t; + + CHIP_ERROR Init(void); + + void SetAction(Action_t action); + + int16_t GetLocalTemperature(void); + void UpdateLocalTemperature(int16_t aLocalTemperature); + uint8_t GetPICoolingDemand(void); + void SetPICoolingDemand(uint8_t aPI); + uint8_t GetPIHeatingDemand(void); + void SetPIHeatingDemand(uint8_t aPI); + + int16_t GetOccupiedCoolingSetpoint(void); + void SetOccupiedCoolingSetpoint(int16_t aSetpoint); + + int16_t GetOccupiedHeatingSetpoint(void); + void SetOccupiedHeatingSetpoint(int16_t aSetpoint); + Operation_t GetControlSequenceOfOperation(void); + void SetControlSequenceOfOperation(Operation_t aOperation); + + SystemMode_t GetSystemMode(void); + void SetSystemMode(SystemMode_t aSystemMode); + + TempDisplayMode_t GetTemperatureDisplayMode(void); + void SetTemperatureDisplayMode(TempDisplayMode_t aMode); + + using ThermostaticRadiatorValveCallback_fn = std::function; + + void SetCallbacks(ThermostaticRadiatorValveCallback_fn aActionInitiated_CB, + ThermostaticRadiatorValveCallback_fn aActionCompleted_CB); + + void StartNormalOperation(void); + void StopNormalOperation(void); + void UpdateThermostaticRadiatorValveStatus(void); + void DisplayTemperature(void); + +private: + friend ThermostaticRadiatorValveManager & ThermostaticRadiatorValveMgr(void); + uint32_t mPeriodicDuration; + Action_t mThermostaticRadiatorValve_action; + + ThermostaticRadiatorValveCallback_fn mActionInitiated_CB; + ThermostaticRadiatorValveCallback_fn mActionCompleted_CB; + + void CancelTimer(void); + void StartTimer(uint32_t aTimeoutMs); + + static ThermostaticRadiatorValveManager sThermostaticRadiatorValve; + static void TimerEventHandler(TimerHandle_t xTimer); + static void PeriodicTimerEventHandler(AppEvent * aEvent); +}; + +inline ThermostaticRadiatorValveManager & ThermostaticRadiatorValveMgr(void) +{ + return ThermostaticRadiatorValveManager::sThermostaticRadiatorValve; +} diff --git a/examples/thermostat/qpg/src/AppTask.cpp b/examples/thermostat/qpg/src/AppTask.cpp new file mode 100644 index 00000000000000..7297541df32d4e --- /dev/null +++ b/examples/thermostat/qpg/src/AppTask.cpp @@ -0,0 +1,520 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "gpSched.h" +#include "qvIO.h" + +#include "AppConfig.h" +#include "AppEvent.h" +#include "AppTask.h" +#include "ota.h" + +#include + +#include +#include +#include +#include + +#include +#include + +#include + +#include "ThermostaticRadiatorValveManager.h" +#include +#include +#include + +using namespace ::chip; +using namespace ::chip::app; +using namespace ::chip::TLV; +using namespace ::chip::Credentials; +using namespace ::chip::DeviceLayer; + +#include + +#define FACTORY_RESET_TRIGGER_TIMEOUT 3000 +#define FACTORY_RESET_CANCEL_WINDOW_TIMEOUT 3000 +#define APP_TASK_STACK_SIZE (2 * 1024) +#define APP_TASK_PRIORITY 2 +#define APP_EVENT_QUEUE_SIZE 10 + +namespace { +TaskHandle_t sAppTaskHandle; +QueueHandle_t sAppEventQueue; + +bool sIsThreadProvisioned = false; +bool sIsThreadEnabled = false; +bool sHaveBLEConnections = false; +bool sIsBLEAdvertisingEnabled = false; + +uint8_t sAppEventQueueBuffer[APP_EVENT_QUEUE_SIZE * sizeof(AppEvent)]; + +StaticQueue_t sAppEventQueueStruct; + +StackType_t appStack[APP_TASK_STACK_SIZE / sizeof(StackType_t)]; +StaticTask_t appTaskStruct; + +chip::DeviceLayer::DeviceInfoProviderImpl gExampleDeviceInfoProvider; +} // namespace + +AppTask AppTask::sAppTask; + +namespace { +constexpr int extDiscTimeoutSecs = 20; +} + +Clusters::Identify::EffectIdentifierEnum sIdentifyEffect = Clusters::Identify::EffectIdentifierEnum::kStopEffect; + +/********************************************************** + * Identify Callbacks + *********************************************************/ + +namespace { +void OnTriggerIdentifyEffectCompleted(chip::System::Layer * systemLayer, void * appState) +{ + sIdentifyEffect = Clusters::Identify::EffectIdentifierEnum::kStopEffect; +} +} // namespace + +void OnTriggerIdentifyEffect(Identify * identify) +{ + sIdentifyEffect = identify->mCurrentEffectIdentifier; + + if (identify->mEffectVariant != Clusters::Identify::EffectVariantEnum::kDefault) + { + ChipLogDetail(AppServer, "Identify Effect Variant unsupported. Using default"); + } + + switch (sIdentifyEffect) + { + case Clusters::Identify::EffectIdentifierEnum::kBlink: + case Clusters::Identify::EffectIdentifierEnum::kBreathe: + case Clusters::Identify::EffectIdentifierEnum::kOkay: + case Clusters::Identify::EffectIdentifierEnum::kChannelChange: + SystemLayer().ScheduleLambda([identify] { + (void) chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds16(5), OnTriggerIdentifyEffectCompleted, + identify); + }); + break; + case Clusters::Identify::EffectIdentifierEnum::kFinishEffect: + SystemLayer().ScheduleLambda([identify] { + (void) chip::DeviceLayer::SystemLayer().CancelTimer(OnTriggerIdentifyEffectCompleted, identify); + (void) chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Seconds16(1), OnTriggerIdentifyEffectCompleted, + identify); + }); + break; + case Clusters::Identify::EffectIdentifierEnum::kStopEffect: + SystemLayer().ScheduleLambda( + [identify] { (void) chip::DeviceLayer::SystemLayer().CancelTimer(OnTriggerIdentifyEffectCompleted, identify); }); + sIdentifyEffect = Clusters::Identify::EffectIdentifierEnum::kStopEffect; + break; + default: + ChipLogProgress(Zcl, "No identifier effect"); + } +} + +Identify gIdentify = { + chip::EndpointId{ 1 }, + [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStart"); }, + [](Identify *) { ChipLogProgress(Zcl, "onIdentifyStop"); }, + Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator, + OnTriggerIdentifyEffect, +}; + +void LockOpenThreadTask(void) +{ + chip::DeviceLayer::ThreadStackMgr().LockThreadStack(); +} + +void UnlockOpenThreadTask(void) +{ + chip::DeviceLayer::ThreadStackMgr().UnlockThreadStack(); +} + +CHIP_ERROR AppTask::StartAppTask() +{ + sAppEventQueue = xQueueCreateStatic(APP_EVENT_QUEUE_SIZE, sizeof(AppEvent), sAppEventQueueBuffer, &sAppEventQueueStruct); + if (sAppEventQueue == nullptr) + { + ChipLogError(NotSpecified, "Failed to allocate app event queue"); + return CHIP_ERROR_NO_MEMORY; + } + + // Start App task. + sAppTaskHandle = xTaskCreateStatic(AppTaskMain, APP_TASK_NAME, ArraySize(appStack), nullptr, 1, appStack, &appTaskStruct); + if (sAppTaskHandle == nullptr) + { + return CHIP_ERROR_NO_MEMORY; + } + + return CHIP_NO_ERROR; +} + +void AppTask::InitServer(intptr_t arg) +{ + static chip::CommonCaseDeviceServerInitParams initParams; + (void) initParams.InitializeStaticResourcesBeforeServerInit(); + + gExampleDeviceInfoProvider.SetStorageDelegate(initParams.persistentStorageDelegate); + chip::DeviceLayer::SetDeviceInfoProvider(&gExampleDeviceInfoProvider); + + chip::Inet::EndPointStateOpenThread::OpenThreadEndpointInitParam nativeParams; + nativeParams.lockCb = LockOpenThreadTask; + nativeParams.unlockCb = UnlockOpenThreadTask; + nativeParams.openThreadInstancePtr = chip::DeviceLayer::ThreadStackMgrImpl().OTInstance(); + initParams.endpointNativeParams = static_cast(&nativeParams); + + chip::Server::GetInstance().Init(initParams); + +#if CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY + chip::app::DnssdServer::Instance().SetExtendedDiscoveryTimeoutSecs(extDiscTimeoutSecs); +#endif +} + +void AppTask::OpenCommissioning(intptr_t arg) +{ + // Enable BLE advertisements + chip::Server::GetInstance().GetCommissioningWindowManager().OpenBasicCommissioningWindow(); + ChipLogProgress(NotSpecified, "BLE advertising started. Waiting for Pairing."); +} + +CHIP_ERROR AppTask::Init() +{ + CHIP_ERROR err = CHIP_NO_ERROR; + + PlatformMgr().AddEventHandler(MatterEventHandler, 0); + + ChipLogProgress(NotSpecified, "Current Software Version: %s", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING); + + // Init ZCL Data Model and start server + PlatformMgr().ScheduleWork(InitServer, 0); + + // Initialize device attestation config + ReturnErrorOnFailure(mFactoryDataProvider.Init()); + SetDeviceInstanceInfoProvider(&mFactoryDataProvider); + SetCommissionableDataProvider(&mFactoryDataProvider); + + SetDeviceAttestationCredentialsProvider(&mFactoryDataProvider); + + err = ThermostaticRadiatorValveMgr().Init(); + if (err != CHIP_NO_ERROR) + { + ChipLogError(NotSpecified, "ThermostaticRadiatorValveMgr().Init() failed"); + return err; + } + + // Setup button handler + qvIO_SetBtnCallback(ButtonEventHandler); + + // Log device configuration + ConfigurationMgr().LogDeviceConfig(); + PrintOnboardingCodes(chip::RendezvousInformationFlags(chip::RendezvousInformationFlag::kBLE)); + + sIsThreadProvisioned = ConnectivityMgr().IsThreadProvisioned(); + sIsThreadEnabled = ConnectivityMgr().IsThreadEnabled(); + sHaveBLEConnections = (ConnectivityMgr().NumBLEConnections() != 0); + sIsBLEAdvertisingEnabled = ConnectivityMgr().IsBLEAdvertisingEnabled(); + UpdateLEDs(); + + return err; +} + +void AppTask::AppTaskMain(void * pvParameter) +{ + AppEvent event; + + while (true) + { + BaseType_t eventReceived = xQueueReceive(sAppEventQueue, &event, portMAX_DELAY); + while (eventReceived == pdTRUE) + { + sAppTask.DispatchEvent(&event); + eventReceived = xQueueReceive(sAppEventQueue, &event, 0); + } + } +} + +void AppTask::ButtonEventHandler(uint8_t btnIdx, bool btnPressed) +{ + ChipLogProgress(NotSpecified, "ButtonEventHandler %d, %d", btnIdx, btnPressed); + + AppEvent button_event = {}; + button_event.Type = AppEvent::kEventType_Button; + button_event.ButtonEvent.ButtonIdx = btnIdx; + button_event.ButtonEvent.Action = btnPressed; + + switch (btnIdx) + { + case APP_READ_TEMPERATURE_BUTTON: { + + if (btnPressed) + { + ThermostaticRadiatorValveManager::TempDisplayMode_t value = ThermostaticRadiatorValveMgr().GetTemperatureDisplayMode(); + + if (value != ThermostaticRadiatorValveManager::TempDisplayMode_t::kUnknownEnumValue) + { + // toggle the value + value = (value == ThermostaticRadiatorValveManager::TempDisplayMode_t::kCelsius) + ? ThermostaticRadiatorValveManager::TempDisplayMode_t::kFahrenheit + : ThermostaticRadiatorValveManager::TempDisplayMode_t::kCelsius; + } + + ThermostaticRadiatorValveMgr().SetTemperatureDisplayMode(value); // update the attribute + ThermostaticRadiatorValveMgr().DisplayTemperature(); + } + break; + } + case APP_COMMISSION_BUTTON: { + // Open commissioning after button pressed if no fabric was available + if (chip::Server::GetInstance().GetFabricTable().FabricCount() == 0) + { + PlatformMgr().ScheduleWork(OpenCommissioning, 0); + } + break; + } + case APP_FUNCTION5_BUTTON: { + /* In this example, this button is for triggering OTA or factory reset*/ + button_event.Handler = FunctionHandler; + break; + } + default: { + // invalid button + return; + } + } + + sAppTask.PostEvent(&button_event); +} + +void AppTask::TimerEventHandler(chip::System::Layer * aLayer, void * aAppState) +{ + AppEvent event; + event.Type = AppEvent::kEventType_Timer; + event.TimerEvent.Context = aAppState; + event.Handler = FunctionTimerEventHandler; + sAppTask.PostEvent(&event); +} + +void AppTask::FunctionTimerEventHandler(AppEvent * aEvent) +{ + if (aEvent->Type != AppEvent::kEventType_Timer) + { + return; + } + + // If we reached here, the button was held past FACTORY_RESET_TRIGGER_TIMEOUT, + // initiate factory reset + if (sAppTask.mFunctionTimerActive && sAppTask.mFunction == kFunction_SoftwareUpdate) + { + ChipLogProgress(NotSpecified, "[BTN] Factory Reset selected. Release within %us to cancel.", + FACTORY_RESET_CANCEL_WINDOW_TIMEOUT / 1000); + + // Start timer for FACTORY_RESET_CANCEL_WINDOW_TIMEOUT to allow user to + // cancel, if required. + sAppTask.StartTimer(FACTORY_RESET_CANCEL_WINDOW_TIMEOUT); + + sAppTask.mFunction = kFunction_FactoryReset; + + // Turn off all LEDs before starting blink to make sure blink is + // co-ordinated. + qvIO_LedSet(SYSTEM_STATE_LED, false); + + qvIO_LedBlink(SYSTEM_STATE_LED, 500, 500); + } + else if (sAppTask.mFunctionTimerActive && sAppTask.mFunction == kFunction_FactoryReset) + { + // Actually trigger Factory Reset + sAppTask.mFunction = kFunction_NoneSelected; + chip::Server::GetInstance().ScheduleFactoryReset(); + } +} + +void AppTask::FunctionHandler(AppEvent * aEvent) +{ + if (aEvent->ButtonEvent.ButtonIdx != APP_FUNCTION5_BUTTON) + { + return; + } + + // To trigger software update: press the APP_FUNCTION_BUTTON button briefly (< + // FACTORY_RESET_TRIGGER_TIMEOUT) To initiate factory reset: press the + // APP_FUNCTION_BUTTON for FACTORY_RESET_TRIGGER_TIMEOUT + + // FACTORY_RESET_CANCEL_WINDOW_TIMEOUT All LEDs start blinking after + // FACTORY_RESET_TRIGGER_TIMEOUT to signal factory reset has been initiated. + // To cancel factory reset: release the APP_FUNCTION_BUTTON once all LEDs + // start blinking within the FACTORY_RESET_CANCEL_WINDOW_TIMEOUT + if (aEvent->ButtonEvent.Action == true) + { + if (!sAppTask.mFunctionTimerActive && sAppTask.mFunction == kFunction_NoneSelected) + { + ChipLogProgress(NotSpecified, "[BTN] Hold to select function:"); + ChipLogProgress(NotSpecified, "[BTN] - Trigger OTA (0-3s)"); + ChipLogProgress(NotSpecified, "[BTN] - Factory Reset (>6s)"); + + sAppTask.StartTimer(FACTORY_RESET_TRIGGER_TIMEOUT); + + sAppTask.mFunction = kFunction_SoftwareUpdate; + } + } + else + { + // If the button was released before factory reset got initiated, trigger a + // software update. + if (sAppTask.mFunctionTimerActive && sAppTask.mFunction == kFunction_SoftwareUpdate) + { + sAppTask.CancelTimer(); + + sAppTask.mFunction = kFunction_NoneSelected; + + ChipLogProgress(NotSpecified, "[BTN] Triggering OTA Query"); + + TriggerOTAQuery(); + } + else if (sAppTask.mFunctionTimerActive && sAppTask.mFunction == kFunction_FactoryReset) + { + sAppTask.CancelTimer(); + + // Change the function to none selected since factory reset has been + // canceled. + sAppTask.mFunction = kFunction_NoneSelected; + + ChipLogProgress(NotSpecified, "[BTN] Factory Reset has been Canceled"); + } + } +} + +void AppTask::CancelTimer() +{ + chip::DeviceLayer::SystemLayer().CancelTimer(TimerEventHandler, this); + mFunctionTimerActive = false; +} + +void AppTask::StartTimer(uint32_t aTimeoutInMs) +{ + CHIP_ERROR err; + + chip::DeviceLayer::SystemLayer().CancelTimer(TimerEventHandler, this); + err = chip::DeviceLayer::SystemLayer().StartTimer(chip::System::Clock::Milliseconds32(aTimeoutInMs), TimerEventHandler, this); + SuccessOrExit(err); + + mFunctionTimerActive = true; +exit: + if (err != CHIP_NO_ERROR) + { + ChipLogError(NotSpecified, "StartTimer failed %s: ", chip::ErrorStr(err)); + } +} + +void AppTask::PostEvent(const AppEvent * aEvent) +{ + if (sAppEventQueue != NULL) + { + if (!xQueueSend(sAppEventQueue, aEvent, 1)) + { + ChipLogError(NotSpecified, "Failed to post event to app task event queue"); + } + } + else + { + ChipLogError(NotSpecified, "Event Queue is NULL should never happen"); + } +} + +void AppTask::DispatchEvent(AppEvent * aEvent) +{ + if (aEvent->Handler) + { + aEvent->Handler(aEvent); + } + else + { + ChipLogError(NotSpecified, "Event received with no handler. Dropping event."); + } +} + +void AppTask::UpdateLEDs(void) +{ + // If system has "full connectivity", keep the LED On constantly. + // + // If thread and service provisioned, but not attached to the thread network + // yet OR no connectivity to the service OR subscriptions are not fully + // established THEN blink the LED Off for a short period of time. + // + // If the system has ble connection(s) uptill the stage above, THEN blink + // the LEDs at an even rate of 100ms. + // + // Otherwise, blink the LED ON for a very short time. + if (sIsThreadProvisioned && sIsThreadEnabled) + { + qvIO_LedSet(SYSTEM_STATE_LED, true); + } + else if (sHaveBLEConnections) + { + qvIO_LedBlink(SYSTEM_STATE_LED, 100, 100); + } + else if (sIsBLEAdvertisingEnabled) + { + qvIO_LedBlink(SYSTEM_STATE_LED, 50, 50); + } + else + { + // not commissioned yet + qvIO_LedBlink(SYSTEM_STATE_LED, 50, 950); + } +} + +void AppTask::MatterEventHandler(const ChipDeviceEvent * event, intptr_t) +{ + switch (event->Type) + { + case DeviceEventType::kServiceProvisioningChange: { + sIsThreadProvisioned = event->ServiceProvisioningChange.IsServiceProvisioned; + UpdateLEDs(); + break; + } + + case DeviceEventType::kThreadConnectivityChange: { + sIsThreadEnabled = (event->ThreadConnectivityChange.Result == kConnectivity_Established); + UpdateLEDs(); + break; + } + + case DeviceEventType::kCHIPoBLEConnectionEstablished: { + sHaveBLEConnections = true; + UpdateLEDs(); + break; + } + + case DeviceEventType::kCHIPoBLEConnectionClosed: { + sHaveBLEConnections = false; + UpdateLEDs(); + break; + } + + case DeviceEventType::kCHIPoBLEAdvertisingChange: { + sIsBLEAdvertisingEnabled = (event->CHIPoBLEAdvertisingChange.Result == kActivity_Started); + UpdateLEDs(); + break; + } + + default: + break; + } +} diff --git a/examples/thermostat/qpg/src/ThermostaticRadiatorValveManager.cpp b/examples/thermostat/qpg/src/ThermostaticRadiatorValveManager.cpp new file mode 100644 index 00000000000000..f8f2c348cc2558 --- /dev/null +++ b/examples/thermostat/qpg/src/ThermostaticRadiatorValveManager.cpp @@ -0,0 +1,457 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * Copyright (c) 2019 Google LLC. + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "ThermostaticRadiatorValveManager.h" +#include "qvIO.h" +#include + +#include "AppConfig.h" +#include "AppTask.h" +#include "app/util/common.h" +#include +#include + +#include "gpSched.h" + +ThermostaticRadiatorValveManager ThermostaticRadiatorValveManager::sThermostaticRadiatorValve; +using namespace chip; +using namespace chip::app::Clusters; +using namespace chip::DeviceLayer; + +TimerHandle_t sThermostaticRadiatorValveTimer; + +#if defined(CHIP_CONFIG_FREERTOS_USE_STATIC_TASK) && CHIP_CONFIG_FREERTOS_USE_STATIC_TASK +StaticTimer_t sThermostaticRadiatorValveTimerBuffer; +#endif + +#define DEGREE_FAHRENHEIT_CONVERSION(x) (int) ((float) x * 1.8) + 3200 // in unit of 0.01 + +#define DURATION_1SECOND 1000 // 1000 mseconds +#define DURATION_1MIN 60 * DURATION_1SECOND +#define TRV_MEASUREMENT_PERIOD DURATION_1MIN + +#define ONE_SECOND_US 1000000UL +#define QPG_THERMOSTATIC_ENDPOINT_ID (1) + +static void DelayInit(void) +{ + // measure temperature for the first time + qvIO_MeasureTemperature(); + + // start operation + ThermostaticRadiatorValveMgr().StartNormalOperation(); + + ThermostaticRadiatorValveMgr().SetAction(ThermostaticRadiatorValveManager::TRV_OFF_ACTION); +} + +CHIP_ERROR ThermostaticRadiatorValveManager::Init() +{ + ChipLogProgress(NotSpecified, "ThermostaticRadiatorValve init"); +#if defined(CHIP_CONFIG_FREERTOS_USE_STATIC_TASK) && CHIP_CONFIG_FREERTOS_USE_STATIC_TASK + sThermostaticRadiatorValveTimer = + xTimerCreateStatic("ThermostaticRadiatorValveTmr", // Just a text name, not used by the RTOS kernel + TRV_MEASUREMENT_PERIOD, // == default timer period (mS) + true, // with timer reload (==periodic timer) + (void *) this, // init timer id = ble obj context + TimerEventHandler, // timer callback handler + &sThermostaticRadiatorValveTimerBuffer // static buffer for timer + + ); +#else + // Create FreeRTOS sw timer for ThermostaticRadiatorValve timer. + sThermostaticRadiatorValveTimer = xTimerCreate("ThermostaticRadiatorValveTmr", // Just a text name, not used by the RTOS kernel + TRV_MEASUREMENT_PERIOD, // == default timer period (mS) + true, // with timer reload (==periodic timer) + (void *) this, // init timer id = lock obj context + TimerEventHandler // timer callback handler + ); +#endif + if (sThermostaticRadiatorValveTimer == NULL) + { + ChipLogProgress(NotSpecified, "sThermostaticRadiatorValveTimer timer create failed"); + return APP_ERROR_CREATE_TIMER_FAILED; + } + + // initiate temperature sensor here + qvIO_TemperatureMeasurementInit(); + + gpSched_ScheduleEvent(ONE_SECOND_US, DelayInit); + + return CHIP_NO_ERROR; +} + +void ThermostaticRadiatorValveManager::SetAction(Action_t action) +{ + mThermostaticRadiatorValve_action = action; +} + +void ThermostaticRadiatorValveManager::StartNormalOperation(void) +{ + // start periodic timer + if (mThermostaticRadiatorValve_action == TRV_OFF_ACTION) + { + ChipLogProgress(NotSpecified, "Start Normal Operation"); + // update ThermostaticRadiatorValve status right away and start timer + UpdateThermostaticRadiatorValveStatus(); + + // set timer period + mPeriodicDuration = TRV_MEASUREMENT_PERIOD; + + // start timer + StartTimer(mPeriodicDuration); + } +} + +void ThermostaticRadiatorValveManager::StopNormalOperation(void) +{ + if (mThermostaticRadiatorValve_action > TRV_OFF_ACTION) + { + ChipLogError(NotSpecified, "Stop Normal Operation"); + CancelTimer(); + + // set the action to OFF + mThermostaticRadiatorValve_action = TRV_OFF_ACTION; + } +} + +void ThermostaticRadiatorValveManager::StartTimer(uint32_t aTimeoutMs) +{ + ChipLogProgress(NotSpecified, "ThermostaticRadiatorValveTimer start timer with %lu", aTimeoutMs); + + if (xTimerIsTimerActive(sThermostaticRadiatorValveTimer)) + { + ChipLogError(NotSpecified, "app timer already started!"); + CancelTimer(); + } + + // timer is not active, change its period to required value (== restart). + // FreeRTOS- Block for a maximum of 100 ticks if the change period command + // cannot immediately be sent to the timer command queue. + if (xTimerChangePeriod(sThermostaticRadiatorValveTimer, (aTimeoutMs / portTICK_PERIOD_MS), 100) != pdPASS) + { + ChipLogError(NotSpecified, "sThermostaticRadiatorValveTimer timer start() failed"); + } +} + +void ThermostaticRadiatorValveManager::CancelTimer(void) +{ + if (xTimerStop(sThermostaticRadiatorValveTimer, 0) == pdFAIL) + { + ChipLogError(NotSpecified, "Lock timer timer stop() failed"); + // appError(APP_ERROR_STOP_TIMER_FAILED); + } +} + +/* Timer event handler*/ +void ThermostaticRadiatorValveManager::TimerEventHandler(TimerHandle_t xTimer) +{ + // Get ThermostaticRadiatorValve obj context from timer id. + ThermostaticRadiatorValveManager * thermostaticRadiatorValve = + static_cast(pvTimerGetTimerID(xTimer)); + + // The timer event handler will be called in the context of the timer task + // once sThermostaticRadiatorValveTimer expires. Post an event to apptask queue with the actual handler + // so that the event can be handled in the context of the apptask. + AppEvent event; + event.Type = AppEvent::kEventType_Timer; + event.TimerEvent.Context = thermostaticRadiatorValve; + event.Handler = PeriodicTimerEventHandler; + + GetAppTask().PostEvent(&event); +} + +/* periodic event handler */ +void ThermostaticRadiatorValveManager::PeriodicTimerEventHandler(AppEvent * aEvent) +{ + ThermostaticRadiatorValveManager * thermostaticRadiatorValve = + static_cast(aEvent->TimerEvent.Context); + ChipLogProgress(NotSpecified, "PeriodicTimerEventHandler"); + + // periodically check the temperature and update thermostaticRadiatorValve status + thermostaticRadiatorValve->UpdateThermostaticRadiatorValveStatus(); +} + +/* Read local temperature from temperature sensor */ +int16_t ThermostaticRadiatorValveManager::GetLocalTemperature() +{ + int temp = 0; + + // measure temperature through ADC peripheral + qvIO_GetTemperatureValue(&temp); + + /* ADC module will be resume after SDP012-576*/ + // measure temperature through ADC peripheral + // ADC_GetTemperatureValue(&temp); + + ChipLogProgress(NotSpecified, "GetLocalTemperature (0.01 degC) - %d", temp); + + return (int16_t) temp; +} + +/* Update the status of thermostaticRadiatorValve according to the existing attributes configuration and temperature */ +void ThermostaticRadiatorValveManager::UpdateThermostaticRadiatorValveStatus(void) +{ + + int16_t localTemperature; + int16_t heatingSetpoint; + int16_t coolingSetpoint; + ThermostaticRadiatorValveManager::SystemMode_t systemMode; + + ChipLogProgress(NotSpecified, "UpdateThermostaticRadiatorValveStatus"); + mThermostaticRadiatorValve_action = TRV_IDLE_ACTION; + + // read temperature value and attributes + localTemperature = GetLocalTemperature(); + heatingSetpoint = GetOccupiedHeatingSetpoint(); + coolingSetpoint = GetOccupiedCoolingSetpoint(); + systemMode = GetSystemMode(); + + // check for the suitable action + // Heat or Auto mode - start heating if temperature < heating setpoint + // Cool or Auto mode - start cooling if temperature > cooling setpoint + if (localTemperature < heatingSetpoint) + { + if ((systemMode == SystemMode_t::kAuto) || (systemMode == SystemMode_t::kHeat)) + { + // Example only - simply set the PI value to the different between local temperature and setpoint + float delta = (float) (heatingSetpoint - localTemperature); + float pi; + + pi = delta / heatingSetpoint * 100; + SetPIHeatingDemand((uint8_t) pi); + // configure LED + qvIO_LedSet(SYSTEM_OPERATING_LED, true); + // update the state + mThermostaticRadiatorValve_action = TRV_HEATING_ACTION; + } + } + else if (localTemperature > coolingSetpoint) + { + if ((systemMode == SystemMode_t::kAuto) || (systemMode == SystemMode_t::kCool)) + { + // Example only - simply set the PI value to the different between local temperature and setpoint + float delta = (float) (localTemperature - coolingSetpoint); + float pi; + + pi = delta / coolingSetpoint * 100; + SetPICoolingDemand((uint8_t) pi); + + // configure LED + qvIO_LedSet(SYSTEM_OPERATING_LED, true); + // update the state + mThermostaticRadiatorValve_action = TRV_COOLING_ACTION; + } + } + + if (mThermostaticRadiatorValve_action == TRV_IDLE_ACTION) + { + // no heating/cooling + SetPICoolingDemand((uint8_t) 0); + SetPIHeatingDemand((uint8_t) 0); + + qvIO_LedSet(SYSTEM_OPERATING_LED, false); + } + + UpdateLocalTemperature(localTemperature); +} + +void ThermostaticRadiatorValveManager::DisplayTemperature(void) +{ +// Display the temperature using logging +#ifdef GP_DIVERSITY_LOG + int localTemperature; + ThermostaticRadiatorValveManager::TempDisplayMode_t displaymode; + + ChipLogProgress(NotSpecified, "DisplayTemperature"); + + localTemperature = GetLocalTemperature(); + displaymode = GetTemperatureDisplayMode(); + + if (displaymode == ThermostaticRadiatorValveManager::TempDisplayMode_t::kFahrenheit) + { + localTemperature = DEGREE_FAHRENHEIT_CONVERSION(localTemperature); + ChipLogProgress(NotSpecified, "Temperature is %d.%02d degF", localTemperature / 100, localTemperature % 100); + } + else + { + ChipLogProgress(NotSpecified, "Temperature is %d.%02d degC", localTemperature / 100, localTemperature % 100); + } + +#endif +} + +/*================================================== + Handling ThermostaticRadiatorValve cluster attributes +==================================================*/ + +void ThermostaticRadiatorValveManager::UpdateLocalTemperature(int16_t aLocalTemperature) +{ + SystemLayer().ScheduleLambda([aLocalTemperature] { + ChipLogProgress(NotSpecified, "UpdateLocalTemperature with value (0.01 degC) %u", aLocalTemperature); + if (EMBER_ZCL_STATUS_SUCCESS != + Thermostat::Attributes::LocalTemperature::Set(QPG_THERMOSTATIC_ENDPOINT_ID, aLocalTemperature)) + { + ChipLogProgress(NotSpecified, "UpdateLocalTemperature failure"); + } + }); +} + +uint8_t ThermostaticRadiatorValveManager::GetPICoolingDemand(void) +{ + uint8_t value; + + Thermostat::Attributes::PICoolingDemand::Get(QPG_THERMOSTATIC_ENDPOINT_ID, &value); + + ChipLogError(NotSpecified, "GetPICoolingDemand - %d", value); + return value; +} + +void ThermostaticRadiatorValveManager::SetPICoolingDemand(uint8_t aPI) +{ + SystemLayer().ScheduleLambda([aPI] { + Thermostat::Attributes::PICoolingDemand::Set(QPG_THERMOSTATIC_ENDPOINT_ID, aPI); + ChipLogError(NotSpecified, "SetPICoolingDemand - %d", aPI); + }); +} + +uint8_t ThermostaticRadiatorValveManager::GetPIHeatingDemand(void) +{ + uint8_t value; + + Thermostat::Attributes::PIHeatingDemand::Get(QPG_THERMOSTATIC_ENDPOINT_ID, &value); + + ChipLogError(NotSpecified, "GetPIHeatingDemand - %d", value); + return value; +} + +void ThermostaticRadiatorValveManager::SetPIHeatingDemand(uint8_t aPI) +{ + SystemLayer().ScheduleLambda([aPI] { + Thermostat::Attributes::PIHeatingDemand::Set(QPG_THERMOSTATIC_ENDPOINT_ID, aPI); + ChipLogError(NotSpecified, "SetPIHeatingDemand - %d", aPI); + }); +} + +int16_t ThermostaticRadiatorValveManager::GetOccupiedCoolingSetpoint(void) +{ + int16_t value; + + Thermostat::Attributes::OccupiedCoolingSetpoint::Get(QPG_THERMOSTATIC_ENDPOINT_ID, &value); + + ChipLogError(NotSpecified, "GetOccupiedCoolingSetpoint (0.01 degC) - %d", value); + + return value; +} + +void ThermostaticRadiatorValveManager::SetOccupiedCoolingSetpoint(int16_t aSetpoint) +{ + SystemLayer().ScheduleLambda([aSetpoint] { + Thermostat::Attributes::OccupiedCoolingSetpoint::Set(QPG_THERMOSTATIC_ENDPOINT_ID, aSetpoint); + + ChipLogError(NotSpecified, "SetOccupiedCoolingSetpoint - %d", aSetpoint); + }); +} + +int16_t ThermostaticRadiatorValveManager::GetOccupiedHeatingSetpoint(void) +{ + int16_t value; + + Thermostat::Attributes::OccupiedHeatingSetpoint::Get(QPG_THERMOSTATIC_ENDPOINT_ID, &value); + + ChipLogError(NotSpecified, "GetOccupiedHeatingSetpoint (0.01 degC) - %d", value); + + return value; +} + +void ThermostaticRadiatorValveManager::SetOccupiedHeatingSetpoint(int16_t aSetpoint) +{ + SystemLayer().ScheduleLambda([aSetpoint] { + Thermostat::Attributes::OccupiedHeatingSetpoint::Set(QPG_THERMOSTATIC_ENDPOINT_ID, aSetpoint); + + ChipLogError(NotSpecified, "SetOccupiedHeatingSetpoint - status %d", aSetpoint); + }); +} + +ThermostaticRadiatorValveManager::Operation_t ThermostaticRadiatorValveManager::GetControlSequenceOfOperation(void) +{ + ThermostaticRadiatorValveManager::Operation_t value; + + Thermostat::Attributes::ControlSequenceOfOperation::Get(QPG_THERMOSTATIC_ENDPOINT_ID, &value); + + ChipLogError(NotSpecified, "GetControlSequenceOfOperation - %d", (uint8_t) value); + + return value; +} + +void ThermostaticRadiatorValveManager::SetControlSequenceOfOperation(ThermostaticRadiatorValveManager::Operation_t aOperation) +{ + SystemLayer().ScheduleLambda([aOperation] { + Thermostat::Attributes::ControlSequenceOfOperation::Set(QPG_THERMOSTATIC_ENDPOINT_ID, aOperation); + + ChipLogError(NotSpecified, "SetControlSequenceOfOperation value %d", (int) aOperation); + }); +} + +ThermostaticRadiatorValveManager::SystemMode_t ThermostaticRadiatorValveManager::GetSystemMode(void) +{ + chip::app::Clusters::Thermostat::SystemModeEnum value; + + Thermostat::Attributes::SystemMode::Get(QPG_THERMOSTATIC_ENDPOINT_ID, &value); + + ChipLogError(NotSpecified, "GetSystemMode - %d", (uint8_t) value); + + return (ThermostaticRadiatorValveManager::SystemMode_t) value; +} + +void ThermostaticRadiatorValveManager::SetSystemMode(ThermostaticRadiatorValveManager::SystemMode_t aSystemMode) +{ + SystemLayer().ScheduleLambda([aSystemMode] { + Thermostat::Attributes::SystemMode::Set(QPG_THERMOSTATIC_ENDPOINT_ID, aSystemMode); + + ChipLogError(NotSpecified, "SetSystemMode value %d", (uint8_t) aSystemMode); + }); +} + +ThermostaticRadiatorValveManager::TempDisplayMode_t ThermostaticRadiatorValveManager::GetTemperatureDisplayMode(void) +{ + ThermostaticRadiatorValveManager::TempDisplayMode_t value; + + ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::Get(QPG_THERMOSTATIC_ENDPOINT_ID, &value); + + ChipLogError(NotSpecified, "GetTemperatureDisplayMode - %d", (uint8_t) value); + + return value; +} + +void ThermostaticRadiatorValveManager::SetTemperatureDisplayMode(ThermostaticRadiatorValveManager::TempDisplayMode_t aMode) +{ + SystemLayer().ScheduleLambda([aMode] { + ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::Set(QPG_THERMOSTATIC_ENDPOINT_ID, aMode); + + ChipLogError(NotSpecified, "SetTemperatureDisplayMode value %d", (uint8_t) aMode); + }); +} + +// Reserved for future use +void ThermostaticRadiatorValveManager::SetCallbacks(ThermostaticRadiatorValveCallback_fn aActionInitiated_CB, + ThermostaticRadiatorValveCallback_fn aActionCompleted_CB) +{ + mActionInitiated_CB = aActionInitiated_CB; + mActionCompleted_CB = aActionCompleted_CB; +} diff --git a/examples/thermostat/qpg/src/ZclCallbacks.cpp b/examples/thermostat/qpg/src/ZclCallbacks.cpp new file mode 100644 index 00000000000000..4551a0d0bedb2f --- /dev/null +++ b/examples/thermostat/qpg/src/ZclCallbacks.cpp @@ -0,0 +1,67 @@ +/* + * + * Copyright (c) 2021 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include + +#include "AppTask.h" +#include "ThermostaticRadiatorValveManager.h" + +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +using namespace ::chip; +using namespace chip::app::Clusters; + +void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size, + uint8_t * value) +{ + ClusterId clusterId = attributePath.mClusterId; + AttributeId attributeId = attributePath.mAttributeId; + + if (clusterId == ThermostatUserInterfaceConfiguration::Id) + { + if (attributeId == ThermostatUserInterfaceConfiguration::Attributes::TemperatureDisplayMode::Id) + { + ChipLogProgress(Zcl, " set TemperatureDisplayMode: %u", *value); + // check the output temperature accordingly + ThermostaticRadiatorValveMgr().DisplayTemperature(); + } + } +} + +void emberAfThermostatClusterInitCallback(EndpointId endpoint) +{ + + // Temp. code for testing purpose, need to be updated + const auto logOnFailure = [](EmberAfStatus status, const char * attributeName) { + if (status != EMBER_ZCL_STATUS_SUCCESS) + { + ChipLogError(Zcl, "Failed to set DoorLock %s: %x", attributeName, status); + } + }; + + logOnFailure(Thermostat::Attributes::FeatureMap::Set(endpoint, 0x23), "feature map"); +} diff --git a/examples/thermostat/qpg/third_party/connectedhomeip b/examples/thermostat/qpg/third_party/connectedhomeip new file mode 120000 index 00000000000000..c866b86874994d --- /dev/null +++ b/examples/thermostat/qpg/third_party/connectedhomeip @@ -0,0 +1 @@ +../../../.. \ No newline at end of file diff --git a/examples/thermostat/qpg/with_pw_rpc.gni b/examples/thermostat/qpg/with_pw_rpc.gni new file mode 100644 index 00000000000000..6f195eee957169 --- /dev/null +++ b/examples/thermostat/qpg/with_pw_rpc.gni @@ -0,0 +1,24 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# add this gni as import in your build args to use pigweed in the example +# 'import("//with_pw_rpc.gni")' + +import("//build_overrides/chip.gni") +import("${chip_root}/config/qpg/lib/pw_rpc/pw_rpc.gni") +import("${chip_root}/examples/platform/qpg/args.gni") + +qpg_sdk_target = get_label_info(":sdk", "label_no_toolchain") + +chip_enable_pw_rpc = true diff --git a/examples/thermostat/qpg/zap/BUILD.gn b/examples/thermostat/qpg/zap/BUILD.gn new file mode 100644 index 00000000000000..38074c904f32eb --- /dev/null +++ b/examples/thermostat/qpg/zap/BUILD.gn @@ -0,0 +1,24 @@ +# Copyright (c) 2022 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/chip.gni") +import("${chip_root}/src/app/chip_data_model.gni") + +chip_data_model("zap") { + zap_file = "thermostaticRadiatorValve.zap" + + zap_pregenerated_dir = + "${chip_root}/zzz_generated/thermostat/qpg/zap-generated" + is_server = true +} diff --git a/examples/thermostat/qpg/zap/thermostaticRadiatorValve.matter b/examples/thermostat/qpg/zap/thermostaticRadiatorValve.matter new file mode 100644 index 00000000000000..06285dfbaebaa7 --- /dev/null +++ b/examples/thermostat/qpg/zap/thermostaticRadiatorValve.matter @@ -0,0 +1,2151 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ +cluster Identify = 3 { + revision 4; + + enum EffectIdentifierEnum : enum8 { + kBlink = 0; + kBreathe = 1; + kOkay = 2; + kChannelChange = 11; + kFinishEffect = 254; + kStopEffect = 255; + } + + enum EffectVariantEnum : enum8 { + kDefault = 0; + } + + enum IdentifyTypeEnum : enum8 { + kNone = 0; + kLightOutput = 1; + kVisibleIndicator = 2; + kAudibleBeep = 3; + kDisplay = 4; + kActuator = 5; + } + + attribute int16u identifyTime = 0; + readonly attribute IdentifyTypeEnum identifyType = 1; + 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 IdentifyRequest { + int16u identifyTime = 0; + } + + request struct TriggerEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; + } + + /** Command description for Identify */ + command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; +} + +/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ +cluster Identify = 3 { + revision 4; + + enum EffectIdentifierEnum : enum8 { + kBlink = 0; + kBreathe = 1; + kOkay = 2; + kChannelChange = 11; + kFinishEffect = 254; + kStopEffect = 255; + } + + enum EffectVariantEnum : enum8 { + kDefault = 0; + } + + enum IdentifyTypeEnum : enum8 { + kNone = 0; + kLightOutput = 1; + kVisibleIndicator = 2; + kAudibleBeep = 3; + kDisplay = 4; + kActuator = 5; + } + + attribute int16u identifyTime = 0; + readonly attribute IdentifyTypeEnum identifyType = 1; + 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 IdentifyRequest { + int16u identifyTime = 0; + } + + request struct TriggerEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; + } + + /** Command description for Identify */ + command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; +} + +/** Attributes and commands for group configuration and manipulation. */ +cluster Groups = 4 { + revision 4; + + bitmap Feature : bitmap32 { + kGroupNames = 0x1; + } + + bitmap NameSupportBitmap : bitmap8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; + 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 AddGroupRequest { + group_id groupID = 0; + char_string<16> groupName = 1; + } + + response struct AddGroupResponse = 0 { + enum8 status = 0; + group_id groupID = 1; + } + + request struct ViewGroupRequest { + group_id groupID = 0; + } + + response struct ViewGroupResponse = 1 { + enum8 status = 0; + group_id groupID = 1; + char_string<16> groupName = 2; + } + + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + + response struct GetGroupMembershipResponse = 2 { + nullable int8u capacity = 0; + group_id groupList[] = 1; + } + + request struct RemoveGroupRequest { + group_id groupID = 0; + } + + response struct RemoveGroupResponse = 3 { + enum8 status = 0; + group_id groupID = 1; + } + + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + char_string<16> groupName = 1; + } + + /** Command description for AddGroup */ + fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + /** Command description for ViewGroup */ + fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + /** Command description for GetGroupMembership */ + fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + /** Command description for RemoveGroup */ + fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + /** Command description for RemoveAllGroups */ + fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + /** Command description for AddGroupIfIdentifying */ + fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; +} + +/** 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; + + bitmap Feature : bitmap32 { + kTagList = 0x1; + } + + struct DeviceTypeStruct { + devtype_id deviceType = 0; + int16u revision = 1; + } + + struct SemanticTagStruct { + nullable vendor_id mfgCode = 0; + enum8 namespaceID = 1; + enum8 tag = 2; + optional nullable char_string label = 3; + } + + readonly attribute DeviceTypeStruct deviceTypeList[] = 0; + readonly attribute cluster_id serverList[] = 1; + readonly attribute cluster_id clientList[] = 2; + readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; + 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; +} + +/** The Binding Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for supporting the binding table. */ +cluster Binding = 30 { + revision 1; // NOTE: Default/not specifically set + + fabric_scoped struct TargetStruct { + optional node_id node = 1; + optional group_id group = 2; + optional endpoint_no endpoint = 3; + optional cluster_id cluster = 4; + fabric_idx fabricIndex = 254; + } + + attribute access(write: manage) TargetStruct binding[] = 0; + 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; +} + +/** The Access Control Cluster exposes a data model view of a + Node's Access Control List (ACL), which codifies the rules used to manage + and enforce Access Control for the Node's endpoints and their associated + cluster instances. */ +cluster AccessControl = 31 { + revision 1; // NOTE: Default/not specifically set + + enum AccessControlEntryAuthModeEnum : enum8 { + kPASE = 1; + kCASE = 2; + kGroup = 3; + } + + enum AccessControlEntryPrivilegeEnum : enum8 { + kView = 1; + kProxyView = 2; + kOperate = 3; + kManage = 4; + kAdminister = 5; + } + + enum ChangeTypeEnum : enum8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + struct AccessControlTargetStruct { + nullable cluster_id cluster = 0; + nullable endpoint_no endpoint = 1; + nullable devtype_id deviceType = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; + nullable fabric_sensitive int64u subjects[] = 3; + nullable fabric_sensitive AccessControlTargetStruct targets[] = 4; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct AccessControlExtensionStruct { + fabric_sensitive octet_string<128> data = 1; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) AccessControlEntryChanged = 0 { + nullable node_id adminNodeID = 1; + nullable int16u adminPasscodeID = 2; + ChangeTypeEnum changeType = 3; + nullable AccessControlEntryStruct latestValue = 4; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) AccessControlExtensionChanged = 1 { + nullable node_id adminNodeID = 1; + nullable int16u adminPasscodeID = 2; + ChangeTypeEnum changeType = 3; + nullable AccessControlExtensionStruct latestValue = 4; + fabric_idx fabricIndex = 254; + } + + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; + readonly attribute int16u subjectsPerAccessControlEntry = 2; + readonly attribute int16u targetsPerAccessControlEntry = 3; + readonly attribute int16u accessControlEntriesPerFabric = 4; + 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; +} + +/** This cluster provides attributes and events for determining basic information about Nodes, which supports both + Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, + which apply to the whole Node. Also allows setting user device information such as location. */ +cluster BasicInformation = 40 { + revision 3; + + enum ColorEnum : enum8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : enum8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + + struct CapabilityMinimaStruct { + int16u caseSessionsPerFabric = 0; + int16u subscriptionsPerFabric = 1; + } + + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + + critical event StartUp = 0 { + int32u softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + fabric_idx fabricIndex = 0; + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + readonly attribute int16u dataModelRevision = 0; + readonly attribute char_string<32> vendorName = 1; + readonly attribute vendor_id vendorID = 2; + readonly attribute char_string<32> productName = 3; + readonly attribute int16u productID = 4; + attribute access(write: manage) char_string<32> nodeLabel = 5; + attribute access(write: administer) char_string<2> location = 6; + readonly attribute int16u hardwareVersion = 7; + readonly attribute char_string<64> hardwareVersionString = 8; + readonly attribute int32u softwareVersion = 9; + readonly attribute char_string<64> softwareVersionString = 10; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute optional char_string<32> uniqueID = 18; + readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; + readonly attribute int32u specificationVersion = 21; + readonly attribute int16u maxPathsPerInvoke = 22; + 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; + + command MfgSpecificPing(): DefaultSuccess = 0; +} + +/** Provides an interface for providing OTA software updates */ +cluster OtaSoftwareUpdateProvider = 41 { + revision 1; // NOTE: Default/not specifically set + + enum ApplyUpdateActionEnum : enum8 { + kProceed = 0; + kAwaitNextAction = 1; + kDiscontinue = 2; + } + + enum DownloadProtocolEnum : enum8 { + kBDXSynchronous = 0; + kBDXAsynchronous = 1; + kHTTPS = 2; + kVendorSpecific = 3; + } + + enum StatusEnum : enum8 { + kUpdateAvailable = 0; + kBusy = 1; + kNotAvailable = 2; + kDownloadProtocolNotSupported = 3; + } + + 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 QueryImageRequest { + vendor_id vendorID = 0; + int16u productID = 1; + int32u softwareVersion = 2; + DownloadProtocolEnum protocolsSupported[] = 3; + optional int16u hardwareVersion = 4; + optional char_string<2> location = 5; + optional boolean requestorCanConsent = 6; + optional octet_string<512> metadataForProvider = 7; + } + + response struct QueryImageResponse = 1 { + StatusEnum status = 0; + optional int32u delayedActionTime = 1; + optional char_string<256> imageURI = 2; + optional int32u softwareVersion = 3; + optional char_string<64> softwareVersionString = 4; + optional octet_string<32> updateToken = 5; + optional boolean userConsentNeeded = 6; + optional octet_string<512> metadataForRequestor = 7; + } + + request struct ApplyUpdateRequestRequest { + octet_string<32> updateToken = 0; + int32u newVersion = 1; + } + + response struct ApplyUpdateResponse = 3 { + ApplyUpdateActionEnum action = 0; + int32u delayedActionTime = 1; + } + + request struct NotifyUpdateAppliedRequest { + octet_string<32> updateToken = 0; + int32u softwareVersion = 1; + } + + /** Determine availability of a new Software Image */ + command QueryImage(QueryImageRequest): QueryImageResponse = 0; + /** Determine next action to take for a downloaded Software Image */ + command ApplyUpdateRequest(ApplyUpdateRequestRequest): ApplyUpdateResponse = 2; + /** Notify OTA Provider that an update was applied */ + command NotifyUpdateApplied(NotifyUpdateAppliedRequest): DefaultSuccess = 4; +} + +/** Provides an interface for downloading and applying OTA software updates */ +cluster OtaSoftwareUpdateRequestor = 42 { + revision 1; // NOTE: Default/not specifically set + + enum AnnouncementReasonEnum : enum8 { + kSimpleAnnouncement = 0; + kUpdateAvailable = 1; + kUrgentUpdateAvailable = 2; + } + + enum ChangeReasonEnum : enum8 { + kUnknown = 0; + kSuccess = 1; + kFailure = 2; + kTimeOut = 3; + kDelayByProvider = 4; + } + + enum UpdateStateEnum : enum8 { + kUnknown = 0; + kIdle = 1; + kQuerying = 2; + kDelayedOnQuery = 3; + kDownloading = 4; + kApplying = 5; + kDelayedOnApply = 6; + kRollingBack = 7; + kDelayedOnUserConsent = 8; + } + + fabric_scoped struct ProviderLocation { + node_id providerNodeID = 1; + endpoint_no endpoint = 2; + fabric_idx fabricIndex = 254; + } + + info event StateTransition = 0 { + UpdateStateEnum previousState = 0; + UpdateStateEnum newState = 1; + ChangeReasonEnum reason = 2; + nullable int32u targetSoftwareVersion = 3; + } + + critical event VersionApplied = 1 { + int32u softwareVersion = 0; + int16u productID = 1; + } + + info event DownloadError = 2 { + int32u softwareVersion = 0; + int64u bytesDownloaded = 1; + nullable int8u progressPercent = 2; + nullable int64s platformCode = 3; + } + + attribute access(write: administer) ProviderLocation defaultOTAProviders[] = 0; + readonly attribute boolean updatePossible = 1; + readonly attribute UpdateStateEnum updateState = 2; + readonly attribute nullable int8u updateStateProgress = 3; + 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 AnnounceOTAProviderRequest { + node_id providerNodeID = 0; + vendor_id vendorID = 1; + AnnouncementReasonEnum announcementReason = 2; + optional octet_string<512> metadataForNode = 3; + endpoint_no endpoint = 4; + } + + /** Announce the presence of an OTA Provider */ + command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; +} + +/** Nodes should be expected to be deployed to any and all regions of the world. These global regions + may have differing preferences for the units in which values are conveyed in communication to a + user. As such, Nodes that visually or audibly convey measurable values to the user need a + mechanism by which they can be configured to use a user’s preferred unit. */ +cluster UnitLocalization = 45 { + revision 1; + + enum TempUnitEnum : enum8 { + kFahrenheit = 0; + kCelsius = 1; + kKelvin = 2; + } + + bitmap Feature : bitmap32 { + kTemperatureUnit = 0x1; + } + + attribute access(write: manage) optional TempUnitEnum temperatureUnit = 0; + 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; +} + +/** This cluster is used to manage global aspects of the Commissioning flow. */ +cluster GeneralCommissioning = 48 { + revision 1; // NOTE: Default/not specifically set + + enum CommissioningErrorEnum : enum8 { + kOK = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNoFailSafe = 3; + kBusyWithOtherAdmin = 4; + } + + enum RegulatoryLocationTypeEnum : enum8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + struct BasicCommissioningInfo { + int16u failSafeExpiryLengthSeconds = 0; + int16u maxCumulativeFailsafeSeconds = 1; + } + + attribute access(write: administer) int64u breadcrumb = 0; + readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1; + readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; + readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; + readonly attribute boolean supportsConcurrentConnection = 4; + 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 ArmFailSafeRequest { + int16u expiryLengthSeconds = 0; + int64u breadcrumb = 1; + } + + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationTypeEnum newRegulatoryConfig = 0; + char_string<2> countryCode = 1; + int64u breadcrumb = 2; + } + + response struct SetRegulatoryConfigResponse = 3 { + CommissioningErrorEnum errorCode = 0; + char_string debugText = 1; + } + + response struct CommissioningCompleteResponse = 5 { + CommissioningErrorEnum errorCode = 0; + char_string debugText = 1; + } + + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ + command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ + command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; +} + +/** Functionality to configure, enable, disable network credentials and access on a Matter device. */ +cluster NetworkCommissioning = 49 { + revision 1; // NOTE: Default/not specifically set + + enum NetworkCommissioningStatusEnum : enum8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBandEnum : enum8 { + k2G4 = 0; + k3G65 = 1; + k5G = 2; + k6G = 3; + k60G = 4; + k1G = 5; + } + + bitmap Feature : bitmap32 { + kWiFiNetworkInterface = 0x1; + kThreadNetworkInterface = 0x2; + kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; + } + + bitmap ThreadCapabilitiesBitmap : bitmap16 { + kIsBorderRouterCapable = 0x1; + kIsRouterCapable = 0x2; + kIsSleepyEndDeviceCapable = 0x4; + kIsFullThreadDevice = 0x8; + kIsSynchronizedSleepyEndDeviceCapable = 0x10; + } + + bitmap WiFiSecurityBitmap : bitmap8 { + kUnencrypted = 0x1; + kWEP = 0x2; + kWPAPersonal = 0x4; + kWPA2Personal = 0x8; + kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; + } + + struct NetworkInfoStruct { + octet_string<32> networkID = 0; + boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; + } + + struct ThreadInterfaceScanResultStruct { + int16u panId = 0; + int64u extendedPanId = 1; + char_string<16> networkName = 2; + int16u channel = 3; + int8u version = 4; + octet_string<8> extendedAddress = 5; + int8s rssi = 6; + int8u lqi = 7; + } + + struct WiFiInterfaceScanResultStruct { + WiFiSecurityBitmap security = 0; + octet_string<32> ssid = 1; + octet_string<6> bssid = 2; + int16u channel = 3; + WiFiBandEnum wiFiBand = 4; + int8s rssi = 5; + } + + readonly attribute access(read: administer) int8u maxNetworks = 0; + readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; + attribute access(write: administer) boolean interfaceEnabled = 4; + readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; + readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; + readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + readonly attribute optional int16u threadVersion = 10; + 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 ScanNetworksRequest { + optional nullable octet_string<32> ssid = 0; + optional int64u breadcrumb = 1; + } + + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + + request struct AddOrUpdateWiFiNetworkRequest { + octet_string<32> ssid = 0; + octet_string<64> credentials = 1; + optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; + } + + request struct AddOrUpdateThreadNetworkRequest { + octet_string<254> operationalDataset = 0; + optional int64u breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + octet_string<32> networkID = 0; + optional int64u breadcrumb = 1; + } + + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + + request struct ConnectNetworkRequest { + octet_string<32> networkID = 0; + optional int64u breadcrumb = 1; + } + + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + + request struct ReorderNetworkRequest { + octet_string<32> networkID = 0; + int8u networkIndex = 1; + optional int64u breadcrumb = 2; + } + + request struct QueryIdentityRequest { + octet_string<20> keyIdentifier = 0; + optional octet_string<32> possessionNonce = 1; + } + + response struct QueryIdentityResponse = 10 { + octet_string<140> identity = 0; + optional octet_string<64> possessionSignature = 1; + } + + /** Detemine the set of networks the device sees as available. */ + command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ + command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ + command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ + command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ + command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ + command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; +} + +/** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ +cluster DiagnosticLogs = 50 { + revision 1; // NOTE: Default/not specifically set + + enum IntentEnum : enum8 { + kEndUserSupport = 0; + kNetworkDiag = 1; + kCrashLogs = 2; + } + + enum StatusEnum : enum8 { + kSuccess = 0; + kExhausted = 1; + kNoLogs = 2; + kBusy = 3; + kDenied = 4; + } + + enum TransferProtocolEnum : enum8 { + kResponsePayload = 0; + kBDX = 1; + } + + 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 RetrieveLogsRequestRequest { + IntentEnum intent = 0; + TransferProtocolEnum requestedProtocol = 1; + optional char_string<32> transferFileDesignator = 2; + } + + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + long_octet_string logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; +} + +/** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ +cluster GeneralDiagnostics = 51 { + revision 2; + + enum BootReasonEnum : enum8 { + kUnspecified = 0; + kPowerOnReboot = 1; + kBrownOutReset = 2; + kSoftwareWatchdogReset = 3; + kHardwareWatchdogReset = 4; + kSoftwareUpdateCompleted = 5; + kSoftwareReset = 6; + } + + enum HardwareFaultEnum : enum8 { + kUnspecified = 0; + kRadio = 1; + kSensor = 2; + kResettableOverTemp = 3; + kNonResettableOverTemp = 4; + kPowerSource = 5; + kVisualDisplayFault = 6; + kAudioOutputFault = 7; + kUserInterfaceFault = 8; + kNonVolatileMemoryError = 9; + kTamperDetected = 10; + } + + enum InterfaceTypeEnum : enum8 { + kUnspecified = 0; + kWiFi = 1; + kEthernet = 2; + kCellular = 3; + kThread = 4; + } + + enum NetworkFaultEnum : enum8 { + kUnspecified = 0; + kHardwareFailure = 1; + kNetworkJammed = 2; + kConnectionFailed = 3; + } + + enum RadioFaultEnum : enum8 { + kUnspecified = 0; + kWiFiFault = 1; + kCellularFault = 2; + kThreadFault = 3; + kNFCFault = 4; + kBLEFault = 5; + kEthernetFault = 6; + } + + struct NetworkInterface { + char_string<32> name = 0; + boolean isOperational = 1; + nullable boolean offPremiseServicesReachableIPv4 = 2; + nullable boolean offPremiseServicesReachableIPv6 = 3; + octet_string<8> hardwareAddress = 4; + octet_string IPv4Addresses[] = 5; + octet_string IPv6Addresses[] = 6; + InterfaceTypeEnum type = 7; + } + + critical event HardwareFaultChange = 0 { + HardwareFaultEnum current[] = 0; + HardwareFaultEnum previous[] = 1; + } + + critical event RadioFaultChange = 1 { + RadioFaultEnum current[] = 0; + RadioFaultEnum previous[] = 1; + } + + critical event NetworkFaultChange = 2 { + NetworkFaultEnum current[] = 0; + NetworkFaultEnum previous[] = 1; + } + + critical event BootReason = 3 { + BootReasonEnum bootReason = 0; + } + + readonly attribute NetworkInterface networkInterfaces[] = 0; + readonly attribute int16u rebootCount = 1; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute boolean testEventTriggersEnabled = 8; + 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 TestEventTriggerRequest { + octet_string<16> enableKey = 0; + int64u eventTrigger = 1; + } + + response struct TimeSnapshotResponse = 2 { + systime_ms systemTimeMs = 0; + nullable posix_ms posixTimeMs = 1; + } + + /** Provide a means for certification tests to trigger some test-plan-specific events */ + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ + command TimeSnapshot(): TimeSnapshotResponse = 1; +} + +/** The Software Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ +cluster SoftwareDiagnostics = 52 { + revision 1; // NOTE: Default/not specifically set + + bitmap Feature : bitmap32 { + kWatermarks = 0x1; + } + + struct ThreadMetricsStruct { + int64u id = 0; + optional char_string<8> name = 1; + optional int32u stackFreeCurrent = 2; + optional int32u stackFreeMinimum = 3; + optional int32u stackSize = 4; + } + + info event SoftwareFault = 0 { + int64u id = 0; + optional char_string name = 1; + optional octet_string faultRecording = 2; + } + + readonly attribute optional ThreadMetricsStruct threadMetrics[] = 0; + readonly attribute optional int64u currentHeapFree = 1; + readonly attribute optional int64u currentHeapUsed = 2; + readonly attribute optional int64u currentHeapHighWatermark = 3; + 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; + + /** Reception of this command SHALL reset the values: The StackFreeMinimum field of the ThreadMetrics attribute, CurrentHeapHighWaterMark attribute. */ + command access(invoke: manage) ResetWatermarks(): DefaultSuccess = 0; +} + +/** The Thread Network Diagnostics Cluster provides a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems */ +cluster ThreadNetworkDiagnostics = 53 { + revision 1; // NOTE: Default/not specifically set + + enum ConnectionStatusEnum : enum8 { + kConnected = 0; + kNotConnected = 1; + } + + enum NetworkFaultEnum : enum8 { + kUnspecified = 0; + kLinkDown = 1; + kHardwareFailure = 2; + kNetworkJammed = 3; + } + + enum RoutingRoleEnum : enum8 { + kUnspecified = 0; + kUnassigned = 1; + kSleepyEndDevice = 2; + kEndDevice = 3; + kREED = 4; + kRouter = 5; + kLeader = 6; + } + + bitmap Feature : bitmap32 { + kPacketCounts = 0x1; + kErrorCounts = 0x2; + kMLECounts = 0x4; + kMACCounts = 0x8; + } + + struct NeighborTableStruct { + int64u extAddress = 0; + int32u age = 1; + int16u rloc16 = 2; + int32u linkFrameCounter = 3; + int32u mleFrameCounter = 4; + int8u lqi = 5; + nullable int8s averageRssi = 6; + nullable int8s lastRssi = 7; + int8u frameErrorRate = 8; + int8u messageErrorRate = 9; + boolean rxOnWhenIdle = 10; + boolean fullThreadDevice = 11; + boolean fullNetworkData = 12; + boolean isChild = 13; + } + + struct OperationalDatasetComponents { + boolean activeTimestampPresent = 0; + boolean pendingTimestampPresent = 1; + boolean masterKeyPresent = 2; + boolean networkNamePresent = 3; + boolean extendedPanIdPresent = 4; + boolean meshLocalPrefixPresent = 5; + boolean delayPresent = 6; + boolean panIdPresent = 7; + boolean channelPresent = 8; + boolean pskcPresent = 9; + boolean securityPolicyPresent = 10; + boolean channelMaskPresent = 11; + } + + struct RouteTableStruct { + int64u extAddress = 0; + int16u rloc16 = 1; + int8u routerId = 2; + int8u nextHop = 3; + int8u pathCost = 4; + int8u LQIIn = 5; + int8u LQIOut = 6; + int8u age = 7; + boolean allocated = 8; + boolean linkEstablished = 9; + } + + struct SecurityPolicy { + int16u rotationTime = 0; + int16u flags = 1; + } + + info event ConnectionStatus = 0 { + ConnectionStatusEnum connectionStatus = 0; + } + + info event NetworkFaultChange = 1 { + NetworkFaultEnum current[] = 0; + NetworkFaultEnum previous[] = 1; + } + + readonly attribute nullable int16u channel = 0; + readonly attribute nullable RoutingRoleEnum routingRole = 1; + readonly attribute nullable char_string<16> networkName = 2; + readonly attribute nullable int16u panId = 3; + readonly attribute nullable int64u extendedPanId = 4; + readonly attribute nullable octet_string<17> meshLocalPrefix = 5; + readonly attribute optional int64u overrunCount = 6; + readonly attribute NeighborTableStruct neighborTable[] = 7; + readonly attribute RouteTableStruct routeTable[] = 8; + readonly attribute nullable int32u partitionId = 9; + readonly attribute nullable int16u weighting = 10; + readonly attribute nullable int16u dataVersion = 11; + readonly attribute nullable int16u stableDataVersion = 12; + readonly attribute nullable int8u leaderRouterId = 13; + readonly attribute optional int16u detachedRoleCount = 14; + readonly attribute optional int16u childRoleCount = 15; + readonly attribute optional int16u routerRoleCount = 16; + readonly attribute optional int16u leaderRoleCount = 17; + readonly attribute optional int16u attachAttemptCount = 18; + readonly attribute optional int16u partitionIdChangeCount = 19; + readonly attribute optional int16u betterPartitionAttachAttemptCount = 20; + readonly attribute optional int16u parentChangeCount = 21; + readonly attribute optional int32u txTotalCount = 22; + readonly attribute optional int32u txUnicastCount = 23; + readonly attribute optional int32u txBroadcastCount = 24; + readonly attribute optional int32u txAckRequestedCount = 25; + readonly attribute optional int32u txAckedCount = 26; + readonly attribute optional int32u txNoAckRequestedCount = 27; + readonly attribute optional int32u txDataCount = 28; + readonly attribute optional int32u txDataPollCount = 29; + readonly attribute optional int32u txBeaconCount = 30; + readonly attribute optional int32u txBeaconRequestCount = 31; + readonly attribute optional int32u txOtherCount = 32; + readonly attribute optional int32u txRetryCount = 33; + readonly attribute optional int32u txDirectMaxRetryExpiryCount = 34; + readonly attribute optional int32u txIndirectMaxRetryExpiryCount = 35; + readonly attribute optional int32u txErrCcaCount = 36; + readonly attribute optional int32u txErrAbortCount = 37; + readonly attribute optional int32u txErrBusyChannelCount = 38; + readonly attribute optional int32u rxTotalCount = 39; + readonly attribute optional int32u rxUnicastCount = 40; + readonly attribute optional int32u rxBroadcastCount = 41; + readonly attribute optional int32u rxDataCount = 42; + readonly attribute optional int32u rxDataPollCount = 43; + readonly attribute optional int32u rxBeaconCount = 44; + readonly attribute optional int32u rxBeaconRequestCount = 45; + readonly attribute optional int32u rxOtherCount = 46; + readonly attribute optional int32u rxAddressFilteredCount = 47; + readonly attribute optional int32u rxDestAddrFilteredCount = 48; + readonly attribute optional int32u rxDuplicatedCount = 49; + readonly attribute optional int32u rxErrNoFrameCount = 50; + readonly attribute optional int32u rxErrUnknownNeighborCount = 51; + readonly attribute optional int32u rxErrInvalidSrcAddrCount = 52; + readonly attribute optional int32u rxErrSecCount = 53; + readonly attribute optional int32u rxErrFcsCount = 54; + readonly attribute optional int32u rxErrOtherCount = 55; + readonly attribute optional nullable int64u activeTimestamp = 56; + readonly attribute optional nullable int64u pendingTimestamp = 57; + readonly attribute optional nullable int32u delay = 58; + readonly attribute nullable SecurityPolicy securityPolicy = 59; + readonly attribute nullable octet_string<4> channelPage0Mask = 60; + readonly attribute nullable OperationalDatasetComponents operationalDatasetComponents = 61; + readonly attribute NetworkFaultEnum activeNetworkFaultsList[] = 62; + 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; + + /** Reception of this command SHALL reset the OverrunCount attributes to 0 */ + command access(invoke: manage) ResetCounts(): DefaultSuccess = 0; +} + +/** Commands to trigger a Node to allow a new Administrator to commission it. */ +cluster AdministratorCommissioning = 60 { + revision 1; // NOTE: Default/not specifically set + + enum CommissioningWindowStatusEnum : enum8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : enum8 { + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; + } + + bitmap Feature : bitmap32 { + kBasic = 0x1; + } + + readonly attribute CommissioningWindowStatusEnum windowStatus = 0; + readonly attribute nullable fabric_idx adminFabricIndex = 1; + readonly attribute nullable vendor_id adminVendorId = 2; + 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 OpenCommissioningWindowRequest { + int16u commissioningTimeout = 0; + octet_string PAKEPasscodeVerifier = 1; + int16u discriminator = 2; + int32u iterations = 3; + octet_string<32> salt = 4; + } + + request struct OpenBasicCommissioningWindowRequest { + int16u commissioningTimeout = 0; + } + + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ + timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ + timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ + timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; +} + +/** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ +cluster OperationalCredentials = 62 { + revision 1; // NOTE: Default/not specifically set + + enum CertificateChainTypeEnum : enum8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : enum8 { + kOK = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInvalidAdminSubject = 6; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + fabric_scoped struct FabricDescriptorStruct { + octet_string<65> rootPublicKey = 1; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; + char_string<32> label = 5; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct NOCStruct { + fabric_sensitive octet_string noc = 1; + nullable fabric_sensitive octet_string icac = 2; + fabric_idx fabricIndex = 254; + } + + readonly attribute access(read: administer) NOCStruct NOCs[] = 0; + readonly attribute FabricDescriptorStruct fabrics[] = 1; + readonly attribute int8u supportedFabrics = 2; + readonly attribute int8u commissionedFabrics = 3; + readonly attribute octet_string trustedRootCertificates[] = 4; + readonly attribute int8u currentFabricIndex = 5; + 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 AttestationRequestRequest { + octet_string<32> attestationNonce = 0; + } + + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + + request struct CertificateChainRequestRequest { + CertificateChainTypeEnum certificateType = 0; + } + + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + + request struct CSRRequestRequest { + octet_string<32> CSRNonce = 0; + optional boolean isForUpdateNOC = 1; + } + + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + + request struct AddNOCRequest { + octet_string<400> NOCValue = 0; + optional octet_string<400> ICACValue = 1; + octet_string<16> IPKValue = 2; + int64u caseAdminSubject = 3; + vendor_id adminVendorId = 4; + } + + request struct UpdateNOCRequest { + octet_string NOCValue = 0; + optional octet_string ICACValue = 1; + } + + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + + request struct UpdateFabricLabelRequest { + char_string<32> label = 0; + } + + request struct RemoveFabricRequest { + fabric_idx fabricIndex = 0; + } + + request struct AddTrustedRootCertificateRequest { + octet_string rootCACertificate = 0; + } + + /** Sender is requesting attestation information from the receiver. */ + command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ + command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ + command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ + command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ + fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ + fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ + command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ + command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; +} + +/** The Group Key Management Cluster is the mechanism by which group keys are managed. */ +cluster GroupKeyManagement = 63 { + revision 1; // NOTE: Default/not specifically set + + enum GroupKeySecurityPolicyEnum : enum8 { + kTrustFirst = 0; + kCacheAndSync = 1; + } + + bitmap Feature : bitmap32 { + kCacheAndSync = 0x1; + } + + fabric_scoped struct GroupInfoMapStruct { + group_id groupId = 1; + endpoint_no endpoints[] = 2; + optional char_string<16> groupName = 3; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct GroupKeyMapStruct { + group_id groupId = 1; + int16u groupKeySetID = 2; + fabric_idx fabricIndex = 254; + } + + struct GroupKeySetStruct { + int16u groupKeySetID = 0; + GroupKeySecurityPolicyEnum groupKeySecurityPolicy = 1; + nullable octet_string<16> epochKey0 = 2; + nullable epoch_us epochStartTime0 = 3; + nullable octet_string<16> epochKey1 = 4; + nullable epoch_us epochStartTime1 = 5; + nullable octet_string<16> epochKey2 = 6; + nullable epoch_us epochStartTime2 = 7; + } + + attribute access(write: manage) GroupKeyMapStruct groupKeyMap[] = 0; + readonly attribute GroupInfoMapStruct groupTable[] = 1; + readonly attribute int16u maxGroupsPerFabric = 2; + readonly attribute int16u maxGroupKeysPerFabric = 3; + 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 KeySetWriteRequest { + GroupKeySetStruct groupKeySet = 0; + } + + request struct KeySetReadRequest { + int16u groupKeySetID = 0; + } + + response struct KeySetReadResponse = 2 { + GroupKeySetStruct groupKeySet = 0; + } + + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + + response struct KeySetReadAllIndicesResponse = 5 { + int16u groupKeySetIDs[] = 0; + } + + /** Write a new set of keys for the given key set id. */ + fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ + fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ + fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; +} + +/** The Fixed Label Cluster provides a feature for the device to tag an endpoint with zero or more read only +labels. */ +cluster FixedLabel = 64 { + revision 1; // NOTE: Default/not specifically set + + struct LabelStruct { + char_string<16> label = 0; + char_string<16> value = 1; + } + + readonly attribute LabelStruct labelList[] = 0; + 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; +} + +/** The User Label Cluster provides a feature to tag an endpoint with zero or more labels. */ +cluster UserLabel = 65 { + revision 1; // NOTE: Default/not specifically set + + struct LabelStruct { + char_string<16> label = 0; + char_string<16> value = 1; + } + + attribute access(write: manage) LabelStruct labelList[] = 0; + 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; +} + +/** An interface for configuring and controlling the functionality of a thermostat. */ +cluster Thermostat = 513 { + revision 6; + + enum ACCapacityFormatEnum : enum8 { + kBTUh = 0; + } + + enum ACCompressorTypeEnum : enum8 { + kUnknown = 0; + kT1 = 1; + kT2 = 2; + kT3 = 3; + } + + enum ACLouverPositionEnum : enum8 { + kClosed = 1; + kOpen = 2; + kQuarter = 3; + kHalf = 4; + kThreeQuarters = 5; + } + + enum ACRefrigerantTypeEnum : enum8 { + kUnknown = 0; + kR22 = 1; + kR410a = 2; + kR407c = 3; + } + + enum ACTypeEnum : enum8 { + kUnknown = 0; + kCoolingFixed = 1; + kHeatPumpFixed = 2; + kCoolingInverter = 3; + kHeatPumpInverter = 4; + } + + enum ControlSequenceOfOperationEnum : enum8 { + kCoolingOnly = 0; + kCoolingWithReheat = 1; + kHeatingOnly = 2; + kHeatingWithReheat = 3; + kCoolingAndHeating = 4; + kCoolingAndHeatingWithReheat = 5; + } + + enum SetpointChangeSourceEnum : enum8 { + kManual = 0; + kSchedule = 1; + kExternal = 2; + } + + enum SetpointRaiseLowerModeEnum : enum8 { + kHeat = 0; + kCool = 1; + kBoth = 2; + } + + enum StartOfWeekEnum : enum8 { + kSunday = 0; + kMonday = 1; + kTuesday = 2; + kWednesday = 3; + kThursday = 4; + kFriday = 5; + kSaturday = 6; + } + + enum SystemModeEnum : enum8 { + kOff = 0; + kAuto = 1; + kCool = 3; + kHeat = 4; + kEmergencyHeat = 5; + kPrecooling = 6; + kFanOnly = 7; + kDry = 8; + kSleep = 9; + } + + enum TemperatureSetpointHoldEnum : enum8 { + kSetpointHoldOff = 0; + kSetpointHoldOn = 1; + } + + enum ThermostatRunningModeEnum : enum8 { + kOff = 0; + kCool = 3; + kHeat = 4; + } + + bitmap ACErrorCodeBitmap : bitmap32 { + kCompressorFail = 0x1; + kRoomSensorFail = 0x2; + kOutdoorSensorFail = 0x4; + kCoilSensorFail = 0x8; + kFanFail = 0x10; + } + + bitmap Feature : bitmap32 { + kHeating = 0x1; + kCooling = 0x2; + kOccupancy = 0x4; + kScheduleConfiguration = 0x8; + kSetback = 0x10; + kAutoMode = 0x20; + kLocalTemperatureNotExposed = 0x40; + } + + bitmap HVACSystemTypeBitmap : bitmap8 { + kCoolingStage = 0x3; + kHeatingStage = 0xC; + kHeatingIsHeatPump = 0x10; + kHeatingUsesFuel = 0x20; + } + + bitmap ProgrammingOperationModeBitmap : bitmap8 { + kScheduleActive = 0x1; + kAutoRecovery = 0x2; + kEconomy = 0x4; + } + + bitmap RelayStateBitmap : bitmap16 { + kHeat = 0x1; + kCool = 0x2; + kFan = 0x4; + kHeatStage2 = 0x8; + kCoolStage2 = 0x10; + kFanStage2 = 0x20; + kFanStage3 = 0x40; + } + + bitmap RemoteSensingBitmap : bitmap8 { + kLocalTemperature = 0x1; + kOutdoorTemperature = 0x2; + kOccupancy = 0x4; + } + + bitmap ScheduleDayOfWeekBitmap : bitmap8 { + kSunday = 0x1; + kMonday = 0x2; + kTuesday = 0x4; + kWednesday = 0x8; + kThursday = 0x10; + kFriday = 0x20; + kSaturday = 0x40; + kAway = 0x80; + } + + bitmap ScheduleModeBitmap : bitmap8 { + kHeatSetpointPresent = 0x1; + kCoolSetpointPresent = 0x2; + } + + struct WeeklyScheduleTransitionStruct { + int16u transitionTime = 0; + nullable temperature heatSetpoint = 1; + nullable temperature coolSetpoint = 2; + } + + readonly attribute nullable temperature localTemperature = 0; + readonly attribute optional nullable temperature outdoorTemperature = 1; + readonly attribute optional bitmap8 occupancy = 2; + readonly attribute optional temperature absMinHeatSetpointLimit = 3; + readonly attribute optional temperature absMaxHeatSetpointLimit = 4; + readonly attribute optional temperature absMinCoolSetpointLimit = 5; + readonly attribute optional temperature absMaxCoolSetpointLimit = 6; + readonly attribute optional int8u PICoolingDemand = 7; + readonly attribute optional int8u PIHeatingDemand = 8; + attribute access(write: manage) optional bitmap8 HVACSystemTypeConfiguration = 9; + attribute access(write: manage) optional int8s localTemperatureCalibration = 16; + attribute optional int16s occupiedCoolingSetpoint = 17; + attribute optional int16s occupiedHeatingSetpoint = 18; + attribute optional int16s unoccupiedCoolingSetpoint = 19; + attribute optional int16s unoccupiedHeatingSetpoint = 20; + attribute access(write: manage) optional int16s minHeatSetpointLimit = 21; + attribute access(write: manage) optional int16s maxHeatSetpointLimit = 22; + attribute access(write: manage) optional int16s minCoolSetpointLimit = 23; + attribute access(write: manage) optional int16s maxCoolSetpointLimit = 24; + attribute access(write: manage) optional int8s minSetpointDeadBand = 25; + attribute access(write: manage) optional RemoteSensingBitmap remoteSensing = 26; + attribute access(write: manage) ControlSequenceOfOperationEnum controlSequenceOfOperation = 27; + attribute access(write: manage) SystemModeEnum systemMode = 28; + readonly attribute optional ThermostatRunningModeEnum thermostatRunningMode = 30; + readonly attribute optional StartOfWeekEnum startOfWeek = 32; + readonly attribute optional int8u numberOfWeeklyTransitions = 33; + readonly attribute optional int8u numberOfDailyTransitions = 34; + attribute access(write: manage) optional TemperatureSetpointHoldEnum temperatureSetpointHold = 35; + attribute access(write: manage) optional nullable int16u temperatureSetpointHoldDuration = 36; + attribute access(write: manage) optional ProgrammingOperationModeBitmap thermostatProgrammingOperationMode = 37; + readonly attribute optional RelayStateBitmap thermostatRunningState = 41; + readonly attribute optional SetpointChangeSourceEnum setpointChangeSource = 48; + readonly attribute optional nullable int16s setpointChangeAmount = 49; + readonly attribute optional epoch_s setpointChangeSourceTimestamp = 50; + attribute access(write: manage) optional nullable int8u occupiedSetback = 52; + readonly attribute optional nullable int8u occupiedSetbackMin = 53; + readonly attribute optional nullable int8u occupiedSetbackMax = 54; + attribute access(write: manage) optional nullable int8u unoccupiedSetback = 55; + readonly attribute optional nullable int8u unoccupiedSetbackMin = 56; + readonly attribute optional nullable int8u unoccupiedSetbackMax = 57; + attribute access(write: manage) optional int8u emergencyHeatDelta = 58; + attribute access(write: manage) optional ACTypeEnum ACType = 64; + attribute access(write: manage) optional int16u ACCapacity = 65; + attribute access(write: manage) optional ACRefrigerantTypeEnum ACRefrigerantType = 66; + attribute access(write: manage) optional ACCompressorTypeEnum ACCompressorType = 67; + attribute access(write: manage) optional ACErrorCodeBitmap ACErrorCode = 68; + attribute access(write: manage) optional ACLouverPositionEnum ACLouverPosition = 69; + readonly attribute optional nullable temperature ACCoilTemperature = 70; + attribute access(write: manage) optional ACCapacityFormatEnum ACCapacityformat = 71; + 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 SetpointRaiseLowerRequest { + SetpointRaiseLowerModeEnum mode = 0; + int8s amount = 1; + } + + response struct GetWeeklyScheduleResponse = 0 { + int8u numberOfTransitionsForSequence = 0; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; + } + + request struct SetWeeklyScheduleRequest { + int8u numberOfTransitionsForSequence = 0; + ScheduleDayOfWeekBitmap dayOfWeekForSequence = 1; + ScheduleModeBitmap modeForSequence = 2; + WeeklyScheduleTransitionStruct transitions[] = 3; + } + + request struct GetWeeklyScheduleRequest { + ScheduleDayOfWeekBitmap daysToReturn = 0; + ScheduleModeBitmap modeToReturn = 1; + } + + /** Command description for SetpointRaiseLower */ + command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; + /** Command description for SetWeeklySchedule */ + command access(invoke: manage) SetWeeklySchedule(SetWeeklyScheduleRequest): DefaultSuccess = 1; + /** Command description for GetWeeklySchedule */ + command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; + /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ + command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; +} + +/** An interface for configuring the user interface of a thermostat (which may be remote from the thermostat). */ +cluster ThermostatUserInterfaceConfiguration = 516 { + revision 2; + + enum KeypadLockoutEnum : enum8 { + kNoLockout = 0; + kLockout1 = 1; + kLockout2 = 2; + kLockout3 = 3; + kLockout4 = 4; + kLockout5 = 5; + } + + enum ScheduleProgrammingVisibilityEnum : enum8 { + kScheduleProgrammingPermitted = 0; + kScheduleProgrammingDenied = 1; + } + + enum TemperatureDisplayModeEnum : enum8 { + kCelsius = 0; + kFahrenheit = 1; + } + + attribute TemperatureDisplayModeEnum temperatureDisplayMode = 0; + attribute access(write: manage) KeypadLockoutEnum keypadLockout = 1; + attribute access(write: manage) optional ScheduleProgrammingVisibilityEnum scheduleProgrammingVisibility = 2; + 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; +} + +endpoint 0 { + device type ma_rootdevice = 22, version 1; + + binding cluster OtaSoftwareUpdateProvider; + + server cluster Identify { + ram attribute identifyTime default = 0x0000; + ram attribute identifyType default = 0x0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 4; + + handle command Identify; + } + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + ram attribute featureMap default = 0; + callback attribute clusterRevision; + } + + server cluster Binding { + callback attribute binding; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster AccessControl { + emits event AccessControlEntryChanged; + emits event AccessControlExtensionChanged; + callback attribute acl; + callback attribute extension; + callback attribute subjectsPerAccessControlEntry; + callback attribute targetsPerAccessControlEntry; + callback attribute accessControlEntriesPerFabric; + callback attribute attributeList; + ram attribute featureMap default = 0; + callback attribute clusterRevision; + } + + server cluster BasicInformation { + emits event StartUp; + emits event ShutDown; + emits event Leave; + callback attribute dataModelRevision; + callback attribute vendorName; + callback attribute vendorID; + callback attribute productName; + callback attribute productID; + persist attribute nodeLabel; + callback attribute location; + callback attribute hardwareVersion; + callback attribute hardwareVersionString; + callback attribute softwareVersion; + callback attribute softwareVersionString; + callback attribute manufacturingDate; + callback attribute partNumber; + callback attribute productURL; + callback attribute productLabel; + callback attribute serialNumber; + persist attribute localConfigDisabled default = 0; + callback attribute uniqueID; + callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 3; + } + + server cluster OtaSoftwareUpdateRequestor { + emits event StateTransition; + emits event VersionApplied; + emits event DownloadError; + callback attribute defaultOTAProviders; + ram attribute updatePossible default = 1; + ram attribute updateState default = 0; + ram attribute updateStateProgress default = 0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command AnnounceOTAProvider; + } + + server cluster UnitLocalization { + persist attribute temperatureUnit default = 0; + ram attribute featureMap default = 0x1; + ram attribute clusterRevision default = 1; + } + + server cluster GeneralCommissioning { + ram attribute breadcrumb default = 0x0000000000000000; + callback attribute basicCommissioningInfo; + callback attribute regulatoryConfig; + callback attribute locationCapability; + callback attribute supportsConcurrentConnection; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command ArmFailSafe; + handle command ArmFailSafeResponse; + handle command SetRegulatoryConfig; + handle command SetRegulatoryConfigResponse; + handle command CommissioningComplete; + handle command CommissioningCompleteResponse; + } + + server cluster NetworkCommissioning { + ram attribute maxNetworks; + callback attribute networks; + ram attribute scanMaxTimeSeconds; + ram attribute connectMaxTimeSeconds; + ram attribute interfaceEnabled; + ram attribute lastNetworkingStatus; + ram attribute lastNetworkID; + ram attribute lastConnectErrorValue; + ram attribute featureMap default = 2; + ram attribute clusterRevision default = 1; + + handle command ScanNetworks; + handle command ScanNetworksResponse; + handle command AddOrUpdateWiFiNetwork; + handle command AddOrUpdateThreadNetwork; + handle command RemoveNetwork; + handle command NetworkConfigResponse; + handle command ConnectNetwork; + handle command ConnectNetworkResponse; + handle command ReorderNetwork; + } + + server cluster DiagnosticLogs { + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command RetrieveLogsRequest; + handle command RetrieveLogsResponse; + } + + server cluster GeneralDiagnostics { + emits event BootReason; + callback attribute networkInterfaces; + callback attribute rebootCount; + callback attribute upTime; + callback attribute totalOperationalHours; + callback attribute bootReason; + callback attribute activeHardwareFaults; + callback attribute activeRadioFaults; + callback attribute activeNetworkFaults; + callback attribute testEventTriggersEnabled default = false; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 0x0002; + + handle command TestEventTrigger; + handle command TimeSnapshot; + handle command TimeSnapshotResponse; + } + + server cluster SoftwareDiagnostics { + callback attribute threadMetrics; + callback attribute currentHeapFree; + callback attribute currentHeapUsed; + callback attribute currentHeapHighWatermark; + callback attribute featureMap; + ram attribute clusterRevision default = 1; + } + + server cluster ThreadNetworkDiagnostics { + callback attribute channel; + callback attribute routingRole; + callback attribute networkName; + callback attribute panId; + callback attribute extendedPanId; + callback attribute meshLocalPrefix; + callback attribute overrunCount; + callback attribute neighborTable; + callback attribute routeTable; + callback attribute partitionId; + callback attribute weighting; + callback attribute dataVersion; + callback attribute stableDataVersion; + callback attribute leaderRouterId; + callback attribute detachedRoleCount; + callback attribute childRoleCount; + callback attribute routerRoleCount; + callback attribute leaderRoleCount; + callback attribute attachAttemptCount; + callback attribute partitionIdChangeCount; + callback attribute betterPartitionAttachAttemptCount; + callback attribute parentChangeCount; + callback attribute txTotalCount; + callback attribute txUnicastCount; + callback attribute txBroadcastCount; + callback attribute txAckRequestedCount; + callback attribute txAckedCount; + callback attribute txNoAckRequestedCount; + callback attribute txDataCount; + callback attribute txDataPollCount; + callback attribute txBeaconCount; + callback attribute txBeaconRequestCount; + callback attribute txOtherCount; + callback attribute txRetryCount; + callback attribute txDirectMaxRetryExpiryCount; + callback attribute txIndirectMaxRetryExpiryCount; + callback attribute txErrCcaCount; + callback attribute txErrAbortCount; + callback attribute txErrBusyChannelCount; + callback attribute rxTotalCount; + callback attribute rxUnicastCount; + callback attribute rxBroadcastCount; + callback attribute rxDataCount; + callback attribute rxDataPollCount; + callback attribute rxBeaconCount; + callback attribute rxBeaconRequestCount; + callback attribute rxOtherCount; + callback attribute rxAddressFilteredCount; + callback attribute rxDestAddrFilteredCount; + callback attribute rxDuplicatedCount; + callback attribute rxErrNoFrameCount; + callback attribute rxErrUnknownNeighborCount; + callback attribute rxErrInvalidSrcAddrCount; + callback attribute rxErrSecCount; + callback attribute rxErrFcsCount; + callback attribute rxErrOtherCount; + callback attribute securityPolicy; + callback attribute channelPage0Mask; + callback attribute operationalDatasetComponents; + callback attribute activeNetworkFaultsList; + ram attribute featureMap default = 0x000F; + ram attribute clusterRevision default = 1; + + handle command ResetCounts; + } + + server cluster AdministratorCommissioning { + callback attribute windowStatus; + callback attribute adminFabricIndex; + callback attribute adminVendorId; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command OpenCommissioningWindow; + handle command OpenBasicCommissioningWindow; + handle command RevokeCommissioning; + } + + server cluster OperationalCredentials { + callback attribute NOCs; + callback attribute fabrics; + callback attribute supportedFabrics; + callback attribute commissionedFabrics; + callback attribute trustedRootCertificates; + callback attribute currentFabricIndex; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command AttestationRequest; + handle command AttestationResponse; + handle command CertificateChainRequest; + handle command CertificateChainResponse; + handle command CSRRequest; + handle command CSRResponse; + handle command AddNOC; + handle command UpdateNOC; + handle command NOCResponse; + handle command UpdateFabricLabel; + handle command RemoveFabric; + handle command AddTrustedRootCertificate; + } + + server cluster GroupKeyManagement { + callback attribute groupKeyMap; + callback attribute groupTable; + callback attribute maxGroupsPerFabric; + callback attribute maxGroupKeysPerFabric; + callback attribute featureMap; + callback attribute clusterRevision; + + handle command KeySetWrite; + handle command KeySetRead; + handle command KeySetReadResponse; + handle command KeySetRemove; + handle command KeySetReadAllIndices; + handle command KeySetReadAllIndicesResponse; + } + + server cluster FixedLabel { + callback attribute labelList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster UserLabel { + callback attribute labelList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } +} +endpoint 1 { + device type ma_thermostat = 769, version 1; + + binding cluster Identify; + + server cluster Identify { + ram attribute identifyTime default = 0x0000; + ram attribute identifyType default = 0x0; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 4; + + handle command Identify; + handle command TriggerEffect; + } + + server cluster Groups { + ram attribute nameSupport; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 4; + + handle command AddGroup; + handle command AddGroupResponse; + handle command ViewGroup; + handle command ViewGroupResponse; + handle command GetGroupMembership; + handle command GetGroupMembershipResponse; + handle command RemoveGroup; + handle command RemoveGroupResponse; + handle command RemoveAllGroups; + handle command AddGroupIfIdentifying; + } + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + ram attribute featureMap default = 0; + callback attribute clusterRevision; + } + + server cluster Thermostat { + ram attribute localTemperature; + ram attribute absMinHeatSetpointLimit default = 700; + ram attribute absMaxHeatSetpointLimit default = 3000; + ram attribute absMinCoolSetpointLimit default = 1600; + ram attribute absMaxCoolSetpointLimit default = 3200; + persist attribute occupiedCoolingSetpoint default = 0x0A28; + persist attribute occupiedHeatingSetpoint default = 0x07D0; + ram attribute minHeatSetpointLimit default = 700; + ram attribute maxHeatSetpointLimit default = 3000; + ram attribute minCoolSetpointLimit default = 1600; + ram attribute maxCoolSetpointLimit default = 3200; + ram attribute minSetpointDeadBand default = 0x19; + ram attribute controlSequenceOfOperation default = 0x04; + persist attribute systemMode default = 0x01; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0x23; + ram attribute clusterRevision default = 6; + + handle command SetpointRaiseLower; + } + + server cluster ThermostatUserInterfaceConfiguration { + ram attribute temperatureDisplayMode default = 0x00; + ram attribute keypadLockout default = 0x00; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 2; + } +} + + diff --git a/examples/thermostat/qpg/zap/thermostaticRadiatorValve.zap b/examples/thermostat/qpg/zap/thermostaticRadiatorValve.zap new file mode 100644 index 00000000000000..7ab1f612324b07 --- /dev/null +++ b/examples/thermostat/qpg/zap/thermostaticRadiatorValve.zap @@ -0,0 +1,5120 @@ +{ + "fileFormat": 2, + "featureLevel": 99, + "creator": "zap", + "keyValuePairs": [ + { + "key": "commandDiscovery", + "value": "1" + }, + { + "key": "defaultResponsePolicy", + "value": "always" + }, + { + "key": "manufacturerCodes", + "value": "0x1002" + } + ], + "package": [ + { + "pathRelativity": "relativeToZap", + "path": "../../../../src/app/zap-templates/zcl/zcl.json", + "type": "zcl-properties", + "category": "matter", + "version": 1, + "description": "Matter SDK ZCL data" + }, + { + "pathRelativity": "relativeToZap", + "path": "../../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "version": "chip-v1" + } + ], + "endpointTypes": [ + { + "id": 1, + "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], + "deviceTypeName": "MA-rootdevice", + "deviceTypeCode": 22, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "IdentifyTime", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "IdentifyType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "IdentifyTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Binding", + "code": 30, + "mfgCode": null, + "define": "BINDING_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "Binding", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Access Control", + "code": 31, + "mfgCode": null, + "define": "ACCESS_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "ACL", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Extension", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SubjectsPerAccessControlEntry", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TargetsPerAccessControlEntry", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AccessControlEntriesPerFabric", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "AccessControlEntryChanged", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "AccessControlExtensionChanged", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Basic Information", + "code": 40, + "mfgCode": null, + "define": "BASIC_INFORMATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DataModelRevision", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorName", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorID", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "vendor_id", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductName", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductID", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NodeLabel", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "NVM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Location", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersion", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersionString", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersion", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersionString", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ManufacturingDate", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartNumber", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductURL", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "long_char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductLabel", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SerialNumber", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LocalConfigDisabled", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "NVM", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UniqueID", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CapabilityMinima", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "CapabilityMinimaStruct", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxPathsPerInvoke", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "StartUp", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "ShutDown", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "Leave", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "OTA Software Update Provider", + "code": 41, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_PROVIDER_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [ + { + "name": "QueryImage", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "QueryImageResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ApplyUpdateRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ApplyUpdateResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "NotifyUpdateApplied", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "OTA Software Update Requestor", + "code": 42, + "mfgCode": null, + "define": "OTA_SOFTWARE_UPDATE_REQUESTOR_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AnnounceOTAProvider", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "DefaultOTAProviders", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UpdatePossible", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UpdateState", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "UpdateStateEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "UpdateStateProgress", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "StateTransition", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "VersionApplied", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "DownloadError", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Localization Configuration", + "code": 43, + "mfgCode": null, + "define": "LOCALIZATION_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "ActiveLocale", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "en-US", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedLocales", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Time Format Localization", + "code": 44, + "mfgCode": null, + "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "HourFormat", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "HourFormatEnum", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveCalendarType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "CalendarTypeEnum", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportedCalendarTypes", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Unit Localization", + "code": 45, + "mfgCode": null, + "define": "UNIT_LOCALIZATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "TemperatureUnit", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "TempUnitEnum", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "General Commissioning", + "code": 48, + "mfgCode": null, + "define": "GENERAL_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ArmFailSafe", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ArmFailSafeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "SetRegulatoryConfig", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "SetRegulatoryConfigResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CommissioningComplete", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CommissioningCompleteResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "Breadcrumb", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BasicCommissioningInfo", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "BasicCommissioningInfo", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RegulatoryConfig", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "RegulatoryLocationTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LocationCapability", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "RegulatoryLocationTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportsConcurrentConnection", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Network Commissioning", + "code": 49, + "mfgCode": null, + "define": "NETWORK_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ScanNetworks", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ScanNetworksResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "AddOrUpdateWiFiNetwork", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 0 + }, + { + "name": "AddOrUpdateThreadNetwork", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveNetwork", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "NetworkConfigResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ConnectNetwork", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ConnectNetworkResponse", + "code": 7, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ReorderNetwork", + "code": 8, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "MaxNetworks", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Networks", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ScanMaxTimeSeconds", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ConnectMaxTimeSeconds", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "InterfaceEnabled", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastNetworkingStatus", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "NetworkCommissioningStatusEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastNetworkID", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastConnectErrorValue", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int32s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Diagnostic Logs", + "code": 50, + "mfgCode": null, + "define": "DIAGNOSTIC_LOGS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "RetrieveLogsRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RetrieveLogsRequestResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "General Diagnostics", + "code": 51, + "mfgCode": null, + "define": "GENERAL_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "TestEventTrigger", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TimeSnapshot", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TimeSnapshotResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "NetworkInterfaces", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RebootCount", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpTime", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TotalOperationalHours", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BootReason", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "BootReasonEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveHardwareFaults", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveRadioFaults", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveNetworkFaults", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TestEventTriggersEnabled", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "false", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0002", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "BootReason", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Software Diagnostics", + "code": 52, + "mfgCode": null, + "define": "SOFTWARE_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "ThreadMetrics", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapFree", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapUsed", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentHeapHighWatermark", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Thread Network Diagnostics", + "code": 53, + "mfgCode": null, + "define": "THREAD_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "Channel", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RoutingRole", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "RoutingRoleEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NetworkName", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PanId", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ExtendedPanId", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "MeshLocalPrefix", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OverrunCount", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NeighborTable", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RouteTable", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartitionId", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Weighting", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "DataVersion", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "StableDataVersion", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LeaderRouterId", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "DetachedRoleCount", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ChildRoleCount", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RouterRoleCount", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LeaderRoleCount", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "AttachAttemptCount", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartitionIdChangeCount", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BetterPartitionAttachAttemptCount", + "code": 20, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ParentChangeCount", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxTotalCount", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxUnicastCount", + "code": 23, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxBroadcastCount", + "code": 24, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxAckRequestedCount", + "code": 25, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxAckedCount", + "code": 26, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxNoAckRequestedCount", + "code": 27, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxDataCount", + "code": 28, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxDataPollCount", + "code": 29, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxBeaconCount", + "code": 30, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxBeaconRequestCount", + "code": 31, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxOtherCount", + "code": 32, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxRetryCount", + "code": 33, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxDirectMaxRetryExpiryCount", + "code": 34, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxIndirectMaxRetryExpiryCount", + "code": 35, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrCcaCount", + "code": 36, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrAbortCount", + "code": 37, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrBusyChannelCount", + "code": 38, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxTotalCount", + "code": 39, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxUnicastCount", + "code": 40, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxBroadcastCount", + "code": 41, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDataCount", + "code": 42, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDataPollCount", + "code": 43, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxBeaconCount", + "code": 44, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxBeaconRequestCount", + "code": 45, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxOtherCount", + "code": 46, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxAddressFilteredCount", + "code": 47, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDestAddrFilteredCount", + "code": 48, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxDuplicatedCount", + "code": 49, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrNoFrameCount", + "code": 50, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrUnknownNeighborCount", + "code": 51, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrInvalidSrcAddrCount", + "code": 52, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrSecCount", + "code": 53, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrFcsCount", + "code": 54, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RxErrOtherCount", + "code": 55, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ActiveTimestamp", + "code": 56, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PendingTimestamp", + "code": 57, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Delay", + "code": 58, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 0, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SecurityPolicy", + "code": 59, + "mfgCode": null, + "side": "server", + "type": "SecurityPolicy", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ChannelPage0Mask", + "code": 60, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OperationalDatasetComponents", + "code": 61, + "mfgCode": null, + "side": "server", + "type": "OperationalDatasetComponents", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ActiveNetworkFaultsList", + "code": 62, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x000F", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "WiFi Network Diagnostics", + "code": 54, + "mfgCode": null, + "define": "WIFI_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 0, + "commands": [ + { + "name": "ResetCounts", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "BSSID", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SecurityType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "SecurityTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "WiFiVersion", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "WiFiVersionEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ChannelNumber", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RSSI", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int8s", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BeaconLostCount", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BeaconRxCount", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PacketMulticastRxCount", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PacketMulticastTxCount", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PacketUnicastRxCount", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PacketUnicastTxCount", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentMaxRate", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OverrunCount", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "Disconnection", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "AssociationFailure", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "ConnectionStatus", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Ethernet Network Diagnostics", + "code": 55, + "mfgCode": null, + "define": "ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 0, + "attributes": [ + { + "name": "PHYRate", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "PHYRateEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FullDuplex", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PacketRxCount", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PacketTxCount", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TxErrCount", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CollisionCount", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OverrunCount", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CarrierDetect", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TimeSinceReset", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Administrator Commissioning", + "code": 60, + "mfgCode": null, + "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "OpenCommissioningWindow", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "OpenBasicCommissioningWindow", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RevokeCommissioning", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "WindowStatus", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "CommissioningWindowStatusEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminFabricIndex", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "fabric_idx", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminVendorId", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "vendor_id", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Operational Credentials", + "code": 62, + "mfgCode": null, + "define": "OPERATIONAL_CREDENTIALS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AttestationRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AttestationResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CertificateChainRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CertificateChainResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CSRRequest", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CSRResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "AddNOC", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "UpdateNOC", + "code": 7, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "NOCResponse", + "code": 8, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "UpdateFabricLabel", + "code": 9, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveFabric", + "code": 10, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddTrustedRootCertificate", + "code": 11, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Fabrics", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SupportedFabrics", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CommissionedFabrics", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TrustedRootCertificates", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentFabricIndex", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Group Key Management", + "code": 63, + "mfgCode": null, + "define": "GROUP_KEY_MANAGEMENT_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "KeySetWrite", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetRead", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetReadResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "KeySetRemove", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetReadAllIndices", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetReadAllIndicesResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "GroupKeyMap", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "GroupTable", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "MaxGroupsPerFabric", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxGroupKeysPerFabric", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Fixed Label", + "code": 64, + "mfgCode": null, + "define": "FIXED_LABEL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "LabelList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "User Label", + "code": 65, + "mfgCode": null, + "define": "USER_LABEL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "LabelList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + }, + { + "id": 2, + "name": "MA-thermostat", + "deviceTypeRef": { + "code": 769, + "profileId": 259, + "label": "MA-thermostat", + "name": "MA-thermostat" + }, + "deviceTypes": [ + { + "code": 769, + "profileId": 259, + "label": "MA-thermostat", + "name": "MA-thermostat" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 769 + ], + "deviceTypeName": "MA-thermostat", + "deviceTypeCode": 769, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "client", + "enabled": 1, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TriggerEffect", + "code": 64, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "IdentifyTime", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "IdentifyType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "IdentifyTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AddGroup", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddGroupResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ViewGroup", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ViewGroupResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "GetGroupMembership", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetGroupMembershipResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RemoveGroup", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveGroupResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RemoveAllGroups", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddGroupIfIdentifying", + "code": 5, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "NameSupport", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "NameSupportBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "4", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Thermostat", + "code": 513, + "mfgCode": null, + "define": "THERMOSTAT_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "SetpointRaiseLower", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "LocalTemperature", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "AbsMinHeatSetpointLimit", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "700", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "AbsMaxHeatSetpointLimit", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "AbsMinCoolSetpointLimit", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1600", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "AbsMaxCoolSetpointLimit", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3200", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OccupiedCoolingSetpoint", + "code": 17, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0A28", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "OccupiedHeatingSetpoint", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x07D0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "MinHeatSetpointLimit", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "700", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "MaxHeatSetpointLimit", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "MinCoolSetpointLimit", + "code": 23, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1600", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "MaxCoolSetpointLimit", + "code": 24, + "mfgCode": null, + "side": "server", + "type": "int16s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3200", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "MinSetpointDeadBand", + "code": 25, + "mfgCode": null, + "side": "server", + "type": "int8s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x19", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ControlSequenceOfOperation", + "code": 27, + "mfgCode": null, + "side": "server", + "type": "ControlSequenceOfOperationEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x04", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SystemMode", + "code": 28, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "NVM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x01", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x23", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "6", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Thermostat User Interface Configuration", + "code": 516, + "mfgCode": null, + "define": "THERMOSTAT_USER_INTERFACE_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "TemperatureDisplayMode", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "TemperatureDisplayModeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "KeypadLockout", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "KeypadLockoutEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x00", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + } + ], + "endpoints": [ + { + "endpointTypeName": "MA-rootdevice", + "endpointTypeIndex": 0, + "profileId": 259, + "endpointId": 0, + "networkId": 0 + }, + { + "endpointTypeName": "MA-thermostat", + "endpointTypeIndex": 1, + "profileId": 259, + "endpointId": 1, + "networkId": 0 + } + ], + "log": [] +} \ No newline at end of file diff --git a/examples/thermostat/telink/CMakeLists.txt b/examples/thermostat/telink/CMakeLists.txt index 71f14895b28a55..d46ba248bd77bc 100755 --- a/examples/thermostat/telink/CMakeLists.txt +++ b/examples/thermostat/telink/CMakeLists.txt @@ -84,10 +84,6 @@ target_include_directories(app PRIVATE ${TELINK_COMMON}/util/include ${TELINK_COMMON}/app/include) -add_definitions( - "-DCHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=" -) - target_sources(app PRIVATE src/AppTask.cpp src/TemperatureManager.cpp @@ -105,3 +101,7 @@ chip_configure_data_model(app INCLUDE_SERVER ZAP_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../thermostat-common/thermostat.zap ) + +if(CONFIG_BOOTLOADER_MCUBOOT) + target_sources(app PRIVATE ${TELINK_COMMON}/util/src/OTAUtil.cpp) +endif() diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index a3141741f72acd..fa9ac10945582d 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -1716,6 +1716,16 @@ cluster Thermostat = 513 { kCoolingAndHeatingWithReheat = 5; } + enum PresetScenarioEnum : enum8 { + kUnspecified = 0; + kOccupied = 1; + kUnoccupied = 2; + kSleep = 3; + kWake = 4; + kVacation = 5; + kUserDefined = 6; + } + enum SetpointChangeSourceEnum : enum8 { kManual = 0; kSchedule = 1; @@ -1777,6 +1787,10 @@ cluster Thermostat = 513 { kSetback = 0x10; kAutoMode = 0x20; kLocalTemperatureNotExposed = 0x40; + kMatterScheduleConfiguration = 0x80; + kPresets = 0x100; + kSetpoints = 0x200; + kQueuedPresetsSupported = 0x400; } bitmap HVACSystemTypeBitmap : bitmap8 { @@ -1786,6 +1800,11 @@ cluster Thermostat = 513 { kHeatingUsesFuel = 0x20; } + bitmap PresetTypeFeaturesBitmap : bitmap16 { + kAutomatic = 0x1; + kSupportsNames = 0x2; + } + bitmap ProgrammingOperationModeBitmap : bitmap8 { kScheduleActive = 0x1; kAutoRecovery = 0x2; @@ -1824,6 +1843,62 @@ cluster Thermostat = 513 { kCoolSetpointPresent = 0x2; } + bitmap ScheduleTypeFeaturesBitmap : bitmap16 { + kSupportsPresets = 0x1; + kSupportsSetpoints = 0x2; + kSupportsNames = 0x4; + kSupportsOff = 0x8; + } + + bitmap TemperatureSetpointHoldPolicyBitmap : bitmap8 { + kHoldDurationElapsed = 0x1; + kHoldDurationElapsedOrPresetChanged = 0x2; + } + + struct ScheduleTransitionStruct { + ScheduleDayOfWeekBitmap dayOfWeek = 0; + int16u transitionTime = 1; + optional octet_string<16> presetHandle = 2; + optional SystemModeEnum systemMode = 3; + optional temperature coolingSetpoint = 4; + optional temperature heatingSetpoint = 5; + } + + struct ScheduleStruct { + nullable octet_string<16> scheduleHandle = 0; + SystemModeEnum systemMode = 1; + optional char_string<64> name = 2; + optional octet_string<16> presetHandle = 3; + ScheduleTransitionStruct transitions[] = 4; + optional nullable boolean builtIn = 5; + } + + struct PresetStruct { + nullable octet_string<16> presetHandle = 0; + PresetScenarioEnum presetScenario = 1; + optional nullable char_string<64> name = 2; + optional temperature coolingSetpoint = 3; + optional temperature heatingSetpoint = 4; + nullable boolean builtIn = 5; + } + + struct PresetTypeStruct { + PresetScenarioEnum presetScenario = 0; + int8u numberOfPresets = 1; + PresetTypeFeaturesBitmap presetTypeFeatures = 2; + } + + struct QueuedPresetStruct { + nullable octet_string<16> presetHandle = 0; + nullable epoch_s transitionTimestamp = 1; + } + + struct ScheduleTypeStruct { + SystemModeEnum systemMode = 0; + int8u numberOfSchedules = 1; + ScheduleTypeFeaturesBitmap scheduleTypeFeatures = 2; + } + struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; nullable temperature heatSetpoint = 1; @@ -1879,6 +1954,20 @@ cluster Thermostat = 513 { attribute access(write: manage) optional ACLouverPositionEnum ACLouverPosition = 69; readonly attribute optional nullable temperature ACCoilTemperature = 70; attribute access(write: manage) optional ACCapacityFormatEnum ACCapacityformat = 71; + readonly attribute optional PresetTypeStruct presetTypes[] = 72; + readonly attribute optional ScheduleTypeStruct scheduleTypes[] = 73; + readonly attribute optional int8u numberOfPresets = 74; + readonly attribute optional int8u numberOfSchedules = 75; + readonly attribute optional int8u numberOfScheduleTransitions = 76; + readonly attribute optional nullable int8u numberOfScheduleTransitionPerDay = 77; + readonly attribute optional nullable octet_string<16> activePresetHandle = 78; + readonly attribute optional nullable octet_string<16> activeScheduleHandle = 79; + attribute access(write: manage) optional PresetStruct presets[] = 80; + attribute access(write: manage) optional ScheduleStruct schedules[] = 81; + readonly attribute optional boolean presetsSchedulesEditable = 82; + readonly attribute optional TemperatureSetpointHoldPolicyBitmap temperatureSetpointHoldPolicy = 83; + readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 84; + readonly attribute optional nullable QueuedPresetStruct queuedPreset = 85; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -1910,14 +1999,45 @@ cluster Thermostat = 513 { ScheduleModeBitmap modeToReturn = 1; } + request struct SetActiveScheduleRequestRequest { + octet_string<16> scheduleHandle = 0; + } + + request struct SetActivePresetRequestRequest { + octet_string<16> presetHandle = 0; + optional int16u delayMinutes = 1; + } + + request struct StartPresetsSchedulesEditRequestRequest { + int16u timeoutSeconds = 0; + } + + request struct SetTemperatureSetpointHoldPolicyRequest { + TemperatureSetpointHoldPolicyBitmap temperatureSetpointHoldPolicy = 0; + } + /** Command description for SetpointRaiseLower */ command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; /** Command description for SetWeeklySchedule */ command access(invoke: manage) SetWeeklySchedule(SetWeeklyScheduleRequest): DefaultSuccess = 1; /** Command description for GetWeeklySchedule */ command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; - /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ + /** This command is used to clear the weekly schedule. The ClearWeeklySchedule command has no payload. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; + /** This command is used to set the active schedule. */ + command SetActiveScheduleRequest(SetActiveScheduleRequestRequest): DefaultSuccess = 5; + /** This command is used to set the active preset. */ + command SetActivePresetRequest(SetActivePresetRequestRequest): DefaultSuccess = 6; + /** This command is used to start editing the presets and schedules. */ + command access(invoke: manage) StartPresetsSchedulesEditRequest(StartPresetsSchedulesEditRequestRequest): DefaultSuccess = 7; + /** This command is used to cancel editing presets and schedules. */ + command access(invoke: manage) CancelPresetsSchedulesEditRequest(): DefaultSuccess = 8; + /** This command is used to notify the server that all edits are done and should be committed. */ + command access(invoke: manage) CommitPresetsSchedulesRequest(): DefaultSuccess = 9; + /** This command is sent to cancel a queued preset. */ + command access(invoke: manage) CancelSetActivePresetRequest(): DefaultSuccess = 10; + /** This command sets the set point hold policy. */ + command SetTemperatureSetpointHoldPolicy(SetTemperatureSetpointHoldPolicyRequest): DefaultSuccess = 11; } /** An interface for configuring the user interface of a thermostat (which may be remote from the thermostat). */ 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/examples/window-app/telink/CMakeLists.txt b/examples/window-app/telink/CMakeLists.txt index 781e487c9a4ff6..629a0a06779dcc 100644 --- a/examples/window-app/telink/CMakeLists.txt +++ b/examples/window-app/telink/CMakeLists.txt @@ -69,10 +69,6 @@ target_include_directories(app PRIVATE ${TELINK_COMMON}/util/include ${TELINK_COMMON}/app/include) -add_definitions( - "-DCHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=" -) - target_sources(app PRIVATE src/AppTask.cpp src/ZclCallbacks.cpp @@ -90,6 +86,10 @@ chip_configure_data_model(app ZAP_FILE ${CMAKE_CURRENT_SOURCE_DIR}/../common/window-app.zap ) +if(CONFIG_BOOTLOADER_MCUBOOT) + target_sources(app PRIVATE ${TELINK_COMMON}/util/src/OTAUtil.cpp) +endif() + # Fix for unused swap parameter in: zephyr/include/zephyr/arch/riscv/irq.h:70 add_compile_options(-Wno-error=unused-parameter) diff --git a/scripts/build/build/targets.py b/scripts/build/build/targets.py index aa11f1e169c35d..e8241e0bfe5913 100755 --- a/scripts/build/build/targets.py +++ b/scripts/build/build/targets.py @@ -584,6 +584,8 @@ def BuildQorvoTarget(): TargetPart('light', app=QpgApp.LIGHT), TargetPart('shell', app=QpgApp.SHELL), TargetPart('persistent-storage', app=QpgApp.PERSISTENT_STORAGE), + TargetPart('light-switch', app=QpgApp.LIGHT_SWITCH), + TargetPart('thermostat', app=QpgApp.THERMOSTAT), ]) target.AppendModifier('updateimage', update_image=True) diff --git a/scripts/build/builders/qpg.py b/scripts/build/builders/qpg.py index 67f224b80a4657..e641b6f58df4ec 100644 --- a/scripts/build/builders/qpg.py +++ b/scripts/build/builders/qpg.py @@ -23,6 +23,8 @@ class QpgApp(Enum): LOCK = auto() SHELL = auto() PERSISTENT_STORAGE = auto() + LIGHT_SWITCH = auto() + THERMOSTAT = auto() def ExampleName(self): if self == QpgApp.LIGHT: @@ -33,6 +35,10 @@ def ExampleName(self): return 'shell' elif self == QpgApp.PERSISTENT_STORAGE: return 'persistent-storage' + elif self == QpgApp.LIGHT_SWITCH: + return 'light-switch-app' + elif self == QpgApp.THERMOSTAT: + return 'thermostat' else: raise Exception('Unknown app type: %r' % self) @@ -45,6 +51,10 @@ def AppNamePrefix(self): return 'chip-qpg6105-shell-example' elif self == QpgApp.PERSISTENT_STORAGE: return 'chip-qpg6105-persistent_storage-example' + elif self == QpgApp.LIGHT_SWITCH: + return 'chip-qpg6105-light-switch-example' + elif self == QpgApp.THERMOSTAT: + return 'chip-qpg6105-thermostat-example' else: raise Exception('Unknown app type: %r' % self) @@ -57,6 +67,10 @@ def FlashBundleName(self): return 'shell_app.out.flashbundle.txt' elif self == QpgApp.PERSISTENT_STORAGE: return 'persistent_storage_app.out.flashbundle.txt' + elif self == QpgApp.LIGHT_SWITCH: + return 'light_switch_app.out.flashbundle.txt' + elif self == QpgApp.THERMOSTAT: + return 'thermostat.out.flashbundle.txt' else: raise Exception('Unknown app type: %r' % self) diff --git a/scripts/build/testdata/all_targets_linux_x64.txt b/scripts/build/testdata/all_targets_linux_x64.txt index fa8b84eec05cb6..c400af29ce138a 100644 --- a/scripts/build/testdata/all_targets_linux_x64.txt +++ b/scripts/build/testdata/all_targets_linux_x64.txt @@ -19,7 +19,7 @@ mbed-cy8cproto_062_4343w-{lock,light,all-clusters,all-clusters-minimal,pigweed,o mw320-all-clusters-app nrf-{nrf5340dk,nrf52840dk,nrf52840dongle}-{all-clusters,all-clusters-minimal,lock,light,light-switch,shell,pump,pump-controller,window-covering}[-rpc] nrf-native-posix-64-tests -qpg-qpg6105-{lock,light,shell,persistent-storage}[-updateimage] +qpg-qpg6105-{lock,light,shell,persistent-storage,light-switch,thermostat}[-updateimage] stm32-stm32wb5mm-dk-light tizen-arm-{all-clusters,all-clusters-minimal,chip-tool,light,tests}[-no-ble][-no-thread][-no-wifi][-asan][-ubsan][-with-ui] telink-{tlsr9518adk80d,tlsr9528a,tlsr9528a_retention}-{air-quality-sensor,all-clusters,all-clusters-minimal,bridge,contact-sensor,light,light-switch,lock,ota-requestor,pump,pump-controller,shell,smoke-co-alarm,temperature-measurement,thermostat,window-covering}[-ota][-dfu][-shell][-rpc][-factory-data][-4mb][-mars] 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/setup/requirements.qpg.txt b/scripts/setup/requirements.qpg.txt new file mode 100644 index 00000000000000..3216862564e024 --- /dev/null +++ b/scripts/setup/requirements.qpg.txt @@ -0,0 +1 @@ +pylzma \ No newline at end of file diff --git a/scripts/tools/zap/run_zaptool.sh b/scripts/tools/zap/run_zaptool.sh index 72c596270c7c95..2895ef4e718d10 100755 --- a/scripts/tools/zap/run_zaptool.sh +++ b/scripts/tools/zap/run_zaptool.sh @@ -17,7 +17,7 @@ # function _get_fullpath() { - cd "$(dirname "$1")" && echo "$PWD/$(basename "$1")" + cd "$(dirname "$1")" >/dev/null && echo "$PWD/$(basename "$1")" } set -e @@ -35,14 +35,14 @@ if [[ -z "$ZAP_INSTALL_PATH" && -n "$PW_ZAP_CIPD_INSTALL_DIR" ]]; then ZAP_INSTALL_PATH="$PW_ZAP_CIPD_INSTALL_DIR" fi -if [ ! -z "$ZAP_DEVELOPMENT_PATH" ]; then +if [ -n "$ZAP_DEVELOPMENT_PATH" ]; then WORKING_DIR=$ZAP_DEVELOPMENT_PATH ZAP_CMD="node src-script/zap-start.js" # Make sure we don't try to munge the package.json in the ZAP repo. export ZAP_SKIP_REAL_VERSION=1 "$CHIP_ROOT"/scripts/tools/zap/zap_bootstrap.sh -elif [ ! -z "$ZAP_INSTALL_PATH" ]; then +elif [ -n "$ZAP_INSTALL_PATH" ]; then if [[ "$OSTYPE" == "darwin"* ]]; then ZAP_CMD="$ZAP_INSTALL_PATH/zap.app/Contents/MacOS/zap" else @@ -59,7 +59,7 @@ fi echo "ARGS: $ZAP_ARGS" - if [[ "${ZAP_ARGS[@]}" == *"/all-clusters-app.zap"* ]]; then + if [[ "${ZAP_ARGS[*]}" == *"/all-clusters-app.zap"* ]]; then ZCL_FILE="$CHIP_ROOT/src/app/zap-templates/zcl/zcl-with-test-extensions.json" else ZCL_FILE="$CHIP_ROOT/src/app/zap-templates/zcl/zcl.json" 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/scripts/tools/zap/zap_bootstrap.sh b/scripts/tools/zap/zap_bootstrap.sh index 56734783f59ed9..ad2fb1fa893ad7 100755 --- a/scripts/tools/zap/zap_bootstrap.sh +++ b/scripts/tools/zap/zap_bootstrap.sh @@ -16,10 +16,6 @@ # limitations under the License. # -function _get_fullpath() { - cd "$(dirname "$1")" && echo "$PWD/$(basename "$1")" -} - function _usage() { cat < #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/device-energy-management-server/device-energy-management-server.cpp b/src/app/clusters/device-energy-management-server/device-energy-management-server.cpp new file mode 100644 index 00000000000000..bfe3cac5f2e89e --- /dev/null +++ b/src/app/clusters/device-energy-management-server/device-energy-management-server.cpp @@ -0,0 +1,559 @@ +/* + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "device-energy-management-server.h" + +#include +#include +#include +#include + +using namespace chip; +using namespace chip::app; +using namespace chip::app::Clusters; +using namespace chip::app::Clusters::DeviceEnergyManagement; +using namespace chip::app::Clusters::DeviceEnergyManagement::Attributes; + +using chip::Protocols::InteractionModel::Status; + +namespace chip { +namespace app { +namespace Clusters { +namespace DeviceEnergyManagement { + +CHIP_ERROR Instance::Init() +{ + ReturnErrorOnFailure(InteractionModelEngine::GetInstance()->RegisterCommandHandler(this)); + VerifyOrReturnError(registerAttributeAccessOverride(this), CHIP_ERROR_INCORRECT_STATE); + + return CHIP_NO_ERROR; +} + +void Instance::Shutdown() +{ + InteractionModelEngine::GetInstance()->UnregisterCommandHandler(this); + unregisterAttributeAccessOverride(this); +} + +bool Instance::HasFeature(Feature aFeature) const +{ + return mFeature.Has(aFeature); +} + +bool Instance::SupportsOptCmd(OptionalCommands aOptionalCmds) const +{ + return mOptionalCmds.Has(aOptionalCmds); +} + +// AttributeAccessInterface +CHIP_ERROR Instance::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) +{ + switch (aPath.mAttributeId) + { + case ESAType::Id: + return aEncoder.Encode(mDelegate.GetESAType()); + case ESACanGenerate::Id: + return aEncoder.Encode(mDelegate.GetESACanGenerate()); + case ESAState::Id: + return aEncoder.Encode(mDelegate.GetESAState()); + case AbsMinPower::Id: + return aEncoder.Encode(mDelegate.GetAbsMinPower()); + case AbsMaxPower::Id: + return aEncoder.Encode(mDelegate.GetAbsMaxPower()); + case PowerAdjustmentCapability::Id: + /* PA - PowerAdjustment */ + if (!HasFeature(Feature::kPowerAdjustment)) + { + return CHIP_IM_GLOBAL_STATUS(UnsupportedAttribute); + } + return aEncoder.Encode(mDelegate.GetPowerAdjustmentCapability()); + case Forecast::Id: + /* PFR | SFR - Power Forecast Reporting or State Forecast Reporting */ + if (!HasFeature(Feature::kPowerForecastReporting) && !HasFeature(Feature::kStateForecastReporting)) + { + return CHIP_IM_GLOBAL_STATUS(UnsupportedAttribute); + } + return aEncoder.Encode(mDelegate.GetForecast()); + /* FeatureMap - is held locally */ + case FeatureMap::Id: + return aEncoder.Encode(mFeature); + } + + /* Allow all other unhandled attributes to fall through to Ember */ + return CHIP_NO_ERROR; +} + +// CommandHandlerInterface +CHIP_ERROR Instance::EnumerateAcceptedCommands(const ConcreteClusterPath & cluster, CommandIdCallback callback, void * context) +{ + using namespace Commands; + + if (HasFeature(Feature::kPowerAdjustment)) + { + for (auto && cmd : { + PowerAdjustRequest::Id, + CancelPowerAdjustRequest::Id, + }) + { + VerifyOrExit(callback(cmd, context) == Loop::Continue, /**/); + } + } + + if (HasFeature(Feature::kForecastAdjustment)) + { + for (auto && cmd : { + StartTimeAdjustRequest::Id, + PauseRequest::Id, + ResumeRequest::Id, + }) + { + VerifyOrExit(callback(cmd, context) == Loop::Continue, /**/); + } + } + + if (SupportsOptCmd(OptionalCommands::kSupportsModifyForecastRequest)) + { + VerifyOrExit(callback(ModifyForecastRequest::Id, context) == Loop::Continue, /**/); + } + + if (SupportsOptCmd(OptionalCommands::kSupportsRequestConstraintBasedForecast)) + { + VerifyOrExit(callback(RequestConstraintBasedForecast::Id, context) == Loop::Continue, /**/); + } + +exit: + return CHIP_NO_ERROR; +} + +void Instance::InvokeCommand(HandlerContext & handlerContext) +{ + using namespace Commands; + + switch (handlerContext.mRequestPath.mCommandId) + { + case PowerAdjustRequest::Id: + if (!HasFeature(Feature::kPowerAdjustment)) + { + handlerContext.mCommandHandler.AddStatus(handlerContext.mRequestPath, Status::UnsupportedCommand); + } + else + { + HandleCommand( + handlerContext, + [this](HandlerContext & ctx, const auto & commandData) { HandlePowerAdjustRequest(ctx, commandData); }); + } + return; + case CancelPowerAdjustRequest::Id: + if (!HasFeature(Feature::kPowerAdjustment)) + { + handlerContext.mCommandHandler.AddStatus(handlerContext.mRequestPath, Status::UnsupportedCommand); + } + else + { + HandleCommand( + handlerContext, + [this](HandlerContext & ctx, const auto & commandData) { HandleCancelPowerAdjustRequest(ctx, commandData); }); + } + return; + case StartTimeAdjustRequest::Id: + if (!HasFeature(Feature::kForecastAdjustment)) + { + handlerContext.mCommandHandler.AddStatus(handlerContext.mRequestPath, Status::UnsupportedCommand); + } + else + { + HandleCommand( + handlerContext, + [this](HandlerContext & ctx, const auto & commandData) { HandleStartTimeAdjustRequest(ctx, commandData); }); + } + return; + case PauseRequest::Id: + if (!HasFeature(Feature::kForecastAdjustment)) + { + handlerContext.mCommandHandler.AddStatus(handlerContext.mRequestPath, Status::UnsupportedCommand); + } + else + { + HandleCommand( + handlerContext, [this](HandlerContext & ctx, const auto & commandData) { HandlePauseRequest(ctx, commandData); }); + } + return; + case ResumeRequest::Id: + if (!HasFeature(Feature::kForecastAdjustment)) + { + handlerContext.mCommandHandler.AddStatus(handlerContext.mRequestPath, Status::UnsupportedCommand); + } + else + { + HandleCommand( + handlerContext, [this](HandlerContext & ctx, const auto & commandData) { HandleResumeRequest(ctx, commandData); }); + } + return; + case ModifyForecastRequest::Id: + if (!SupportsOptCmd(OptionalCommands::kSupportsModifyForecastRequest)) + { + handlerContext.mCommandHandler.AddStatus(handlerContext.mRequestPath, Status::UnsupportedCommand); + } + else + { + HandleCommand( + handlerContext, + [this](HandlerContext & ctx, const auto & commandData) { HandleModifyForecastRequest(ctx, commandData); }); + } + return; + case RequestConstraintBasedForecast::Id: + if (!SupportsOptCmd(OptionalCommands::kSupportsRequestConstraintBasedForecast)) + { + handlerContext.mCommandHandler.AddStatus(handlerContext.mRequestPath, Status::UnsupportedCommand); + } + else + { + HandleCommand( + handlerContext, + [this](HandlerContext & ctx, const auto & commandData) { HandleRequestConstraintBasedForecast(ctx, commandData); }); + } + return; + } +} + +void Instance::HandlePowerAdjustRequest(HandlerContext & ctx, const Commands::PowerAdjustRequest::DecodableType & commandData) +{ + int64_t power = commandData.power; + uint32_t durationSec = commandData.duration; + bool validArgs = false; + Status status = Status::Success; + + PowerAdjustmentCapability::TypeInfo::Type powerAdjustmentCapability; + powerAdjustmentCapability = mDelegate.GetPowerAdjustmentCapability(); + + if (powerAdjustmentCapability.IsNull()) + { + ChipLogError(Zcl, "DEM: powerAdjustmentCapability IsNull"); + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::ConstraintError); + return; + } + + /* PowerAdjustmentCapability is a list - so iterate through checking if the command is within one of the offers */ + for (auto pas : powerAdjustmentCapability.Value()) + { + if ((power >= pas.minPower) && (durationSec >= pas.minDuration) && (power <= pas.maxPower) && + (durationSec <= pas.maxDuration)) + { + ChipLogProgress(Zcl, "DEM: Good PowerAdjustment args"); + validArgs = true; + break; + } + } + + if (!validArgs) + { + ChipLogError(Zcl, "DEM: invalid request range"); + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::ConstraintError); + return; + } + + ChipLogProgress(Zcl, "DEM: Good PowerAdjustRequest() args."); + + status = mDelegate.PowerAdjustRequest(power, durationSec); + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, status); + if (status != Status::Success) + { + ChipLogError(Zcl, "DEM: Failed to PowerAdjustRequest() args."); + } +} + +void Instance::HandleCancelPowerAdjustRequest(HandlerContext & ctx, + const Commands::CancelPowerAdjustRequest::DecodableType & commandData) +{ + Status status = Status::Success; + ESAStateEnum esaStatus; + + /* Check that the ESA state is PowerAdjustActive */ + esaStatus = mDelegate.GetESAState(); + if (ESAStateEnum::kPowerAdjustActive != esaStatus) + { + ChipLogError(Zcl, "DEM: kPowerAdjustActive != esaStatus"); + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::Failure); + return; + } + + status = mDelegate.CancelPowerAdjustRequest(); + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, status); + if (status != Status::Success) + { + ChipLogError(Zcl, "DEM: Failed to CancelPowerAdjustRequest()"); + return; + } +} + +void Instance::HandleStartTimeAdjustRequest(HandlerContext & ctx, + const Commands::StartTimeAdjustRequest::DecodableType & commandData) +{ + Status status = Status::Success; + uint32_t earliestStartTimeEpoch = 0; + uint32_t latestEndTimeEpoch = 0; + uint32_t requestedStartTimeEpoch = commandData.requestedStartTime; + uint32_t duration; + + DataModel::Nullable forecastNullable = mDelegate.GetForecast(); + + if (forecastNullable.IsNull()) + { + ChipLogError(Zcl, "DEM: Forecast is Null"); + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::Failure); + return; + } + + if (ESAStateEnum::kUserOptOut == mDelegate.GetESAState()) + { + ChipLogError(Zcl, "DEM: ESAState = kUserOptOut"); + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::Failure); + return; + } + + /* Temporary variable to save calling .Value() on forecastNullable */ + auto & forecast = forecastNullable.Value(); + + /** + * If the RequestedStartTime value resulted in a time shift which is + * outside the time constraints of EarliestStartTime and + * LatestEndTime, then the command SHALL be rejected with CONSTRAINT_ERROR; + * in other failure scenarios the command SHALL be rejected with FAILURE + */ + /* earliestStartTime is optional based on the StartTimeAdjust (STA) feature AND is nullable */ + if (!(forecast.earliestStartTime.HasValue()) || !(forecast.latestEndTime.HasValue())) + { + /* These should have values, since this command requires STA feature and these are mandatory for that */ + ChipLogError(Zcl, "DEM: EarliestStartTime / LatestEndTime do not have values"); + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::Failure); + return; + } + + /* Temporary variable to save keep calling .Value() on the Optional element */ + DataModel::Nullable & earliestStartTimeNullable = forecast.earliestStartTime.Value(); + /* Latest End Time is optional & cannot be null - unlike earliestStartTime! */ + latestEndTimeEpoch = forecast.latestEndTime.Value(); + + if (earliestStartTimeNullable.IsNull()) + { + System::Clock::Milliseconds64 cTMs; + CHIP_ERROR err = System::SystemClock().GetClock_RealTimeMS(cTMs); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "DEM: Unable to get current time - err:%" CHIP_ERROR_FORMAT, err.Format()); + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::Failure); + return; + } + + auto unixEpoch = std::chrono::duration_cast(cTMs).count(); + uint32_t chipEpoch = 0; + if (!UnixEpochToChipEpochTime(unixEpoch, chipEpoch)) + { + ChipLogError(Zcl, "DEM: unable to convert Unix Epoch time to Matter Epoch Time"); + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::Failure); + return; + } + + /* Null means - We can start immediately */ + earliestStartTimeEpoch = chipEpoch; /* NOW */ + } + else + { + earliestStartTimeEpoch = earliestStartTimeNullable.Value(); + } + + duration = forecast.endTime - forecast.startTime; // the current entire forecast duration + if (requestedStartTimeEpoch < earliestStartTimeEpoch) + { + ChipLogError(Zcl, "DEM: Bad requestedStartTime %ld, earlier than earliestStartTime %ld.", + static_cast(requestedStartTimeEpoch), + static_cast(earliestStartTimeEpoch)); + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::ConstraintError); + return; + } + + if ((requestedStartTimeEpoch + duration) > latestEndTimeEpoch) + { + ChipLogError(Zcl, "DEM: Bad requestedStartTimeEpoch + duration %ld, later than latestEndTime %ld.", + static_cast(requestedStartTimeEpoch + duration), + static_cast(latestEndTimeEpoch)); + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::ConstraintError); + return; + } + + ChipLogProgress(Zcl, "DEM: Good requestedStartTimeEpoch %ld.", static_cast(requestedStartTimeEpoch)); + status = mDelegate.StartTimeAdjustRequest(requestedStartTimeEpoch); + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, status); + if (status != Status::Success) + { + ChipLogError(Zcl, "DEM: StartTimeAdjustRequest(%ld) FAILURE", static_cast(requestedStartTimeEpoch)); + return; + } +} + +void Instance::HandlePauseRequest(HandlerContext & ctx, const Commands::PauseRequest::DecodableType & commandData) +{ + Status status = Status::Success; + CHIP_ERROR err = CHIP_NO_ERROR; + DataModel::Nullable forecast = mDelegate.GetForecast(); + + uint32_t duration = commandData.duration; + + if (forecast.IsNull()) + { + ChipLogError(Zcl, "DEM: Forecast is Null"); + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::Failure); + return; + } + + if (ESAStateEnum::kUserOptOut == mDelegate.GetESAState()) + { + ChipLogError(Zcl, "DEM: ESAState = kUserOptOut"); + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::Failure); + return; + } + + /* value SHALL be between the MinPauseDuration and MaxPauseDuration indicated in the + ActiveSlotNumber index in the Slots list in the Forecast. + */ + uint16_t activeSlotNumber; + if (forecast.Value().activeSlotNumber.IsNull()) + { + ChipLogError(Zcl, "DEM: activeSlotNumber Is Null"); + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::Failure); + return; + } + + activeSlotNumber = forecast.Value().activeSlotNumber.Value(); + if (activeSlotNumber >= forecast.Value().slots.size()) + { + ChipLogError(Zcl, "DEM: Bad activeSlotNumber %d , size()=%d.", activeSlotNumber, + static_cast(forecast.Value().slots.size())); + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::Failure); + return; + } + + if (!forecast.Value().slots[activeSlotNumber].slotIsPauseable) + { + ChipLogError(Zcl, "DEM: activeSlotNumber %d is NOT pauseable.", activeSlotNumber); + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::ConstraintError); + return; + } + + if ((duration < forecast.Value().slots[activeSlotNumber].minPauseDuration) && + (duration > forecast.Value().slots[activeSlotNumber].maxPauseDuration)) + { + ChipLogError(Zcl, "DEM: out of range pause duration %ld", static_cast(duration)); + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::ConstraintError); + return; + } + + err = mDelegate.SetESAState(ESAStateEnum::kPaused); + if (CHIP_NO_ERROR != err) + { + ChipLogError(Zcl, "DEM: SetESAState(paused) FAILURE"); + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::Failure); + return; + } + + status = mDelegate.PauseRequest(duration); + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::Failure); + if (status != Status::Success) + { + ChipLogError(Zcl, "DEM: mDelegate.PauseRequest(%ld) FAILURE", static_cast(duration)); + return; + } +} + +void Instance::HandleResumeRequest(HandlerContext & ctx, const Commands::ResumeRequest::DecodableType & commandData) +{ + Status status = Status::Success; + DataModel::Nullable forecast = mDelegate.GetForecast(); + + if (ESAStateEnum::kPaused != mDelegate.GetESAState()) + { + ChipLogError(Zcl, "DEM: ESAState not Paused."); + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::Failure); + return; + } + + status = mDelegate.ResumeRequest(); + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::Failure); + if (status != Status::Success) + { + ChipLogError(Zcl, "DEM: mDelegate.ResumeRequest() FAILURE"); + return; + } +} + +void Instance::HandleModifyForecastRequest(HandlerContext & ctx, const Commands::ModifyForecastRequest::DecodableType & commandData) +{ + Status status = Status::Success; + uint32_t forecastId = commandData.forecastId; + DataModel::Nullable forecast; + + if (ESAStateEnum::kUserOptOut == mDelegate.GetESAState()) + { + ChipLogError(Zcl, "DEM: ESAState = kUserOptOut"); + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::Failure); + return; + } + + forecast = mDelegate.GetForecast(); + if (forecast.IsNull()) + { + ChipLogError(Zcl, "DEM: Forecast is Null"); + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::Failure); + return; + } + + DataModel::DecodableList slotAdjustments = commandData.slotAdjustments; + status = mDelegate.ModifyForecastRequest(forecastId, slotAdjustments); + if (status != Status::Success) + { + ChipLogError(Zcl, "DEM: mDelegate.ModifyForecastRequest() FAILURE"); + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::Failure); + return; + } +} + +void Instance::HandleRequestConstraintBasedForecast(HandlerContext & ctx, + const Commands::RequestConstraintBasedForecast::DecodableType & commandData) +{ + Status status = Status::Success; + + if (ESAStateEnum::kUserOptOut == mDelegate.GetESAState()) + { + ChipLogError(Zcl, "DEM: ESAState = kUserOptOut"); + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::Failure); + return; + } + + status = mDelegate.RequestConstraintBasedForecast(commandData.constraints); + if (status != Status::Success) + { + ChipLogError(Zcl, "DEM: mDelegate.commandData.constraints() FAILURE"); + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::Failure); + return; + } +} + +} // namespace DeviceEnergyManagement +} // namespace Clusters +} // namespace app +} // namespace chip + +void MatterDeviceEnergyManagementPluginServerInitCallback() {} diff --git a/src/app/clusters/device-energy-management-server/device-energy-management-server.h b/src/app/clusters/device-energy-management-server/device-energy-management-server.h new file mode 100644 index 00000000000000..7ab6a8aa60f306 --- /dev/null +++ b/src/app/clusters/device-energy-management-server/device-energy-management-server.h @@ -0,0 +1,214 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace chip { +namespace app { +namespace Clusters { +namespace DeviceEnergyManagement { + +using namespace chip::app::Clusters::DeviceEnergyManagement::Attributes; + +using chip::Protocols::InteractionModel::Status; + +class Delegate +{ +public: + virtual ~Delegate() = default; + + void SetEndpointId(EndpointId aEndpoint) { mEndpointId = aEndpoint; } + + /** + * @brief Delegate should implement a handler to begin to adjust client power + * consumption/generation to the level requested. + * + * @param power Milli-Watts the ESA SHALL use during the adjustment period. + * @param duration The duration that the ESA SHALL maintain the requested power for. + * @return Success if the adjustment is accepted; otherwise the command SHALL be rejected with appropriate error. + */ + virtual Status PowerAdjustRequest(const int64_t power, const uint32_t duration) = 0; + + /** + * @brief Delegate SHALL make the ESA end the active power adjustment session & return to normal (or idle) power levels. + * The ESA SHALL also generate an PowerAdjustEnd Event and the ESAState SHALL be restored to Online. + * + * @return It should report SUCCESS if successful and FAILURE otherwise. + */ + virtual Status CancelPowerAdjustRequest() = 0; + + /** + * @brief Delegate for the ESA SHALL update its Forecast attribute with the RequestedStartTime including a new ForecastId. + * + * If the ESA supports ForecastAdjustment, and the ESAState is not UserOptOut and the RequestedStartTime is after + * the EarliestStartTime and the resulting EndTime is before the LatestEndTime, then ESA SHALL accept the request + * to modify the Start Time. + * A client can estimate the entire Forecast sequence duration by computing the EndTime - StartTime fields from the + * Forecast attribute, and therefore avoid scheduling the start time too late. + * + * @param requestedStartTime The requested start time in UTC that the client would like the appliance to shift its power + * forecast to. + * @return Success if the StartTime in the Forecast is updated, otherwise the command SHALL be rejected with appropriate + * IM_Status. + */ + virtual Status StartTimeAdjustRequest(const uint32_t requestedStartTime) = 0; + + /** + * @brief Delegate handler for PauseRequest command + * + * If the ESA supports FA and the SlotIsPauseable field is true in the ActiveSlotNumber + * index in the Slots list, and the ESAState is not UserOptOut then the ESA SHALL allow its current + * operation to be Paused. + * + * During this state the ESA SHALL not consume or produce significant power (other than required to keep its + * basic control system operational). + * + * @param duration Duration that the ESA SHALL be paused for. + * @return Success if the ESA is paused, otherwise returns other IM_Status. + */ + virtual Status PauseRequest(const uint32_t duration) = 0; + + /** + * @brief Delegate handler for ResumeRequest command + * + * If the ESA supports FA and it is currently Paused then the ESA SHALL resume its operation. + * The ESA SHALL also generate a Resumed Event and the ESAState SHALL be updated accordingly to + * reflect its current state. + * + * @return Success if the ESA is resumed, otherwise returns other IM_Status. + */ + virtual Status ResumeRequest() = 0; + + /** + * @brief Delegate handler for ModifyForecastRequest + * + * If the ESA supports FA, and the ESAState is not UserOptOut it SHALL attempt to adjust its power forecast. + * This allows a one or more modifications in a single command by sending a list of modifications (one for each 'slot'). + * Attempts to modify slots which have already past, SHALL result in the entire command being rejected. + * If the ESA accepts the requested Forecast then it SHALL update its Forecast attribute (incrementing its ForecastId) + * and run the revised Forecast as its new intended operation. + * + * @param forecastId Indicates the ESA ForecastId that is to be modified. + * @param slotAdjustments List of adjustments to be applied to the ESA, corresponding to the expected ESA forecastId. + * @return Success if the entire list of SlotAdjustmentStruct are accepted, otherwise the command + * SHALL be rejected returning other IM_Status. + */ + virtual Status ModifyForecastRequest(const uint32_t forecastId, + const DataModel::DecodableList & slotAdjustments) = 0; + + /** + * @brief Delegate handler for RequestConstraintBasedForecast + * + * The ESA SHALL inspect the requested power limits to ensure that there are no overlapping elements. The ESA + * manufacturer may also reject the request if it could cause the user’s preferences to be breached (e.g. may + * cause the home to be too hot or too cold, or a battery to be insufficiently charged). + * If the ESA can meet the requested power limits, it SHALL regenerate a new Power Forecast with a new ForecastId. + * + * @param constraints Sequence of turn up/down power requests that the ESA is being asked to constrain its operation within. + * @return Success if successful, otherwise the command SHALL be rejected returning other IM_Status. + */ + virtual Status + RequestConstraintBasedForecast(const DataModel::DecodableList & constraints) = 0; + + // ------------------------------------------------------------------ + // Get attribute methods + virtual ESATypeEnum GetESAType() = 0; + virtual bool GetESACanGenerate() = 0; + virtual ESAStateEnum GetESAState() = 0; + virtual int64_t GetAbsMinPower() = 0; + virtual int64_t GetAbsMaxPower() = 0; + virtual PowerAdjustmentCapability::TypeInfo::Type GetPowerAdjustmentCapability() = 0; + virtual DataModel::Nullable GetForecast() = 0; + + // ------------------------------------------------------------------ + // Set attribute methods + virtual CHIP_ERROR SetESAType(ESATypeEnum) = 0; + virtual CHIP_ERROR SetESACanGenerate(bool) = 0; + virtual CHIP_ERROR SetESAState(ESAStateEnum) = 0; + virtual CHIP_ERROR SetAbsMinPower(int64_t) = 0; + virtual CHIP_ERROR SetAbsMaxPower(int64_t) = 0; + virtual CHIP_ERROR SetPowerAdjustmentCapability(PowerAdjustmentCapability::TypeInfo::Type) = 0; + virtual CHIP_ERROR SetForecast(DataModel::Nullable) = 0; + +protected: + EndpointId mEndpointId = 0; +}; + +enum class OptionalCommands : uint32_t +{ + kSupportsModifyForecastRequest = 0x1, + kSupportsRequestConstraintBasedForecast = 0x2 +}; + +class Instance : public AttributeAccessInterface, public CommandHandlerInterface +{ +public: + Instance(EndpointId aEndpointId, Delegate & aDelegate, Feature aFeature, OptionalCommands aOptionalCmds) : + AttributeAccessInterface(MakeOptional(aEndpointId), Id), CommandHandlerInterface(MakeOptional(aEndpointId), Id), + mDelegate(aDelegate), mFeature(aFeature), mOptionalCmds(aOptionalCmds) + { + /* set the base class delegates endpointId */ + mDelegate.SetEndpointId(aEndpointId); + } + + ~Instance() { Shutdown(); } + + CHIP_ERROR Init(); + void Shutdown(); + + bool HasFeature(Feature aFeature) const; + bool SupportsOptCmd(OptionalCommands aOptionalCmds) const; + +private: + Delegate & mDelegate; + BitMask mFeature; + BitMask mOptionalCmds; + + // AttributeAccessInterface + CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; + // NOTE there are no writable attributes + + // CommandHandlerInterface + void InvokeCommand(HandlerContext & handlerContext) override; + CHIP_ERROR EnumerateAcceptedCommands(const ConcreteClusterPath & cluster, CommandIdCallback callback, void * context) override; + + void HandlePowerAdjustRequest(HandlerContext & ctx, const Commands::PowerAdjustRequest::DecodableType & commandData); + void HandleCancelPowerAdjustRequest(HandlerContext & ctx, + const Commands::CancelPowerAdjustRequest::DecodableType & commandData); + void HandleStartTimeAdjustRequest(HandlerContext & ctx, const Commands::StartTimeAdjustRequest::DecodableType & commandData); + void HandlePauseRequest(HandlerContext & ctx, const Commands::PauseRequest::DecodableType & commandData); + void HandleResumeRequest(HandlerContext & ctx, const Commands::ResumeRequest::DecodableType & commandData); + void HandleModifyForecastRequest(HandlerContext & ctx, const Commands::ModifyForecastRequest::DecodableType & commandData); + void HandleRequestConstraintBasedForecast(HandlerContext & ctx, + const Commands::RequestConstraintBasedForecast::DecodableType & commandData); +}; + +} // namespace DeviceEnergyManagement +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/src/app/clusters/energy-evse-server/EnergyEvseTestEventTriggerDelegate.cpp b/src/app/clusters/energy-evse-server/EnergyEvseTestEventTriggerDelegate.cpp new file mode 100644 index 00000000000000..78fb87085f3b10 --- /dev/null +++ b/src/app/clusters/energy-evse-server/EnergyEvseTestEventTriggerDelegate.cpp @@ -0,0 +1,42 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "EnergyEvseTestEventTriggerDelegate.h" + +using namespace chip::app::Clusters::EnergyEvse; + +namespace chip { + +bool EnergyEvseTestEventTriggerDelegate::DoesEnableKeyMatch(const ByteSpan & enableKey) const +{ + return !mEnableKey.empty() && mEnableKey.data_equal(enableKey); +} + +CHIP_ERROR EnergyEvseTestEventTriggerDelegate::HandleEventTrigger(uint64_t eventTrigger) +{ + if (HandleEnergyEvseTestEventTrigger(eventTrigger)) + { + return CHIP_NO_ERROR; + } + if (mOtherDelegate != nullptr) + { + return mOtherDelegate->HandleEventTrigger(eventTrigger); + } + return CHIP_ERROR_INVALID_ARGUMENT; +} + +} // namespace chip diff --git a/src/app/clusters/energy-evse-server/EnergyEvseTestEventTriggerDelegate.h b/src/app/clusters/energy-evse-server/EnergyEvseTestEventTriggerDelegate.h new file mode 100644 index 00000000000000..3c1dff4f5e7f81 --- /dev/null +++ b/src/app/clusters/energy-evse-server/EnergyEvseTestEventTriggerDelegate.h @@ -0,0 +1,98 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include + +namespace chip { + +/* + * These Test EventTrigger values are specified in the TC_EEVSE test plan + * and are defined conditions used in test events. + * + * They are sent along with the enableKey (manufacturer defined secret) + * in the General Diagnostic cluster TestEventTrigger command + */ +enum class EnergyEvseTrigger : uint64_t +{ + // Scenarios + // Basic Functionality Test Event | Simulate installation with _{A_CIRCUIT_CAPACITY}_=32A and + // _{A_USER_MAXIMUM_CHARGE_CURRENT}_=32A + kBasicFunctionality = 0x0099000000000000, + // Basic Functionality Test Event Clear | End simulation of installation + kBasicFunctionalityClear = 0x0099000000000001, + // EV Plugged-in Test Event | Simulate plugging the EV into the EVSE using a cable of 63A capacity + kEVPluggedIn = 0x0099000000000002, + // EV Plugged-in Test Event Clear | Simulate unplugging the EV + kEVPluggedInClear = 0x0099000000000003, + // EV Charge Demand Test Event | Simulate the EV presenting charge demand to the EVSE + kEVChargeDemand = 0x0099000000000004, + // EV Charge Demand Test Event Clear | Simulate the EV becoming fully charged + kEVChargeDemandClear = 0x0099000000000005, + // EVSE has a GroundFault fault + kEVSEGroundFault = 0x0099000000000010, + // EVSE has a OverTemperature fault + kEVSEOverTemperatureFault = 0x0099000000000011, + // EVSE faults have cleared + kEVSEFaultClear = 0x0099000000000012, + // EVSE Diagnostics Complete | Simulate diagnostics have been completed and return to normal + kEVSEDiagnosticsComplete = 0x0099000000000020, +}; + +class EnergyEvseTestEventTriggerDelegate : public TestEventTriggerDelegate +{ +public: + /** + * This class expects the enableKey ByteSpan to be valid forever. + * Typically this feature is only enabled in certification testing + * and uses a static secret key in the device for testing (e.g. in factory data) + */ + explicit EnergyEvseTestEventTriggerDelegate(const ByteSpan & enableKey, TestEventTriggerDelegate * otherDelegate) : + mEnableKey(enableKey), mOtherDelegate(otherDelegate) + {} + + /* This function returns True if the enableKey received in the TestEventTrigger command + * matches the value passed into the constructor. + */ + bool DoesEnableKeyMatch(const ByteSpan & enableKey) const override; + + /** This function must return True if the eventTrigger is recognised and handled + * It must return False to allow a higher level TestEvent handler to check other + * clusters that may handle it. + */ + CHIP_ERROR HandleEventTrigger(uint64_t eventTrigger) override; + +private: + ByteSpan mEnableKey; + TestEventTriggerDelegate * mOtherDelegate; +}; + +} // namespace chip + +/** + * @brief User handler for handling the test event trigger + * + * @note If TestEventTrigger is enabled, it needs to be implemented in the app + * + * @param eventTrigger Event trigger to handle + * + * @retval true on success + * @retval false if error happened + */ +bool HandleEnergyEvseTestEventTrigger(uint64_t eventTrigger); diff --git a/src/app/clusters/energy-evse-server/energy-evse-server.cpp b/src/app/clusters/energy-evse-server/energy-evse-server.cpp index 60f9e24be0f962..019aead77c24a8 100644 --- a/src/app/clusters/energy-evse-server/energy-evse-server.cpp +++ b/src/app/clusters/energy-evse-server/energy-evse-server.cpp @@ -23,6 +23,7 @@ using namespace chip; using namespace chip::app; +using namespace chip::app::DataModel; using namespace chip::app::Clusters; using namespace chip::app::Clusters::EnergyEvse; using namespace chip::app::Clusters::EnergyEvse::Attributes; @@ -125,6 +126,10 @@ CHIP_ERROR Instance::Read(const ConcreteReadAttributePath & aPath, AttributeValu return aEncoder.Encode(mDelegate.GetSessionEnergyCharged()); case SessionEnergyDischarged::Id: return aEncoder.Encode(mDelegate.GetSessionEnergyDischarged()); + + /* FeatureMap - is held locally */ + case FeatureMap::Id: + return aEncoder.Encode(mFeature); } /* Allow all other unhandled attributes to fall through to Ember */ return CHIP_NO_ERROR; @@ -166,7 +171,7 @@ CHIP_ERROR Instance::Write(const ConcreteDataAttributePath & aPath, AttributeVal } uint16_t newValue; ReturnErrorOnFailure(aDecoder.Decode(newValue)); - ReturnErrorOnFailure(mDelegate.SetApproximateEVEfficiency(newValue)); + ReturnErrorOnFailure(mDelegate.SetApproximateEVEfficiency(MakeNullable(newValue))); return CHIP_NO_ERROR; } diff --git a/src/app/clusters/energy-evse-server/energy-evse-server.h b/src/app/clusters/energy-evse-server/energy-evse-server.h index 5df2f0149eb1ed..a194551607c6f4 100644 --- a/src/app/clusters/energy-evse-server/energy-evse-server.h +++ b/src/app/clusters/energy-evse-server/energy-evse-server.h @@ -48,6 +48,7 @@ class Delegate virtual ~Delegate() = default; void SetEndpointId(EndpointId aEndpoint) { mEndpointId = aEndpoint; } + EndpointId GetEndpointId() { return mEndpointId; } /** * @brief Delegate should implement a handler to disable the EVSE. @@ -116,9 +117,9 @@ class Delegate // ------------------------------------------------------------------ // Set attribute methods - virtual CHIP_ERROR SetUserMaximumChargeCurrent(int64_t aNewValue) = 0; - virtual CHIP_ERROR SetRandomizationDelayWindow(uint32_t aNewValue) = 0; - virtual CHIP_ERROR SetApproximateEVEfficiency(uint16_t aNewValue) = 0; + virtual CHIP_ERROR SetUserMaximumChargeCurrent(int64_t aNewValue) = 0; + virtual CHIP_ERROR SetRandomizationDelayWindow(uint32_t aNewValue) = 0; + virtual CHIP_ERROR SetApproximateEVEfficiency(DataModel::Nullable aNewValue) = 0; protected: EndpointId mEndpointId = 0; 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/microwave-oven-control-server/microwave-oven-control-server.cpp b/src/app/clusters/microwave-oven-control-server/microwave-oven-control-server.cpp index 09716a03fd9d09..c1e9546b2afcb7 100644 --- a/src/app/clusters/microwave-oven-control-server/microwave-oven-control-server.cpp +++ b/src/app/clusters/microwave-oven-control-server/microwave-oven-control-server.cpp @@ -40,11 +40,12 @@ namespace Clusters { namespace MicrowaveOvenControl { Instance::Instance(Delegate * aDelegate, EndpointId aEndpointId, ClusterId aClusterId, - Clusters::OperationalState::Instance & aOpStateInstance, + BitMask aFeature, Clusters::OperationalState::Instance & aOpStateInstance, Clusters::ModeBase::Instance & aMicrowaveOvenModeInstance) : CommandHandlerInterface(MakeOptional(aEndpointId), aClusterId), AttributeAccessInterface(MakeOptional(aEndpointId), aClusterId), mDelegate(aDelegate), mEndpointId(aEndpointId), - mClusterId(aClusterId), mOpStateInstance(aOpStateInstance), mMicrowaveOvenModeInstance(aMicrowaveOvenModeInstance) + mClusterId(aClusterId), mFeature(aFeature), mOpStateInstance(aOpStateInstance), + mMicrowaveOvenModeInstance(aMicrowaveOvenModeInstance) { mDelegate->SetInstance(this); } @@ -58,77 +59,148 @@ Instance::~Instance() CHIP_ERROR Instance::Init() { // Check if the cluster has been selected in zap - if (!emberAfContainsServer(mEndpointId, mClusterId)) - { - ChipLogError(Zcl, "Microwave Oven Control: The cluster with ID %lu was not enabled in zap.", long(mClusterId)); - return CHIP_ERROR_INVALID_ARGUMENT; - } + VerifyOrReturnError( + emberAfContainsServer(mEndpointId, mClusterId), CHIP_ERROR_INVALID_ARGUMENT, + ChipLogError(Zcl, "Microwave Oven Control: The cluster with ID %lu was not enabled in zap.", long(mClusterId))); + + // Exactly one of the PowerAsNumber and PowerInWatts features must be supported, per spec. + VerifyOrReturnError( + mFeature.Has(MicrowaveOvenControl::Feature::kPowerAsNumber) || mFeature.Has(MicrowaveOvenControl::Feature::kPowerInWatts), + CHIP_ERROR_INVALID_ARGUMENT, + ChipLogError(Zcl, + "Microwave Oven Control: feature bits error, feature must support one of PowerInWatts and PowerAsNumber")); + + // Check that the feature bits do not include both PowerAsNumber and PowerInWatts + VerifyOrReturnError( + !(mFeature.Has(MicrowaveOvenControl::Feature::kPowerAsNumber) && + mFeature.Has(MicrowaveOvenControl::Feature::kPowerInWatts)), + CHIP_ERROR_INVALID_ARGUMENT, + ChipLogError(Zcl, + "Microwave Oven Control: feature bits error, feature could not support both PowerAsNumber and PowerInWatts")); + + // Per spec, the PowerNumberLimits feature is only allowed if the PowerAsNumber feature is supported. + VerifyOrReturnError( + !mFeature.Has(MicrowaveOvenControl::Feature::kPowerNumberLimits) || + mFeature.Has(MicrowaveOvenControl::Feature::kPowerAsNumber), + CHIP_ERROR_INVALID_ARGUMENT, + ChipLogError( + Zcl, + "Microwave Oven Control: feature bits error, if feature supports PowerNumberLimits it must support PowerAsNumber")); ReturnErrorOnFailure(InteractionModelEngine::GetInstance()->RegisterCommandHandler(this)); VerifyOrReturnError(registerAttributeAccessOverride(this), CHIP_ERROR_INCORRECT_STATE); - + // If the PowerInWatts feature is supported, get the count of supported watt levels so we can later + // ensure incoming watt level values are valid. + if (HasFeature(MicrowaveOvenControl::Feature::kPowerInWatts)) + { + mSupportedWattLevels = GetCountOfSupportedWattLevels(); + VerifyOrReturnError(mSupportedWattLevels > 0, CHIP_ERROR_INVALID_ARGUMENT, + ChipLogError(Zcl, "Microwave Oven Control: supported watt levels is empty")); + } return CHIP_NO_ERROR; } -uint32_t Instance::GetCookTime() const +bool Instance::HasFeature(MicrowaveOvenControl::Feature feature) const { - return mCookTime; + return mFeature.Has(feature); } -uint8_t Instance::GetPowerSetting() const +uint8_t Instance::GetCountOfSupportedWattLevels() const { - return mPowerSetting; + uint8_t wattIndex = 0; + uint16_t watt = 0; + while (mDelegate->GetWattSettingByIndex(wattIndex, watt) == CHIP_NO_ERROR) + { + wattIndex++; + } + return wattIndex; } -void Instance::SetCookTime(uint32_t cookTime) +uint32_t Instance::GetCookTimeSec() const { - uint32_t oldCookTime = mCookTime; - mCookTime = cookTime; - if (mCookTime != oldCookTime) - { - MatterReportingAttributeChangeCallback(mEndpointId, mClusterId, Attributes::CookTime::Id); - } + return mCookTimeSec; } -void Instance::SetPowerSetting(uint8_t powerSetting) +void Instance::SetCookTimeSec(uint32_t cookTimeSec) { - uint8_t oldPowerSetting = mPowerSetting; - mPowerSetting = powerSetting; - if (mPowerSetting != oldPowerSetting) + uint32_t oldCookTimeSec = mCookTimeSec; + mCookTimeSec = cookTimeSec; + if (mCookTimeSec != oldCookTimeSec) { - MatterReportingAttributeChangeCallback(mEndpointId, mClusterId, Attributes::PowerSetting::Id); + MatterReportingAttributeChangeCallback(mEndpointId, mClusterId, Attributes::CookTime::Id); } } CHIP_ERROR Instance::Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) { - ChipLogError(Zcl, "OperationalState: Reading"); + ChipLogError(Zcl, "Microwave Oven Control: Reading"); switch (aPath.mAttributeId) { - case MicrowaveOvenControl::Attributes::CookTime::Id: { - ReturnErrorOnFailure(aEncoder.Encode(GetCookTime())); - } - break; - - case MicrowaveOvenControl::Attributes::PowerSetting::Id: { - ReturnErrorOnFailure(aEncoder.Encode(GetPowerSetting())); - } - break; - - case MicrowaveOvenControl::Attributes::MinPower::Id: { - ReturnErrorOnFailure(aEncoder.Encode(mDelegate->GetMinPower())); - } - break; - - case MicrowaveOvenControl::Attributes::MaxPower::Id: { - ReturnErrorOnFailure(aEncoder.Encode(mDelegate->GetMaxPower())); - } - break; - - case MicrowaveOvenControl::Attributes::PowerStep::Id: { - ReturnErrorOnFailure(aEncoder.Encode(mDelegate->GetPowerStep())); - } - break; + case MicrowaveOvenControl::Attributes::CookTime::Id: + return aEncoder.Encode(GetCookTimeSec()); + + case MicrowaveOvenControl::Attributes::MaxCookTime::Id: + return aEncoder.Encode(mDelegate->GetMaxCookTimeSec()); + + case MicrowaveOvenControl::Attributes::PowerSetting::Id: + VerifyOrReturnError(HasFeature(MicrowaveOvenControl::Feature::kPowerAsNumber), CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE, + ChipLogError(Zcl, "Microwave Oven Control: can not get PowerSetting number, feature is not supported")); + + return aEncoder.Encode(mDelegate->GetPowerSettingNum()); + + case MicrowaveOvenControl::Attributes::MinPower::Id: + VerifyOrReturnError(HasFeature(MicrowaveOvenControl::Feature::kPowerAsNumber), CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE, + ChipLogError(Zcl, "Microwave Oven Control: can not get MinPower number, feature is not supported")); + + return aEncoder.Encode(HasFeature(MicrowaveOvenControl::Feature::kPowerNumberLimits) ? mDelegate->GetMinPowerNum() + : kDefaultMinPowerNum); + + case MicrowaveOvenControl::Attributes::MaxPower::Id: + VerifyOrReturnError(HasFeature(MicrowaveOvenControl::Feature::kPowerAsNumber), CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE, + ChipLogError(Zcl, "Microwave Oven Control: can not get MaxPower number, feature is not supported")); + + return aEncoder.Encode(HasFeature(MicrowaveOvenControl::Feature::kPowerNumberLimits) ? mDelegate->GetMaxPowerNum() + : kDefaultMaxPowerNum); + + case MicrowaveOvenControl::Attributes::PowerStep::Id: + VerifyOrReturnError(HasFeature(MicrowaveOvenControl::Feature::kPowerAsNumber), CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE, + ChipLogError(Zcl, "Microwave Oven Control: can not get PowerStep number, feature is not supported")); + + return aEncoder.Encode(HasFeature(MicrowaveOvenControl::Feature::kPowerNumberLimits) ? mDelegate->GetPowerStepNum() + : kDefaultPowerStepNum); + + case MicrowaveOvenControl::Attributes::SupportedWatts::Id: + VerifyOrReturnError(HasFeature(MicrowaveOvenControl::Feature::kPowerInWatts), CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE, + ChipLogError(Zcl, "Microwave Oven Control: can not get SuppoertWatts list, feature is not supported")); + + return aEncoder.EncodeList([delegate = mDelegate](const auto & encoder) -> CHIP_ERROR { + uint16_t wattRating; + uint8_t index = 0; + CHIP_ERROR err = CHIP_NO_ERROR; + while ((err = delegate->GetWattSettingByIndex(index, wattRating)) == CHIP_NO_ERROR) + { + ReturnErrorOnFailure(encoder.Encode(wattRating)); + index++; + } + if (err == CHIP_ERROR_NOT_FOUND) + { + return CHIP_NO_ERROR; + } + return err; + }); + + case MicrowaveOvenControl::Attributes::SelectedWattIndex::Id: + VerifyOrReturnError( + HasFeature(MicrowaveOvenControl::Feature::kPowerInWatts), CHIP_ERROR_UNSUPPORTED_CHIP_FEATURE, + ChipLogError(Zcl, "Microwave Oven Control: can not get SelectedWattIndex number, feature is not supported")); + + return aEncoder.Encode(mDelegate->GetCurrentWattIndex()); + + case MicrowaveOvenControl::Attributes::WattRating::Id: + return aEncoder.Encode(mDelegate->GetWattRating()); + + case MicrowaveOvenControl::Attributes::FeatureMap::Id: + return aEncoder.Encode(mFeature.Raw()); } return CHIP_NO_ERROR; } @@ -161,17 +233,28 @@ void Instance::HandleSetCookingParameters(HandlerContext & ctx, const Commands:: uint8_t opState; uint8_t modeValue; uint8_t reqCookMode; - uint32_t reqCookTime; - uint8_t reqPowerSetting; - auto & cookMode = req.cookMode; - auto & cookTime = req.cookTime; - auto & powerSetting = req.powerSetting; + uint32_t reqCookTimeSec; + bool reqStartAfterSetting; + auto & cookMode = req.cookMode; + auto & cookTimeSec = req.cookTime; + auto & powerSetting = req.powerSetting; + auto & wattSettingIndex = req.wattSettingIndex; + auto & startAfterSetting = req.startAfterSetting; opState = mOpStateInstance.GetCurrentOperationalState(); VerifyOrExit(opState == to_underlying(OperationalStateEnum::kStopped), status = Status::InvalidInState); - VerifyOrExit(cookMode.HasValue() || cookTime.HasValue() || powerSetting.HasValue(), status = Status::InvalidCommand; - ChipLogError(Zcl, "Microwave Oven Control: Failed to set cooking parameters, all command fields are missing ")); + if (startAfterSetting.HasValue()) + { + VerifyOrExit( + ServerClusterCommandExists( + ConcreteCommandPath(mEndpointId, OperationalState::Id, OperationalState::Commands::Start::Id)) == Status::Success, + status = Status::InvalidCommand; + ChipLogError( + Zcl, + "Microwave Oven Control: Failed to set cooking parameters, Start command of operational state is not supported")); + } + reqStartAfterSetting = startAfterSetting.ValueOr(false); modeValue = 0; VerifyOrExit(mMicrowaveOvenModeInstance.GetModeValueByModeTag(to_underlying(MicrowaveOvenMode::ModeTag::kNormal), modeValue) == @@ -180,19 +263,68 @@ void Instance::HandleSetCookingParameters(HandlerContext & ctx, const Commands:: ChipLogError(Zcl, "Microwave Oven Control: Failed to set cookMode, Normal mode is not found")); reqCookMode = cookMode.ValueOr(modeValue); - VerifyOrExit(mMicrowaveOvenModeInstance.IsSupportedMode(reqCookMode), status = Status::InvalidCommand; + VerifyOrExit(mMicrowaveOvenModeInstance.IsSupportedMode(reqCookMode), status = Status::ConstraintError; ChipLogError(Zcl, "Microwave Oven Control: Failed to set cookMode, cookMode is not supported")); - reqCookTime = cookTime.ValueOr(MicrowaveOvenControl::kDefaultCookTime); - VerifyOrExit(IsCookTimeInRange(reqCookTime), status = Status::InvalidCommand; + reqCookTimeSec = cookTimeSec.ValueOr(MicrowaveOvenControl::kDefaultCookTimeSec); + VerifyOrExit(IsCookTimeSecondsInRange(reqCookTimeSec, mDelegate->GetMaxCookTimeSec()), status = Status::ConstraintError; ChipLogError(Zcl, "Microwave Oven Control: Failed to set cookTime, cookTime value is out of range")); - reqPowerSetting = powerSetting.ValueOr(mDelegate->GetMaxPower()); - VerifyOrExit(IsPowerSettingInRange(reqPowerSetting, mDelegate->GetMinPower(), mDelegate->GetMaxPower()), - status = Status::InvalidCommand; - ChipLogError(Zcl, "Microwave Oven Control: Failed to set cookPower, cookPower value is out of range")); - - status = mDelegate->HandleSetCookingParametersCallback(reqCookMode, reqCookTime, reqPowerSetting); + if (HasFeature(MicrowaveOvenControl::Feature::kPowerAsNumber)) + { + // if using power as number, check if the param is invalid and set PowerSetting number. + uint8_t reqPowerSettingNum; + uint8_t maxPowerNum = kDefaultMaxPowerNum; + uint8_t minPowerNum = kDefaultMinPowerNum; + uint8_t powerStepNum = kDefaultPowerStepNum; + VerifyOrExit(!wattSettingIndex.HasValue(), status = Status::InvalidCommand; ChipLogError( + Zcl, "Microwave Oven Control: Failed to set cooking parameters, should have no value for wattSettingIndex")); + + VerifyOrExit( + cookMode.HasValue() || cookTimeSec.HasValue() || powerSetting.HasValue(), status = Status::InvalidCommand; + ChipLogError(Zcl, "Microwave Oven Control: Failed to set cooking parameters, all command fields are missing ")); + + if (HasFeature(MicrowaveOvenControl::Feature::kPowerNumberLimits)) + { + maxPowerNum = mDelegate->GetMaxPowerNum(); + minPowerNum = mDelegate->GetMinPowerNum(); + powerStepNum = mDelegate->GetPowerStepNum(); + } + reqPowerSettingNum = powerSetting.ValueOr(maxPowerNum); + VerifyOrExit(IsPowerSettingNumberInRange(reqPowerSettingNum, minPowerNum, maxPowerNum), status = Status::ConstraintError; + ChipLogError(Zcl, "Microwave Oven Control: Failed to set PowerSetting, PowerSetting value is out of range")); + + VerifyOrExit( + reqPowerSettingNum % powerStepNum == 0, status = Status::InvalidCommand; ChipLogError( + Zcl, + "Microwave Oven Control: Failed to set PowerSetting, PowerSetting value must be multiple of PowerStep number")); + + status = mDelegate->HandleSetCookingParametersCallback(reqCookMode, reqCookTimeSec, reqStartAfterSetting, + MakeOptional(reqPowerSettingNum), NullOptional); + } + else + { + // if using power in watt, check if the param is invalid and set wattSettingIndex number. + uint8_t reqWattSettingIndex; + VerifyOrExit(!powerSetting.HasValue(), status = Status::InvalidCommand; ChipLogError( + Zcl, "Microwave Oven Control: Failed to set cooking parameters, should have no value for powerSetting ")); + + VerifyOrExit( + cookMode.HasValue() || cookTimeSec.HasValue() || wattSettingIndex.HasValue(), status = Status::InvalidCommand; + ChipLogError(Zcl, "Microwave Oven Control: Failed to set cooking parameters, all command fields are missing ")); + + // count of supported watt levels must greater than 0 + VerifyOrExit( + mSupportedWattLevels > 0, + ChipLogError(Zcl, "Microwave Oven Control: Failed to set wattSettingIndex, count of supported watt levels is 0")); + + reqWattSettingIndex = wattSettingIndex.ValueOr(mSupportedWattLevels - 1); + VerifyOrExit(reqWattSettingIndex <= (mSupportedWattLevels - 1), status = Status::ConstraintError; + ChipLogError(Zcl, "Microwave Oven Control: Failed to set wattSettingIndex, wattSettingIndex is out of range")); + + status = mDelegate->HandleSetCookingParametersCallback(reqCookMode, reqCookTimeSec, reqStartAfterSetting, NullOptional, + MakeOptional(reqWattSettingIndex)); + } exit: ctx.mCommandHandler.AddStatus(ctx.mRequestPath, status); @@ -203,30 +335,30 @@ void Instance::HandleAddMoreTime(HandlerContext & ctx, const Commands::AddMoreTi ChipLogDetail(Zcl, "Microwave Oven Control: HandleAddMoreTime"); Status status; uint8_t opState; - uint32_t finalCookTime; + uint32_t finalCookTimeSec; opState = mOpStateInstance.GetCurrentOperationalState(); VerifyOrExit(opState != to_underlying(OperationalStateEnum::kError), status = Status::InvalidInState); // if the added cooking time is greater than the max cooking time, the cooking time stay unchanged. - VerifyOrExit(req.timeToAdd <= kMaxCookTime - GetCookTime(), status = Status::ConstraintError; + VerifyOrExit(req.timeToAdd + GetCookTimeSec() <= mDelegate->GetMaxCookTimeSec(), status = Status::ConstraintError; ChipLogError(Zcl, "Microwave Oven Control: Failed to set cookTime, cookTime value is out of range")); - finalCookTime = GetCookTime() + req.timeToAdd; - status = mDelegate->HandleModifyCookTimeCallback(finalCookTime); + finalCookTimeSec = GetCookTimeSec() + req.timeToAdd; + status = mDelegate->HandleModifyCookTimeSecondsCallback(finalCookTimeSec); exit: ctx.mCommandHandler.AddStatus(ctx.mRequestPath, status); } -bool IsCookTimeInRange(uint32_t cookTime) +bool IsCookTimeSecondsInRange(uint32_t cookTimeSec, uint32_t maxCookTimeSec) { - return MicrowaveOvenControl::kMinCookTime <= cookTime && cookTime <= MicrowaveOvenControl::kMaxCookTime; + return MicrowaveOvenControl::kMinCookTimeSec <= cookTimeSec && cookTimeSec <= maxCookTimeSec; } -bool IsPowerSettingInRange(uint8_t powerSetting, uint8_t minCookPower, uint8_t maxCookPower) +bool IsPowerSettingNumberInRange(uint8_t powerSettingNum, uint8_t minCookPowerNum, uint8_t maxCookPowerNum) { - return minCookPower <= powerSetting && powerSetting <= maxCookPower; + return minCookPowerNum <= powerSettingNum && powerSettingNum <= maxCookPowerNum; } } // namespace MicrowaveOvenControl @@ -238,6 +370,5 @@ bool IsPowerSettingInRange(uint8_t powerSetting, uint8_t minCookPower, uint8_t m * * Server Init * - * @param endpoint Endpoint that is being initialized */ void MatterMicrowaveOvenControlPluginServerInitCallback() {} diff --git a/src/app/clusters/microwave-oven-control-server/microwave-oven-control-server.h b/src/app/clusters/microwave-oven-control-server/microwave-oven-control-server.h index a9f1f1f5847b3b..d82b353f7f3eb1 100644 --- a/src/app/clusters/microwave-oven-control-server/microwave-oven-control-server.h +++ b/src/app/clusters/microwave-oven-control-server/microwave-oven-control-server.h @@ -31,11 +31,11 @@ namespace app { namespace Clusters { namespace MicrowaveOvenControl { -constexpr uint32_t kDefaultCookTime = 30u; -constexpr uint8_t kDefaultPowerSetting = 100u; -constexpr uint32_t kMaxCookTime = 65535u; -constexpr uint32_t kMinCookTime = 1u; -constexpr uint16_t kDerivedModeTag = 16384u; +constexpr uint32_t kDefaultCookTimeSec = 30u; +constexpr uint32_t kMinCookTimeSec = 1u; +constexpr uint8_t kDefaultMinPowerNum = 10u; +constexpr uint8_t kDefaultMaxPowerNum = 100u; +constexpr uint8_t kDefaultPowerStepNum = 10u; class Delegate; @@ -49,12 +49,13 @@ class Instance : public CommandHandlerInterface, public AttributeAccessInterface * Note: the caller must ensure that the delegate lives throughout the instance's lifetime. * @param aEndpointId The endpoint on which this cluster exists. This must match the zap configuration. * @param aClusterId The ID of the Microwave Oven Control cluster to be instantiated. + * @param aFeature The bitmask value that identifies which features are supported by this instance. * @param aOpStateInstance The reference of Operational State Instance. * @param aMicrowaveOvenModeInstance The reference of Microwave Oven Mode Instance. * Note: a MicrowaveOvenControl instance must relies on an Operational State instance and a Microwave Oven Mode instance. * Caller must ensure those 2 instances are live and initialized before initializing MicorwaveOvenControl instance. */ - Instance(Delegate * aDelegate, EndpointId aEndpointId, ClusterId aClusterId, + Instance(Delegate * aDelegate, EndpointId aEndpointId, ClusterId aClusterId, BitMask aFeature, Clusters::OperationalState::Instance & aOpStateInstance, Clusters::ModeBase::Instance & aMicrowaveOvenModeInstance); ~Instance() override; @@ -64,31 +65,32 @@ class Instance : public CommandHandlerInterface, public AttributeAccessInterface * This function must be called after defining an Instance class object. * @return Returns an error if the given endpoint and cluster ID have not been enabled in zap or if the * CommandHandler or AttributeHandler registration fails, else returns CHIP_NO_ERROR. + * This method also checks if the feature setting is valid, if invalid it will returns CHIP_ERROR_INVALID_ARGUMENT. */ CHIP_ERROR Init(); - /** - * @brief define the get/set api for the mandatory attributes - */ - uint32_t GetCookTime() const; - void SetCookTime(uint32_t cookTime); + bool HasFeature(MicrowaveOvenControl::Feature feature) const; + + uint8_t GetCountOfSupportedWattLevels() const; - uint8_t GetPowerSetting() const; - void SetPowerSetting(uint8_t powerSetting); + uint32_t GetCookTimeSec() const; + + void SetCookTimeSec(uint32_t cookTimeSec); private: Delegate * mDelegate; EndpointId mEndpointId; ClusterId mClusterId; + BitMask mFeature; Clusters::OperationalState::Instance & mOpStateInstance; Clusters::ModeBase::Instance & mMicrowaveOvenModeInstance; - uint32_t mCookTime = kDefaultCookTime; - uint8_t mPowerSetting = kDefaultPowerSetting; + uint32_t mCookTimeSec = kDefaultCookTimeSec; + uint8_t mSupportedWattLevels = 0; /** * IM-level implementation of read - * @return appropriately mapped CHIP_ERROR if applicable (may return CHIP_IM_GLOBAL_STATUS errors) + * @return appropriately mapped CHIP_ERROR if applicable */ CHIP_ERROR Read(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) override; @@ -125,27 +127,53 @@ class Delegate virtual ~Delegate() = default; /** - * @brief Handle Command Callback in application: SetCookingParameters - * @return Returns the Interaction Model status code which was user determined in the business logic - * @param cookMode: the user defined modes which from the Microwave Oven Mode application level - * @param cookTime: the input cook time value - * @param powerSetting: the input power setting value + * @brief Handle Command Callback in application: SetCookingParameters. + * @return Returns the Interaction Model status code which was user determined in the business logic. + * @param cookMode: the input cook mode value. Callee needs to define the cooking mode value in the Microwave Oven Mode + * instance. + * @param cookTimeSec: the input cook time value. + * @param startAfterSetting: if true, the cooking operation will start after handling the command. + * @param powerSettingNum: the input power setting value. + * @param wattSettingIndex: the input watts setting index. + * Note: powerSettingNum and wattSettingIndex must be mutually exclusive. + * If using power as number, wattSettingIndex will be set to NullOptional. + * If using power in watts, powerSettingNum will be set to NullOptional. */ - virtual Protocols::InteractionModel::Status HandleSetCookingParametersCallback(uint8_t cookMode, uint32_t cookTime, - uint8_t powerSetting) = 0; + virtual Protocols::InteractionModel::Status HandleSetCookingParametersCallback(uint8_t cookMode, uint32_t cookTimeSec, + bool startAfterSetting, + Optional powerSettingNum, + Optional wattSettingIndex) = 0; /** - * @brief Handle Command Callback in application: AddMoreTime - * @return Returns the Interaction Model status code which was user determined in the business logic - * @param finalCookTime: the cook time value after adding input time + * @brief Handle Command Callback in application: AddMoreTime. + * @return Returns the Interaction Model status code which was user determined in the business logic. + * @param finalCookTimeSec: the cook time value after adding input time. */ - virtual Protocols::InteractionModel::Status HandleModifyCookTimeCallback(uint32_t finalCookTime) = 0; + virtual Protocols::InteractionModel::Status HandleModifyCookTimeSecondsCallback(uint32_t finalCookTimeSec) = 0; + + /** + * Get the watt setting from the supported watts list. + * @param index The index of the watt setting to be returned. It is assumed that watt setting are indexable from 0 and with no + * gaps. + * @param wattSetting A reference to receive the watt setting on success. + * @return Returns a CHIP_NO_ERROR if there was no error and the label was returned successfully, + * CHIP_ERROR_NOT_FOUND if the index in beyond the list of available labels. + */ + virtual CHIP_ERROR GetWattSettingByIndex(uint8_t index, uint16_t & wattSetting) = 0; + + virtual uint32_t GetMaxCookTimeSec() const = 0; + + virtual uint8_t GetPowerSettingNum() const = 0; + + virtual uint8_t GetMinPowerNum() const = 0; + + virtual uint8_t GetMaxPowerNum() const = 0; - virtual uint8_t GetMinPower() const = 0; + virtual uint8_t GetPowerStepNum() const = 0; - virtual uint8_t GetMaxPower() const = 0; + virtual uint8_t GetCurrentWattIndex() const = 0; - virtual uint8_t GetPowerStep() const = 0; + virtual uint16_t GetWattRating() const = 0; private: friend class Instance; @@ -163,18 +191,14 @@ class Delegate }; /** - * @brief Check if the given cook time is in range - * @param cookTime cookTime that given by user + * @brief Check if the given cook time is in range. */ -bool IsCookTimeInRange(uint32_t cookTime); +bool IsCookTimeSecondsInRange(uint32_t cookTimeSec, uint32_t maxCookTimeSec); /** - * @brief Check if the given cooking power is in range - * @param powerSetting power setting that given by user - * @param minCookPower the min power setting that defined in application level - * @param maxCookPower the max power setting that defined in application level + * @brief Check if the given cooking power is in range. */ -bool IsPowerSettingInRange(uint8_t powerSetting, uint8_t minCookPower, uint8_t maxCookPower); +bool IsPowerSettingNumberInRange(uint8_t powerSettingNum, uint8_t minCookPowerNum, uint8_t maxCookPowerNum); } // namespace MicrowaveOvenControl } // namespace Clusters diff --git a/src/app/clusters/network-commissioning/network-commissioning.cpp b/src/app/clusters/network-commissioning/network-commissioning.cpp index 87edf85f5c06c9..6776897efce6fb 100644 --- a/src/app/clusters/network-commissioning/network-commissioning.cpp +++ b/src/app/clusters/network-commissioning/network-commissioning.cpp @@ -273,39 +273,76 @@ CHIP_ERROR Instance::Read(const ConcreteReadAttributePath & aPath, AttributeValu case Attributes::ClusterRevision::Id: return aEncoder.Encode(kCurrentClusterRevision); - case Attributes::SupportedWiFiBands::Id: -#if (!CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION && !CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP) - return CHIP_IM_GLOBAL_STATUS(UnsupportedAttribute); -#else - VerifyOrReturnError(mFeatureFlags.Has(Feature::kWiFiNetworkInterface), CHIP_IM_GLOBAL_STATUS(UnsupportedAttribute)); - - return aEncoder.EncodeList([this](const auto & encoder) { - uint32_t bands = mpDriver.Get()->GetSupportedWiFiBandsMask(); + case Attributes::SupportedWiFiBands::Id: { +#if (CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION || CHIP_DEVICE_CONFIG_ENABLE_WIFI_AP) + // TODO https://github.com/project-chip/connectedhomeip/issues/31431 + // This is a case of shared zap config where mandatory wifi attributes are enabled for a thread platform (e.g + // all-cluster-app). Real world product must only enable the attributes tied to the network technology supported by their + // product. Temporarily return an list of 1 element of value 0 when wifi is not supported or WiFiNetworkInterface is not + // enabled until a solution is implemented with the attribute list. + // Final implementation will return UnsupportedAttribute if we get here without the needed WiFi support . + // VerifyOrReturnError(mFeatureFlags.Has(Feature::kWiFiNetworkInterface), CHIP_IM_GLOBAL_STATUS(UnsupportedAttribute)); + if (mFeatureFlags.Has(Feature::kWiFiNetworkInterface)) + { + return aEncoder.EncodeList([this](const auto & encoder) { + uint32_t bands = mpDriver.Get()->GetSupportedWiFiBandsMask(); - // Extract every band from the bitmap of supported bands, starting positionally on the right. - for (uint32_t band_bit_pos = 0; band_bit_pos < std::numeric_limits::digits; ++band_bit_pos) - { - uint32_t band_mask = static_cast(1UL << band_bit_pos); - if ((bands & band_mask) != 0) + // Extract every band from the bitmap of supported bands, starting positionally on the right. + for (uint32_t band_bit_pos = 0; band_bit_pos < std::numeric_limits::digits; ++band_bit_pos) { - ReturnErrorOnFailure(encoder.Encode(static_cast(band_bit_pos))); + uint32_t band_mask = static_cast(1UL << band_bit_pos); + if ((bands & band_mask) != 0) + { + ReturnErrorOnFailure(encoder.Encode(static_cast(band_bit_pos))); + } } - } + return CHIP_NO_ERROR; + }); + } +#endif + return aEncoder.EncodeList([](const auto & encoder) { + WiFiBandEnum bands = WiFiBandEnum::k2g4; + ReturnErrorOnFailure(encoder.Encode(bands)); return CHIP_NO_ERROR; }); + } + break; + case Attributes::SupportedThreadFeatures::Id: { + // TODO https://github.com/project-chip/connectedhomeip/issues/31431 + BitMask ThreadCapabilities = 0; +#if (CHIP_DEVICE_CONFIG_ENABLE_THREAD) + // This is a case of shared zap config where mandatory thread attributes are enabled for a wifi platform (e.g + // all-cluster-app). Real world product must only enable the attributes tied to the network technology supported by their + // product. Temporarily encode a value of 0 reflecting no thread capabilities hen CHIP_DEVICE_CONFIG_ENABLE_THREAD or + // ThreadNetworkInterface are not enabled until a solution is implemented with the attribute list. + // Final implementation will return UnsupportedAttribute if we get here without the needed thread support + // VerifyOrReturnError(mFeatureFlags.Has(Feature::kThreadNetworkInterface), CHIP_IM_GLOBAL_STATUS(UnsupportedAttribute)); + if (mFeatureFlags.Has(Feature::kThreadNetworkInterface)) + { + ThreadCapabilities = mpDriver.Get()->GetSupportedThreadFeatures(); + } #endif - break; - - case Attributes::SupportedThreadFeatures::Id: - VerifyOrReturnError(mFeatureFlags.Has(Feature::kThreadNetworkInterface), CHIP_NO_ERROR); - VerifyOrReturnError(mpDriver.Valid(), CHIP_NO_ERROR); - return aEncoder.Encode(mpDriver.Get()->GetSupportedThreadFeatures()); - - case Attributes::ThreadVersion::Id: - VerifyOrReturnError(mFeatureFlags.Has(Feature::kThreadNetworkInterface), CHIP_NO_ERROR); - VerifyOrReturnError(mpDriver.Valid(), CHIP_NO_ERROR); - return aEncoder.Encode(mpDriver.Get()->GetThreadVersion()); - + return aEncoder.Encode(ThreadCapabilities); + } + break; + case Attributes::ThreadVersion::Id: { + // TODO https://github.com/project-chip/connectedhomeip/issues/31431ß + uint16_t threadVersion = 0; +#if (CHIP_DEVICE_CONFIG_ENABLE_THREAD) + // This is a case of shared zap config where mandatory thread attributes are enabled for a wifi platform (e.g + // all-cluster-app) Real world product must only enable the attributes tied to the network technology supported by their + // product. Temporarily encode a value of 0 reflecting no thread version when CHIP_DEVICE_CONFIG_ENABLE_THREAD or + // ThreadNetworkInterface are not enabled until a solution is implemented with the attribute list. + // Final implementation will return UnsupportedAttribute if we get here without the needed thread support + // VerifyOrReturnError(mFeatureFlags.Has(Feature::kThreadNetworkInterface), CHIP_IM_GLOBAL_STATUS(UnsupportedAttribute)); + if (mFeatureFlags.Has(Feature::kThreadNetworkInterface)) + { + threadVersion = mpDriver.Get()->GetThreadVersion(); + } +#endif + return aEncoder.Encode(threadVersion); + } + break; default: return CHIP_NO_ERROR; } 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/thermostat-server/thermostat-server.cpp b/src/app/clusters/thermostat-server/thermostat-server.cpp index 85ed4f14d5b6e3..f5a5157a7e44e9 100644 --- a/src/app/clusters/thermostat-server/thermostat-server.cpp +++ b/src/app/clusters/thermostat-server/thermostat-server.cpp @@ -108,6 +108,26 @@ CHIP_ERROR ThermostatAttrAccess::Read(const ConcreteReadAttributePath & aPath, A return aEncoder.Encode(valueRemoteSensing); } break; + case PresetTypes::Id: { + return aEncoder.EncodeList([](const auto & encoder) -> CHIP_ERROR { return CHIP_NO_ERROR; }); + } + break; + case Presets::Id: { + return aEncoder.EncodeList([](const auto & encoder) -> CHIP_ERROR { return CHIP_NO_ERROR; }); + } + break; + case ScheduleTypes::Id: { + return aEncoder.EncodeList([](const auto & encoder) -> CHIP_ERROR { return CHIP_NO_ERROR; }); + } + break; + case Schedules::Id: { + return aEncoder.EncodeList([](const auto & encoder) -> CHIP_ERROR { return CHIP_NO_ERROR; }); + } + break; + case QueuedPreset::Id: { + DataModel::Nullable value; + return aEncoder.Encode(value); + } default: // return CHIP_NO_ERROR and just read from the attribute store in default break; } @@ -140,6 +160,19 @@ CHIP_ERROR ThermostatAttrAccess::Write(const ConcreteDataAttributePath & aPath, return statusIB.ToChipError(); } break; + case Presets::Id: { + return CHIP_ERROR_NOT_IMPLEMENTED; + } + break; + + case Schedules::Id: { + return CHIP_ERROR_NOT_IMPLEMENTED; + } + break; + case QueuedPreset::Id: { + return CHIP_ERROR_NOT_IMPLEMENTED; + } + break; default: // return CHIP_NO_ERROR and just write to the attribute store in default break; } @@ -462,6 +495,62 @@ bool emberAfThermostatClusterSetWeeklyScheduleCallback(app::CommandHandler * com return false; } +bool emberAfThermostatClusterSetActiveScheduleRequestCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::Thermostat::Commands::SetActiveScheduleRequest::DecodableType & commandData) +{ + // TODO + return false; +} + +bool emberAfThermostatClusterSetActivePresetRequestCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::Thermostat::Commands::SetActivePresetRequest::DecodableType & commandData) +{ + // TODO + return false; +} + +bool emberAfThermostatClusterStartPresetsSchedulesEditRequestCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::Thermostat::Commands::StartPresetsSchedulesEditRequest::DecodableType & commandData) +{ + // TODO + return false; +} + +bool emberAfThermostatClusterCancelPresetsSchedulesEditRequestCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::Thermostat::Commands::CancelPresetsSchedulesEditRequest::DecodableType & commandData) +{ + // TODO + return false; +} + +bool emberAfThermostatClusterCommitPresetsSchedulesRequestCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::Thermostat::Commands::CommitPresetsSchedulesRequest::DecodableType & commandData) +{ + // TODO + return false; +} + +bool emberAfThermostatClusterCancelSetActivePresetRequestCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::Thermostat::Commands::CancelSetActivePresetRequest::DecodableType & commandData) +{ + // TODO + return false; +} + +bool emberAfThermostatClusterSetTemperatureSetpointHoldPolicyCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::Thermostat::Commands::SetTemperatureSetpointHoldPolicy::DecodableType & commandData) +{ + // TODO + return false; +} + int16_t EnforceHeatingSetpointLimits(int16_t HeatingSetpoint, EndpointId endpoint) { // Optional Mfg supplied limits @@ -603,6 +692,7 @@ int16_t EnforceCoolingSetpointLimits(int16_t CoolingSetpoint, EndpointId endpoin return CoolingSetpoint; } + bool emberAfThermostatClusterSetpointRaiseLowerCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::SetpointRaiseLower::DecodableType & commandData) 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/PICS.yaml b/src/app/tests/suites/certification/PICS.yaml index dd68224dc4cb68..16aad6fe3e8d37 100644 --- a/src/app/tests/suites/certification/PICS.yaml +++ b/src/app/tests/suites/certification/PICS.yaml @@ -9355,3 +9355,136 @@ PICS: - label: "Does the device implement sending the Resume command?" id: RVCOPSTATE.C.C04.Tx + + # + #Boolean State Configuration + # + - label: + "Does the device implement the Boolean State Configuration cluster as + a server?" + id: BOOLCFG.S + + #Features + - label: "Does the device support visual alarms?" + id: BOOLCFG.S.F00 + + - label: "Does the device support audible alarms??" + id: BOOLCFG.S.F01 + + - label: + "Does the device support the ability to suppress or acknowledge + alarms?" + id: BOOLCFG.S.F02 + + - label: + "Does the device support the ability to set level of threshold + detection sensitivity?" + id: BOOLCFG.S.F03 + + #Attributes + - label: "Does the device implement the CurrentSensitivityLevel attribute?" + id: BOOLCFG.S.A0000 + + - label: + "Does the device implement the SupportedSensitivityLevels attribute?" + id: BOOLCFG.S.A0001 + + - label: "Does the device implement the DefaultSensitivityLevel attribute?" + id: BOOLCFG.S.A0002 + + - label: "Does the device implement the AlarmsActive attribute?" + id: BOOLCFG.S.A0003 + + - label: "Does the device implement the AlarmsSuppressed attribute?" + id: BOOLCFG.S.A0004 + + - label: "Does the device implement the AlarmsEnabled attribute?" + id: BOOLCFG.S.A0005 + + - label: "Does the device implement the AlarmsSupported attribute?" + id: BOOLCFG.S.A0006 + + - label: "Does the device implement the SensorFault attribute?" + id: BOOLCFG.S.A0007 + + #Commands received + - label: "Does the device implement receiving the SuppressAlarm command?" + id: BOOLCFG.S.C00.Rsp + + - label: + "Does the device implement receiving the EnableDisableAlarm command?" + id: BOOLCFG.S.C01.Rsp + + #Events + - label: "Does the device implement the AlarmsStateChanged event?" + id: BOOLCFG.S.E00 + + - label: "Does the device implement the SensorFault event?" + id: BOOLCFG.S.E01 + + # + #Valve Configuration and Control + # + - label: + "Does the device implement the Valve Configuration and Control cluster + as a server?" + id: VALCC.S + + #Features + - label: + "Does the device support the ability to use UTC time is used for time + indications?" + id: VALCC.S.F00 + + - label: + "Does the device support the ability to setting the specific position + of the valve?" + id: VALCC.S.F01 + + #Attributes + - label: "Does the device implement the OpenDuration attribute?" + id: VALCC.S.A0000 + + - label: "Does the device implement the DefaultOpenDuration attribute?" + id: VALCC.S.A0001 + + - label: "Does the device implement the AutoCloseTime attribute?" + id: VALCC.S.A0002 + + - label: "Does the device implement the RemainingDuration attribute?" + id: VALCC.S.A0003 + + - label: "Does the device implement the CurrentState attribute?" + id: VALCC.S.A0004 + + - label: "Does the device implement the TargetState attribute?" + id: VALCC.S.A0005 + + - label: "Does the device implement the CurrentLevel attribute?" + id: VALCC.S.A0006 + + - label: "Does the device implement the TargetLevel attribute?" + id: VALCC.S.A0007 + + - label: "Does the device implement the DefaultOpenLevel attribute?" + id: VALCC.S.A0008 + + - label: "Does the device implement the ValveFault attribute?" + id: VALCC.S.A0009 + + - label: "Does the device implement the LevelStep attribute?" + id: VALCC.S.A000a + + #Commands received + - label: "Does the device implement receiving the Open command?" + id: VALCC.S.C00.Rsp + + - label: "Does the device implement receiving the Close command?" + id: VALCC.S.C01.Rsp + + #Events + - label: "Does the device implement the ValveStateChanged event?" + id: VALCC.S.E00 + + - label: "Does the device implement the ValveFault event?" + id: VALCC.S.E01 diff --git a/src/app/tests/suites/certification/Test_TC_BOOLCFG_1_1.yaml b/src/app/tests/suites/certification/Test_TC_BOOLCFG_1_1.yaml new file mode 100644 index 00000000000000..d8294f379d108a --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_BOOLCFG_1_1.yaml @@ -0,0 +1,292 @@ +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: 69.1.1. [TC-BOOLCFG-1.1] Global attributes with server as DUT + +PICS: + - BOOLCFG.S + +config: + nodeId: 0x12344321 + cluster: "Boolean State Configuration" + endpoint: 1 + +tests: + - label: "Step 1: Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "Step 2: Read the global attribute: ClusterRevision" + command: "readAttribute" + attribute: "ClusterRevision" + response: + value: 1 + constraints: + type: int16u + + - label: "Step 3a: Read the global attribute: FeatureMap" + command: "readAttribute" + attribute: "FeatureMap" + PICS: + ( !BOOLCFG.S.F00 && !BOOLCFG.S.F01 && !BOOLCFG.S.F02 && !BOOLCFG.S.F03 + ) + response: + value: 0 + constraints: + type: bitmap32 + + - label: + "Step 3b: Given BOOLCFG.S.F00(VIS) ensure featuremap has the correct + bit set" + command: "readAttribute" + attribute: "FeatureMap" + PICS: BOOLCFG.S.F00 + response: + constraints: + type: bitmap32 + hasMasksSet: [0x1] + + - label: + "Step 3c: Given BOOLCFG.S.F01(AUD) ensure featuremap has the correct + bit set" + command: "readAttribute" + attribute: "FeatureMap" + PICS: BOOLCFG.S.F01 + response: + constraints: + type: bitmap32 + hasMasksSet: [0x2] + + - label: + "Step 3d: Given BOOLCFG.S.F02(SPRS) ensure featuremap has the correct + bit set" + command: "readAttribute" + attribute: "FeatureMap" + PICS: BOOLCFG.S.F02 + response: + constraints: + type: bitmap32 + hasMasksSet: [0x4] + + - label: + "Step 3d: Given BOOLCFG.S.F03(SENSLVL) ensure featuremap has the + correct bit set" + command: "readAttribute" + attribute: "FeatureMap" + PICS: BOOLCFG.S.F03 + response: + constraints: + type: bitmap32 + hasMasksSet: [0x8] + + - label: "Step 4a: Read the global attribute: AttributeList" + PICS: PICS_EVENT_LIST_ENABLED + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [65528, 65529, 65530, 65531, 65532, 65533] + + - label: "Step 4a: Read the global attribute: AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [65528, 65529, 65531, 65532, 65533] + + - label: + "Step 4b: Read the feature dependent(BOOLCFG.S.F00) attribute in + AttributeList" + PICS: BOOLCFG.S.F00 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [3, 6] + + - label: + "Step 4c: Read the feature dependent(BOOLCFG.S.F00) optional attribute + in AttributeList" + PICS: BOOLCFG.S.F00 && BOOLCFG.S.A0005 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [5] + + - label: + "Step 4d: Read the feature dependent(BOOLCFG.S.F01) attribute in + AttributeList" + PICS: BOOLCFG.S.F01 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [3, 6] + + - label: + "Step 4e: Read the feature dependent(BOOLCFG.S.F01) optional attribute + in AttributeList" + PICS: BOOLCFG.S.F01 && BOOLCFG.S.A0005 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [5] + + - label: + "Step 4f: Read the feature dependent(BOOLCFG.S.F02) attribute in + AttributeList" + PICS: BOOLCFG.S.F02 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [4] + + - label: + "Step 4g: Read the feature dependent(BOOLCFG.S.F03) attribute in + AttributeList" + PICS: BOOLCFG.S.F03 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 1] + + - label: + "Step 4h: Read the feature dependent(BOOLCFG.S.F03) optional attribute + in AttributeList" + PICS: BOOLCFG.S.F03 && BOOLCFG.S.A0002 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [2] + + - label: + "Step 4i: TH reads optional (SensorFault) attribute in AttributeList" + PICS: BOOLCFG.S.A0007 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [7] + + - label: "Step 5a: Read the global attribute: EventList" + PICS: + PICS_EVENT_LIST_ENABLED && !BOOLCFG.S.F00 && !BOOLCFG.S.F01 && + !BOOLCFG.S.E01 + command: "readAttribute" + attribute: "EventList" + response: + value: [] + constraints: + type: list + + - label: + "Step 5b: Read the feature dependent(BOOLCFG.S.F00) + (AlarmsStateChanged) event in EventList" + PICS: PICS_EVENT_LIST_ENABLED && BOOLCFG.S.F00 + command: "readAttribute" + attribute: "EventList" + response: + constraints: + type: list + contains: [0] + + - label: + "Step 5c: Read the feature dependent(BOOLCFG.S.F01) + (AlarmsStateChanged) event in EventList" + PICS: PICS_EVENT_LIST_ENABLED && BOOLCFG.S.F01 + command: "readAttribute" + attribute: "EventList" + response: + constraints: + type: list + contains: [0] + + - label: "Step 5d: Read the optional (SensorFault) event in EventList" + PICS: PICS_EVENT_LIST_ENABLED && BOOLCFG.S.E01 + command: "readAttribute" + attribute: "EventList" + response: + constraints: + type: list + contains: [1] + + - label: "Step 6a: Read the global attribute: AcceptedCommandList" + PICS: ( !BOOLCFG.S.F00 && !BOOLCFG.S.F01 && !BOOLCFG.S.F02 ) + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + value: [] + constraints: + type: list + + - label: + "Step 6b: Read the feature dependent(BOOLCFG.S.F02) (SuppressAlarm) + command in AcceptedCommandList" + PICS: BOOLCFG.S.F02 + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [0] + + - label: + "Step 6c: Read the feature dependent(BOOLCFG.S.F00) + (EnableDisableAlarm) command in AcceptedCommandList" + PICS: BOOLCFG.S.F00 + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [1] + + - label: + "Step 6d: Read the feature dependent(BOOLCFG.S.F01) + (EnableDisableAlarm) command in AcceptedCommandList" + PICS: BOOLCFG.S.F01 + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [1] + + - label: "Step 7: Read the global attribute: GeneratedCommandList" + command: "readAttribute" + attribute: "GeneratedCommandList" + response: + value: [] + constraints: + type: list diff --git a/src/app/tests/suites/certification/Test_TC_OPCREDS_3_1.yaml b/src/app/tests/suites/certification/Test_TC_OPCREDS_3_1.yaml deleted file mode 100644 index 8cfa4e8526774c..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_OPCREDS_3_1.yaml +++ /dev/null @@ -1,927 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: - 15.2.1. [TC-OPCREDS-3.1] Attribute-NOCs, TrustedRootCertificates list - validation [DUT-Server] - -PICS: - - OPCREDS.S - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Pre-Conditions" - verification: | - 1. PAI, DAC certificates are obtained and validated against externally obtained PAA certificate - 2. This test case assumes that during Commissioning AddNOC will be sent with ICACValue - 3. TH2 is set up with at least one valid CASE Authenticated Tag specified in its NOC, saved as CAT_TH2 - 4. Read SupportedFabrics attributes from the DUT and saves as NumSupportedFabrics . Ensure there are NumSupportedFabrics test harness instances that can each commission the DUT - disabled: true - - - label: - "Step 1: Factory Reset DUT (to ensure NOC list is empty at the - beginning of the following steps)" - PICS: OPCREDS.S.A0000 - verification: | - On both DUT and TH side - sudo rm -rf /tmp/chip_* - disabled: true - - - label: - "Step 2: Start the commissioning process of DUT by TH1 on a first - Fabric" - verification: | - DUT side: - sudo ./chip-all-clusters-app --wifi --trace_decode 1 - - TH side: - ./chip-tool pairing ble-wifi 1 zigbeehome matter123 20202021 3841 --trace_decode 1 - - [1650455358.501816][4366:4371] CHIP:TOO: Device commissioning completed with success - disabled: true - - - label: - "Step 3: TH1 sends ArmFailSafe command to the DUT with the - ExpiryLengthSeconds field set to 900" - PICS: CGEN.S.C00.Rsp && CGEN.S.C01.Tx - verification: | - ./chip-tool generalcommissioning arm-fail-safe 900 600 1 0 - - - Verify the ErrorCode as 'OK'(0) in TH log - [1659676500.031926][2475:2480] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0001 - [1659676500.047646][2475:2480] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0030 Command 0x0000_0001 - [1659676500.055459][2475:2480] CHIP:TOO: ArmFailSafeResponse: { - [1659676500.055613][2475:2480] CHIP:TOO: errorCode: 0 - [1659676500.055669][2475:2480] CHIP:TOO: debugText: - [1659676500.055719][2475:2480] CHIP:TOO: } - [1659676500.055806][2475:2480] CHIP:DMG: ICR moving to [AwaitingDe] - [1659676500.055920][2475:2480] CHIP:EM: Sending Standalone Ack for MessageCounter:225116044 on exchange 37810i - disabled: true - - - label: "Step 4: TH1 sends SetRegulatoryConfig command to the DUT" - PICS: CGEN.S.C02.Rsp && CGEN.S.C03.Tx - verification: | - ./chip-tool generalcommissioning set-regulatory-config 0 new 0 1 0 - - Verify the ErrorCode as SUCCESS in TH Log - - [1658223287.237009][5570:5575] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0003 - [1658223287.237060][5570:5575] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0030 Command 0x0000_0003 - [1658223287.237122][5570:5575] CHIP:TOO: SetRegulatoryConfigResponse: { - [1658223287.237159][5570:5575] CHIP:TOO: errorCode: 0 - [1658223287.237183][5570:5575] CHIP:TOO: debugText: - [1658223287.237205][5570:5575] CHIP:TOO: } - disabled: true - - - label: "Step 5: TH1 sends AttestationRequest command to DUT" - PICS: OPCREDS.S.C00.Rsp && OPCREDS.S.C01.Tx - verification: | - To get attestation nonce give below command Raspi platform on TH - echo hex:$(hexdump -vn32 -e'4/4 "%08X" ' /dev/urandom) - - - ./chip-tool operationalcredentials attestation-request hex:3577CA6EFFFC560E287604663AE5BE2F11D1B1CF99BE326AF5B3B114A2E91395 1 0 - - Verify attestation response in TH Log - - [1658223434.718871][5712:5717] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0001 - [1658223434.718921][5712:5717] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Command 0x0000_0001 - [1658223434.718981][5712:5717] CHIP:TOO: AttestationResponse: { - [1658223434.719026][5712:5717] CHIP:TOO: attestationElements: 1531011D023082021906092A864886F70D010702A082020A30820206020103310D300B06096086480165030402013082017106092A864886F70D010701A08201620482015E152400012501F1FF3602050080050180050280050380050480050580050680050780050880050980050A80050B80050C80050D80050E80050F80051080051180051280051380051480051580051680051780051880051980051A80051B80051C80051D80051E80051F80052080052180052280052380052480052580052680052780052880052980052A80052B80052C80052D80052E80052F80053080053180053280053380053480053580053680053780053880053980053A80053B80053C80053D80053E80053F80054080054180054280054380054480054580054680054780054880054980054A80054B80054C80054D80054E80054F80055080055180055280055380055480055580055680055780055880055980055A80055B80055C80055D80055E80055F80056080056180056280056380182403162C04135A494732303134325A423333303030332D3234240500240600250794 - [1658223434.719078][5712:5717] CHIP:TOO: ...................: 2624080018317D307B020103801462FA823359ACFAA9963E1CFA140ADDF504F37160300B0609608648016503040201300A06082A8648CE3D04030204473045022024E5D1F47A7D7B0D206A26EF699B7C9757B72D469089DE3192E678C745E7F60C022100F8AA2FA711FCB79B97E397CEDA667BAE464E2BD3FFDFC3CCED7AA8CA5F4C1A7C3002203577CA6EFFFC560E287604663AE5BE2F11D1B1CF99BE326AF5B3B114A2E9139524030018 - [1658223434.719110][5712:5717] CHIP:TOO: signature: 7E18271F57FFC60492CA74943FC897493FB2FECDD4A4DC9F2AD348AAD1F5C57DAEB144A4D1C79419386C746F28AC145F3185C64AD99DD829EE70C3690D29642D - [1658223434.719135][5712:5717] CHIP:TOO: } - disabled: true - - - label: - "Step 6: TH1 sends CertificateChainRequest Command to DUT for the PAI - and saves the certififate as 'PAICert'" - PICS: OPCREDS.S.C02.Rsp && OPCREDS.S.C03.Tx - verification: | - ./chip-tool operationalcredentials certificate-chain-request 2 1 0 --trace_decode 1 - - - Verify the CertificateChainResponse and verify that the size of certificate is less than or equal to 600 bytes and of type octstr in TH Log - - [1660214092.609231][14671:14676] CHIP:DMG: InvokeRequestMessage = - [1660214092.609243][14671:14676] CHIP:DMG: { - [1660214092.609255][14671:14676] CHIP:DMG: suppressResponse = false, - [1660214092.609269][14671:14676] CHIP:DMG: timedRequest = false, - [1660214092.609281][14671:14676] CHIP:DMG: InvokeRequests = - [1660214092.609301][14671:14676] CHIP:DMG: [ - [1660214092.609311][14671:14676] CHIP:DMG: CommandDataIB = - [1660214092.609326][14671:14676] CHIP:DMG: { - [1660214092.609338][14671:14676] CHIP:DMG: CommandPathIB = - [1660214092.609352][14671:14676] CHIP:DMG: { - [1660214092.609367][14671:14676] CHIP:DMG: EndpointId = 0x0, - [1660214092.609383][14671:14676] CHIP:DMG: ClusterId = 0x3e, - [1660214092.609396][14671:14676] CHIP:DMG: CommandId = 0x2, - [1660214092.609410][14671:14676] CHIP:DMG: }, - [1660214092.609426][14671:14676] CHIP:DMG: - [1660214092.609437][14671:14676] CHIP:DMG: CommandFields = - [1660214092.609452][14671:14676] CHIP:DMG: { - [1660214092.609467][14671:14676] CHIP:DMG: 0x0 = 2, - [1660214092.609481][14671:14676] CHIP:DMG: }, - [1660214092.609493][14671:14676] CHIP:DMG: }, - [1660214092.609511][14671:14676] CHIP:DMG: - [1660214092.609522][14671:14676] CHIP:DMG: ], - [1660214092.609541][14671:14676] CHIP:DMG: - [1660214092.609551][14671:14676] CHIP:DMG: InteractionModelRevision = 1 - [1660214092.609563][14671:14676] CHIP:DMG: }, - [1660214092.609576][14671:14676] CHIP:DMG: - [1660214092.609674][14671:14676] CHIP:DMG: ICR moving to [CommandSen] - [1660214092.609707][14671:14676] CHIP:EM: Sending Standalone Ack for MessageCounter:33263154 on exchange 56685i - [1660214092.609876][14671:14676] CHIP:IN: Prepared unauthenticated message 0x7f5ae77fd000 to 0x0000000000000000 (0) of type 0x10 and protocolId (0, 0) on exchange 56685i with MessageCounter:66323624. - [1660214092.609904][14671:14676] CHIP:IN: Sending unauthenticated msg 0x7f5ae77fd000 with MessageCounter:66323624 to 0x0000000000000000 at monotonic time: 00000000012052C1 msec - [1660214092.610138][14671:14676] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0f:2753%enp0s31f6]:5540 | 66323624 | [Secure Channel (0) / Standalone Ack (0x10) / Session = 0 / Exchange = 56685] - [1660214092.610167][14671:14676] CHIP:DMG: Header Flags = - [1660214092.610177][14671:14676] CHIP:DMG: { - [1660214092.610198][14671:14676] CHIP:DMG: Message (0x04) = - [1660214092.610208][14671:14676] CHIP:DMG: { - [1660214092.610222][14671:14676] CHIP:DMG: SourceNodeId = 86B22B3066A1B459 - [1660214092.610234][14671:14676] CHIP:DMG: } - [1660214092.610255][14671:14676] CHIP:DMG: Exchange (0x03) = - [1660214092.610265][14671:14676] CHIP:DMG: { - [1660214092.610276][14671:14676] CHIP:DMG: Initiator = true - [1660214092.610290][14671:14676] CHIP:DMG: AckMsg = 33263154 - [1660214092.610301][14671:14676] CHIP:DMG: } - [1660214092.610333][14671:14676] CHIP:DMG: } - [1660214092.610355][14671:14676] CHIP:DMG: - [1660214092.610379][14671:14676] CHIP:DMG: Encrypted Payload (26 bytes) = - [1660214092.610394][14671:14676] CHIP:DMG: { - [1660214092.610407][14671:14676] CHIP:DMG: data = 04000000a804f40359b4a166302bb28603106ddd0000328efb01 - [1660214092.610423][14671:14676] CHIP:DMG: buffer_ptr = 140028080604320 - [1660214092.610436][14671:14676] CHIP:DMG: } - [1660214092.610450][14671:14676] CHIP:DMG: - [1660214092.610521][14671:14676] CHIP:EM: Flushed pending ack for MessageCounter:33263154 on exchange 56685i - [1660214092.617596][14671:14676] CHIP:DMG: << from UDP:[fe80::e65f:1ff:fe0f:2753%enp0s31f6]:5540 | 219026739 | [Interaction Model (1) / InvokeCommandResponse (0x09) / Session = 20731 / Exchange = 56686] - [1660214092.617620][14671:14676] CHIP:DMG: Header Flags = - [1660214092.617626][14671:14676] CHIP:DMG: { - [1660214092.617637][14671:14676] CHIP:DMG: Exchange (0x06) = - [1660214092.617645][14671:14676] CHIP:DMG: { - [1660214092.617652][14671:14676] CHIP:DMG: AckMsg = 21510045 - [1660214092.617657][14671:14676] CHIP:DMG: NeedsAck = true - [1660214092.617663][14671:14676] CHIP:DMG: } - [1660214092.617672][14671:14676] CHIP:DMG: } - [1660214092.617678][14671:14676] CHIP:DMG: - [1660214092.617686][14671:14676] CHIP:DMG: Encrypted Payload (531 bytes) = - [1660214092.617692][14671:14676] CHIP:DMG: { - [1660214092.617698][14671:14676] CHIP:DMG: data = 00fb500033150e0d1ee5b6538768098d8ef37ec0e09fbeb30c158a93ffdd1ca81041b2baa637a7e200110cd7cf06f5ffa40a8e4529a8a38cdd47e50715aaa344941b0c760264022f21b37432352c00f457fade1bdee072261fcb5cde3fcd70e2e71d5a8ec9fa038e670a404d8641162b8fb34919e9d6e431a1c895a6e01cbd3125c9322ff741caf28b79f69f103ec0e9c5b1b74c43fde4d4ac21f15e48b2090916feca5662682ae9eb1f8d18011d618492d57139ad99e94f99e3a755d2a8e46ba7133a0f1d2fe20b7e5cf2906542c4685866c7ccbd8e2e15e84e3dc653057623dac7d65d7bb785466bab3e816e06f378d0165aadf7ef38d23afdb42731191683a995fa1223bcccf27c0314aced823b2a00ff0da758b1f910631fab7098f013a7fed82136cf072c1150e4f351541f194f0aa2987bc0d1d7688d7955d94560b34bbce0b407d340b0ebaef6f5e9343af6cb8d030fb8040a9a6b7cd9465974a692072d05597b98ec66c42cf4edd86d841048cf5f045f90fb74d4066f2f23e038530e18dd4a0f3c1d86800077661bbd5ff28ff873bb87c6a2545871c6eeca5426466cecff984822b8dd3b7822fb109ec80c9ca3c9bb70b20056f2f4f8b25d1ec3bd8c17a86403bdd42d8cf2c2f66ca8983812361f34770992a7724fc33c5297169a2dcc99b92f290d2894bad6c612684f29c71eb0190b5d8d31dee66650da1942a798de69389d9c5bcfbf0e56a08c820092a53d4f34 - [1660214092.617712][14671:14676] CHIP:DMG: buffer_ptr = 140028080581472 - [1660214092.617717][14671:14676] CHIP:DMG: } - [1660214092.617722][14671:14676] CHIP:DMG: - [1660214092.617768][14671:14676] CHIP:DMG: DAC/PAI (463) = - [1660214092.617789][14671:14676] CHIP:DMG: { - -----BEGIN CERTIFICATE----- - MIIByzCCAXGgAwIBAgIIVq2CIq2UW2QwCgYIKoZIzj0EAwIwMDEYMBYGA1UEAwwP - TWF0dGVyIFRlc3QgUEFBMRQwEgYKKwYBBAGConwCAQwERkZGMTAgFw0yMjAyMDUw - MDAwMDBaGA85OTk5MTIzMTIzNTk1OVowPTElMCMGA1UEAwwcTWF0dGVyIERldiBQ - QUkgMHhGRkYxIG5vIFBJRDEUMBIGCisGAQQBgqJ8AgEMBEZGRjEwWTATBgcqhkjO - PQIBBggqhkjOPQMBBwNCAARBmpMVwhc+DIyHbQPM/JRIUmR/f+xeUIL0BZko7KiU - xZQVEwmsYx5MsDOSr2hLC6+35ls7gWLC9Sv5MbjneqqCo2YwZDASBgNVHRMBAf8E - CDAGAQH/AgEAMA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUY1QOR/ZLHDjROISk - YtFsGV2P+zwwHwYDVR0jBBgwFoAUav0idx9RH+y/FkGXZxDc3DGhcX4wCgYIKoZI - zj0EAwIDSAAwRQIhALLvJ/Sa6bUPuR7qyUxNC9u415KcbLiPrOUpNo0SBUwMAiBl - Xckrhr2QmIKmxiF3uCXX0F7b58Ivn+pxIg5+pwP4kQ== - -----END CERTIFICATE----- - [1660214092.617801][14671:14676] CHIP:DMG: } - [1660214092.617807][14671:14676] CHIP:DMG: - [1660214092.617815][14671:14676] CHIP:DMG: - [1660214092.617827][14671:14676] CHIP:DMG: Additional Fields = - [1660214092.617832][14671:14676] CHIP:DMG: { - [1660214092.617839][14671:14676] CHIP:DMG: peer_address = UDP:[fe80::e65f:1ff:fe0f:2753%enp0s31f6]:5540 - [1660214092.617845][14671:14676] CHIP:DMG: } - [1660214092.617851][14671:14676] CHIP:DMG: - [1660214092.617861][14671:14676] CHIP:EM: Received message of type 0x9 with protocolId (0, 1) and MessageCounter:219026739 on exchange 56686i - [1660214092.617870][14671:14676] CHIP:EM: Found matching exchange: 56686i, Delegate: 0x7f5ad4003a48 - [1660214092.617885][14671:14676] CHIP:EM: Rxd Ack; Removing MessageCounter:21510045 from Retrans Table on exchange 56686i - [1660214092.617891][14671:14676] CHIP:EM: Removed CHIP MessageCounter:21510045 from RetransTable on exchange 56686i - [1660214092.617904][14671:14676] CHIP:DMG: ICR moving to [ResponseRe] - disabled: true - - - label: - "Step 7: TH1 sends CertificateChainRequest Command to DUT for the DAC - and saves the certififate as 'DACCert'" - PICS: OPCREDS.S.C02.Rsp && OPCREDS.S.C03.Tx - verification: | - ./chip-tool operationalcredentials certificate-chain-request 1 1 0 - - Verify the CertificateChainResponse in TH Log - - [1660218221.819087][17048:17053] CHIP:DMG: InvokeRequestMessage = - [1660218221.819106][17048:17053] CHIP:DMG: { - [1660218221.819126][17048:17053] CHIP:DMG: suppressResponse = false, - [1660218221.819147][17048:17053] CHIP:DMG: timedRequest = false, - [1660218221.819164][17048:17053] CHIP:DMG: InvokeRequests = - [1660218221.819194][17048:17053] CHIP:DMG: [ - [1660218221.819210][17048:17053] CHIP:DMG: CommandDataIB = - [1660218221.819233][17048:17053] CHIP:DMG: { - [1660218221.819251][17048:17053] CHIP:DMG: CommandPathIB = - [1660218221.819274][17048:17053] CHIP:DMG: { - [1660218221.819296][17048:17053] CHIP:DMG: EndpointId = 0x0, - [1660218221.819319][17048:17053] CHIP:DMG: ClusterId = 0x3e, - [1660218221.819341][17048:17053] CHIP:DMG: CommandId = 0x2, - [1660218221.819361][17048:17053] CHIP:DMG: }, - [1660218221.819386][17048:17053] CHIP:DMG: - [1660218221.819403][17048:17053] CHIP:DMG: CommandFields = - [1660218221.819425][17048:17053] CHIP:DMG: { - [1660218221.819448][17048:17053] CHIP:DMG: 0x0 = 1, - [1660218221.819470][17048:17053] CHIP:DMG: }, - [1660218221.819488][17048:17053] CHIP:DMG: }, - [1660218221.819515][17048:17053] CHIP:DMG: - [1660218221.819530][17048:17053] CHIP:DMG: ], - [1660218221.819559][17048:17053] CHIP:DMG: - [1660218221.819575][17048:17053] CHIP:DMG: InteractionModelRevision = 1 - [1660218221.819592][17048:17053] CHIP:DMG: }, - [1660218221.819611][17048:17053] CHIP:DMG: - [1660218221.819755][17048:17053] CHIP:DMG: ICR moving to [CommandSen] - [1660218221.819807][17048:17053] CHIP:EM: Sending Standalone Ack for MessageCounter:33263156 on exchange 41890i - [1660218221.820060][17048:17053] CHIP:IN: Prepared unauthenticated message 0x7f950d02b000 to 0x0000000000000000 (0) of type 0x10 and protocolId (0, 0) on exchange 41890i with MessageCounter:146063148. - [1660218221.820102][17048:17053] CHIP:IN: Sending unauthenticated msg 0x7f950d02b000 with MessageCounter:146063148 to 0x0000000000000000 at monotonic time: 00000000015F547B msec - [1660218221.820457][17048:17053] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0f:2753%enp0s31f6]:5540 | 146063148 | [Secure Channel (0) / Standalone Ack (0x10) / Session = 0 / Exchange = 41890] - [1660218221.820501][17048:17053] CHIP:DMG: Header Flags = - [1660218221.820519][17048:17053] CHIP:DMG: { - [1660218221.820578][17048:17053] CHIP:DMG: Message (0x04) = - [1660218221.820596][17048:17053] CHIP:DMG: { - [1660218221.820622][17048:17053] CHIP:DMG: SourceNodeId = EB2A0D2FCD128BCD - [1660218221.820642][17048:17053] CHIP:DMG: } - [1660218221.820677][17048:17053] CHIP:DMG: Exchange (0x03) = - [1660218221.820692][17048:17053] CHIP:DMG: { - [1660218221.820709][17048:17053] CHIP:DMG: Initiator = true - [1660218221.820730][17048:17053] CHIP:DMG: AckMsg = 33263156 - [1660218221.820747][17048:17053] CHIP:DMG: } - [1660218221.820778][17048:17053] CHIP:DMG: } - [1660218221.820792][17048:17053] CHIP:DMG: - [1660218221.820819][17048:17053] CHIP:DMG: Encrypted Payload (26 bytes) = - [1660218221.820834][17048:17053] CHIP:DMG: { - [1660218221.820853][17048:17053] CHIP:DMG: data = 040000002cbfb408cd8b12cd2f0d2aeb0310a2a30000348efb01 - [1660218221.820871][17048:17053] CHIP:DMG: buffer_ptr = 140277792687280 - [1660218221.820888][17048:17053] CHIP:DMG: } - [1660218221.820906][17048:17053] CHIP:DMG: - [1660218221.820997][17048:17053] CHIP:EM: Flushed pending ack for MessageCounter:33263156 on exchange 41890i - [1660218221.826505][17048:17053] CHIP:DMG: << from UDP:[fe80::e65f:1ff:fe0f:2753%enp0s31f6]:5540 | 217571241 | [Interaction Model (1) / InvokeCommandResponse (0x09) / Session = 16041 / Exchange = 41891] - [1660218221.826559][17048:17053] CHIP:DMG: Header Flags = - [1660218221.826581][17048:17053] CHIP:DMG: { - [1660218221.826620][17048:17053] CHIP:DMG: Exchange (0x06) = - [1660218221.826636][17048:17053] CHIP:DMG: { - [1660218221.826658][17048:17053] CHIP:DMG: AckMsg = 228316047 - [1660218221.826677][17048:17053] CHIP:DMG: NeedsAck = true - [1660218221.826695][17048:17053] CHIP:DMG: } - [1660218221.826723][17048:17053] CHIP:DMG: } - [1660218221.826736][17048:17053] CHIP:DMG: - [1660218221.826764][17048:17053] CHIP:DMG: Encrypted Payload (559 bytes) = - [1660218221.826778][17048:17053] CHIP:DMG: { - [1660218221.826796][17048:17053] CHIP:DMG: data = 00a93e00a9dff70c44f908196a2718a5b4cd8fb67b67d2223ade09fa1f23a5e9d6081ef9003a293b4f7ddf1e64767c15165a5544c4bc162a2eea22b085a5392580dec393bc15a705abc25360a7f05f99baf448b6c29e93defc8d01b00c11b268b2a197f88fc5984fe4c541fc523e2ecd2316b5dc1109c54408186296772f48d484047770f70a6af3e639833481b4663c7b65b902a850a8d55d3a86c73523a6853f47727582113480efece0e72f552a42ce49a26746e8d6b405ae87fadc7711a313f1865b90ac934486e05d2ed6868a5b5c4e13010eec98f917308c6fe5e9c6816c045f4640aea37804278a600cede11aee2bb591224edd0524bda56ee2d4d64c8a29c664edb006f4f42855f3868f272e94d8648d2431c0e95f6a55802c18d5938497b6b5c5aa37e37597a6782ca55a2948ceededd45e63537f4f1985f45653dbb118a0e1108eca228973b5c8fb48a1afeb649c46aec6259a649f0795c677ca492452c9fcb07969b6f851421252d30d6e160a350feb8baee6ccea79f54e0ebfae94c99eafa466964671b1fe3aa8585c83c28d9484444ba7d5a8a8e3178aedea00d292a53e3f0939b15bb7bee982e346410d5b064ec496409ba26e6a3b2182cff7b1955ba8f980d99590dfa0f2b690d1f1e5d8d178b1a64893dfcd242949ade66269336bc6c0440e9e4a120af59bfbbaabee32871ec1208915f63f91bdb1305045afeface4c7fc39e8eae7db8923b95aa01d4fee30d525664297305e569a3bfca01a767d47f6fdc0eb1b7706bc4547b1 - [1660218221.826837][17048:17053] CHIP:DMG: buffer_ptr = 140277792657648 - [1660218221.826854][17048:17053] CHIP:DMG: } - [1660218221.826870][17048:17053] CHIP:DMG: - [1660218221.826979][17048:17053] CHIP:DMG: DAC/PAI (491) = - [1660218221.827025][17048:17053] CHIP:DMG: { - -----BEGIN CERTIFICATE----- - MIIB5zCCAY6gAwIBAgIIac3xDenlTtEwCgYIKoZIzj0EAwIwPTElMCMGA1UEAwwc - TWF0dGVyIERldiBQQUkgMHhGRkYxIG5vIFBJRDEUMBIGCisGAQQBgqJ8AgEMBEZG - RjEwIBcNMjIwMjA1MDAwMDAwWhgPOTk5OTEyMzEyMzU5NTlaMFMxJTAjBgNVBAMM - HE1hdHRlciBEZXYgREFDIDB4RkZGMS8weDgwMDExFDASBgorBgEEAYKifAIBDARG - RkYxMRQwEgYKKwYBBAGConwCAgwEODAwMTBZMBMGByqGSM49AgEGCCqGSM49AwEH - A0IABEY6xpNCkQoOVYj8b/Vrtj5i7M7LFI99TrA+5VJgFBV2fRalxmP3k+SRIyYL - gpenzX58/HsxaznZjpDSk3dzjoKjYDBeMAwGA1UdEwEB/wQCMAAwDgYDVR0PAQH/ - BAQDAgeAMB0GA1UdDgQWBBSI3eezADgpMs/3NMBGJIEPRBaKbzAfBgNVHSMEGDAW - gBRjVA5H9kscONE4hKRi0WwZXY/7PDAKBggqhkjOPQQDAgNHADBEAiABJ6J7S0Rh - DuL83E0reIVWNmC8D3bxchntagjfsrPBzQIga1ngr0Xz6yqFuRnTVzFSjGAoxBUj - lUXhCOTlTnCXE1M= - -----END CERTIFICATE----- - [1660218221.827089][17048:17053] CHIP:DMG: } - [1660218221.827105][17048:17053] CHIP:DMG: - [1660218221.827125][17048:17053] CHIP:DMG: - [1660218221.827158][17048:17053] CHIP:DMG: Additional Fields = - [1660218221.827173][17048:17053] CHIP:DMG: { - [1660218221.827194][17048:17053] CHIP:DMG: peer_address = UDP:[fe80::e65f:1ff:fe0f:2753%enp0s31f6]:5540 - [1660218221.827211][17048:17053] CHIP:DMG: } - [1660218221.827226][17048:17053] CHIP:DMG: - [1660218221.827257][17048:17053] CHIP:EM: Received message of type 0x9 with protocolId (0, 1) and MessageCounter:217571241 on exchange 41891i - [1660218221.827276][17048:17053] CHIP:EM: Found matching exchange: 41891i, Delegate: 0x7f94f8003a48 - [1660218221.827310][17048:17053] CHIP:EM: Rxd Ack; Removing MessageCounter:228316047 from Retrans Table on exchange 41891i - [1660218221.827326][17048:17053] CHIP:EM: Removed CHIP MessageCounter:228316047 from RetransTable on exchange 41891i - [1660218221.827357][17048:17053] CHIP:DMG: ICR moving to [ResponseRe] - disabled: true - - - label: "Step 8: TH1 Sends CSRRequest command with a random 32-byte nonce" - PICS: OPCREDS.S.C04.Rsp - verification: | - To get SCR Nonce give below command 2 times - echo hex:$(hexdump -vn32 -e'4/4 "%08X" ' /dev/urandom) - - ./chip-tool operationalcredentials csrrequest hex:A61BFCE6E2C6AAF48FDEC4BF9DCEF08EB65B976997D82BE5F359902982717603 1 0 - - Verify the CSRResponse in TH Log - - [1658223679.580697][6136:6141] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0005 - [1658223679.580761][6136:6141] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Command 0x0000_0005 - [1658223679.580823][6136:6141] CHIP:TOO: CSRResponse: { - [1658223679.580875][6136:6141] CHIP:TOO: NOCSRElements: 153001CB3081C83070020100300E310C300A060355040A0C034353523059301306072A8648CE3D020106082A8648CE3D030107034200047DA16C714034D3B96716F64DC0E742D007233212025E305AF6CE56DFA057718E149E52B39584456C8F954A1596B64F8BBC02E501276B962D4AB2C0A607D983C9A000300A06082A8648CE3D040302034800304502206FB78A61A7B0F021C396FEC1CCD6802129AC3EE5EA2727ABCCB19DBAEA7DEE1A022100A5C81ADC5D8BFAA5DB84A1261D8BBCEA5C26B24D4405F0B978E19B17D8458C9E300220A61BFCE6E2C6AAF48FDEC4BF9DCEF08EB65B976997D82BE5F35990298271760318 - [1658223679.580915][6136:6141] CHIP:TOO: attestationSignature: EB731B40B20501AF32C468AA522948F7848D3AEDFA24D9A879575B4A265886C97109EE0DE1ECEB969B1A7F98F127DB4C275292B986BF8DA56EF7B16DA8EC8ABE - [1658223679.580943][6136:6141] CHIP:TOO: } - - Verify attestation signature is an octstr type and has maximum length of 64 - - Example: - EB731B40B20501AF32C468AA522948F7848D3AEDFA24D9A879575B4A265886C97109EE0DE1ECEB969B1A7F98F127DB4C275292B986BF8DA56EF7B16DA8EC8ABE - disabled: true - - - label: "Step 9: TH1 validates the attestation response" - verification: | - - disabled: true - - - label: - "Step 10: TH1 obtains or generates the NOC, the Root CA Certificate - and ICAC using the CSR elements from step 8 and selects an IPK. The - certificates shall have their subjects padded with additional data - such that they are each the maximum certificate size of 400 bytes when - encoded in the MatterCertificateEncoding. Save RCAC as - Root_CA_Certificate_TH1 Save ICAC as Intermediate_Certificate_TH1 Save - NOC as Node_Operational_Certificate_TH1 Save IPK as IPK_TH1 Extract - the RCAC public key and save as Root_Public_Key_TH1" - verification: | - - disabled: true - - - label: - "Step 11: TH1 obtains or generates Root Certificate with a different - Root CA ID and the corresponding ICAC, NOC and IPK using the CSR - elements from step 8 Save RCAC as Root_CA_Certificate_TH1_2 Save ICAC - as Intermediate_Certificate_TH1_2 Save NOC as - Node_Operational_Certificate_TH1_2 Save IPK as IPK_TH1_2" - verification: | - - disabled: true - - - label: - "Step 12: TH1 generates an INVALID Root Certificate where the - signature does not match the public key and saves it as - Root_CA_Malformed" - verification: | - - disabled: true - - - label: - "Step 13: TH1 sends AddTrustedRootCertificate command to DUT to - install Root_CA_Malformed" - PICS: OPCREDS.S.C0b.Rsp - verification: | - - disabled: true - - - label: - "Step 14: TH1 sends AddTrustedRootCertificate command to DUT with - RootCACertificate set to Root_CA_Certificate_TH1" - PICS: OPCREDS.S.C0b.Rsp - verification: | - - disabled: true - - - label: - "Step 15: TH1 sends AddTrustedRootCertificate command to DUT again - with the RootCACertificate field set to Root_CA_Certificate_TH1" - PICS: OPCREDS.S.C0b.Rsp - verification: | - - disabled: true - - - label: - "Step 16: TH1 sends AddTrustedRootCertificate command to DUT again - with the RootCACertificate field set to Root_CA_Certificate_TH1_2" - PICS: OPCREDS.S.C0b.Rsp - verification: | - - disabled: true - - - label: - "Step 17: TH1 reads the TrustedRootCertificates list from DUT and - saves as TrustedRootsList" - PICS: OPCREDS.S.A0004 - verification: | - - disabled: true - - - label: - "Step 18: TH1 appends Root_CA_Certificate_TH1_2 to TrustedRootsList - and writes the TrustedRootCertificates attribute with that value" - PICS: OPCREDS.S.A0004 - verification: | - - disabled: true - - - label: "Step 19: TH1 reads the TrustedRootCertificates list from DUT" - PICS: OPCREDS.S.A0004 - verification: | - - disabled: true - - - label: - "Step 20: TH1 sends the AddNOC Command to DUT with the following - fields: NOCValue as Node_Operational_Certificate_TH1_2 ICACValue as - Intermediate_Certificate_TH1_2 IpkValue as IPK_TH1_2 CaseAdminSubject - as the NodeID of TH1 AdminVendorId as the Vendor ID of TH1" - PICS: OPCREDS.S.C06.Rsp - verification: | - - disabled: true - - - label: - "Step 21: TH1 sends the AddNOC Command to DUT with the following - fields: NOCValue as Node_Operational_Certificate_TH1 ICACValue as - Intermediate_Certificate_TH1 IpkValue as IPK_TH1 CaseAdminSubject is - an invalid NodeID (not an operational Node ID or Case Authenticated - Tag - ex. 0) AdminVendorId as the Vendor ID of TH1" - PICS: OPCREDS.S.C06.Rsp - verification: | - - disabled: true - - - label: - "Step 22: TH1 sends the AddNOC Command to DUT with the following - fields: NOCValue as Node_Operational_Certificate_TH1 ICACValue as - Intermediate_Certificate_TH1 IpkValue as IPK_TH1 CaseAdminSubject as - the NodeID of TH1 AdminVendorId as the Vendor ID of TH1" - PICS: OPCREDS.S.C06.Rsp - verification: | - - disabled: true - - - label: - "Step 23: TH1 saves the FabricIndex as FabricIndex_TH1 for future use" - verification: | - - disabled: true - - - label: - "Step 24: TH1 sends the AddNOC Command to DUT with the following - fields: NOCValue as Node_Operational_Certificate_TH1_1 ICACValue as - Intermediate_Certificate_TH1_1 IpkValue as IPK_TH1_1 CaseAdminSubject - as the NodeID of TH1 AdminVendorId as the Vendor ID of TH1" - PICS: OPCREDS.S.C06.Rsp - verification: | - - disabled: true - - - label: - "Step 25: TH1 reads the NOCs attribute from DUT using a - non-fabric-filtered read and saves the list as NOClist" - PICS: OPCREDS.S.A0000 - verification: | - - disabled: true - - - label: - "Step 26: TH1 appends a second list item to 'NOClist' and writes that - value to the NOCs attribute" - PICS: OPCREDS.S.A0000 - verification: | - - disabled: true - - - label: - "Step 27: TH1 reads the NOCs attribute from DUT using a - non-fabric-filtered read" - PICS: OPCREDS.S.A0000 - verification: | - - disabled: true - - - label: - "Step 28: TH1 sends UpdateFabricLabel command with 'Label 1' as Label - field to DUT" - PICS: OPCREDS.S.C09.Rsp - verification: | - - disabled: true - - - label: - "Step 29: TH1 reads the Fabrics Attribute from DUT using a - non-fabric-filtered read and gets the FabricDescriptorStruct for which - the FabricIndex field equals FabricIndex_TH1" - verification: | - - disabled: true - - - label: - "Step 31: TH1 sends ArmFailSafe command to the DUT with - ExpiryLengthSeconds field set to 0" - PICS: CGEN.S.C00.Rsp && CGEN.S.C01.Tx - verification: | - - disabled: true - - - label: "Step 32: TH1 reconnects to the DUT over PASE" - verification: | - - disabled: true - - - label: "Step 33: TH1 reads the TrustedRootCertificates list from DUT" - PICS: OPCREDS.S.A0004 - verification: | - - disabled: true - - - label: - "Step 34: TH1 reads the NOCs attribute from DUT using a - non-fabric-filtered read" - PICS: OPCREDS.S.A0000 - verification: | - - disabled: true - - - label: - "Step 35: TH1 reads the Fabrics attribute from the DUT using a - non-fabric-filtered read" - PICS: OPCREDS.S.A0001 - verification: | - - disabled: true - - - label: - "Step 36: TH1 fully commissions DUT onto the fabric, using - 'Root_CA_Certificate_TH1' and the AddNOC parameters specified in step - . This will update the value of FabricIndex_TH1 so that it references - the fabric the DUT was just commissioned onto" - verification: | - - disabled: true - - - label: "Step 37: TH1 reads the TrustedRootCertificates list from DUT" - PICS: OPCREDS.S.A0004 - verification: | - - disabled: true - - - label: - "Step 38: TH1 reads the NOCs attribute from DUT using a - non-fabric-filtered read" - PICS: OPCREDS.S.A0000 - verification: | - - disabled: true - - - label: - "Step 39: TH1 sends UpdateFabricLabel command with 'Label 1' as Label - field to DUT" - PICS: OPCREDS.S.C09.Rsp - verification: | - - disabled: true - - - label: - "Step 40: TH1 reads the Fabrics Attribute from DUT using a - non-fabric-filtered read and gets the FabricDescriptorStruct for which - the FabricIndex field equals FabricIndex_TH1" - PICS: OPCREDS.S.A0001 - verification: | - - disabled: true - - - label: - "Step 42: TH1 reads the ACL attribute from the Access Control cluster" - PICS: OPCREDS.S.C06.Rsp - verification: | - - disabled: true - - - label: - "Step 43: TH1 issues a KeySetRead command to the DUT for GroupKeySetID - 0" - PICS: OPCREDS.S.C06.Rsp - verification: | - - disabled: true - - - label: - "Step 44: TH1 sends an OpenCommissioningWindow command to the - Administrator Commissioning cluster" - verification: | - - disabled: true - - - label: - "Step 45: TH2 begins the process of commissionning the DUT. After - receiving the CSRResponse TH2 obtains or generates a NOC, the Root CA - Certificate, ICAC and IPK. The certificates shall have their subjects - padded with additional data such that they are each the maximum - certificate size of 400 bytes when encoded in the - MatterCertificateEncoding. Save RCAC as Root_CA_Certificate_TH2 Save - ICAC as Intermediate_Certificate_TH2 Save NOC as - Node_Operational_Certificate_TH2 Save IPK as IPK_TH2 Extract the RCAC - public key and save as Root_Public_Key_TH2" - verification: | - - disabled: true - - - label: - "Step 46: TH2 completes the commissioning process using - Root_CA_Certificate_TH2 when performing the AddTrustedRootCertificate - command and sending AddNOC with the following parameters: NOCValue as - Node_Operational_Certificate_TH2 ICACValue as - Intermediate_Certificate_TH2 IpkValue as IPK_TH2 CaseAdminSubject as - CAT_TH2 AdminVendorId as the Vendor ID of TH2" - verification: | - Not verifiable - disabled: true - - - label: "Step 47: TH2 reads the TrustedRootCertificates list from DUT" - PICS: OPCREDS.S.A0004 - verification: | - - disabled: true - - - label: - "Step 48: TH2 reads the NOCs attribute from DUT using a - non-fabric-filtered read" - PICS: OPCREDS.S.A0000 - verification: | - - disabled: true - - - label: - "Step 49: TH2 sends UpdateFabricLabel command with 'Label 2' as Label - field to DUT" - PICS: OPCREDS.S.C09.Rsp - verification: | - - disabled: true - - - label: - "Step 50: TH2 sends UpdateFabricLabel command with 'Label 1' as Label - field to DUT" - PICS: OPCREDS.S.C09.Rsp - verification: | - - disabled: true - - - label: - "Step 51: Read the Fabrics List from DUT using a non-fabric-filtered - read" - PICS: OPCREDS.S.A0001 - verification: | - - disabled: true - - - label: - "Step 52: TH1 sends ArmFailSafe command to the DUT with the - ExpiryLengthSeconds field set to 900" - PICS: CGEN.S.C00.Rsp && CGEN.S.C01.Tx - verification: | - - disabled: true - - - label: - "Step 53: TH1 sends AddTrustedRootCertificate command to DUT with - RootCACertificate set to Root_CA_Certificate_TH1_2" - PICS: OPCREDS.S.C0b.Rsp - verification: | - - disabled: true - - - label: - "Step 54: TH1 sends the AddNOC Command to DUT with the following - fields: NOCValue as Node_Operational_Certificate_TH1_2 ICACValue as - Intermediate_Certificate_TH1_2 IpkValue as IPK_TH1_2 CaseAdminSubject - as the NodeID of TH1 AdminVendorId as the Vendor ID of TH1" - PICS: OPCREDS.S.C06.Rsp - verification: | - - disabled: true - - - label: "Step 55: TH1 Sends CSRRequest command with a random 32-byte nonce" - PICS: OPCREDS.S.C04.Rsp - verification: | - - disabled: true - - - label: - "Step 56: TH1 sends the AddNOC Command to DUT with the following - fields: NOCValue as Node_Operational_Certificate_TH1_2 ICACValue as - Intermediate_Certificate_TH1_2 IpkValue as IPK_TH1_2 CaseAdminSubject - as the NodeID of TH1 AdminVendorId as the Vendor ID of TH1" - PICS: OPCREDS.S.C06.Rsp - verification: | - - disabled: true - - - label: - "Step 57: TH1 obtains or generates a NOC and ICAC using the CSR - elements from step 55 with a different NodeID, but the same Root CA - Certificate and fabric ID as step 10. Save as - Node_Operational_Certificates_TH1_fabric_conflict and - Intermediate_Certificate_TH1_fabric_conflict" - verification: | - - disabled: true - - - label: - "Step 58: TH1 sends the AddNOC Command to DUT with the following - fields: NOCValue as Node_Operational_Certificate_TH1_fabric_conflict - ICACValue as Intermediate_Certificate_TH1_fabric_conflict - CaseAdminSubject as the NodeID of TH1 AdminVendorId as the Vendor ID - of TH1" - PICS: OPCREDS.S.C06.Rsp - verification: | - - disabled: true - - - label: - "Step 59: TH1 sends ArmFailSafe command to the DUT with - ExpiryLengthSeconds set to 0" - PICS: CGEN.S.C00.Rsp && CGEN.S.C01.Tx - verification: | - - disabled: true - - - label: "Step 60: TH1 reads the TrustedRootCertificates list from DUT" - PICS: OPCREDS.S.A0004 - verification: | - - disabled: true - - - label: - "Step 61: TH1 sends ArmFailSafe command to the DUT with the - ExpiryLengthSeconds field set to 900" - PICS: CGEN.S.C00.Rsp && CGEN.S.C01.Tx - verification: | - - disabled: true - - - label: - "Step 62: TH1 Sends CSRRequest command with a random 32-byte nonce and - the IsForUpdateNOC field set to true" - PICS: OPCREDS.S.C04.Rsp - verification: | - - disabled: true - - - label: - "Step 63: TH1 obtains or generates a NOC, Root CA Certificate, ICAC - using the CSR elements from the previous step Save RCAC as - Root_CA_Certificate_TH1_3 Save ICAC as Intermediate_Certificate_TH1_3 - Save NOC as Node_Operational_Certificate_TH1_3" - verification: | - - disabled: true - - - label: - "Step 64: TH1 sends AddTrustedRootCertificate command to DUT with - RootCACertificate set to Root_CA_Certificate_TH1_3" - PICS: OPCREDS.S.C0b.Rsp - verification: | - - disabled: true - - - label: - "Step 65: TH1 sends the AddNOC Command to DUT with the following - fields: NOCValue as Node_Operational_Certificate_TH1_3 ICACValue as - Intermediate_Certificate_TH1_3 CaseAdminSubject as the NodeID of TH1 - AdminVendorId as the Vendor ID of TH1" - PICS: OPCREDS.S.C06.Rsp - verification: | - - disabled: true - - - label: - "Step 66: TH1 sends ArmFailSafe command to the DUT with - ExpiryLengthSeconds set to 0" - PICS: CGEN.S.C00.Rsp && CGEN.S.C01.Tx - verification: | - - disabled: true - - - label: - "Step 67: TH1 sends ArmFailSafe command to the DUT with the - ExpiryLengthSeconds field set to 900" - PICS: CGEN.S.C00.Rsp && CGEN.S.C01.Tx - verification: | - - disabled: true - - - label: - "Step 68: TH2 sends RemoveFabric command with Fabric Index as - FabricIndexTH2 + 5 (Invalid Fabric Index) to DUT" - PICS: OPCREDS.S.C0a.Rsp - verification: | - - disabled: true - - - label: - "Step 69: TH2 reads the Fabrics List from DUT using a - non-fabric-filtered read" - PICS: OPCREDS.S.A0001 - verification: | - - disabled: true - - - label: - "Step 70: TH2 sends RemoveFabric command with Fabric Index as - FabricIndex_TH1 (Valid Fabric Index) to DUT" - PICS: OPCREDS.S.C0a.Rsp - verification: | - - disabled: true - - - label: - "Step 71: TH2 reads the Fabrics List from DUT using a - non-fabric-filtetered read" - PICS: OPCREDS.S.A0001 - verification: | - - disabled: true - - - label: "Step 72: TH2 sends a CommissioningComplete command to the DUT" - verification: | - - disabled: true - - - label: - "Step 73: TH2 sends an OpenCommissioningWindow command to the - Administrator Commissioning cluster" - verification: | - - disabled: true - - - label: - "Step 74: TH1 fully commissions the DUT using subject-padded, 400 byte - certificates" - verification: | - - disabled: true - - - label: - "Step 75: Repeat steps 73 and 74 to fill the fabric table using the - remaining test harnesses (TH3 through TH NumSupportedFabrics). Each - test harness should commission the DUT using subject-padded, 400-byte - certificates" - verification: | - - disabled: true - - - label: "Step 76: TH1 reads CommissionedFabrics attribute" - PICS: OPCREDS.S.A0003 - verification: | - - disabled: true - - - label: "Step 77: Repeat steps 73 and 74 with TH NumSupportedFabrics + 1" - verification: | - - disabled: true - - - label: - "Step 78: TH1 reads the SubjectsPerAccessControlEntry attribute from - the Access Control Cluster and saves the value as maxSubjects" - verification: | - - disabled: true - - - label: - "Step 79: TH1 reads the TargetsPerAccessControlEntry attribute from - the Access Control Cluster and saves the value as maxTargets" - verification: | - - disabled: true - - - label: - "Step 80: TH1 reads the AccessControlEntriesPerFabric attribute from - the Access Control Cluster and saves the value as maxEntries" - verification: | - - disabled: true - - - label: - "Step 81: TH1 creates a valid list of AccessControlEntryStructs with - maxEntries entries. Each AccessControlEntryStruct specifies - maxSubjects subjects and maxTargets targets. TH1 writes this list to - the AccessControl cluster ACL attribute" - verification: | - - disabled: true - - - label: - "Step 82: Repeat step 81 for TH2 through TH NumSupportedFabrics to - fill the ACL table" - verification: | - - disabled: true 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/certification/Test_TC_VALCC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_VALCC_1_1.yaml new file mode 100644 index 00000000000000..cf00d40a21a02f --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_VALCC_1_1.yaml @@ -0,0 +1,186 @@ +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: 62.1.1. [TC-VALCC-1.1] Global attributes with server as DUT + +PICS: + - VALCC.S + +config: + nodeId: 0x12344321 + cluster: "Valve Configuration and Control" + endpoint: 1 + +tests: + - label: "Step 1: Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "Step 2: Read the global attribute: ClusterRevision" + command: "readAttribute" + attribute: "ClusterRevision" + response: + value: 1 + constraints: + type: int16u + + - label: "Step 3a: Read the global attribute: FeatureMap" + command: "readAttribute" + attribute: "FeatureMap" + PICS: ( !VALCC.S.F00 && !VALCC.S.F01 ) + response: + value: 0 + constraints: + type: bitmap32 + + - label: + "Step 3b: Given VALCC.S.F00(TS) ensure featuremap has the correct bit + set" + command: "readAttribute" + attribute: "FeatureMap" + PICS: VALCC.S.F00 + response: + constraints: + type: bitmap32 + hasMasksSet: [0x1] + + - label: + "Step 3c: Given VALCC.S.F01(LVL) ensure featuremap has the correct bit + set" + command: "readAttribute" + attribute: "FeatureMap" + PICS: VALCC.S.F01 + response: + constraints: + type: bitmap32 + hasMasksSet: [0x2] + + - label: "Step 4a: Read the global attribute: AttributeList" + PICS: PICS_EVENT_LIST_ENABLED + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 1, 3, 4, 65528, 65529, 65530, 65531, 65532, 65533] + + - label: "Step 4a: Read the global attribute: AttributeList" + PICS: "!PICS_EVENT_LIST_ENABLED" + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [0, 1, 3, 4, 65528, 65529, 65531, 65532, 65533] + + - label: + "Step 4b: Read the feature dependent(VALCC.S.F00) attribute in + AttributeList" + PICS: VALCC.S.F00 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [2] + + - label: + "Step 4c: Read the feature dependent(VALCC.S.F01) attribute in + AttributeList" + PICS: VALCC.S.F01 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [6, 7] + + - label: + "Step 4d: Read the feature dependent(VALCC.S.F01) optional attribute + in AttributeList" + PICS: VALCC.S.F01 && VALCC.S.A0008 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [8] + + - label: + "Step 4e: Read the feature dependent(VALCC.S.F01) optional attribute + in AttributeList" + PICS: VALCC.S.F01 && VALCC.S.A000a + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [10] + + - label: + "Step 4f: TH reads optional (ValveFault) attribute in AttributeList" + PICS: VALCC.S.A0009 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [9] + + - label: "Step 5a: Read the global attribute: EventList" + PICS: PICS_EVENT_LIST_ENABLED && !VALCC.S.E00 && !VALCC.S.E01 + command: "readAttribute" + attribute: "EventList" + response: + value: [] + constraints: + type: list + + - label: "Step 5b: Read the optional (ValveStateChanged) event in EventList" + PICS: PICS_EVENT_LIST_ENABLED && VALCC.S.E00 + command: "readAttribute" + attribute: "EventList" + response: + constraints: + type: list + contains: [0] + + - label: "Step 5c: Read the optional (ValveFault) event in EventList" + PICS: PICS_EVENT_LIST_ENABLED && VALCC.S.E01 + command: "readAttribute" + attribute: "EventList" + response: + constraints: + type: list + contains: [1] + + - label: "Step 6: Read the global attribute: AcceptedCommandList" + command: "readAttribute" + attribute: "AcceptedCommandList" + response: + constraints: + type: list + contains: [0, 1] + + - label: "Step 7: Read the global attribute: GeneratedCommandList" + command: "readAttribute" + attribute: "GeneratedCommandList" + response: + value: [] + constraints: + type: list diff --git a/src/app/tests/suites/certification/ci-pics-values b/src/app/tests/suites/certification/ci-pics-values index 86fb9fb792b2fa..1dcd7edc09597a 100644 --- a/src/app/tests/suites/certification/ci-pics-values +++ b/src/app/tests/suites/certification/ci-pics-values @@ -2655,3 +2655,42 @@ REFALM.S.A0003=1 REFALM.S.E00=1 REFALM.S.C00.Rsp=1 REFALM.S.C01.Rsp=1 + +#Boolean State Configuration +BOOLCFG.S=1 +BOOLCFG.S.F00=1 +BOOLCFG.S.F01=1 +BOOLCFG.S.F02=1 +BOOLCFG.S.F03=1 +BOOLCFG.S.A0000=1 +BOOLCFG.S.A0001=1 +BOOLCFG.S.A0002=1 +BOOLCFG.S.A0003=1 +BOOLCFG.S.A0004=1 +BOOLCFG.S.A0005=1 +BOOLCFG.S.A0006=1 +BOOLCFG.S.A0007=1 +BOOLCFG.S.E00=1 +BOOLCFG.S.E01=1 +BOOLCFG.S.C00.Rsp=1 +BOOLCFG.S.C01.Rsp=1 + +#Valve Configuration and Control +VALCC.S=1 +VALCC.S.F00=1 +VALCC.S.F01=1 +VALCC.S.A0000=1 +VALCC.S.A0001=1 +VALCC.S.A0002=1 +VALCC.S.A0003=1 +VALCC.S.A0004=1 +VALCC.S.A0005=1 +VALCC.S.A0006=1 +VALCC.S.A0007=1 +VALCC.S.A0008=1 +VALCC.S.A0009=1 +VALCC.S.A000a=1 +VALCC.S.E00=1 +VALCC.S.E01=1 +VALCC.S.C00.Rsp=1 +VALCC.S.C01.Rsp=1 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/microwave-oven-control-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/microwave-oven-control-cluster.xml index e6cb38e39a1efc..ab13fc51e10f29 100644 --- a/src/app/zap-templates/zcl/data-model/chip/microwave-oven-control-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/microwave-oven-control-cluster.xml @@ -17,6 +17,13 @@ limitations under the License. + + + + + + + Microwave Oven Control Appliances @@ -25,17 +32,23 @@ limitations under the License. MICROWAVE_OVEN_CONTROL_CLUSTER true true - CookTime - PowerSetting - MinPower - MaxPower - PowerStep + CookTime + MaxCookTime + PowerSetting + MinPower + MaxPower + PowerStep + SupportedWatts + SelectedWattIndex + WattRating Set Cooking Parameters - - - + + + + + Add More Cooking Time diff --git a/src/app/zap-templates/zcl/data-model/chip/rvc-run-mode-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/rvc-run-mode-cluster.xml index 1a866b5f5868da..9f102dd8b63b15 100644 --- a/src/app/zap-templates/zcl/data-model/chip/rvc-run-mode-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/rvc-run-mode-cluster.xml @@ -33,6 +33,7 @@ limitations under the License. + 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/app/zap-templates/zcl/data-model/chip/thermostat-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/thermostat-cluster.xml index 567216018d07ff..948c0937a3fd10 100644 --- a/src/app/zap-templates/zcl/data-model/chip/thermostat-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/thermostat-cluster.xml @@ -25,6 +25,10 @@ limitations under the License. + + + + @@ -51,6 +55,14 @@ limitations under the License. + + + + + + + + @@ -87,6 +99,18 @@ limitations under the License. + + + + + + + + + + + + @@ -187,6 +211,17 @@ limitations under the License. + + + + + + + + + + + @@ -195,6 +230,56 @@ limitations under the License. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Thermostat HVAC @@ -204,11 +289,13 @@ limitations under the License. true true + + + LocalTemperature OutdoorTemperature Occupancy - - + AbsMinHeatSetpointLimit AbsMaxHeatSetpointLimit AbsMinCoolSetpointLimit @@ -325,6 +412,29 @@ limitations under the License. ACCapacityformat + PresetTypes + ScheduleTypes + NumberOfPresets + NumberOfSchedules + NumberOfScheduleTransitions + NumberOfScheduleTransitionPerDay + ActivePresetHandle + ActiveScheduleHandle + + Presets + + + + Schedules + + + PresetsSchedulesEditable + TemperatureSetpointHoldPolicy + SetpointHoldExpiryTimestamp + QueuedPreset + + + Command description for SetpointRaiseLower @@ -350,11 +460,42 @@ limitations under the License. - - The Clear Weekly Schedule command is used to clear the weekly schedule. - + This command is used to clear the weekly schedule. The ClearWeeklySchedule command has no payload. + + + This command is used to set the active schedule. + + + + This command is used to set the active preset. + + + + This command is used to start editing the presets and schedules. + + + + + This command is used to cancel editing presets and schedules. + + + + This command is used to notify the server that all edits are done and should be committed. + + + + This command is sent to cancel a queued preset. + + + + This command sets the set point hold policy. + + + + + The Current Weekly Schedule Command is sent from the server in response to the Get Weekly Schedule Command. @@ -364,6 +505,6 @@ limitations under the License. - + \ No newline at end of file diff --git a/src/app/zap-templates/zcl/zcl-with-test-extensions.json b/src/app/zap-templates/zcl/zcl-with-test-extensions.json index ecbcea088f51b5..b071fd42c77cb8 100644 --- a/src/app/zap-templates/zcl/zcl-with-test-extensions.json +++ b/src/app/zap-templates/zcl/zcl-with-test-extensions.json @@ -178,7 +178,42 @@ ], "Bridged Device Basic Information": ["ProductAppearance"], "Descriptor": ["ClusterRevision"], - "Device Energy Management": ["Forecast"], + "Device Energy Management": [ + "ESAType", + "ESACanGenerate", + "ESAState", + "AbsMinPower", + "AbsMaxPower", + "PowerAdjustmentCapability", + "Forecast", + "FeatureMap" + ], + "Energy EVSE": [ + "State", + "SupplyState", + "FaultState", + "ChargingEnabledUntil", + "DischargingEnabledUntil", + "CircuitCapacity", + "MinimumChargeCurrent", + "MaximumChargeCurrent", + "MaximumDischargeCurrent", + "UserMaximumChargeCurrent", + "RandomizationDelayWindow", + "NextChargeStartTime", + "NextChargeTargetTime", + "NextChargeRequiredEnergy", + "NextChargeTargetSoC", + "ApproximateEVEfficiency", + "StateOfCharge", + "BatteryCapacity", + "VehicleID", + "SessionID", + "SessionDuration", + "SessionEnergyCharged", + "SessionEnergyDischarged", + "FeatureMap" + ], "Ethernet Network Diagnostics": [ "PHYRate", "FullDuplex", @@ -345,10 +380,15 @@ "Microwave Oven Mode": ["SupportedModes", "CurrentMode", "FeatureMap"], "Microwave Oven Control": [ "CookTime", + "MaxCookTime", "PowerSetting", "MinPower", "MaxPower", - "PowerStep" + "PowerStep", + "SupportedWatts", + "SelectedWattIndex", + "WattRating", + "FeatureMap" ], "Laundry Washer Mode": [ "SupportedModes", @@ -553,6 +593,7 @@ "FeatureMap" ], "Air Quality": ["AirQuality", "FeatureMap"], + "Thermostat": ["QueuedPreset"], "Electrical Energy Measurement": [ "Accuracy", "CumulativeEnergyImported", diff --git a/src/app/zap-templates/zcl/zcl.json b/src/app/zap-templates/zcl/zcl.json index 80b9ff7bbd84f9..c645c66e91fc5c 100644 --- a/src/app/zap-templates/zcl/zcl.json +++ b/src/app/zap-templates/zcl/zcl.json @@ -176,7 +176,42 @@ ], "Bridged Device Basic Information": ["ProductAppearance"], "Descriptor": ["ClusterRevision"], - "Device Energy Management": ["Forecast"], + "Device Energy Management": [ + "ESAType", + "ESACanGenerate", + "ESAState", + "AbsMinPower", + "AbsMaxPower", + "PowerAdjustmentCapability", + "Forecast", + "FeatureMap" + ], + "Energy EVSE": [ + "State", + "SupplyState", + "FaultState", + "ChargingEnabledUntil", + "DischargingEnabledUntil", + "CircuitCapacity", + "MinimumChargeCurrent", + "MaximumChargeCurrent", + "MaximumDischargeCurrent", + "UserMaximumChargeCurrent", + "RandomizationDelayWindow", + "NextChargeStartTime", + "NextChargeTargetTime", + "NextChargeRequiredEnergy", + "NextChargeTargetSoC", + "ApproximateEVEfficiency", + "StateOfCharge", + "BatteryCapacity", + "VehicleID", + "SessionID", + "SessionDuration", + "SessionEnergyCharged", + "SessionEnergyDischarged", + "FeatureMap" + ], "Ethernet Network Diagnostics": [ "PHYRate", "FullDuplex", @@ -343,10 +378,15 @@ "Microwave Oven Mode": ["SupportedModes", "CurrentMode", "FeatureMap"], "Microwave Oven Control": [ "CookTime", + "MaxCookTime", "PowerSetting", "MinPower", "MaxPower", - "PowerStep" + "PowerStep", + "SupportedWatts", + "SelectedWattIndex", + "WattRating", + "FeatureMap" ], "Laundry Washer Mode": [ "SupportedModes", @@ -551,6 +591,7 @@ "FeatureMap" ], "Air Quality": ["AirQuality", "FeatureMap"], + "Thermostat": ["QueuedPreset"], "Electrical Energy Measurement": [ "Accuracy", "CumulativeEnergyImported", diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 9b39b0d849af15..5f550b620b8006 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; @@ -3298,6 +3105,7 @@ cluster RvcRunMode = 84 { enum ModeTag : enum16 { kIdle = 16384; kCleaning = 16385; + kMapping = 16386; } enum StatusCode : enum8 { @@ -3740,11 +3548,21 @@ provisional cluster MicrowaveOvenMode = 94 { provisional cluster MicrowaveOvenControl = 95 { revision 1; // NOTE: Default/not specifically set - readonly attribute elapsed_s cookTime = 1; - readonly attribute int8u powerSetting = 2; + bitmap Feature : bitmap32 { + kPowerAsNumber = 0x1; + kPowerInWatts = 0x2; + kPowerNumberLimits = 0x4; + } + + readonly attribute elapsed_s cookTime = 0; + readonly attribute elapsed_s maxCookTime = 1; + readonly attribute optional int8u powerSetting = 2; readonly attribute optional int8u minPower = 3; readonly attribute optional int8u maxPower = 4; readonly attribute optional int8u powerStep = 5; + readonly attribute optional int16u supportedWatts[] = 6; + readonly attribute optional int8u selectedWattIndex = 7; + readonly attribute optional int16u wattRating = 8; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -3756,6 +3574,8 @@ provisional cluster MicrowaveOvenControl = 95 { optional int8u cookMode = 0; optional elapsed_s cookTime = 1; optional int8u powerSetting = 2; + optional int8u wattSettingIndex = 3; + optional boolean startAfterSetting = 4; } request struct AddMoreTimeRequest { @@ -3903,6 +3723,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 @@ -5815,6 +5828,16 @@ cluster Thermostat = 513 { kCoolingAndHeatingWithReheat = 5; } + enum PresetScenarioEnum : enum8 { + kUnspecified = 0; + kOccupied = 1; + kUnoccupied = 2; + kSleep = 3; + kWake = 4; + kVacation = 5; + kUserDefined = 6; + } + enum SetpointChangeSourceEnum : enum8 { kManual = 0; kSchedule = 1; @@ -5876,6 +5899,10 @@ cluster Thermostat = 513 { kSetback = 0x10; kAutoMode = 0x20; kLocalTemperatureNotExposed = 0x40; + kMatterScheduleConfiguration = 0x80; + kPresets = 0x100; + kSetpoints = 0x200; + kQueuedPresetsSupported = 0x400; } bitmap HVACSystemTypeBitmap : bitmap8 { @@ -5885,6 +5912,11 @@ cluster Thermostat = 513 { kHeatingUsesFuel = 0x20; } + bitmap PresetTypeFeaturesBitmap : bitmap16 { + kAutomatic = 0x1; + kSupportsNames = 0x2; + } + bitmap ProgrammingOperationModeBitmap : bitmap8 { kScheduleActive = 0x1; kAutoRecovery = 0x2; @@ -5923,6 +5955,62 @@ cluster Thermostat = 513 { kCoolSetpointPresent = 0x2; } + bitmap ScheduleTypeFeaturesBitmap : bitmap16 { + kSupportsPresets = 0x1; + kSupportsSetpoints = 0x2; + kSupportsNames = 0x4; + kSupportsOff = 0x8; + } + + bitmap TemperatureSetpointHoldPolicyBitmap : bitmap8 { + kHoldDurationElapsed = 0x1; + kHoldDurationElapsedOrPresetChanged = 0x2; + } + + struct ScheduleTransitionStruct { + ScheduleDayOfWeekBitmap dayOfWeek = 0; + int16u transitionTime = 1; + optional octet_string<16> presetHandle = 2; + optional SystemModeEnum systemMode = 3; + optional temperature coolingSetpoint = 4; + optional temperature heatingSetpoint = 5; + } + + struct ScheduleStruct { + nullable octet_string<16> scheduleHandle = 0; + SystemModeEnum systemMode = 1; + optional char_string<64> name = 2; + optional octet_string<16> presetHandle = 3; + ScheduleTransitionStruct transitions[] = 4; + optional nullable boolean builtIn = 5; + } + + struct PresetStruct { + nullable octet_string<16> presetHandle = 0; + PresetScenarioEnum presetScenario = 1; + optional nullable char_string<64> name = 2; + optional temperature coolingSetpoint = 3; + optional temperature heatingSetpoint = 4; + nullable boolean builtIn = 5; + } + + struct PresetTypeStruct { + PresetScenarioEnum presetScenario = 0; + int8u numberOfPresets = 1; + PresetTypeFeaturesBitmap presetTypeFeatures = 2; + } + + struct QueuedPresetStruct { + nullable octet_string<16> presetHandle = 0; + nullable epoch_s transitionTimestamp = 1; + } + + struct ScheduleTypeStruct { + SystemModeEnum systemMode = 0; + int8u numberOfSchedules = 1; + ScheduleTypeFeaturesBitmap scheduleTypeFeatures = 2; + } + struct WeeklyScheduleTransitionStruct { int16u transitionTime = 0; nullable temperature heatSetpoint = 1; @@ -5978,6 +6066,20 @@ cluster Thermostat = 513 { attribute access(write: manage) optional ACLouverPositionEnum ACLouverPosition = 69; readonly attribute optional nullable temperature ACCoilTemperature = 70; attribute access(write: manage) optional ACCapacityFormatEnum ACCapacityformat = 71; + readonly attribute optional PresetTypeStruct presetTypes[] = 72; + readonly attribute optional ScheduleTypeStruct scheduleTypes[] = 73; + readonly attribute optional int8u numberOfPresets = 74; + readonly attribute optional int8u numberOfSchedules = 75; + readonly attribute optional int8u numberOfScheduleTransitions = 76; + readonly attribute optional nullable int8u numberOfScheduleTransitionPerDay = 77; + readonly attribute optional nullable octet_string<16> activePresetHandle = 78; + readonly attribute optional nullable octet_string<16> activeScheduleHandle = 79; + attribute access(write: manage) optional PresetStruct presets[] = 80; + attribute access(write: manage) optional ScheduleStruct schedules[] = 81; + readonly attribute optional boolean presetsSchedulesEditable = 82; + readonly attribute optional TemperatureSetpointHoldPolicyBitmap temperatureSetpointHoldPolicy = 83; + readonly attribute optional nullable epoch_s setpointHoldExpiryTimestamp = 84; + readonly attribute optional nullable QueuedPresetStruct queuedPreset = 85; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -6009,14 +6111,45 @@ cluster Thermostat = 513 { ScheduleModeBitmap modeToReturn = 1; } + request struct SetActiveScheduleRequestRequest { + octet_string<16> scheduleHandle = 0; + } + + request struct SetActivePresetRequestRequest { + octet_string<16> presetHandle = 0; + optional int16u delayMinutes = 1; + } + + request struct StartPresetsSchedulesEditRequestRequest { + int16u timeoutSeconds = 0; + } + + request struct SetTemperatureSetpointHoldPolicyRequest { + TemperatureSetpointHoldPolicyBitmap temperatureSetpointHoldPolicy = 0; + } + /** Command description for SetpointRaiseLower */ command SetpointRaiseLower(SetpointRaiseLowerRequest): DefaultSuccess = 0; /** Command description for SetWeeklySchedule */ command access(invoke: manage) SetWeeklySchedule(SetWeeklyScheduleRequest): DefaultSuccess = 1; /** Command description for GetWeeklySchedule */ command GetWeeklySchedule(GetWeeklyScheduleRequest): GetWeeklyScheduleResponse = 2; - /** The Clear Weekly Schedule command is used to clear the weekly schedule. */ + /** This command is used to clear the weekly schedule. The ClearWeeklySchedule command has no payload. */ command access(invoke: manage) ClearWeeklySchedule(): DefaultSuccess = 3; + /** This command is used to set the active schedule. */ + command SetActiveScheduleRequest(SetActiveScheduleRequestRequest): DefaultSuccess = 5; + /** This command is used to set the active preset. */ + command SetActivePresetRequest(SetActivePresetRequestRequest): DefaultSuccess = 6; + /** This command is used to start editing the presets and schedules. */ + command access(invoke: manage) StartPresetsSchedulesEditRequest(StartPresetsSchedulesEditRequestRequest): DefaultSuccess = 7; + /** This command is used to cancel editing presets and schedules. */ + command access(invoke: manage) CancelPresetsSchedulesEditRequest(): DefaultSuccess = 8; + /** This command is used to notify the server that all edits are done and should be committed. */ + command access(invoke: manage) CommitPresetsSchedulesRequest(): DefaultSuccess = 9; + /** This command is sent to cancel a queued preset. */ + command access(invoke: manage) CancelSetActivePresetRequest(): DefaultSuccess = 10; + /** This command sets the set point hold policy. */ + command SetTemperatureSetpointHoldPolicy(SetTemperatureSetpointHoldPolicyRequest): DefaultSuccess = 11; } /** An interface for controlling a fan in a heating/cooling system. */ diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index 53ce1b49183816..9c1c09406ad207 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", @@ -2861,6 +2861,59 @@ } ] }, + { + "name": "Microwave Oven Control", + "code": 95, + "mfgCode": null, + "define": "MICROWAVE_OVEN_CONTROL_CLUSTER", + "side": "client", + "enabled": 1, + "apiMaturity": "provisional", + "commands": [ + { + "name": "SetCookingParameters", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "client", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "Operational State", "code": 96, diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java index f050f7e1428d6a..8eb7fcdcee4b3a 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java @@ -1002,980 +1002,6 @@ public void onSuccess(byte[] tlv) { } } - public static class ScenesCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 5L; - - 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 ScenesCluster(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.ScenesClusterExtensionFieldSet.decodeTlv(elementcastingValue))); - } - } - } - callback.onSuccess(status, groupID, sceneID, transitionTime, sceneName, extensionFieldSets); - }}, commandId, value, timedInvokeTimeoutMs); - } - - public void removeScene(RemoveSceneResponseCallback callback, Integer groupID, Integer sceneID) { - removeScene(callback, groupID, sceneID, 0); - } - - public void removeScene(RemoveSceneResponseCallback callback, Integer groupID, Integer sceneID, 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); - }}, commandId, value, timedInvokeTimeoutMs); - } - - public void removeAllScenes(RemoveAllScenesResponseCallback callback, Integer groupID) { - removeAllScenes(callback, groupID, 0); - } - - public void removeAllScenes(RemoveAllScenesResponseCallback callback, Integer groupID, int timedInvokeTimeoutMs) { - final long commandId = 3L; - - 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 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); - }}, commandId, value, timedInvokeTimeoutMs); - } - - public void storeScene(StoreSceneResponseCallback callback, Integer groupID, Integer sceneID) { - storeScene(callback, groupID, sceneID, 0); - } - - public void storeScene(StoreSceneResponseCallback callback, Integer groupID, Integer sceneID, int timedInvokeTimeoutMs) { - final long commandId = 4L; - - 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); - }}, commandId, value, timedInvokeTimeoutMs); - } - - public void recallScene(DefaultClusterCallback callback, Integer groupID, Integer sceneID, @Nullable Optional transitionTime) { - recallScene(callback, groupID, sceneID, transitionTime, 0); - } - - public void recallScene(DefaultClusterCallback callback, Integer groupID, Integer sceneID, @Nullable Optional transitionTime, int timedInvokeTimeoutMs) { - final long commandId = 5L; - - 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 = 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 onResponse(StructType invokeStructValue) { - callback.onSuccess(); - }}, commandId, value, timedInvokeTimeoutMs); - } - - public void getSceneMembership(GetSceneMembershipResponseCallback callback, Integer groupID) { - getSceneMembership(callback, groupID, 0); - } - - 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 void enhancedAddScene(EnhancedAddSceneResponseCallback callback, Integer groupID, Integer sceneID, Integer transitionTime, String sceneName, ArrayList extensionFieldSets) { - enhancedAddScene(callback, groupID, sceneID, transitionTime, sceneName, extensionFieldSets, 0); - } - - 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)); - - 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 enhancedViewScene(EnhancedViewSceneResponseCallback callback, Integer groupID, Integer sceneID) { - enhancedViewScene(callback, groupID, sceneID, 0); - } - - 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 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); - }}, commandId, value, timedInvokeTimeoutMs); - } - - 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 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)); - - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @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); - } - } - } - 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); - } - - 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 readSceneCountAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SCENE_COUNT_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, SCENE_COUNT_ATTRIBUTE_ID, true); - } - - 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) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, SCENE_COUNT_ATTRIBUTE_ID, minInterval, maxInterval); - } - - 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) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, CURRENT_SCENE_ATTRIBUTE_ID, true); - } - - 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) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, CURRENT_SCENE_ATTRIBUTE_ID, minInterval, maxInterval); - } - - 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) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, CURRENT_GROUP_ATTRIBUTE_ID, true); - } - - 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) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, CURRENT_GROUP_ATTRIBUTE_ID, minInterval, maxInterval); - } - - 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) { - Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, SCENE_VALID_ATTRIBUTE_ID, true); - } - - 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) { - Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, SCENE_VALID_ATTRIBUTE_ID, minInterval, maxInterval); - } - - public void readNameSupportAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NAME_SUPPORT_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, NAME_SUPPORT_ATTRIBUTE_ID, true); - } - - public void subscribeNameSupportAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - 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); - } - }, NAME_SUPPORT_ATTRIBUTE_ID, minInterval, maxInterval); - } - - 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) { - @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, LAST_CONFIGURED_BY_ATTRIBUTE_ID, true); - } - - 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) { - @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - } - }, 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( - 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 OnOffCluster extends BaseChipCluster { public static final long CLUSTER_ID = 6L; @@ -25386,11 +24412,15 @@ public void onSuccess(byte[] tlv) { public static class MicrowaveOvenControlCluster extends BaseChipCluster { public static final long CLUSTER_ID = 95L; - private static final long COOK_TIME_ATTRIBUTE_ID = 1L; + private static final long COOK_TIME_ATTRIBUTE_ID = 0L; + private static final long MAX_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 SUPPORTED_WATTS_ATTRIBUTE_ID = 6L; + private static final long SELECTED_WATT_INDEX_ATTRIBUTE_ID = 7L; + private static final long WATT_RATING_ATTRIBUTE_ID = 8L; 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; @@ -25408,11 +24438,11 @@ 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 setCookingParameters(DefaultClusterCallback callback, Optional cookMode, Optional cookTime, Optional powerSetting, Optional wattSettingIndex, Optional startAfterSetting) { + setCookingParameters(callback, cookMode, cookTime, powerSetting, wattSettingIndex, startAfterSetting, 0); } - public void setCookingParameters(DefaultClusterCallback callback, Optional cookMode, Optional cookTime, Optional powerSetting, int timedInvokeTimeoutMs) { + public void setCookingParameters(DefaultClusterCallback callback, Optional cookMode, Optional cookTime, Optional powerSetting, Optional wattSettingIndex, Optional startAfterSetting, int timedInvokeTimeoutMs) { final long commandId = 0L; ArrayList elements = new ArrayList<>(); @@ -25428,32 +24458,590 @@ public void setCookingParameters(DefaultClusterCallback callback, Optionalmap((nonOptionalpowerSetting) -> new UIntType(nonOptionalpowerSetting)).orElse(new EmptyType()); elements.add(new StructElement(powerSettingFieldID, powerSettingtlvValue)); + final long wattSettingIndexFieldID = 3L; + BaseTLVType wattSettingIndextlvValue = wattSettingIndex.map((nonOptionalwattSettingIndex) -> new UIntType(nonOptionalwattSettingIndex)).orElse(new EmptyType()); + elements.add(new StructElement(wattSettingIndexFieldID, wattSettingIndextlvValue)); + + final long startAfterSettingFieldID = 4L; + BaseTLVType startAfterSettingtlvValue = startAfterSetting.map((nonOptionalstartAfterSetting) -> new BooleanType(nonOptionalstartAfterSetting)).orElse(new EmptyType()); + elements.add(new StructElement(startAfterSettingFieldID, startAfterSettingtlvValue)); + + 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 SupportedWattsAttributeCallback 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 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 readMaxCookTimeAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_COOK_TIME_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, MAX_COOK_TIME_ATTRIBUTE_ID, true); + } + + public void subscribeMaxCookTimeAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_COOK_TIME_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, MAX_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); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, POWER_SETTING_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readMinPowerAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MIN_POWER_ATTRIBUTE_ID); + + 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 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 readMaxPowerAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_POWER_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, MAX_POWER_ATTRIBUTE_ID, true); + } + + 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) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, MAX_POWER_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readPowerStepAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, POWER_STEP_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, POWER_STEP_ATTRIBUTE_ID, true); + } + + public void subscribePowerStepAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + 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); + } + }, POWER_STEP_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readSupportedWattsAttribute( + SupportedWattsAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_WATTS_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, SUPPORTED_WATTS_ATTRIBUTE_ID, true); + } + + public void subscribeSupportedWattsAttribute( + SupportedWattsAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SUPPORTED_WATTS_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, SUPPORTED_WATTS_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readSelectedWattIndexAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SELECTED_WATT_INDEX_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, SELECTED_WATT_INDEX_ATTRIBUTE_ID, true); + } + + public void subscribeSelectedWattIndexAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SELECTED_WATT_INDEX_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, SELECTED_WATT_INDEX_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readWattRatingAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, WATT_RATING_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, WATT_RATING_ATTRIBUTE_ID, true); + } + + public void subscribeWattRatingAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, WATT_RATING_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, WATT_RATING_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 OperationalStateCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 96L; + + 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; + + public OperationalStateCluster(long devicePtr, int endpointId) { + super(devicePtr, endpointId, CLUSTER_ID); + } + + @Override + @Deprecated + public long initWithDevice(long devicePtr, int endpointId) { + return 0L; + } + + public void pause(OperationalCommandResponseCallback callback) { + pause(callback, 0); + } + + public void pause(OperationalCommandResponseCallback 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) { + 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 stop(OperationalCommandResponseCallback callback) { + stop(callback, 0); + } + + 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) { + 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 start(OperationalCommandResponseCallback callback) { + start(callback, 0); + } + + public void start(OperationalCommandResponseCallback callback, 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) { + 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 void addMoreTime(DefaultClusterCallback callback, Long timeToAdd) { - addMoreTime(callback, timeToAdd, 0); + public interface OperationalCommandResponseCallback extends BaseClusterCallback { + void onSuccess(ChipStructs.OperationalStateClusterErrorStateStruct commandResponseState); } - public void addMoreTime(DefaultClusterCallback callback, Long timeToAdd, int timedInvokeTimeoutMs) { - final long commandId = 1L; + public interface PhaseListAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable List value); + } - ArrayList elements = new ArrayList<>(); - final long timeToAddFieldID = 0L; - BaseTLVType timeToAddtlvValue = new UIntType(timeToAdd); - elements.add(new StructElement(timeToAddFieldID, timeToAddtlvValue)); + public interface CurrentPhaseAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Integer value); + } - StructType value = new StructType(elements); - invoke(new InvokeCallbackImpl(callback) { - @Override - public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); - }}, commandId, value, timedInvokeTimeoutMs); + 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 { @@ -25472,109 +25060,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 readPowerSettingAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, POWER_SETTING_ATTRIBUTE_ID); + 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) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, POWER_SETTING_ATTRIBUTE_ID, true); + }, CURRENT_PHASE_ATTRIBUTE_ID, true); } - public void subscribePowerSettingAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, POWER_SETTING_ATTRIBUTE_ID); + 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) { - Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } - }, POWER_SETTING_ATTRIBUTE_ID, minInterval, maxInterval); + }, CURRENT_PHASE_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readMinPowerAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MIN_POWER_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); } - }, MIN_POWER_ATTRIBUTE_ID, true); + }, COUNTDOWN_TIME_ATTRIBUTE_ID, true); } - public void subscribeMinPowerAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MIN_POWER_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); } - }, MIN_POWER_ATTRIBUTE_ID, minInterval, maxInterval); + }, COUNTDOWN_TIME_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readMaxPowerAttribute( - IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_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); } - }, MAX_POWER_ATTRIBUTE_ID, true); + }, OPERATIONAL_STATE_LIST_ATTRIBUTE_ID, true); } - public void subscribeMaxPowerAttribute( - IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, MAX_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); } - }, MAX_POWER_ATTRIBUTE_ID, minInterval, maxInterval); + }, OPERATIONAL_STATE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } - public void readPowerStepAttribute( + public void readOperationalStateAttribute( IntegerAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, POWER_STEP_ATTRIBUTE_ID); + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, OPERATIONAL_STATE_ATTRIBUTE_ID); readAttribute(new ReportCallbackImpl(callback, path) { @Override @@ -25582,19 +25170,44 @@ public void onSuccess(byte[] tlv) { Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } - }, POWER_STEP_ATTRIBUTE_ID, true); + }, OPERATIONAL_STATE_ATTRIBUTE_ID, true); } - public void subscribePowerStepAttribute( + public void subscribeOperationalStateAttribute( IntegerAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, POWER_STEP_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); } - }, POWER_STEP_ATTRIBUTE_ID, minInterval, maxInterval); + }, 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.OperationalStateClusterErrorStateStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, OPERATIONAL_ERROR_ATTRIBUTE_ID, true); + } + + 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) { + ChipStructs.OperationalStateClusterErrorStateStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, OPERATIONAL_ERROR_ATTRIBUTE_ID, minInterval, maxInterval); } public void readGeneratedCommandListAttribute( @@ -25748,8 +25361,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 +25377,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 +25400,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 +25426,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 +25452,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 +25478,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 +25492,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,11 +25508,11 @@ 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.OperationalStateClusterErrorStateStruct value); + void onSuccess(ChipStructs.RvcOperationalStateClusterErrorStateStruct value); } public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { @@ -26000,7 +25613,7 @@ public void readOperationalStateListAttribute( 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); } }, OPERATIONAL_STATE_LIST_ATTRIBUTE_ID, true); @@ -26013,7 +25626,7 @@ public void subscribeOperationalStateListAttribute( subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } }, OPERATIONAL_STATE_LIST_ATTRIBUTE_ID, minInterval, maxInterval); } @@ -26050,7 +25663,7 @@ public void readOperationalErrorAttribute( readAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - ChipStructs.OperationalStateClusterErrorStateStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + ChipStructs.RvcOperationalStateClusterErrorStateStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); callback.onSuccess(value); } }, OPERATIONAL_ERROR_ATTRIBUTE_ID, true); @@ -26063,7 +25676,7 @@ public void subscribeOperationalErrorAttribute( subscribeAttribute(new ReportCallbackImpl(callback, path) { @Override public void onSuccess(byte[] tlv) { - ChipStructs.OperationalStateClusterErrorStateStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + ChipStructs.RvcOperationalStateClusterErrorStateStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); } }, OPERATIONAL_ERROR_ATTRIBUTE_ID, minInterval, maxInterval); } @@ -26219,15 +25832,17 @@ public void onSuccess(byte[] tlv) { } } - public static class RvcOperationalStateCluster extends BaseChipCluster { - public static final long CLUSTER_ID = 97L; + public static class ScenesManagementCluster extends BaseChipCluster { + public static final long CLUSTER_ID = 98L; - 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 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; @@ -26235,7 +25850,7 @@ public static class RvcOperationalStateCluster extends BaseChipCluster { private static final long FEATURE_MAP_ATTRIBUTE_ID = 65532L; private static final long CLUSTER_REVISION_ATTRIBUTE_ID = 65533L; - public RvcOperationalStateCluster(long devicePtr, int endpointId) { + public ScenesManagementCluster(long devicePtr, int endpointId) { super(devicePtr, endpointId, CLUSTER_ID); } @@ -26245,132 +25860,578 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public void pause(OperationalCommandResponseCallback callback) { - pause(callback, 0); + 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 pause(OperationalCommandResponseCallback callback, int timedInvokeTimeoutMs) { + 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<>(); + 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 removeScene(RemoveSceneResponseCallback callback, Integer groupID, Integer sceneID) { + removeScene(callback, groupID, sceneID, 0); + } + + public void removeScene(RemoveSceneResponseCallback callback, Integer groupID, Integer sceneID, 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); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void removeAllScenes(RemoveAllScenesResponseCallback callback, Integer groupID) { + removeAllScenes(callback, groupID, 0); + } + + public void removeAllScenes(RemoveAllScenesResponseCallback callback, Integer groupID, int timedInvokeTimeoutMs) { + final long commandId = 3L; + + 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 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); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void storeScene(StoreSceneResponseCallback callback, Integer groupID, Integer sceneID) { + storeScene(callback, groupID, sceneID, 0); + } + + public void storeScene(StoreSceneResponseCallback callback, Integer groupID, Integer sceneID, int timedInvokeTimeoutMs) { + final long commandId = 4L; + + 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); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void recallScene(DefaultClusterCallback callback, Integer groupID, Integer sceneID, @Nullable Optional transitionTime) { + recallScene(callback, groupID, sceneID, transitionTime, 0); + } + + public void recallScene(DefaultClusterCallback callback, Integer groupID, Integer sceneID, @Nullable Optional transitionTime, int timedInvokeTimeoutMs) { + final long commandId = 5L; + + 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 = 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 onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void getSceneMembership(GetSceneMembershipResponseCallback callback, Integer groupID) { + getSceneMembership(callback, groupID, 0); + } + + 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 commandResponseStateFieldID = 0L; - ChipStructs.RvcOperationalStateClusterErrorStateStruct commandResponseState = null; + 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() == 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() == 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(commandResponseState); + callback.onSuccess(status, capacity, groupID, sceneList); }}, commandId, value, timedInvokeTimeoutMs); } - public void stop(OperationalCommandResponseCallback callback) { - stop(callback, 0); + public void enhancedAddScene(EnhancedAddSceneResponseCallback callback, Integer groupID, Integer sceneID, Integer transitionTime, String sceneName, ArrayList extensionFieldSets) { + enhancedAddScene(callback, groupID, sceneID, transitionTime, sceneName, extensionFieldSets, 0); } - public void stop(OperationalCommandResponseCallback callback, int timedInvokeTimeoutMs) { - final long commandId = 1L; + 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)); + + 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 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 start(OperationalCommandResponseCallback callback) { - start(callback, 0); + public void enhancedViewScene(EnhancedViewSceneResponseCallback callback, Integer groupID, Integer sceneID) { + enhancedViewScene(callback, groupID, sceneID, 0); } - public void start(OperationalCommandResponseCallback callback, int timedInvokeTimeoutMs) { - final long commandId = 2L; + 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 resume(OperationalCommandResponseCallback callback) { - resume(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 resume(OperationalCommandResponseCallback callback, int timedInvokeTimeoutMs) { - final long commandId = 3L; + 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)); + 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 interface OperationalCommandResponseCallback extends BaseClusterCallback { - void onSuccess(ChipStructs.RvcOperationalStateClusterErrorStateStruct commandResponseState); + public interface AddSceneResponseCallback extends BaseClusterCallback { + void onSuccess(Integer status, Integer groupID, Integer sceneID); } - public interface PhaseListAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable List value); + public interface ViewSceneResponseCallback extends BaseClusterCallback { + void onSuccess(Integer status, Integer groupID, Integer sceneID, Optional transitionTime, Optional sceneName, Optional> extensionFieldSets); } - public interface CurrentPhaseAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Integer value); + public interface RemoveSceneResponseCallback extends BaseClusterCallback { + void onSuccess(Integer status, Integer groupID, Integer sceneID); } - public interface CountdownTimeAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Long value); + public interface RemoveAllScenesResponseCallback extends BaseClusterCallback { + void onSuccess(Integer status, Integer groupID); } - public interface OperationalStateListAttributeCallback extends BaseAttributeCallback { - void onSuccess(List value); + public interface StoreSceneResponseCallback extends BaseClusterCallback { + void onSuccess(Integer status, Integer groupID, Integer sceneID); } - public interface OperationalErrorAttributeCallback extends BaseAttributeCallback { - void onSuccess(ChipStructs.RvcOperationalStateClusterErrorStateStruct value); + 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); } public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { @@ -26389,109 +26450,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 +26560,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( @@ -36004,6 +36120,20 @@ public static class ThermostatCluster extends BaseChipCluster { private static final long A_C_LOUVER_POSITION_ATTRIBUTE_ID = 69L; private static final long A_C_COIL_TEMPERATURE_ATTRIBUTE_ID = 70L; private static final long A_C_CAPACITYFORMAT_ATTRIBUTE_ID = 71L; + private static final long PRESET_TYPES_ATTRIBUTE_ID = 72L; + private static final long SCHEDULE_TYPES_ATTRIBUTE_ID = 73L; + private static final long NUMBER_OF_PRESETS_ATTRIBUTE_ID = 74L; + private static final long NUMBER_OF_SCHEDULES_ATTRIBUTE_ID = 75L; + private static final long NUMBER_OF_SCHEDULE_TRANSITIONS_ATTRIBUTE_ID = 76L; + private static final long NUMBER_OF_SCHEDULE_TRANSITION_PER_DAY_ATTRIBUTE_ID = 77L; + private static final long ACTIVE_PRESET_HANDLE_ATTRIBUTE_ID = 78L; + private static final long ACTIVE_SCHEDULE_HANDLE_ATTRIBUTE_ID = 79L; + private static final long PRESETS_ATTRIBUTE_ID = 80L; + private static final long SCHEDULES_ATTRIBUTE_ID = 81L; + private static final long PRESETS_SCHEDULES_EDITABLE_ATTRIBUTE_ID = 82L; + private static final long TEMPERATURE_SETPOINT_HOLD_POLICY_ATTRIBUTE_ID = 83L; + private static final long SETPOINT_HOLD_EXPIRY_TIMESTAMP_ATTRIBUTE_ID = 84L; + private static final long QUEUED_PRESET_ATTRIBUTE_ID = 85L; 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; @@ -36148,6 +36278,138 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, value, timedInvokeTimeoutMs); } + public void setActiveScheduleRequest(DefaultClusterCallback callback, byte[] scheduleHandle) { + setActiveScheduleRequest(callback, scheduleHandle, 0); + } + + public void setActiveScheduleRequest(DefaultClusterCallback callback, byte[] scheduleHandle, int timedInvokeTimeoutMs) { + final long commandId = 5L; + + ArrayList elements = new ArrayList<>(); + final long scheduleHandleFieldID = 0L; + BaseTLVType scheduleHandletlvValue = new ByteArrayType(scheduleHandle); + elements.add(new StructElement(scheduleHandleFieldID, scheduleHandletlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void setActivePresetRequest(DefaultClusterCallback callback, byte[] presetHandle, Optional delayMinutes) { + setActivePresetRequest(callback, presetHandle, delayMinutes, 0); + } + + public void setActivePresetRequest(DefaultClusterCallback callback, byte[] presetHandle, Optional delayMinutes, int timedInvokeTimeoutMs) { + final long commandId = 6L; + + ArrayList elements = new ArrayList<>(); + final long presetHandleFieldID = 0L; + BaseTLVType presetHandletlvValue = new ByteArrayType(presetHandle); + elements.add(new StructElement(presetHandleFieldID, presetHandletlvValue)); + + final long delayMinutesFieldID = 1L; + BaseTLVType delayMinutestlvValue = delayMinutes.map((nonOptionaldelayMinutes) -> new UIntType(nonOptionaldelayMinutes)).orElse(new EmptyType()); + elements.add(new StructElement(delayMinutesFieldID, delayMinutestlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void startPresetsSchedulesEditRequest(DefaultClusterCallback callback, Integer timeoutSeconds) { + startPresetsSchedulesEditRequest(callback, timeoutSeconds, 0); + } + + public void startPresetsSchedulesEditRequest(DefaultClusterCallback callback, Integer timeoutSeconds, int timedInvokeTimeoutMs) { + final long commandId = 7L; + + ArrayList elements = new ArrayList<>(); + final long timeoutSecondsFieldID = 0L; + BaseTLVType timeoutSecondstlvValue = new UIntType(timeoutSeconds); + elements.add(new StructElement(timeoutSecondsFieldID, timeoutSecondstlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + + public void cancelPresetsSchedulesEditRequest(DefaultClusterCallback callback) { + cancelPresetsSchedulesEditRequest(callback, 0); + } + + public void cancelPresetsSchedulesEditRequest(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + final long commandId = 8L; + + 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 void commitPresetsSchedulesRequest(DefaultClusterCallback callback) { + commitPresetsSchedulesRequest(callback, 0); + } + + public void commitPresetsSchedulesRequest(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + final long commandId = 9L; + + 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 void cancelSetActivePresetRequest(DefaultClusterCallback callback) { + cancelSetActivePresetRequest(callback, 0); + } + + public void cancelSetActivePresetRequest(DefaultClusterCallback callback, int timedInvokeTimeoutMs) { + final long commandId = 10L; + + 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 void setTemperatureSetpointHoldPolicy(DefaultClusterCallback callback, Integer temperatureSetpointHoldPolicy) { + setTemperatureSetpointHoldPolicy(callback, temperatureSetpointHoldPolicy, 0); + } + + public void setTemperatureSetpointHoldPolicy(DefaultClusterCallback callback, Integer temperatureSetpointHoldPolicy, int timedInvokeTimeoutMs) { + final long commandId = 11L; + + ArrayList elements = new ArrayList<>(); + final long temperatureSetpointHoldPolicyFieldID = 0L; + BaseTLVType temperatureSetpointHoldPolicytlvValue = new UIntType(temperatureSetpointHoldPolicy); + elements.add(new StructElement(temperatureSetpointHoldPolicyFieldID, temperatureSetpointHoldPolicytlvValue)); + + StructType value = new StructType(elements); + invoke(new InvokeCallbackImpl(callback) { + @Override + public void onResponse(StructType invokeStructValue) { + callback.onSuccess(); + }}, commandId, value, timedInvokeTimeoutMs); + } + public interface GetWeeklyScheduleResponseCallback extends BaseClusterCallback { void onSuccess(Integer numberOfTransitionsForSequence, Integer dayOfWeekForSequence, Integer modeForSequence, ArrayList transitions); } @@ -36196,6 +36458,42 @@ public interface ACCoilTemperatureAttributeCallback extends BaseAttributeCallbac void onSuccess(@Nullable Integer value); } + public interface PresetTypesAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface ScheduleTypesAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface NumberOfScheduleTransitionPerDayAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Integer value); + } + + public interface ActivePresetHandleAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable byte[] value); + } + + public interface ActiveScheduleHandleAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable byte[] value); + } + + public interface PresetsAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface SchedulesAttributeCallback extends BaseAttributeCallback { + void onSuccess(List value); + } + + public interface SetpointHoldExpiryTimestampAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable Long value); + } + + public interface QueuedPresetAttributeCallback extends BaseAttributeCallback { + void onSuccess(@Nullable ChipStructs.ThermostatClusterQueuedPresetStruct value); + } + public interface GeneratedCommandListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } @@ -37680,6 +37978,374 @@ public void onSuccess(byte[] tlv) { }, A_C_CAPACITYFORMAT_ATTRIBUTE_ID, minInterval, maxInterval); } + public void readPresetTypesAttribute( + PresetTypesAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PRESET_TYPES_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, PRESET_TYPES_ATTRIBUTE_ID, true); + } + + public void subscribePresetTypesAttribute( + PresetTypesAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PRESET_TYPES_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, PRESET_TYPES_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readScheduleTypesAttribute( + ScheduleTypesAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SCHEDULE_TYPES_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, SCHEDULE_TYPES_ATTRIBUTE_ID, true); + } + + public void subscribeScheduleTypesAttribute( + ScheduleTypesAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SCHEDULE_TYPES_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, SCHEDULE_TYPES_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readNumberOfPresetsAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NUMBER_OF_PRESETS_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, NUMBER_OF_PRESETS_ATTRIBUTE_ID, true); + } + + public void subscribeNumberOfPresetsAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NUMBER_OF_PRESETS_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, NUMBER_OF_PRESETS_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readNumberOfSchedulesAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NUMBER_OF_SCHEDULES_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, NUMBER_OF_SCHEDULES_ATTRIBUTE_ID, true); + } + + public void subscribeNumberOfSchedulesAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NUMBER_OF_SCHEDULES_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, NUMBER_OF_SCHEDULES_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readNumberOfScheduleTransitionsAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NUMBER_OF_SCHEDULE_TRANSITIONS_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, NUMBER_OF_SCHEDULE_TRANSITIONS_ATTRIBUTE_ID, true); + } + + public void subscribeNumberOfScheduleTransitionsAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NUMBER_OF_SCHEDULE_TRANSITIONS_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, NUMBER_OF_SCHEDULE_TRANSITIONS_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readNumberOfScheduleTransitionPerDayAttribute( + NumberOfScheduleTransitionPerDayAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NUMBER_OF_SCHEDULE_TRANSITION_PER_DAY_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, NUMBER_OF_SCHEDULE_TRANSITION_PER_DAY_ATTRIBUTE_ID, true); + } + + public void subscribeNumberOfScheduleTransitionPerDayAttribute( + NumberOfScheduleTransitionPerDayAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NUMBER_OF_SCHEDULE_TRANSITION_PER_DAY_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, NUMBER_OF_SCHEDULE_TRANSITION_PER_DAY_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readActivePresetHandleAttribute( + ActivePresetHandleAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_PRESET_HANDLE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable byte[] value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ACTIVE_PRESET_HANDLE_ATTRIBUTE_ID, true); + } + + public void subscribeActivePresetHandleAttribute( + ActivePresetHandleAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_PRESET_HANDLE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable byte[] value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ACTIVE_PRESET_HANDLE_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readActiveScheduleHandleAttribute( + ActiveScheduleHandleAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_SCHEDULE_HANDLE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable byte[] value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, ACTIVE_SCHEDULE_HANDLE_ATTRIBUTE_ID, true); + } + + public void subscribeActiveScheduleHandleAttribute( + ActiveScheduleHandleAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, ACTIVE_SCHEDULE_HANDLE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable byte[] value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, ACTIVE_SCHEDULE_HANDLE_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readPresetsAttribute( + PresetsAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PRESETS_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, PRESETS_ATTRIBUTE_ID, true); + } + + public void writePresetsAttribute(DefaultClusterCallback callback, ArrayList value) { + writePresetsAttribute(callback, value, 0); + } + + public void writePresetsAttribute(DefaultClusterCallback callback, ArrayList value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = ArrayType.generateArrayType(value, (elementvalue) -> elementvalue.encodeTlv()); + writeAttribute(new WriteAttributesCallbackImpl(callback), PRESETS_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribePresetsAttribute( + PresetsAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PRESETS_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, PRESETS_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readSchedulesAttribute( + SchedulesAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SCHEDULES_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, SCHEDULES_ATTRIBUTE_ID, true); + } + + public void writeSchedulesAttribute(DefaultClusterCallback callback, ArrayList value) { + writeSchedulesAttribute(callback, value, 0); + } + + public void writeSchedulesAttribute(DefaultClusterCallback callback, ArrayList value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = ArrayType.generateArrayType(value, (elementvalue) -> elementvalue.encodeTlv()); + writeAttribute(new WriteAttributesCallbackImpl(callback), SCHEDULES_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeSchedulesAttribute( + SchedulesAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SCHEDULES_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + List value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, SCHEDULES_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readPresetsSchedulesEditableAttribute( + BooleanAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PRESETS_SCHEDULES_EDITABLE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, PRESETS_SCHEDULES_EDITABLE_ATTRIBUTE_ID, true); + } + + public void subscribePresetsSchedulesEditableAttribute( + BooleanAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, PRESETS_SCHEDULES_EDITABLE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Boolean value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, PRESETS_SCHEDULES_EDITABLE_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readTemperatureSetpointHoldPolicyAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TEMPERATURE_SETPOINT_HOLD_POLICY_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, TEMPERATURE_SETPOINT_HOLD_POLICY_ATTRIBUTE_ID, true); + } + + public void subscribeTemperatureSetpointHoldPolicyAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, TEMPERATURE_SETPOINT_HOLD_POLICY_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, TEMPERATURE_SETPOINT_HOLD_POLICY_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readSetpointHoldExpiryTimestampAttribute( + SetpointHoldExpiryTimestampAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SETPOINT_HOLD_EXPIRY_TIMESTAMP_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, SETPOINT_HOLD_EXPIRY_TIMESTAMP_ATTRIBUTE_ID, true); + } + + public void subscribeSetpointHoldExpiryTimestampAttribute( + SetpointHoldExpiryTimestampAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, SETPOINT_HOLD_EXPIRY_TIMESTAMP_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, SETPOINT_HOLD_EXPIRY_TIMESTAMP_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readQueuedPresetAttribute( + QueuedPresetAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, QUEUED_PRESET_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable ChipStructs.ThermostatClusterQueuedPresetStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, QUEUED_PRESET_ATTRIBUTE_ID, true); + } + + public void subscribeQueuedPresetAttribute( + QueuedPresetAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, QUEUED_PRESET_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + @Nullable ChipStructs.ThermostatClusterQueuedPresetStruct value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + } + }, QUEUED_PRESET_ATTRIBUTE_ID, minInterval, maxInterval); + } + public void readGeneratedCommandListAttribute( GeneratedCommandListAttributeCallback callback) { ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, GENERATED_COMMAND_LIST_ATTRIBUTE_ID); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java b/src/controller/java/generated/java/chip/devicecontroller/ChipStructs.java index 98bc3ca71303f5..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,41 +5063,284 @@ public String toString() { return output.toString(); } } -public static class HepaFilterMonitoringClusterReplacementProductStruct { - public Integer productIdentifierType; - public String productIdentifierValue; - private static final long PRODUCT_IDENTIFIER_TYPE_ID = 0L; - private static final long PRODUCT_IDENTIFIER_VALUE_ID = 1L; +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 HepaFilterMonitoringClusterReplacementProductStruct( - Integer productIdentifierType, - String productIdentifierValue + public ScenesManagementClusterAttributeValuePair( + Long attributeID, + Long attributeValue ) { - this.productIdentifierType = productIdentifierType; - this.productIdentifierValue = productIdentifierValue; + this.attributeID = attributeID; + this.attributeValue = attributeValue; } public StructType encodeTlv() { ArrayList values = new ArrayList<>(); - values.add(new StructElement(PRODUCT_IDENTIFIER_TYPE_ID, new UIntType(productIdentifierType))); - values.add(new StructElement(PRODUCT_IDENTIFIER_VALUE_ID, new StringType(productIdentifierValue))); + 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 HepaFilterMonitoringClusterReplacementProductStruct decodeTlv(BaseTLVType tlvValue) { + public static ScenesManagementClusterAttributeValuePair decodeTlv(BaseTLVType tlvValue) { if (tlvValue == null || tlvValue.type() != TLVType.Struct) { return null; } - Integer productIdentifierType = null; - String productIdentifierValue = null; + Long attributeID = null; + Long attributeValue = null; for (StructElement element: ((StructType)tlvValue).value()) { - if (element.contextTagNum() == PRODUCT_IDENTIFIER_TYPE_ID) { + if (element.contextTagNum() == ATTRIBUTE_I_D_ID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { UIntType castingValue = element.value(UIntType.class); - productIdentifierType = castingValue.value(Integer.class); + attributeID = castingValue.value(Long.class); } - } else if (element.contextTagNum() == PRODUCT_IDENTIFIER_VALUE_ID) { + } 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; + private static final long PRODUCT_IDENTIFIER_TYPE_ID = 0L; + private static final long PRODUCT_IDENTIFIER_VALUE_ID = 1L; + + public HepaFilterMonitoringClusterReplacementProductStruct( + Integer productIdentifierType, + String productIdentifierValue + ) { + this.productIdentifierType = productIdentifierType; + this.productIdentifierValue = productIdentifierValue; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(PRODUCT_IDENTIFIER_TYPE_ID, new UIntType(productIdentifierType))); + values.add(new StructElement(PRODUCT_IDENTIFIER_VALUE_ID, new StringType(productIdentifierValue))); + + return new StructType(values); + } + + public static HepaFilterMonitoringClusterReplacementProductStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Integer productIdentifierType = null; + String productIdentifierValue = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == PRODUCT_IDENTIFIER_TYPE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + productIdentifierType = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == PRODUCT_IDENTIFIER_VALUE_ID) { if (element.value(BaseTLVType.class).type() == TLVType.String) { StringType castingValue = element.value(StringType.class); productIdentifierValue = castingValue.value(String.class); @@ -7473,6 +7473,582 @@ public String toString() { return output.toString(); } } +public static class ThermostatClusterScheduleTransitionStruct { + public Integer dayOfWeek; + public Integer transitionTime; + public Optional presetHandle; + public Optional systemMode; + public Optional coolingSetpoint; + public Optional heatingSetpoint; + private static final long DAY_OF_WEEK_ID = 0L; + private static final long TRANSITION_TIME_ID = 1L; + private static final long PRESET_HANDLE_ID = 2L; + private static final long SYSTEM_MODE_ID = 3L; + private static final long COOLING_SETPOINT_ID = 4L; + private static final long HEATING_SETPOINT_ID = 5L; + + public ThermostatClusterScheduleTransitionStruct( + Integer dayOfWeek, + Integer transitionTime, + Optional presetHandle, + Optional systemMode, + Optional coolingSetpoint, + Optional heatingSetpoint + ) { + this.dayOfWeek = dayOfWeek; + this.transitionTime = transitionTime; + this.presetHandle = presetHandle; + this.systemMode = systemMode; + this.coolingSetpoint = coolingSetpoint; + this.heatingSetpoint = heatingSetpoint; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(DAY_OF_WEEK_ID, new UIntType(dayOfWeek))); + values.add(new StructElement(TRANSITION_TIME_ID, new UIntType(transitionTime))); + values.add(new StructElement(PRESET_HANDLE_ID, presetHandle.map((nonOptionalpresetHandle) -> new ByteArrayType(nonOptionalpresetHandle)).orElse(new EmptyType()))); + values.add(new StructElement(SYSTEM_MODE_ID, systemMode.map((nonOptionalsystemMode) -> new UIntType(nonOptionalsystemMode)).orElse(new EmptyType()))); + values.add(new StructElement(COOLING_SETPOINT_ID, coolingSetpoint.map((nonOptionalcoolingSetpoint) -> new IntType(nonOptionalcoolingSetpoint)).orElse(new EmptyType()))); + values.add(new StructElement(HEATING_SETPOINT_ID, heatingSetpoint.map((nonOptionalheatingSetpoint) -> new IntType(nonOptionalheatingSetpoint)).orElse(new EmptyType()))); + + return new StructType(values); + } + + public static ThermostatClusterScheduleTransitionStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Integer dayOfWeek = null; + Integer transitionTime = null; + Optional presetHandle = Optional.empty(); + Optional systemMode = Optional.empty(); + Optional coolingSetpoint = Optional.empty(); + Optional heatingSetpoint = Optional.empty(); + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == DAY_OF_WEEK_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + dayOfWeek = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == TRANSITION_TIME_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + transitionTime = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == PRESET_HANDLE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { + ByteArrayType castingValue = element.value(ByteArrayType.class); + presetHandle = Optional.of(castingValue.value(byte[].class)); + } + } else if (element.contextTagNum() == SYSTEM_MODE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + systemMode = Optional.of(castingValue.value(Integer.class)); + } + } else if (element.contextTagNum() == COOLING_SETPOINT_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Int) { + IntType castingValue = element.value(IntType.class); + coolingSetpoint = Optional.of(castingValue.value(Integer.class)); + } + } else if (element.contextTagNum() == HEATING_SETPOINT_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Int) { + IntType castingValue = element.value(IntType.class); + heatingSetpoint = Optional.of(castingValue.value(Integer.class)); + } + } + } + return new ThermostatClusterScheduleTransitionStruct( + dayOfWeek, + transitionTime, + presetHandle, + systemMode, + coolingSetpoint, + heatingSetpoint + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ThermostatClusterScheduleTransitionStruct {\n"); + output.append("\tdayOfWeek: "); + output.append(dayOfWeek); + output.append("\n"); + output.append("\ttransitionTime: "); + output.append(transitionTime); + output.append("\n"); + output.append("\tpresetHandle: "); + output.append(presetHandle.isPresent() ? Arrays.toString(presetHandle.get()) : ""); + output.append("\n"); + output.append("\tsystemMode: "); + output.append(systemMode); + output.append("\n"); + output.append("\tcoolingSetpoint: "); + output.append(coolingSetpoint); + output.append("\n"); + output.append("\theatingSetpoint: "); + output.append(heatingSetpoint); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class ThermostatClusterScheduleStruct { + public @Nullable byte[] scheduleHandle; + public Integer systemMode; + public Optional name; + public Optional presetHandle; + public ArrayList transitions; + public @Nullable Optional builtIn; + private static final long SCHEDULE_HANDLE_ID = 0L; + private static final long SYSTEM_MODE_ID = 1L; + private static final long NAME_ID = 2L; + private static final long PRESET_HANDLE_ID = 3L; + private static final long TRANSITIONS_ID = 4L; + private static final long BUILT_IN_ID = 5L; + + public ThermostatClusterScheduleStruct( + @Nullable byte[] scheduleHandle, + Integer systemMode, + Optional name, + Optional presetHandle, + ArrayList transitions, + @Nullable Optional builtIn + ) { + this.scheduleHandle = scheduleHandle; + this.systemMode = systemMode; + this.name = name; + this.presetHandle = presetHandle; + this.transitions = transitions; + this.builtIn = builtIn; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(SCHEDULE_HANDLE_ID, scheduleHandle != null ? new ByteArrayType(scheduleHandle) : new NullType())); + values.add(new StructElement(SYSTEM_MODE_ID, new UIntType(systemMode))); + values.add(new StructElement(NAME_ID, name.map((nonOptionalname) -> new StringType(nonOptionalname)).orElse(new EmptyType()))); + values.add(new StructElement(PRESET_HANDLE_ID, presetHandle.map((nonOptionalpresetHandle) -> new ByteArrayType(nonOptionalpresetHandle)).orElse(new EmptyType()))); + values.add(new StructElement(TRANSITIONS_ID, ArrayType.generateArrayType(transitions, (elementtransitions) -> elementtransitions.encodeTlv()))); + values.add(new StructElement(BUILT_IN_ID, builtIn != null ? builtIn.map((nonOptionalbuiltIn) -> new BooleanType(nonOptionalbuiltIn)).orElse(new EmptyType()) : new NullType())); + + return new StructType(values); + } + + public static ThermostatClusterScheduleStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + @Nullable byte[] scheduleHandle = null; + Integer systemMode = null; + Optional name = Optional.empty(); + Optional presetHandle = Optional.empty(); + ArrayList transitions = null; + @Nullable Optional builtIn = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == SCHEDULE_HANDLE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { + ByteArrayType castingValue = element.value(ByteArrayType.class); + scheduleHandle = castingValue.value(byte[].class); + } + } else if (element.contextTagNum() == SYSTEM_MODE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + systemMode = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == NAME_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + name = Optional.of(castingValue.value(String.class)); + } + } else if (element.contextTagNum() == PRESET_HANDLE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { + ByteArrayType castingValue = element.value(ByteArrayType.class); + presetHandle = Optional.of(castingValue.value(byte[].class)); + } + } else if (element.contextTagNum() == TRANSITIONS_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Array) { + ArrayType castingValue = element.value(ArrayType.class); + transitions = castingValue.map((elementcastingValue) -> ChipStructs.ThermostatClusterScheduleTransitionStruct.decodeTlv(elementcastingValue)); + } + } else if (element.contextTagNum() == BUILT_IN_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Boolean) { + BooleanType castingValue = element.value(BooleanType.class); + builtIn = Optional.of(castingValue.value(Boolean.class)); + } + } + } + return new ThermostatClusterScheduleStruct( + scheduleHandle, + systemMode, + name, + presetHandle, + transitions, + builtIn + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ThermostatClusterScheduleStruct {\n"); + output.append("\tscheduleHandle: "); + output.append(Arrays.toString(scheduleHandle)); + output.append("\n"); + output.append("\tsystemMode: "); + output.append(systemMode); + output.append("\n"); + output.append("\tname: "); + output.append(name); + output.append("\n"); + output.append("\tpresetHandle: "); + output.append(presetHandle.isPresent() ? Arrays.toString(presetHandle.get()) : ""); + output.append("\n"); + output.append("\ttransitions: "); + output.append(transitions); + output.append("\n"); + output.append("\tbuiltIn: "); + output.append(builtIn); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class ThermostatClusterPresetStruct { + public @Nullable byte[] presetHandle; + public Integer presetScenario; + public @Nullable Optional name; + public Optional coolingSetpoint; + public Optional heatingSetpoint; + public @Nullable Boolean builtIn; + private static final long PRESET_HANDLE_ID = 0L; + private static final long PRESET_SCENARIO_ID = 1L; + private static final long NAME_ID = 2L; + private static final long COOLING_SETPOINT_ID = 3L; + private static final long HEATING_SETPOINT_ID = 4L; + private static final long BUILT_IN_ID = 5L; + + public ThermostatClusterPresetStruct( + @Nullable byte[] presetHandle, + Integer presetScenario, + @Nullable Optional name, + Optional coolingSetpoint, + Optional heatingSetpoint, + @Nullable Boolean builtIn + ) { + this.presetHandle = presetHandle; + this.presetScenario = presetScenario; + this.name = name; + this.coolingSetpoint = coolingSetpoint; + this.heatingSetpoint = heatingSetpoint; + this.builtIn = builtIn; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(PRESET_HANDLE_ID, presetHandle != null ? new ByteArrayType(presetHandle) : new NullType())); + values.add(new StructElement(PRESET_SCENARIO_ID, new UIntType(presetScenario))); + values.add(new StructElement(NAME_ID, name != null ? name.map((nonOptionalname) -> new StringType(nonOptionalname)).orElse(new EmptyType()) : new NullType())); + values.add(new StructElement(COOLING_SETPOINT_ID, coolingSetpoint.map((nonOptionalcoolingSetpoint) -> new IntType(nonOptionalcoolingSetpoint)).orElse(new EmptyType()))); + values.add(new StructElement(HEATING_SETPOINT_ID, heatingSetpoint.map((nonOptionalheatingSetpoint) -> new IntType(nonOptionalheatingSetpoint)).orElse(new EmptyType()))); + values.add(new StructElement(BUILT_IN_ID, builtIn != null ? new BooleanType(builtIn) : new NullType())); + + return new StructType(values); + } + + public static ThermostatClusterPresetStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + @Nullable byte[] presetHandle = null; + Integer presetScenario = null; + @Nullable Optional name = null; + Optional coolingSetpoint = Optional.empty(); + Optional heatingSetpoint = Optional.empty(); + @Nullable Boolean builtIn = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == PRESET_HANDLE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { + ByteArrayType castingValue = element.value(ByteArrayType.class); + presetHandle = castingValue.value(byte[].class); + } + } else if (element.contextTagNum() == PRESET_SCENARIO_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + presetScenario = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == NAME_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.String) { + StringType castingValue = element.value(StringType.class); + name = Optional.of(castingValue.value(String.class)); + } + } else if (element.contextTagNum() == COOLING_SETPOINT_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Int) { + IntType castingValue = element.value(IntType.class); + coolingSetpoint = Optional.of(castingValue.value(Integer.class)); + } + } else if (element.contextTagNum() == HEATING_SETPOINT_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Int) { + IntType castingValue = element.value(IntType.class); + heatingSetpoint = Optional.of(castingValue.value(Integer.class)); + } + } else if (element.contextTagNum() == BUILT_IN_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.Boolean) { + BooleanType castingValue = element.value(BooleanType.class); + builtIn = castingValue.value(Boolean.class); + } + } + } + return new ThermostatClusterPresetStruct( + presetHandle, + presetScenario, + name, + coolingSetpoint, + heatingSetpoint, + builtIn + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ThermostatClusterPresetStruct {\n"); + output.append("\tpresetHandle: "); + output.append(Arrays.toString(presetHandle)); + output.append("\n"); + output.append("\tpresetScenario: "); + output.append(presetScenario); + output.append("\n"); + output.append("\tname: "); + output.append(name); + output.append("\n"); + output.append("\tcoolingSetpoint: "); + output.append(coolingSetpoint); + output.append("\n"); + output.append("\theatingSetpoint: "); + output.append(heatingSetpoint); + output.append("\n"); + output.append("\tbuiltIn: "); + output.append(builtIn); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class ThermostatClusterPresetTypeStruct { + public Integer presetScenario; + public Integer numberOfPresets; + public Integer presetTypeFeatures; + private static final long PRESET_SCENARIO_ID = 0L; + private static final long NUMBER_OF_PRESETS_ID = 1L; + private static final long PRESET_TYPE_FEATURES_ID = 2L; + + public ThermostatClusterPresetTypeStruct( + Integer presetScenario, + Integer numberOfPresets, + Integer presetTypeFeatures + ) { + this.presetScenario = presetScenario; + this.numberOfPresets = numberOfPresets; + this.presetTypeFeatures = presetTypeFeatures; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(PRESET_SCENARIO_ID, new UIntType(presetScenario))); + values.add(new StructElement(NUMBER_OF_PRESETS_ID, new UIntType(numberOfPresets))); + values.add(new StructElement(PRESET_TYPE_FEATURES_ID, new UIntType(presetTypeFeatures))); + + return new StructType(values); + } + + public static ThermostatClusterPresetTypeStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Integer presetScenario = null; + Integer numberOfPresets = null; + Integer presetTypeFeatures = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == PRESET_SCENARIO_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + presetScenario = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == NUMBER_OF_PRESETS_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + numberOfPresets = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == PRESET_TYPE_FEATURES_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + presetTypeFeatures = castingValue.value(Integer.class); + } + } + } + return new ThermostatClusterPresetTypeStruct( + presetScenario, + numberOfPresets, + presetTypeFeatures + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ThermostatClusterPresetTypeStruct {\n"); + output.append("\tpresetScenario: "); + output.append(presetScenario); + output.append("\n"); + output.append("\tnumberOfPresets: "); + output.append(numberOfPresets); + output.append("\n"); + output.append("\tpresetTypeFeatures: "); + output.append(presetTypeFeatures); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class ThermostatClusterQueuedPresetStruct { + public @Nullable byte[] presetHandle; + public @Nullable Long transitionTimestamp; + private static final long PRESET_HANDLE_ID = 0L; + private static final long TRANSITION_TIMESTAMP_ID = 1L; + + public ThermostatClusterQueuedPresetStruct( + @Nullable byte[] presetHandle, + @Nullable Long transitionTimestamp + ) { + this.presetHandle = presetHandle; + this.transitionTimestamp = transitionTimestamp; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(PRESET_HANDLE_ID, presetHandle != null ? new ByteArrayType(presetHandle) : new NullType())); + values.add(new StructElement(TRANSITION_TIMESTAMP_ID, transitionTimestamp != null ? new UIntType(transitionTimestamp) : new NullType())); + + return new StructType(values); + } + + public static ThermostatClusterQueuedPresetStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + @Nullable byte[] presetHandle = null; + @Nullable Long transitionTimestamp = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == PRESET_HANDLE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.ByteArray) { + ByteArrayType castingValue = element.value(ByteArrayType.class); + presetHandle = castingValue.value(byte[].class); + } + } else if (element.contextTagNum() == TRANSITION_TIMESTAMP_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + transitionTimestamp = castingValue.value(Long.class); + } + } + } + return new ThermostatClusterQueuedPresetStruct( + presetHandle, + transitionTimestamp + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ThermostatClusterQueuedPresetStruct {\n"); + output.append("\tpresetHandle: "); + output.append(Arrays.toString(presetHandle)); + output.append("\n"); + output.append("\ttransitionTimestamp: "); + output.append(transitionTimestamp); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} +public static class ThermostatClusterScheduleTypeStruct { + public Integer systemMode; + public Integer numberOfSchedules; + public Integer scheduleTypeFeatures; + private static final long SYSTEM_MODE_ID = 0L; + private static final long NUMBER_OF_SCHEDULES_ID = 1L; + private static final long SCHEDULE_TYPE_FEATURES_ID = 2L; + + public ThermostatClusterScheduleTypeStruct( + Integer systemMode, + Integer numberOfSchedules, + Integer scheduleTypeFeatures + ) { + this.systemMode = systemMode; + this.numberOfSchedules = numberOfSchedules; + this.scheduleTypeFeatures = scheduleTypeFeatures; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(SYSTEM_MODE_ID, new UIntType(systemMode))); + values.add(new StructElement(NUMBER_OF_SCHEDULES_ID, new UIntType(numberOfSchedules))); + values.add(new StructElement(SCHEDULE_TYPE_FEATURES_ID, new UIntType(scheduleTypeFeatures))); + + return new StructType(values); + } + + public static ThermostatClusterScheduleTypeStruct decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Integer systemMode = null; + Integer numberOfSchedules = null; + Integer scheduleTypeFeatures = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == SYSTEM_MODE_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + systemMode = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == NUMBER_OF_SCHEDULES_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + numberOfSchedules = castingValue.value(Integer.class); + } + } else if (element.contextTagNum() == SCHEDULE_TYPE_FEATURES_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + scheduleTypeFeatures = castingValue.value(Integer.class); + } + } + } + return new ThermostatClusterScheduleTypeStruct( + systemMode, + numberOfSchedules, + scheduleTypeFeatures + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("ThermostatClusterScheduleTypeStruct {\n"); + output.append("\tsystemMode: "); + output.append(systemMode); + output.append("\n"); + output.append("\tnumberOfSchedules: "); + output.append(numberOfSchedules); + output.append("\n"); + output.append("\tscheduleTypeFeatures: "); + output.append(scheduleTypeFeatures); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} public static class ThermostatClusterWeeklyScheduleTransitionStruct { public Integer transitionTime; public @Nullable Integer heatSetpoint; diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java index 2e712af09006a4..a1be6ce8ae6bd1 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,294 +698,6 @@ 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 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 OnOff implements BaseCluster { public static final long ID = 6L; public long getID() { @@ -8201,11 +7913,15 @@ public long getID() { } public enum Attribute { - CookTime(1L), + CookTime(0L), + MaxCookTime(1L), PowerSetting(2L), MinPower(3L), MaxPower(4L), PowerStep(5L), + SupportedWatts(6L), + SelectedWattIndex(7L), + WattRating(8L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -8271,7 +7987,7 @@ public static Command value(long id) throws NoSuchFieldError { } throw new NoSuchFieldError(); } - }public enum SetCookingParametersCommandField {CookMode(0),CookTime(1),PowerSetting(2),; + }public enum SetCookingParametersCommandField {CookMode(0),CookTime(1),PowerSetting(2),WattSettingIndex(3),StartAfterSetting(4),; private final int id; SetCookingParametersCommandField(int id) { this.id = id; @@ -8454,12 +8170,126 @@ public long getID() { } public enum Attribute { - PhaseList(0L), - CurrentPhase(1L), - CountdownTime(2L), - OperationalStateList(3L), - OperationalState(4L), - OperationalError(5L), + PhaseList(0L), + CurrentPhase(1L), + CountdownTime(2L), + OperationalStateList(3L), + OperationalState(4L), + OperationalError(5L), + 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 { + OperationalError(0L), + OperationCompletion(1L),; + 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 { + Pause(0L), + Stop(1L), + Start(2L), + Resume(3L),; + 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 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), @@ -8485,9 +8315,7 @@ public static Attribute value(long id) throws NoSuchFieldError { } } - public enum Event { - OperationalError(0L), - OperationCompletion(1L),; + public enum Event {; private final long id; Event(long id) { this.id = id; @@ -8508,10 +8336,16 @@ public static Event value(long id) throws NoSuchFieldError { } public enum Command { - Pause(0L), - Stop(1L), - Start(2L), - Resume(3L),; + 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; @@ -8529,7 +8363,177 @@ public static Command value(long id) throws NoSuchFieldError { } throw new NoSuchFieldError(); } - }@Override + }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(); } @@ -10887,6 +10891,20 @@ public enum Attribute { ACLouverPosition(69L), ACCoilTemperature(70L), ACCapacityformat(71L), + PresetTypes(72L), + ScheduleTypes(73L), + NumberOfPresets(74L), + NumberOfSchedules(75L), + NumberOfScheduleTransitions(76L), + NumberOfScheduleTransitionPerDay(77L), + ActivePresetHandle(78L), + ActiveScheduleHandle(79L), + Presets(80L), + Schedules(81L), + PresetsSchedulesEditable(82L), + TemperatureSetpointHoldPolicy(83L), + SetpointHoldExpiryTimestamp(84L), + QueuedPreset(85L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -10936,7 +10954,14 @@ public enum Command { SetpointRaiseLower(0L), SetWeeklySchedule(1L), GetWeeklySchedule(2L), - ClearWeeklySchedule(3L),; + ClearWeeklySchedule(3L), + SetActiveScheduleRequest(5L), + SetActivePresetRequest(6L), + StartPresetsSchedulesEditRequest(7L), + CancelPresetsSchedulesEditRequest(8L), + CommitPresetsSchedulesRequest(9L), + CancelSetActivePresetRequest(10L), + SetTemperatureSetpointHoldPolicy(11L),; private final long id; Command(long id) { this.id = id; @@ -11005,6 +11030,74 @@ public static GetWeeklyScheduleCommandField value(int id) throws NoSuchFieldErro } throw new NoSuchFieldError(); } + }public enum SetActiveScheduleRequestCommandField {ScheduleHandle(0),; + private final int id; + SetActiveScheduleRequestCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static SetActiveScheduleRequestCommandField value(int id) throws NoSuchFieldError { + for (SetActiveScheduleRequestCommandField field : SetActiveScheduleRequestCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum SetActivePresetRequestCommandField {PresetHandle(0),DelayMinutes(1),; + private final int id; + SetActivePresetRequestCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static SetActivePresetRequestCommandField value(int id) throws NoSuchFieldError { + for (SetActivePresetRequestCommandField field : SetActivePresetRequestCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum StartPresetsSchedulesEditRequestCommandField {TimeoutSeconds(0),; + private final int id; + StartPresetsSchedulesEditRequestCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static StartPresetsSchedulesEditRequestCommandField value(int id) throws NoSuchFieldError { + for (StartPresetsSchedulesEditRequestCommandField field : StartPresetsSchedulesEditRequestCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } + }public enum SetTemperatureSetpointHoldPolicyCommandField {TemperatureSetpointHoldPolicy(0),; + private final int id; + SetTemperatureSetpointHoldPolicyCommandField(int id) { + this.id = id; + } + + public int getID() { + return id; + } + public static SetTemperatureSetpointHoldPolicyCommandField value(int id) throws NoSuchFieldError { + for (SetTemperatureSetpointHoldPolicyCommandField field : SetTemperatureSetpointHoldPolicyCommandField.values()) { + if (field.getID() == id) { + return field; + } + } + throw new NoSuchFieldError(); + } }@Override public String getAttributeName(long id) throws NoSuchFieldError { return Attribute.value(id).toString(); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java index 94cda4091ba5dc..10007746d7dd7b 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java @@ -480,381 +480,6 @@ public void onError(Exception ex) { } } - - public static class DelegatedScenesClusterAddSceneResponseCallback implements ChipClusters.ScenesCluster.AddSceneResponseCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(Integer status, Integer groupID, Integer sceneID) { - 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); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception error) { - callback.onFailure(error); - } - } - - public static class DelegatedScenesClusterViewSceneResponseCallback implements ChipClusters.ScenesCluster.ViewSceneResponseCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(Integer status, Integer groupID, Integer sceneID, Optional transitionTime, Optional sceneName, Optional> extensionFieldSets) { - 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 - - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception error) { - callback.onFailure(error); - } - } - - public static class DelegatedScenesClusterRemoveSceneResponseCallback implements ChipClusters.ScenesCluster.RemoveSceneResponseCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(Integer status, Integer groupID, Integer sceneID) { - 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); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception error) { - callback.onFailure(error); - } - } - - public static class DelegatedScenesClusterRemoveAllScenesResponseCallback implements ChipClusters.ScenesCluster.RemoveAllScenesResponseCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(Integer status, Integer groupID) { - Map responseValues = new LinkedHashMap<>(); - - 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 error) { - callback.onFailure(error); - } - } - - public static class DelegatedScenesClusterStoreSceneResponseCallback implements ChipClusters.ScenesCluster.StoreSceneResponseCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(Integer status, Integer groupID, Integer sceneID) { - 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); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception error) { - callback.onFailure(error); - } - } - - public static class DelegatedScenesClusterGetSceneMembershipResponseCallback implements ChipClusters.ScenesCluster.GetSceneMembershipResponseCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(Integer status, @Nullable Integer capacity, Integer groupID, Optional> sceneList) { - 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 - - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception error) { - callback.onFailure(error); - } - } - - public static class DelegatedScenesClusterEnhancedAddSceneResponseCallback implements ChipClusters.ScenesCluster.EnhancedAddSceneResponseCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(Integer status, Integer groupID, Integer sceneID) { - 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); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception error) { - callback.onFailure(error); - } - } - - public static class DelegatedScenesClusterEnhancedViewSceneResponseCallback implements ChipClusters.ScenesCluster.EnhancedViewSceneResponseCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(Integer status, Integer groupID, Integer sceneID, Optional transitionTime, Optional sceneName, Optional> extensionFieldSets) { - 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 - - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception error) { - callback.onFailure(error); - } - } - - public static class DelegatedScenesClusterCopySceneResponseCallback implements ChipClusters.ScenesCluster.CopySceneResponseCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(Integer status, Integer groupIdentifierFrom, Integer sceneIdentifierFrom) { - 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); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception error) { - callback.onFailure(error); - } - } - public static class DelegatedScenesClusterLastConfiguredByAttributeCallback implements ChipClusters.ScenesCluster.LastConfiguredByAttributeCallback, 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 DelegatedScenesClusterFabricSceneInfoAttributeCallback implements ChipClusters.ScenesCluster.FabricSceneInfoAttributeCallback, 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 DelegatedScenesClusterGeneratedCommandListAttributeCallback implements ChipClusters.ScenesCluster.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 DelegatedScenesClusterAcceptedCommandListAttributeCallback implements ChipClusters.ScenesCluster.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 DelegatedScenesClusterEventListAttributeCallback implements ChipClusters.ScenesCluster.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 DelegatedScenesClusterAttributeListAttributeCallback implements ChipClusters.ScenesCluster.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 DelegatedOnOffClusterStartUpOnOffAttributeCallback implements ChipClusters.OnOffCluster.StartUpOnOffAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override @@ -8662,7 +8287,238 @@ public void onError(Exception ex) { } } - public static class DelegatedSmokeCoAlarmClusterAcceptedCommandListAttributeCallback implements ChipClusters.SmokeCoAlarmCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedSmokeCoAlarmClusterAcceptedCommandListAttributeCallback implements ChipClusters.SmokeCoAlarmCluster.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 DelegatedSmokeCoAlarmClusterEventListAttributeCallback implements ChipClusters.SmokeCoAlarmCluster.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 DelegatedSmokeCoAlarmClusterAttributeListAttributeCallback implements ChipClusters.SmokeCoAlarmCluster.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 DelegatedDishwasherAlarmClusterGeneratedCommandListAttributeCallback implements ChipClusters.DishwasherAlarmCluster.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 DelegatedDishwasherAlarmClusterAcceptedCommandListAttributeCallback implements ChipClusters.DishwasherAlarmCluster.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 DelegatedDishwasherAlarmClusterEventListAttributeCallback implements ChipClusters.DishwasherAlarmCluster.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 DelegatedDishwasherAlarmClusterAttributeListAttributeCallback implements ChipClusters.DishwasherAlarmCluster.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 DelegatedMicrowaveOvenModeClusterSupportedModesAttributeCallback implements ChipClusters.MicrowaveOvenModeCluster.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); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedMicrowaveOvenModeClusterGeneratedCommandListAttributeCallback implements ChipClusters.MicrowaveOvenModeCluster.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 DelegatedMicrowaveOvenModeClusterAcceptedCommandListAttributeCallback implements ChipClusters.MicrowaveOvenModeCluster.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 DelegatedMicrowaveOvenModeClusterEventListAttributeCallback implements ChipClusters.MicrowaveOvenModeCluster.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 DelegatedMicrowaveOvenModeClusterAttributeListAttributeCallback implements ChipClusters.MicrowaveOvenModeCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8683,7 +8539,7 @@ public void onError(Exception ex) { } } - public static class DelegatedSmokeCoAlarmClusterEventListAttributeCallback implements ChipClusters.SmokeCoAlarmCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedMicrowaveOvenControlClusterSupportedWattsAttributeCallback implements ChipClusters.MicrowaveOvenControlCluster.SupportedWattsAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8691,9 +8547,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); } @@ -8704,7 +8560,7 @@ public void onError(Exception ex) { } } - public static class DelegatedSmokeCoAlarmClusterAttributeListAttributeCallback implements ChipClusters.SmokeCoAlarmCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedMicrowaveOvenControlClusterGeneratedCommandListAttributeCallback implements ChipClusters.MicrowaveOvenControlCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8725,7 +8581,7 @@ public void onError(Exception ex) { } } - public static class DelegatedDishwasherAlarmClusterGeneratedCommandListAttributeCallback implements ChipClusters.DishwasherAlarmCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedMicrowaveOvenControlClusterAcceptedCommandListAttributeCallback implements ChipClusters.MicrowaveOvenControlCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8746,7 +8602,7 @@ public void onError(Exception ex) { } } - public static class DelegatedDishwasherAlarmClusterAcceptedCommandListAttributeCallback implements ChipClusters.DishwasherAlarmCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedMicrowaveOvenControlClusterEventListAttributeCallback implements ChipClusters.MicrowaveOvenControlCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8767,7 +8623,7 @@ public void onError(Exception ex) { } } - public static class DelegatedDishwasherAlarmClusterEventListAttributeCallback implements ChipClusters.DishwasherAlarmCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedMicrowaveOvenControlClusterAttributeListAttributeCallback implements ChipClusters.MicrowaveOvenControlCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8788,7 +8644,8 @@ public void onError(Exception ex) { } } - public static class DelegatedDishwasherAlarmClusterAttributeListAttributeCallback implements ChipClusters.DishwasherAlarmCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + + public static class DelegatedOperationalStateClusterOperationalCommandResponseCallback implements ChipClusters.OperationalStateCluster.OperationalCommandResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8796,20 +8653,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 DelegatedMicrowaveOvenModeClusterSupportedModesAttributeCallback implements ChipClusters.MicrowaveOvenModeCluster.SupportedModesAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOperationalStateClusterPhaseListAttributeCallback implements ChipClusters.OperationalStateCluster.PhaseListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8817,9 +8674,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); } @@ -8830,7 +8687,7 @@ public void onError(Exception ex) { } } - public static class DelegatedMicrowaveOvenModeClusterGeneratedCommandListAttributeCallback implements ChipClusters.MicrowaveOvenModeCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOperationalStateClusterCurrentPhaseAttributeCallback implements ChipClusters.OperationalStateCluster.CurrentPhaseAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8838,10 +8695,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); } @@ -8851,7 +8708,7 @@ public void onError(Exception ex) { } } - public static class DelegatedMicrowaveOvenModeClusterAcceptedCommandListAttributeCallback implements ChipClusters.MicrowaveOvenModeCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOperationalStateClusterCountdownTimeAttributeCallback implements ChipClusters.OperationalStateCluster.CountdownTimeAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8859,10 +8716,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); } @@ -8872,7 +8729,7 @@ public void onError(Exception ex) { } } - public static class DelegatedMicrowaveOvenModeClusterEventListAttributeCallback implements ChipClusters.MicrowaveOvenModeCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOperationalStateClusterOperationalStateListAttributeCallback implements ChipClusters.OperationalStateCluster.OperationalStateListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8880,9 +8737,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); } @@ -8893,7 +8750,7 @@ public void onError(Exception ex) { } } - public static class DelegatedMicrowaveOvenModeClusterAttributeListAttributeCallback implements ChipClusters.MicrowaveOvenModeCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOperationalStateClusterOperationalErrorAttributeCallback implements ChipClusters.OperationalStateCluster.OperationalErrorAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8901,10 +8758,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); } @@ -8914,7 +8771,7 @@ public void onError(Exception ex) { } } - public static class DelegatedMicrowaveOvenControlClusterGeneratedCommandListAttributeCallback implements ChipClusters.MicrowaveOvenControlCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOperationalStateClusterGeneratedCommandListAttributeCallback implements ChipClusters.OperationalStateCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8935,7 +8792,7 @@ public void onError(Exception ex) { } } - public static class DelegatedMicrowaveOvenControlClusterAcceptedCommandListAttributeCallback implements ChipClusters.MicrowaveOvenControlCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOperationalStateClusterAcceptedCommandListAttributeCallback implements ChipClusters.OperationalStateCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8956,7 +8813,7 @@ public void onError(Exception ex) { } } - public static class DelegatedMicrowaveOvenControlClusterEventListAttributeCallback implements ChipClusters.MicrowaveOvenControlCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOperationalStateClusterEventListAttributeCallback implements ChipClusters.OperationalStateCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8977,7 +8834,7 @@ public void onError(Exception ex) { } } - public static class DelegatedMicrowaveOvenControlClusterAttributeListAttributeCallback implements ChipClusters.MicrowaveOvenControlCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedOperationalStateClusterAttributeListAttributeCallback implements ChipClusters.OperationalStateCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -8999,7 +8856,7 @@ public void onError(Exception ex) { } - public static class DelegatedOperationalStateClusterOperationalCommandResponseCallback implements ChipClusters.OperationalStateCluster.OperationalCommandResponseCallback, DelegatedClusterCallback { + public static class DelegatedRvcOperationalStateClusterOperationalCommandResponseCallback implements ChipClusters.RvcOperationalStateCluster.OperationalCommandResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9007,7 +8864,7 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(ChipStructs.OperationalStateClusterErrorStateStruct commandResponseState) { + public void onSuccess(ChipStructs.RvcOperationalStateClusterErrorStateStruct commandResponseState) { Map responseValues = new LinkedHashMap<>(); // commandResponseState: Struct ErrorStateStruct @@ -9020,7 +8877,7 @@ public void onError(Exception error) { callback.onFailure(error); } } - public static class DelegatedOperationalStateClusterPhaseListAttributeCallback implements ChipClusters.OperationalStateCluster.PhaseListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcOperationalStateClusterPhaseListAttributeCallback implements ChipClusters.RvcOperationalStateCluster.PhaseListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9041,7 +8898,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOperationalStateClusterCurrentPhaseAttributeCallback implements ChipClusters.OperationalStateCluster.CurrentPhaseAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcOperationalStateClusterCurrentPhaseAttributeCallback implements ChipClusters.RvcOperationalStateCluster.CurrentPhaseAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9062,7 +8919,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOperationalStateClusterCountdownTimeAttributeCallback implements ChipClusters.OperationalStateCluster.CountdownTimeAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcOperationalStateClusterCountdownTimeAttributeCallback implements ChipClusters.RvcOperationalStateCluster.CountdownTimeAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9083,7 +8940,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOperationalStateClusterOperationalStateListAttributeCallback implements ChipClusters.OperationalStateCluster.OperationalStateListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcOperationalStateClusterOperationalStateListAttributeCallback implements ChipClusters.RvcOperationalStateCluster.OperationalStateListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9091,9 +8948,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 +8961,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOperationalStateClusterOperationalErrorAttributeCallback implements ChipClusters.OperationalStateCluster.OperationalErrorAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcOperationalStateClusterOperationalErrorAttributeCallback implements ChipClusters.RvcOperationalStateCluster.OperationalErrorAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9112,9 +8969,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(ChipStructs.OperationalStateClusterErrorStateStruct value) { + public void onSuccess(ChipStructs.RvcOperationalStateClusterErrorStateStruct value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.OperationalStateClusterErrorStateStruct"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.RvcOperationalStateClusterErrorStateStruct"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -9125,7 +8982,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOperationalStateClusterGeneratedCommandListAttributeCallback implements ChipClusters.OperationalStateCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcOperationalStateClusterGeneratedCommandListAttributeCallback implements ChipClusters.RvcOperationalStateCluster.GeneratedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9146,7 +9003,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOperationalStateClusterAcceptedCommandListAttributeCallback implements ChipClusters.OperationalStateCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcOperationalStateClusterAcceptedCommandListAttributeCallback implements ChipClusters.RvcOperationalStateCluster.AcceptedCommandListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9167,7 +9024,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOperationalStateClusterEventListAttributeCallback implements ChipClusters.OperationalStateCluster.EventListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcOperationalStateClusterEventListAttributeCallback implements ChipClusters.RvcOperationalStateCluster.EventListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9188,7 +9045,7 @@ public void onError(Exception ex) { } } - public static class DelegatedOperationalStateClusterAttributeListAttributeCallback implements ChipClusters.OperationalStateCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedRvcOperationalStateClusterAttributeListAttributeCallback implements ChipClusters.RvcOperationalStateCluster.AttributeListAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9210,7 +9067,7 @@ public void onError(Exception ex) { } - public static class DelegatedRvcOperationalStateClusterOperationalCommandResponseCallback implements ChipClusters.RvcOperationalStateCluster.OperationalCommandResponseCallback, DelegatedClusterCallback { + public static class DelegatedScenesManagementClusterAddSceneResponseCallback implements ChipClusters.ScenesManagementCluster.AddSceneResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9218,11 +9075,48 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(ChipStructs.RvcOperationalStateClusterErrorStateStruct commandResponseState) { + public void onSuccess(Integer status, Integer groupID, Integer sceneID) { Map responseValues = new LinkedHashMap<>(); - // commandResponseState: Struct ErrorStateStruct + 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 error) { + callback.onFailure(error); + } + } + + public static class DelegatedScenesManagementClusterViewSceneResponseCallback implements ChipClusters.ScenesManagementCluster.ViewSceneResponseCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(Integer status, Integer groupID, Integer sceneID, Optional transitionTime, Optional sceneName, Optional> extensionFieldSets) { + 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 + callback.onSuccess(responseValues); } @@ -9231,7 +9125,8 @@ public void onError(Exception error) { callback.onFailure(error); } } - public static class DelegatedRvcOperationalStateClusterPhaseListAttributeCallback implements ChipClusters.RvcOperationalStateCluster.PhaseListAttributeCallback, DelegatedClusterCallback { + + public static class DelegatedScenesManagementClusterRemoveSceneResponseCallback implements ChipClusters.ScenesManagementCluster.RemoveSceneResponseCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -9239,20 +9134,130 @@ 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 error) { + callback.onFailure(error); + } + } + + public static class DelegatedScenesManagementClusterRemoveAllScenesResponseCallback implements ChipClusters.ScenesManagementCluster.RemoveAllScenesResponseCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(Integer status, Integer groupID) { + Map responseValues = new LinkedHashMap<>(); + + 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 error) { + callback.onFailure(error); + } + } + + public static class DelegatedScenesManagementClusterStoreSceneResponseCallback implements ChipClusters.ScenesManagementCluster.StoreSceneResponseCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(Integer status, Integer groupID, Integer sceneID) { + 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); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception error) { + callback.onFailure(error); + } + } + + public static class DelegatedScenesManagementClusterGetSceneMembershipResponseCallback implements ChipClusters.ScenesManagementCluster.GetSceneMembershipResponseCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(Integer status, @Nullable Integer capacity, Integer groupID, Optional> sceneList) { + 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 + + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception error) { + callback.onFailure(error); + } + } + + public static class DelegatedScenesManagementClusterEnhancedAddSceneResponseCallback implements ChipClusters.ScenesManagementCluster.EnhancedAddSceneResponseCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(Integer status, Integer groupID, Integer sceneID) { + 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); 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 +9265,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 +9298,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 +9323,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 +9336,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 +9344,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 +9357,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 +9378,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 +9399,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 +9420,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) { @@ -12242,7 +12263,204 @@ public void onError(Exception ex) { } } - public static class DelegatedPumpConfigurationAndControlClusterAttributeListAttributeCallback implements ChipClusters.PumpConfigurationAndControlCluster.AttributeListAttributeCallback, DelegatedClusterCallback { + public static class DelegatedPumpConfigurationAndControlClusterAttributeListAttributeCallback implements ChipClusters.PumpConfigurationAndControlCluster.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 DelegatedThermostatClusterGetWeeklyScheduleResponseCallback implements ChipClusters.ThermostatCluster.GetWeeklyScheduleResponseCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(Integer numberOfTransitionsForSequence, Integer dayOfWeekForSequence, Integer modeForSequence, ArrayList transitions) { + Map responseValues = new LinkedHashMap<>(); + + CommandResponseInfo numberOfTransitionsForSequenceResponseValue = new CommandResponseInfo("numberOfTransitionsForSequence", "Integer"); + responseValues.put(numberOfTransitionsForSequenceResponseValue, numberOfTransitionsForSequence); + CommandResponseInfo dayOfWeekForSequenceResponseValue = new CommandResponseInfo("dayOfWeekForSequence", "Integer"); + responseValues.put(dayOfWeekForSequenceResponseValue, dayOfWeekForSequence); + CommandResponseInfo modeForSequenceResponseValue = new CommandResponseInfo("modeForSequence", "Integer"); + responseValues.put(modeForSequenceResponseValue, modeForSequence); + // transitions: WeeklyScheduleTransitionStruct + // Conversion from this type to Java is not properly implemented yet + + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception error) { + callback.onFailure(error); + } + } + public static class DelegatedThermostatClusterLocalTemperatureAttributeCallback implements ChipClusters.ThermostatCluster.LocalTemperatureAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable Integer value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedThermostatClusterOutdoorTemperatureAttributeCallback implements ChipClusters.ThermostatCluster.OutdoorTemperatureAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable Integer value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedThermostatClusterTemperatureSetpointHoldDurationAttributeCallback implements ChipClusters.ThermostatCluster.TemperatureSetpointHoldDurationAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable Integer value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedThermostatClusterSetpointChangeAmountAttributeCallback implements ChipClusters.ThermostatCluster.SetpointChangeAmountAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable Integer value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedThermostatClusterOccupiedSetbackAttributeCallback implements ChipClusters.ThermostatCluster.OccupiedSetbackAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable Integer value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedThermostatClusterOccupiedSetbackMinAttributeCallback implements ChipClusters.ThermostatCluster.OccupiedSetbackMinAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable Integer value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedThermostatClusterOccupiedSetbackMaxAttributeCallback implements ChipClusters.ThermostatCluster.OccupiedSetbackMaxAttributeCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(@Nullable Integer value) { + Map responseValues = new LinkedHashMap<>(); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + responseValues.put(commandResponseInfo, value); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception ex) { + callback.onFailure(ex); + } + } + + public static class DelegatedThermostatClusterUnoccupiedSetbackAttributeCallback implements ChipClusters.ThermostatCluster.UnoccupiedSetbackAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12250,10 +12468,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); } @@ -12263,8 +12481,7 @@ public void onError(Exception ex) { } } - - public static class DelegatedThermostatClusterGetWeeklyScheduleResponseCallback implements ChipClusters.ThermostatCluster.GetWeeklyScheduleResponseCallback, DelegatedClusterCallback { + public static class DelegatedThermostatClusterUnoccupiedSetbackMinAttributeCallback implements ChipClusters.ThermostatCluster.UnoccupiedSetbackMinAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12272,27 +12489,20 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer numberOfTransitionsForSequence, Integer dayOfWeekForSequence, Integer modeForSequence, ArrayList transitions) { + public void onSuccess(@Nullable Integer value) { Map responseValues = new LinkedHashMap<>(); - - CommandResponseInfo numberOfTransitionsForSequenceResponseValue = new CommandResponseInfo("numberOfTransitionsForSequence", "Integer"); - responseValues.put(numberOfTransitionsForSequenceResponseValue, numberOfTransitionsForSequence); - CommandResponseInfo dayOfWeekForSequenceResponseValue = new CommandResponseInfo("dayOfWeekForSequence", "Integer"); - responseValues.put(dayOfWeekForSequenceResponseValue, dayOfWeekForSequence); - CommandResponseInfo modeForSequenceResponseValue = new CommandResponseInfo("modeForSequence", "Integer"); - responseValues.put(modeForSequenceResponseValue, modeForSequence); - // transitions: WeeklyScheduleTransitionStruct - // Conversion from this type to Java is not properly implemented yet - + 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 DelegatedThermostatClusterLocalTemperatureAttributeCallback implements ChipClusters.ThermostatCluster.LocalTemperatureAttributeCallback, DelegatedClusterCallback { + + public static class DelegatedThermostatClusterUnoccupiedSetbackMaxAttributeCallback implements ChipClusters.ThermostatCluster.UnoccupiedSetbackMaxAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12313,7 +12523,7 @@ public void onError(Exception ex) { } } - public static class DelegatedThermostatClusterOutdoorTemperatureAttributeCallback implements ChipClusters.ThermostatCluster.OutdoorTemperatureAttributeCallback, DelegatedClusterCallback { + public static class DelegatedThermostatClusterACCoilTemperatureAttributeCallback implements ChipClusters.ThermostatCluster.ACCoilTemperatureAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12334,7 +12544,7 @@ public void onError(Exception ex) { } } - public static class DelegatedThermostatClusterTemperatureSetpointHoldDurationAttributeCallback implements ChipClusters.ThermostatCluster.TemperatureSetpointHoldDurationAttributeCallback, DelegatedClusterCallback { + public static class DelegatedThermostatClusterPresetTypesAttributeCallback implements ChipClusters.ThermostatCluster.PresetTypesAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12342,10 +12552,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); } @@ -12355,7 +12565,7 @@ public void onError(Exception ex) { } } - public static class DelegatedThermostatClusterSetpointChangeAmountAttributeCallback implements ChipClusters.ThermostatCluster.SetpointChangeAmountAttributeCallback, DelegatedClusterCallback { + public static class DelegatedThermostatClusterScheduleTypesAttributeCallback implements ChipClusters.ThermostatCluster.ScheduleTypesAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12363,10 +12573,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); } @@ -12376,7 +12586,7 @@ public void onError(Exception ex) { } } - public static class DelegatedThermostatClusterOccupiedSetbackAttributeCallback implements ChipClusters.ThermostatCluster.OccupiedSetbackAttributeCallback, DelegatedClusterCallback { + public static class DelegatedThermostatClusterNumberOfScheduleTransitionPerDayAttributeCallback implements ChipClusters.ThermostatCluster.NumberOfScheduleTransitionPerDayAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12397,7 +12607,7 @@ public void onError(Exception ex) { } } - public static class DelegatedThermostatClusterOccupiedSetbackMinAttributeCallback implements ChipClusters.ThermostatCluster.OccupiedSetbackMinAttributeCallback, DelegatedClusterCallback { + public static class DelegatedThermostatClusterActivePresetHandleAttributeCallback implements ChipClusters.ThermostatCluster.ActivePresetHandleAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12405,9 +12615,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(@Nullable byte[] value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "byte[]"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -12418,7 +12628,7 @@ public void onError(Exception ex) { } } - public static class DelegatedThermostatClusterOccupiedSetbackMaxAttributeCallback implements ChipClusters.ThermostatCluster.OccupiedSetbackMaxAttributeCallback, DelegatedClusterCallback { + public static class DelegatedThermostatClusterActiveScheduleHandleAttributeCallback implements ChipClusters.ThermostatCluster.ActiveScheduleHandleAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12426,9 +12636,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(@Nullable byte[] value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "byte[]"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -12439,7 +12649,7 @@ public void onError(Exception ex) { } } - public static class DelegatedThermostatClusterUnoccupiedSetbackAttributeCallback implements ChipClusters.ThermostatCluster.UnoccupiedSetbackAttributeCallback, DelegatedClusterCallback { + public static class DelegatedThermostatClusterPresetsAttributeCallback implements ChipClusters.ThermostatCluster.PresetsAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12447,10 +12657,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); } @@ -12460,7 +12670,7 @@ public void onError(Exception ex) { } } - public static class DelegatedThermostatClusterUnoccupiedSetbackMinAttributeCallback implements ChipClusters.ThermostatCluster.UnoccupiedSetbackMinAttributeCallback, DelegatedClusterCallback { + public static class DelegatedThermostatClusterSchedulesAttributeCallback implements ChipClusters.ThermostatCluster.SchedulesAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12468,10 +12678,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); } @@ -12481,7 +12691,7 @@ public void onError(Exception ex) { } } - public static class DelegatedThermostatClusterUnoccupiedSetbackMaxAttributeCallback implements ChipClusters.ThermostatCluster.UnoccupiedSetbackMaxAttributeCallback, DelegatedClusterCallback { + public static class DelegatedThermostatClusterSetpointHoldExpiryTimestampAttributeCallback implements ChipClusters.ThermostatCluster.SetpointHoldExpiryTimestampAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12489,9 +12699,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(@Nullable Long value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -12502,7 +12712,7 @@ public void onError(Exception ex) { } } - public static class DelegatedThermostatClusterACCoilTemperatureAttributeCallback implements ChipClusters.ThermostatCluster.ACCoilTemperatureAttributeCallback, DelegatedClusterCallback { + public static class DelegatedThermostatClusterQueuedPresetAttributeCallback implements ChipClusters.ThermostatCluster.QueuedPresetAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override public void setCallbackDelegate(ClusterCommandCallback callback) { @@ -12510,9 +12720,9 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(@Nullable Integer value) { + public void onSuccess(@Nullable ChipStructs.ThermostatClusterQueuedPresetStruct value) { Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Integer"); + CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "ChipStructs.ThermostatClusterQueuedPresetStruct"); responseValues.put(commandResponseInfo, value); callback.onSuccess(responseValues); } @@ -19576,10 +19786,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); @@ -19812,6 +20018,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); @@ -20026,7 +20236,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")); @@ -20085,6 +20294,7 @@ public void combineCommand(Map destination, Map> getCommandMap() { ((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") - - , (Integer) - commandArguments.get("transitionTime") - - , (String) - commandArguments.get("sceneName") - - , (ArrayList) - commandArguments.get("extensionFieldSets") - - ); - }, - () -> new DelegatedScenesClusterEnhancedAddSceneResponseCallback(), - scenesenhancedAddSceneCommandParams - ); - scenesClusterInteractionInfoMap.put("enhancedAddScene", scenesenhancedAddSceneInteractionInfo); - - Map scenesenhancedViewSceneCommandParams = new LinkedHashMap(); - - CommandParameterInfo scenesenhancedViewScenegroupIDCommandParameterInfo = new CommandParameterInfo("groupID", Integer.class, Integer.class); - scenesenhancedViewSceneCommandParams.put("groupID",scenesenhancedViewScenegroupIDCommandParameterInfo); - - CommandParameterInfo scenesenhancedViewScenesceneIDCommandParameterInfo = new CommandParameterInfo("sceneID", Integer.class, Integer.class); - scenesenhancedViewSceneCommandParams.put("sceneID",scenesenhancedViewScenesceneIDCommandParameterInfo); - InteractionInfo scenesenhancedViewSceneInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ScenesCluster) cluster) - .enhancedViewScene((ChipClusters.ScenesCluster.EnhancedViewSceneResponseCallback) callback - , (Integer) - commandArguments.get("groupID") - - , (Integer) - commandArguments.get("sceneID") - - ); - }, - () -> new DelegatedScenesClusterEnhancedViewSceneResponseCallback(), - scenesenhancedViewSceneCommandParams - ); - scenesClusterInteractionInfoMap.put("enhancedViewScene", scenesenhancedViewSceneInteractionInfo); - - Map scenescopySceneCommandParams = new LinkedHashMap(); - - CommandParameterInfo scenescopyScenemodeCommandParameterInfo = new CommandParameterInfo("mode", Integer.class, Integer.class); - scenescopySceneCommandParams.put("mode",scenescopyScenemodeCommandParameterInfo); - - CommandParameterInfo scenescopyScenegroupIdentifierFromCommandParameterInfo = new CommandParameterInfo("groupIdentifierFrom", Integer.class, Integer.class); - scenescopySceneCommandParams.put("groupIdentifierFrom",scenescopyScenegroupIdentifierFromCommandParameterInfo); - - CommandParameterInfo scenescopyScenesceneIdentifierFromCommandParameterInfo = new CommandParameterInfo("sceneIdentifierFrom", Integer.class, Integer.class); - scenescopySceneCommandParams.put("sceneIdentifierFrom",scenescopyScenesceneIdentifierFromCommandParameterInfo); - - CommandParameterInfo scenescopyScenegroupIdentifierToCommandParameterInfo = new CommandParameterInfo("groupIdentifierTo", Integer.class, Integer.class); - scenescopySceneCommandParams.put("groupIdentifierTo",scenescopyScenegroupIdentifierToCommandParameterInfo); - - CommandParameterInfo scenescopyScenesceneIdentifierToCommandParameterInfo = new CommandParameterInfo("sceneIdentifierTo", Integer.class, Integer.class); - scenescopySceneCommandParams.put("sceneIdentifierTo",scenescopyScenesceneIdentifierToCommandParameterInfo); - InteractionInfo scenescopySceneInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.ScenesCluster) cluster) - .copyScene((ChipClusters.ScenesCluster.CopySceneResponseCallback) callback - , (Integer) - commandArguments.get("mode") - - , (Integer) - commandArguments.get("groupIdentifierFrom") - - , (Integer) - commandArguments.get("sceneIdentifierFrom") + }, + () -> 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<>(); @@ -22770,6 +22695,12 @@ public Map> getCommandMap() { CommandParameterInfo microwaveOvenControlsetCookingParameterspowerSettingCommandParameterInfo = new CommandParameterInfo("powerSetting", Optional.class, Integer.class); microwaveOvenControlsetCookingParametersCommandParams.put("powerSetting",microwaveOvenControlsetCookingParameterspowerSettingCommandParameterInfo); + + CommandParameterInfo microwaveOvenControlsetCookingParameterswattSettingIndexCommandParameterInfo = new CommandParameterInfo("wattSettingIndex", Optional.class, Integer.class); + microwaveOvenControlsetCookingParametersCommandParams.put("wattSettingIndex",microwaveOvenControlsetCookingParameterswattSettingIndexCommandParameterInfo); + + CommandParameterInfo microwaveOvenControlsetCookingParametersstartAfterSettingCommandParameterInfo = new CommandParameterInfo("startAfterSetting", Optional.class, Boolean.class); + microwaveOvenControlsetCookingParametersCommandParams.put("startAfterSetting",microwaveOvenControlsetCookingParametersstartAfterSettingCommandParameterInfo); InteractionInfo microwaveOvenControlsetCookingParametersInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.MicrowaveOvenControlCluster) cluster) @@ -22780,6 +22711,10 @@ public Map> getCommandMap() { commandArguments.get("cookTime") , (Optional) commandArguments.get("powerSetting") + , (Optional) + commandArguments.get("wattSettingIndex") + , (Optional) + commandArguments.get("startAfterSetting") ); }, () -> new DelegatedDefaultClusterCallback(), @@ -22910,6 +22845,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(); @@ -24110,6 +24330,115 @@ public Map> getCommandMap() { ); thermostatClusterInteractionInfoMap.put("clearWeeklySchedule", thermostatclearWeeklyScheduleInteractionInfo); + Map thermostatsetActiveScheduleRequestCommandParams = new LinkedHashMap(); + + CommandParameterInfo thermostatsetActiveScheduleRequestscheduleHandleCommandParameterInfo = new CommandParameterInfo("scheduleHandle", byte[].class, byte[].class); + thermostatsetActiveScheduleRequestCommandParams.put("scheduleHandle",thermostatsetActiveScheduleRequestscheduleHandleCommandParameterInfo); + InteractionInfo thermostatsetActiveScheduleRequestInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .setActiveScheduleRequest((DefaultClusterCallback) callback + , (byte[]) + commandArguments.get("scheduleHandle") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + thermostatsetActiveScheduleRequestCommandParams + ); + thermostatClusterInteractionInfoMap.put("setActiveScheduleRequest", thermostatsetActiveScheduleRequestInteractionInfo); + + Map thermostatsetActivePresetRequestCommandParams = new LinkedHashMap(); + + CommandParameterInfo thermostatsetActivePresetRequestpresetHandleCommandParameterInfo = new CommandParameterInfo("presetHandle", byte[].class, byte[].class); + thermostatsetActivePresetRequestCommandParams.put("presetHandle",thermostatsetActivePresetRequestpresetHandleCommandParameterInfo); + + CommandParameterInfo thermostatsetActivePresetRequestdelayMinutesCommandParameterInfo = new CommandParameterInfo("delayMinutes", Optional.class, Integer.class); + thermostatsetActivePresetRequestCommandParams.put("delayMinutes",thermostatsetActivePresetRequestdelayMinutesCommandParameterInfo); + InteractionInfo thermostatsetActivePresetRequestInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .setActivePresetRequest((DefaultClusterCallback) callback + , (byte[]) + commandArguments.get("presetHandle") + , (Optional) + commandArguments.get("delayMinutes") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + thermostatsetActivePresetRequestCommandParams + ); + thermostatClusterInteractionInfoMap.put("setActivePresetRequest", thermostatsetActivePresetRequestInteractionInfo); + + Map thermostatstartPresetsSchedulesEditRequestCommandParams = new LinkedHashMap(); + + CommandParameterInfo thermostatstartPresetsSchedulesEditRequesttimeoutSecondsCommandParameterInfo = new CommandParameterInfo("timeoutSeconds", Integer.class, Integer.class); + thermostatstartPresetsSchedulesEditRequestCommandParams.put("timeoutSeconds",thermostatstartPresetsSchedulesEditRequesttimeoutSecondsCommandParameterInfo); + InteractionInfo thermostatstartPresetsSchedulesEditRequestInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .startPresetsSchedulesEditRequest((DefaultClusterCallback) callback + , (Integer) + commandArguments.get("timeoutSeconds") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + thermostatstartPresetsSchedulesEditRequestCommandParams + ); + thermostatClusterInteractionInfoMap.put("startPresetsSchedulesEditRequest", thermostatstartPresetsSchedulesEditRequestInteractionInfo); + + Map thermostatcancelPresetsSchedulesEditRequestCommandParams = new LinkedHashMap(); + InteractionInfo thermostatcancelPresetsSchedulesEditRequestInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .cancelPresetsSchedulesEditRequest((DefaultClusterCallback) callback + ); + }, + () -> new DelegatedDefaultClusterCallback(), + thermostatcancelPresetsSchedulesEditRequestCommandParams + ); + thermostatClusterInteractionInfoMap.put("cancelPresetsSchedulesEditRequest", thermostatcancelPresetsSchedulesEditRequestInteractionInfo); + + Map thermostatcommitPresetsSchedulesRequestCommandParams = new LinkedHashMap(); + InteractionInfo thermostatcommitPresetsSchedulesRequestInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .commitPresetsSchedulesRequest((DefaultClusterCallback) callback + ); + }, + () -> new DelegatedDefaultClusterCallback(), + thermostatcommitPresetsSchedulesRequestCommandParams + ); + thermostatClusterInteractionInfoMap.put("commitPresetsSchedulesRequest", thermostatcommitPresetsSchedulesRequestInteractionInfo); + + Map thermostatcancelSetActivePresetRequestCommandParams = new LinkedHashMap(); + InteractionInfo thermostatcancelSetActivePresetRequestInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .cancelSetActivePresetRequest((DefaultClusterCallback) callback + ); + }, + () -> new DelegatedDefaultClusterCallback(), + thermostatcancelSetActivePresetRequestCommandParams + ); + thermostatClusterInteractionInfoMap.put("cancelSetActivePresetRequest", thermostatcancelSetActivePresetRequestInteractionInfo); + + Map thermostatsetTemperatureSetpointHoldPolicyCommandParams = new LinkedHashMap(); + + CommandParameterInfo thermostatsetTemperatureSetpointHoldPolicytemperatureSetpointHoldPolicyCommandParameterInfo = new CommandParameterInfo("temperatureSetpointHoldPolicy", Integer.class, Integer.class); + thermostatsetTemperatureSetpointHoldPolicyCommandParams.put("temperatureSetpointHoldPolicy",thermostatsetTemperatureSetpointHoldPolicytemperatureSetpointHoldPolicyCommandParameterInfo); + InteractionInfo thermostatsetTemperatureSetpointHoldPolicyInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster) + .setTemperatureSetpointHoldPolicy((DefaultClusterCallback) callback + , (Integer) + commandArguments.get("temperatureSetpointHoldPolicy") + ); + }, + () -> new DelegatedDefaultClusterCallback(), + thermostatsetTemperatureSetpointHoldPolicyCommandParams + ); + thermostatClusterInteractionInfoMap.put("setTemperatureSetpointHoldPolicy", thermostatsetTemperatureSetpointHoldPolicyInteractionInfo); + commandMap.put("thermostat", thermostatClusterInteractionInfoMap); Map fanControlClusterInteractionInfoMap = 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 16c71818bad11c..64a4a7a1ff08c7 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( @@ -8013,6 +7855,17 @@ private static Map readMicrowaveOvenControlInteractionI readMicrowaveOvenControlCookTimeCommandParams ); result.put("readCookTimeAttribute", readMicrowaveOvenControlCookTimeAttributeInteractionInfo); + Map readMicrowaveOvenControlMaxCookTimeCommandParams = new LinkedHashMap(); + InteractionInfo readMicrowaveOvenControlMaxCookTimeAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.MicrowaveOvenControlCluster) cluster).readMaxCookTimeAttribute( + (ChipClusters.LongAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readMicrowaveOvenControlMaxCookTimeCommandParams + ); + result.put("readMaxCookTimeAttribute", readMicrowaveOvenControlMaxCookTimeAttributeInteractionInfo); Map readMicrowaveOvenControlPowerSettingCommandParams = new LinkedHashMap(); InteractionInfo readMicrowaveOvenControlPowerSettingAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -8057,6 +7910,39 @@ private static Map readMicrowaveOvenControlInteractionI readMicrowaveOvenControlPowerStepCommandParams ); result.put("readPowerStepAttribute", readMicrowaveOvenControlPowerStepAttributeInteractionInfo); + Map readMicrowaveOvenControlSupportedWattsCommandParams = new LinkedHashMap(); + InteractionInfo readMicrowaveOvenControlSupportedWattsAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.MicrowaveOvenControlCluster) cluster).readSupportedWattsAttribute( + (ChipClusters.MicrowaveOvenControlCluster.SupportedWattsAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedMicrowaveOvenControlClusterSupportedWattsAttributeCallback(), + readMicrowaveOvenControlSupportedWattsCommandParams + ); + result.put("readSupportedWattsAttribute", readMicrowaveOvenControlSupportedWattsAttributeInteractionInfo); + Map readMicrowaveOvenControlSelectedWattIndexCommandParams = new LinkedHashMap(); + InteractionInfo readMicrowaveOvenControlSelectedWattIndexAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.MicrowaveOvenControlCluster) cluster).readSelectedWattIndexAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readMicrowaveOvenControlSelectedWattIndexCommandParams + ); + result.put("readSelectedWattIndexAttribute", readMicrowaveOvenControlSelectedWattIndexAttributeInteractionInfo); + Map readMicrowaveOvenControlWattRatingCommandParams = new LinkedHashMap(); + InteractionInfo readMicrowaveOvenControlWattRatingAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.MicrowaveOvenControlCluster) cluster).readWattRatingAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readMicrowaveOvenControlWattRatingCommandParams + ); + result.put("readWattRatingAttribute", readMicrowaveOvenControlWattRatingAttributeInteractionInfo); Map readMicrowaveOvenControlGeneratedCommandListCommandParams = new LinkedHashMap(); InteractionInfo readMicrowaveOvenControlGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -8376,6 +8262,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( @@ -11751,6 +11795,149 @@ private static Map readThermostatInteractionInfo() { readThermostatACCapacityformatCommandParams ); result.put("readACCapacityformatAttribute", readThermostatACCapacityformatAttributeInteractionInfo); + Map readThermostatPresetTypesCommandParams = new LinkedHashMap(); + InteractionInfo readThermostatPresetTypesAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster).readPresetTypesAttribute( + (ChipClusters.ThermostatCluster.PresetTypesAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedThermostatClusterPresetTypesAttributeCallback(), + readThermostatPresetTypesCommandParams + ); + result.put("readPresetTypesAttribute", readThermostatPresetTypesAttributeInteractionInfo); + Map readThermostatScheduleTypesCommandParams = new LinkedHashMap(); + InteractionInfo readThermostatScheduleTypesAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster).readScheduleTypesAttribute( + (ChipClusters.ThermostatCluster.ScheduleTypesAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedThermostatClusterScheduleTypesAttributeCallback(), + readThermostatScheduleTypesCommandParams + ); + result.put("readScheduleTypesAttribute", readThermostatScheduleTypesAttributeInteractionInfo); + Map readThermostatNumberOfPresetsCommandParams = new LinkedHashMap(); + InteractionInfo readThermostatNumberOfPresetsAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster).readNumberOfPresetsAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readThermostatNumberOfPresetsCommandParams + ); + result.put("readNumberOfPresetsAttribute", readThermostatNumberOfPresetsAttributeInteractionInfo); + Map readThermostatNumberOfSchedulesCommandParams = new LinkedHashMap(); + InteractionInfo readThermostatNumberOfSchedulesAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster).readNumberOfSchedulesAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readThermostatNumberOfSchedulesCommandParams + ); + result.put("readNumberOfSchedulesAttribute", readThermostatNumberOfSchedulesAttributeInteractionInfo); + Map readThermostatNumberOfScheduleTransitionsCommandParams = new LinkedHashMap(); + InteractionInfo readThermostatNumberOfScheduleTransitionsAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster).readNumberOfScheduleTransitionsAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readThermostatNumberOfScheduleTransitionsCommandParams + ); + result.put("readNumberOfScheduleTransitionsAttribute", readThermostatNumberOfScheduleTransitionsAttributeInteractionInfo); + Map readThermostatNumberOfScheduleTransitionPerDayCommandParams = new LinkedHashMap(); + InteractionInfo readThermostatNumberOfScheduleTransitionPerDayAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster).readNumberOfScheduleTransitionPerDayAttribute( + (ChipClusters.ThermostatCluster.NumberOfScheduleTransitionPerDayAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedThermostatClusterNumberOfScheduleTransitionPerDayAttributeCallback(), + readThermostatNumberOfScheduleTransitionPerDayCommandParams + ); + result.put("readNumberOfScheduleTransitionPerDayAttribute", readThermostatNumberOfScheduleTransitionPerDayAttributeInteractionInfo); + Map readThermostatActivePresetHandleCommandParams = new LinkedHashMap(); + InteractionInfo readThermostatActivePresetHandleAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster).readActivePresetHandleAttribute( + (ChipClusters.ThermostatCluster.ActivePresetHandleAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedThermostatClusterActivePresetHandleAttributeCallback(), + readThermostatActivePresetHandleCommandParams + ); + result.put("readActivePresetHandleAttribute", readThermostatActivePresetHandleAttributeInteractionInfo); + Map readThermostatActiveScheduleHandleCommandParams = new LinkedHashMap(); + InteractionInfo readThermostatActiveScheduleHandleAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster).readActiveScheduleHandleAttribute( + (ChipClusters.ThermostatCluster.ActiveScheduleHandleAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedThermostatClusterActiveScheduleHandleAttributeCallback(), + readThermostatActiveScheduleHandleCommandParams + ); + result.put("readActiveScheduleHandleAttribute", readThermostatActiveScheduleHandleAttributeInteractionInfo); + Map readThermostatPresetsCommandParams = new LinkedHashMap(); + InteractionInfo readThermostatPresetsAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster).readPresetsAttribute( + (ChipClusters.ThermostatCluster.PresetsAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedThermostatClusterPresetsAttributeCallback(), + readThermostatPresetsCommandParams + ); + result.put("readPresetsAttribute", readThermostatPresetsAttributeInteractionInfo); + Map readThermostatSchedulesCommandParams = new LinkedHashMap(); + InteractionInfo readThermostatSchedulesAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster).readSchedulesAttribute( + (ChipClusters.ThermostatCluster.SchedulesAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedThermostatClusterSchedulesAttributeCallback(), + readThermostatSchedulesCommandParams + ); + result.put("readSchedulesAttribute", readThermostatSchedulesAttributeInteractionInfo); + Map readThermostatPresetsSchedulesEditableCommandParams = new LinkedHashMap(); + InteractionInfo readThermostatPresetsSchedulesEditableAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster).readPresetsSchedulesEditableAttribute( + (ChipClusters.BooleanAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedBooleanAttributeCallback(), + readThermostatPresetsSchedulesEditableCommandParams + ); + result.put("readPresetsSchedulesEditableAttribute", readThermostatPresetsSchedulesEditableAttributeInteractionInfo); + Map readThermostatTemperatureSetpointHoldPolicyCommandParams = new LinkedHashMap(); + InteractionInfo readThermostatTemperatureSetpointHoldPolicyAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster).readTemperatureSetpointHoldPolicyAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readThermostatTemperatureSetpointHoldPolicyCommandParams + ); + result.put("readTemperatureSetpointHoldPolicyAttribute", readThermostatTemperatureSetpointHoldPolicyAttributeInteractionInfo); + Map readThermostatSetpointHoldExpiryTimestampCommandParams = new LinkedHashMap(); + InteractionInfo readThermostatSetpointHoldExpiryTimestampAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.ThermostatCluster) cluster).readSetpointHoldExpiryTimestampAttribute( + (ChipClusters.ThermostatCluster.SetpointHoldExpiryTimestampAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedThermostatClusterSetpointHoldExpiryTimestampAttributeCallback(), + readThermostatSetpointHoldExpiryTimestampCommandParams + ); + result.put("readSetpointHoldExpiryTimestampAttribute", readThermostatSetpointHoldExpiryTimestampAttributeInteractionInfo); Map readThermostatGeneratedCommandListCommandParams = new LinkedHashMap(); InteractionInfo readThermostatGeneratedCommandListAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { @@ -19689,7 +19876,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()); @@ -19748,6 +19934,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 41532a359802fa..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,11 +99,17 @@ 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", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterPresetTypeStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterQueuedPresetStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterScheduleStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterScheduleTransitionStruct.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterScheduleTypeStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterWeeklyScheduleTransitionStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterNeighborTableStruct.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThreadNetworkDiagnosticsClusterOperationalDatasetComponents.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/chip/devicecontroller/cluster/structs/ThermostatClusterPresetStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterPresetStruct.kt new file mode 100644 index 00000000000000..cb91c04d920b9c --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterPresetStruct.kt @@ -0,0 +1,140 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import java.util.Optional +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ThermostatClusterPresetStruct( + val presetHandle: ByteArray?, + val presetScenario: UInt, + val name: Optional?, + val coolingSetpoint: Optional, + val heatingSetpoint: Optional, + val builtIn: Boolean? +) { + override fun toString(): String = buildString { + append("ThermostatClusterPresetStruct {\n") + append("\tpresetHandle : $presetHandle\n") + append("\tpresetScenario : $presetScenario\n") + append("\tname : $name\n") + append("\tcoolingSetpoint : $coolingSetpoint\n") + append("\theatingSetpoint : $heatingSetpoint\n") + append("\tbuiltIn : $builtIn\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + if (presetHandle != null) { + put(ContextSpecificTag(TAG_PRESET_HANDLE), presetHandle) + } else { + putNull(ContextSpecificTag(TAG_PRESET_HANDLE)) + } + put(ContextSpecificTag(TAG_PRESET_SCENARIO), presetScenario) + if (name != null) { + if (name.isPresent) { + val optname = name.get() + put(ContextSpecificTag(TAG_NAME), optname) + } + } else { + putNull(ContextSpecificTag(TAG_NAME)) + } + if (coolingSetpoint.isPresent) { + val optcoolingSetpoint = coolingSetpoint.get() + put(ContextSpecificTag(TAG_COOLING_SETPOINT), optcoolingSetpoint) + } + if (heatingSetpoint.isPresent) { + val optheatingSetpoint = heatingSetpoint.get() + put(ContextSpecificTag(TAG_HEATING_SETPOINT), optheatingSetpoint) + } + if (builtIn != null) { + put(ContextSpecificTag(TAG_BUILT_IN), builtIn) + } else { + putNull(ContextSpecificTag(TAG_BUILT_IN)) + } + endStructure() + } + } + + companion object { + private const val TAG_PRESET_HANDLE = 0 + private const val TAG_PRESET_SCENARIO = 1 + private const val TAG_NAME = 2 + private const val TAG_COOLING_SETPOINT = 3 + private const val TAG_HEATING_SETPOINT = 4 + private const val TAG_BUILT_IN = 5 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ThermostatClusterPresetStruct { + tlvReader.enterStructure(tlvTag) + val presetHandle = + if (!tlvReader.isNull()) { + tlvReader.getByteArray(ContextSpecificTag(TAG_PRESET_HANDLE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PRESET_HANDLE)) + null + } + val presetScenario = tlvReader.getUInt(ContextSpecificTag(TAG_PRESET_SCENARIO)) + val name = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NAME)) + null + } + val coolingSetpoint = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_COOLING_SETPOINT))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_COOLING_SETPOINT))) + } else { + Optional.empty() + } + val heatingSetpoint = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_HEATING_SETPOINT))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_HEATING_SETPOINT))) + } else { + Optional.empty() + } + val builtIn = + if (!tlvReader.isNull()) { + tlvReader.getBoolean(ContextSpecificTag(TAG_BUILT_IN)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_BUILT_IN)) + null + } + + tlvReader.exitContainer() + + return ThermostatClusterPresetStruct( + presetHandle, + presetScenario, + name, + coolingSetpoint, + heatingSetpoint, + builtIn + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterPresetTypeStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterPresetTypeStruct.kt new file mode 100644 index 00000000000000..386af8f682e665 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterPresetTypeStruct.kt @@ -0,0 +1,64 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ThermostatClusterPresetTypeStruct( + val presetScenario: UInt, + val numberOfPresets: UInt, + val presetTypeFeatures: UInt +) { + override fun toString(): String = buildString { + append("ThermostatClusterPresetTypeStruct {\n") + append("\tpresetScenario : $presetScenario\n") + append("\tnumberOfPresets : $numberOfPresets\n") + append("\tpresetTypeFeatures : $presetTypeFeatures\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_PRESET_SCENARIO), presetScenario) + put(ContextSpecificTag(TAG_NUMBER_OF_PRESETS), numberOfPresets) + put(ContextSpecificTag(TAG_PRESET_TYPE_FEATURES), presetTypeFeatures) + endStructure() + } + } + + companion object { + private const val TAG_PRESET_SCENARIO = 0 + private const val TAG_NUMBER_OF_PRESETS = 1 + private const val TAG_PRESET_TYPE_FEATURES = 2 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ThermostatClusterPresetTypeStruct { + tlvReader.enterStructure(tlvTag) + val presetScenario = tlvReader.getUInt(ContextSpecificTag(TAG_PRESET_SCENARIO)) + val numberOfPresets = tlvReader.getUInt(ContextSpecificTag(TAG_NUMBER_OF_PRESETS)) + val presetTypeFeatures = tlvReader.getUInt(ContextSpecificTag(TAG_PRESET_TYPE_FEATURES)) + + tlvReader.exitContainer() + + return ThermostatClusterPresetTypeStruct(presetScenario, numberOfPresets, presetTypeFeatures) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterQueuedPresetStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterQueuedPresetStruct.kt new file mode 100644 index 00000000000000..4ecaecf98901dc --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterQueuedPresetStruct.kt @@ -0,0 +1,79 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ThermostatClusterQueuedPresetStruct( + val presetHandle: ByteArray?, + val transitionTimestamp: ULong? +) { + override fun toString(): String = buildString { + append("ThermostatClusterQueuedPresetStruct {\n") + append("\tpresetHandle : $presetHandle\n") + append("\ttransitionTimestamp : $transitionTimestamp\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + if (presetHandle != null) { + put(ContextSpecificTag(TAG_PRESET_HANDLE), presetHandle) + } else { + putNull(ContextSpecificTag(TAG_PRESET_HANDLE)) + } + if (transitionTimestamp != null) { + put(ContextSpecificTag(TAG_TRANSITION_TIMESTAMP), transitionTimestamp) + } else { + putNull(ContextSpecificTag(TAG_TRANSITION_TIMESTAMP)) + } + endStructure() + } + } + + companion object { + private const val TAG_PRESET_HANDLE = 0 + private const val TAG_TRANSITION_TIMESTAMP = 1 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ThermostatClusterQueuedPresetStruct { + tlvReader.enterStructure(tlvTag) + val presetHandle = + if (!tlvReader.isNull()) { + tlvReader.getByteArray(ContextSpecificTag(TAG_PRESET_HANDLE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PRESET_HANDLE)) + null + } + val transitionTimestamp = + if (!tlvReader.isNull()) { + tlvReader.getULong(ContextSpecificTag(TAG_TRANSITION_TIMESTAMP)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_TRANSITION_TIMESTAMP)) + null + } + + tlvReader.exitContainer() + + return ThermostatClusterQueuedPresetStruct(presetHandle, transitionTimestamp) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterScheduleStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterScheduleStruct.kt new file mode 100644 index 00000000000000..ac1ffbde1caca9 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterScheduleStruct.kt @@ -0,0 +1,142 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import java.util.Optional +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ThermostatClusterScheduleStruct( + val scheduleHandle: ByteArray?, + val systemMode: UInt, + val name: Optional, + val presetHandle: Optional, + val transitions: List, + val builtIn: Optional? +) { + override fun toString(): String = buildString { + append("ThermostatClusterScheduleStruct {\n") + append("\tscheduleHandle : $scheduleHandle\n") + append("\tsystemMode : $systemMode\n") + append("\tname : $name\n") + append("\tpresetHandle : $presetHandle\n") + append("\ttransitions : $transitions\n") + append("\tbuiltIn : $builtIn\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + if (scheduleHandle != null) { + put(ContextSpecificTag(TAG_SCHEDULE_HANDLE), scheduleHandle) + } else { + putNull(ContextSpecificTag(TAG_SCHEDULE_HANDLE)) + } + put(ContextSpecificTag(TAG_SYSTEM_MODE), systemMode) + if (name.isPresent) { + val optname = name.get() + put(ContextSpecificTag(TAG_NAME), optname) + } + if (presetHandle.isPresent) { + val optpresetHandle = presetHandle.get() + put(ContextSpecificTag(TAG_PRESET_HANDLE), optpresetHandle) + } + startArray(ContextSpecificTag(TAG_TRANSITIONS)) + for (item in transitions.iterator()) { + item.toTlv(AnonymousTag, this) + } + endArray() + if (builtIn != null) { + if (builtIn.isPresent) { + val optbuiltIn = builtIn.get() + put(ContextSpecificTag(TAG_BUILT_IN), optbuiltIn) + } + } else { + putNull(ContextSpecificTag(TAG_BUILT_IN)) + } + endStructure() + } + } + + companion object { + private const val TAG_SCHEDULE_HANDLE = 0 + private const val TAG_SYSTEM_MODE = 1 + private const val TAG_NAME = 2 + private const val TAG_PRESET_HANDLE = 3 + private const val TAG_TRANSITIONS = 4 + private const val TAG_BUILT_IN = 5 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ThermostatClusterScheduleStruct { + tlvReader.enterStructure(tlvTag) + val scheduleHandle = + if (!tlvReader.isNull()) { + tlvReader.getByteArray(ContextSpecificTag(TAG_SCHEDULE_HANDLE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_SCHEDULE_HANDLE)) + null + } + val systemMode = tlvReader.getUInt(ContextSpecificTag(TAG_SYSTEM_MODE)) + val name = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) + } else { + Optional.empty() + } + val presetHandle = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_PRESET_HANDLE))) { + Optional.of(tlvReader.getByteArray(ContextSpecificTag(TAG_PRESET_HANDLE))) + } else { + Optional.empty() + } + val transitions = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_TRANSITIONS)) + while (!tlvReader.isEndOfContainer()) { + add(ThermostatClusterScheduleTransitionStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + val builtIn = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_BUILT_IN))) { + Optional.of(tlvReader.getBoolean(ContextSpecificTag(TAG_BUILT_IN))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_BUILT_IN)) + null + } + + tlvReader.exitContainer() + + return ThermostatClusterScheduleStruct( + scheduleHandle, + systemMode, + name, + presetHandle, + transitions, + builtIn + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterScheduleTransitionStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterScheduleTransitionStruct.kt new file mode 100644 index 00000000000000..aabb3b6418da7b --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterScheduleTransitionStruct.kt @@ -0,0 +1,119 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import java.util.Optional +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ThermostatClusterScheduleTransitionStruct( + val dayOfWeek: UInt, + val transitionTime: UInt, + val presetHandle: Optional, + val systemMode: Optional, + val coolingSetpoint: Optional, + val heatingSetpoint: Optional +) { + override fun toString(): String = buildString { + append("ThermostatClusterScheduleTransitionStruct {\n") + append("\tdayOfWeek : $dayOfWeek\n") + append("\ttransitionTime : $transitionTime\n") + append("\tpresetHandle : $presetHandle\n") + append("\tsystemMode : $systemMode\n") + append("\tcoolingSetpoint : $coolingSetpoint\n") + append("\theatingSetpoint : $heatingSetpoint\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_DAY_OF_WEEK), dayOfWeek) + put(ContextSpecificTag(TAG_TRANSITION_TIME), transitionTime) + if (presetHandle.isPresent) { + val optpresetHandle = presetHandle.get() + put(ContextSpecificTag(TAG_PRESET_HANDLE), optpresetHandle) + } + if (systemMode.isPresent) { + val optsystemMode = systemMode.get() + put(ContextSpecificTag(TAG_SYSTEM_MODE), optsystemMode) + } + if (coolingSetpoint.isPresent) { + val optcoolingSetpoint = coolingSetpoint.get() + put(ContextSpecificTag(TAG_COOLING_SETPOINT), optcoolingSetpoint) + } + if (heatingSetpoint.isPresent) { + val optheatingSetpoint = heatingSetpoint.get() + put(ContextSpecificTag(TAG_HEATING_SETPOINT), optheatingSetpoint) + } + endStructure() + } + } + + companion object { + private const val TAG_DAY_OF_WEEK = 0 + private const val TAG_TRANSITION_TIME = 1 + private const val TAG_PRESET_HANDLE = 2 + private const val TAG_SYSTEM_MODE = 3 + private const val TAG_COOLING_SETPOINT = 4 + private const val TAG_HEATING_SETPOINT = 5 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ThermostatClusterScheduleTransitionStruct { + tlvReader.enterStructure(tlvTag) + val dayOfWeek = tlvReader.getUInt(ContextSpecificTag(TAG_DAY_OF_WEEK)) + val transitionTime = tlvReader.getUInt(ContextSpecificTag(TAG_TRANSITION_TIME)) + val presetHandle = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_PRESET_HANDLE))) { + Optional.of(tlvReader.getByteArray(ContextSpecificTag(TAG_PRESET_HANDLE))) + } else { + Optional.empty() + } + val systemMode = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_SYSTEM_MODE))) { + Optional.of(tlvReader.getUInt(ContextSpecificTag(TAG_SYSTEM_MODE))) + } else { + Optional.empty() + } + val coolingSetpoint = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_COOLING_SETPOINT))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_COOLING_SETPOINT))) + } else { + Optional.empty() + } + val heatingSetpoint = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_HEATING_SETPOINT))) { + Optional.of(tlvReader.getInt(ContextSpecificTag(TAG_HEATING_SETPOINT))) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return ThermostatClusterScheduleTransitionStruct( + dayOfWeek, + transitionTime, + presetHandle, + systemMode, + coolingSetpoint, + heatingSetpoint + ) + } + } +} diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterScheduleTypeStruct.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterScheduleTypeStruct.kt new file mode 100644 index 00000000000000..eb62cbf32b28a4 --- /dev/null +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/structs/ThermostatClusterScheduleTypeStruct.kt @@ -0,0 +1,68 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package chip.devicecontroller.cluster.structs + +import chip.devicecontroller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ThermostatClusterScheduleTypeStruct( + val systemMode: UInt, + val numberOfSchedules: UInt, + val scheduleTypeFeatures: UInt +) { + override fun toString(): String = buildString { + append("ThermostatClusterScheduleTypeStruct {\n") + append("\tsystemMode : $systemMode\n") + append("\tnumberOfSchedules : $numberOfSchedules\n") + append("\tscheduleTypeFeatures : $scheduleTypeFeatures\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_SYSTEM_MODE), systemMode) + put(ContextSpecificTag(TAG_NUMBER_OF_SCHEDULES), numberOfSchedules) + put(ContextSpecificTag(TAG_SCHEDULE_TYPE_FEATURES), scheduleTypeFeatures) + endStructure() + } + } + + companion object { + private const val TAG_SYSTEM_MODE = 0 + private const val TAG_NUMBER_OF_SCHEDULES = 1 + private const val TAG_SCHEDULE_TYPE_FEATURES = 2 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ThermostatClusterScheduleTypeStruct { + tlvReader.enterStructure(tlvTag) + val systemMode = tlvReader.getUInt(ContextSpecificTag(TAG_SYSTEM_MODE)) + val numberOfSchedules = tlvReader.getUInt(ContextSpecificTag(TAG_NUMBER_OF_SCHEDULES)) + val scheduleTypeFeatures = tlvReader.getUInt(ContextSpecificTag(TAG_SCHEDULE_TYPE_FEATURES)) + + tlvReader.exitContainer() + + return ThermostatClusterScheduleTypeStruct( + systemMode, + numberOfSchedules, + scheduleTypeFeatures + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/MicrowaveOvenControlCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/MicrowaveOvenControlCluster.kt index fdb896c19ff9aa..2548f9fdc3e725 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/clusters/MicrowaveOvenControlCluster.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/MicrowaveOvenControlCluster.kt @@ -44,6 +44,16 @@ class MicrowaveOvenControlCluster( private val controller: MatterController, private val endpointId: UShort ) { + class SupportedWattsAttribute(val value: List?) + + sealed class SupportedWattsAttributeSubscriptionState { + data class Success(val value: List?) : SupportedWattsAttributeSubscriptionState() + + data class Error(val exception: Exception) : SupportedWattsAttributeSubscriptionState() + + object SubscriptionEstablished : SupportedWattsAttributeSubscriptionState() + } + class GeneratedCommandListAttribute(val value: List) sealed class GeneratedCommandListAttributeSubscriptionState { @@ -88,6 +98,8 @@ class MicrowaveOvenControlCluster( cookMode: UByte?, cookTime: UInt?, powerSetting: UByte?, + wattSettingIndex: UByte?, + startAfterSetting: Boolean?, timedInvokeTimeout: Duration? = null ) { val commandId: UInt = 0u @@ -103,6 +115,16 @@ class MicrowaveOvenControlCluster( val TAG_POWER_SETTING_REQ: Int = 2 powerSetting?.let { tlvWriter.put(ContextSpecificTag(TAG_POWER_SETTING_REQ), powerSetting) } + + val TAG_WATT_SETTING_INDEX_REQ: Int = 3 + wattSettingIndex?.let { + tlvWriter.put(ContextSpecificTag(TAG_WATT_SETTING_INDEX_REQ), wattSettingIndex) + } + + val TAG_START_AFTER_SETTING_REQ: Int = 4 + startAfterSetting?.let { + tlvWriter.put(ContextSpecificTag(TAG_START_AFTER_SETTING_REQ), startAfterSetting) + } tlvWriter.endStructure() val request: InvokeRequest = @@ -138,7 +160,7 @@ class MicrowaveOvenControlCluster( } suspend fun readCookTimeAttribute(): UInt { - val ATTRIBUTE_ID: UInt = 1u + val ATTRIBUTE_ID: UInt = 0u val attributePath = AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) @@ -172,7 +194,7 @@ class MicrowaveOvenControlCluster( minInterval: Int, maxInterval: Int ): Flow { - val ATTRIBUTE_ID: UInt = 1u + val ATTRIBUTE_ID: UInt = 0u val attributePaths = listOf( AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) @@ -218,7 +240,88 @@ class MicrowaveOvenControlCluster( } } - suspend fun readPowerSettingAttribute(): UByte { + suspend fun readMaxCookTimeAttribute(): UInt { + val ATTRIBUTE_ID: UInt = 1u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Maxcooktime attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UInt = tlvReader.getUInt(AnonymousTag) + + return decodedValue + } + + suspend fun subscribeMaxCookTimeAttribute( + minInterval: Int, + maxInterval: Int + ): Flow { + val ATTRIBUTE_ID: UInt = 1u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()) + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + UIntSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { "Maxcooktime attribute not found in Node State update" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UInt = tlvReader.getUInt(AnonymousTag) + + emit(UIntSubscriptionState.Success(decodedValue)) + } + SubscriptionState.SubscriptionEstablished -> { + emit(UIntSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readPowerSettingAttribute(): UByte? { val ATTRIBUTE_ID: UInt = 2u val attributePath = @@ -244,7 +347,12 @@ class MicrowaveOvenControlCluster( // Decode the TLV data into the appropriate type val tlvReader = TlvReader(attributeData.data) - val decodedValue: UByte = tlvReader.getUByte(AnonymousTag) + val decodedValue: UByte? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUByte(AnonymousTag) + } else { + null + } return decodedValue } @@ -288,9 +396,14 @@ class MicrowaveOvenControlCluster( // Decode the TLV data into the appropriate type val tlvReader = TlvReader(attributeData.data) - val decodedValue: UByte = tlvReader.getUByte(AnonymousTag) + val decodedValue: UByte? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUByte(AnonymousTag) + } else { + null + } - emit(UByteSubscriptionState.Success(decodedValue)) + decodedValue?.let { emit(UByteSubscriptionState.Success(it)) } } SubscriptionState.SubscriptionEstablished -> { emit(UByteSubscriptionState.SubscriptionEstablished) @@ -572,6 +685,295 @@ class MicrowaveOvenControlCluster( } } + suspend fun readSupportedWattsAttribute(): SupportedWattsAttribute { + val ATTRIBUTE_ID: UInt = 6u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Supportedwatts attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List? = + if (tlvReader.isNextTag(AnonymousTag)) { + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUShort(AnonymousTag)) + } + tlvReader.exitContainer() + } + } else { + null + } + + return SupportedWattsAttribute(decodedValue) + } + + suspend fun subscribeSupportedWattsAttribute( + minInterval: Int, + maxInterval: Int + ): Flow { + val ATTRIBUTE_ID: UInt = 6u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()) + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + SupportedWattsAttributeSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Supportedwatts attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List? = + if (tlvReader.isNextTag(AnonymousTag)) { + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(tlvReader.getUShort(AnonymousTag)) + } + tlvReader.exitContainer() + } + } else { + null + } + + decodedValue?.let { emit(SupportedWattsAttributeSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(SupportedWattsAttributeSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readSelectedWattIndexAttribute(): UByte? { + val ATTRIBUTE_ID: UInt = 7u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Selectedwattindex attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UByte? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUByte(AnonymousTag) + } else { + null + } + + return decodedValue + } + + suspend fun subscribeSelectedWattIndexAttribute( + minInterval: Int, + maxInterval: Int + ): Flow { + val ATTRIBUTE_ID: UInt = 7u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()) + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + UByteSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Selectedwattindex attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UByte? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUByte(AnonymousTag) + } else { + null + } + + decodedValue?.let { emit(UByteSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(UByteSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readWattRatingAttribute(): UShort? { + val ATTRIBUTE_ID: UInt = 8u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Wattrating attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UShort? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUShort(AnonymousTag) + } else { + null + } + + return decodedValue + } + + suspend fun subscribeWattRatingAttribute( + minInterval: Int, + maxInterval: Int + ): Flow { + val ATTRIBUTE_ID: UInt = 8u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()) + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + UShortSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { "Wattrating attribute not found in Node State update" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UShort? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUShort(AnonymousTag) + } else { + null + } + + decodedValue?.let { emit(UShortSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(UShortSubscriptionState.SubscriptionEstablished) + } + } + } + } + suspend fun readGeneratedCommandListAttribute(): GeneratedCommandListAttribute { val ATTRIBUTE_ID: UInt = 65528u 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/clusters/ThermostatCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/ThermostatCluster.kt index 274ed8e0234f00..2fa28950db06cd 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/clusters/ThermostatCluster.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/ThermostatCluster.kt @@ -22,6 +22,7 @@ import java.util.logging.Level import java.util.logging.Logger import kotlinx.coroutines.flow.Flow import kotlinx.coroutines.flow.transform +import matter.controller.BooleanSubscriptionState import matter.controller.ByteSubscriptionState import matter.controller.InvokeRequest import matter.controller.InvokeResponse @@ -165,6 +166,104 @@ class ThermostatCluster(private val controller: MatterController, private val en object SubscriptionEstablished : ACCoilTemperatureAttributeSubscriptionState() } + class PresetTypesAttribute(val value: List?) + + sealed class PresetTypesAttributeSubscriptionState { + data class Success(val value: List?) : + PresetTypesAttributeSubscriptionState() + + data class Error(val exception: Exception) : PresetTypesAttributeSubscriptionState() + + object SubscriptionEstablished : PresetTypesAttributeSubscriptionState() + } + + class ScheduleTypesAttribute(val value: List?) + + sealed class ScheduleTypesAttributeSubscriptionState { + data class Success(val value: List?) : + ScheduleTypesAttributeSubscriptionState() + + data class Error(val exception: Exception) : ScheduleTypesAttributeSubscriptionState() + + object SubscriptionEstablished : ScheduleTypesAttributeSubscriptionState() + } + + class NumberOfScheduleTransitionPerDayAttribute(val value: UByte?) + + sealed class NumberOfScheduleTransitionPerDayAttributeSubscriptionState { + data class Success(val value: UByte?) : + NumberOfScheduleTransitionPerDayAttributeSubscriptionState() + + data class Error(val exception: Exception) : + NumberOfScheduleTransitionPerDayAttributeSubscriptionState() + + object SubscriptionEstablished : NumberOfScheduleTransitionPerDayAttributeSubscriptionState() + } + + class ActivePresetHandleAttribute(val value: ByteArray?) + + sealed class ActivePresetHandleAttributeSubscriptionState { + data class Success(val value: ByteArray?) : ActivePresetHandleAttributeSubscriptionState() + + data class Error(val exception: Exception) : ActivePresetHandleAttributeSubscriptionState() + + object SubscriptionEstablished : ActivePresetHandleAttributeSubscriptionState() + } + + class ActiveScheduleHandleAttribute(val value: ByteArray?) + + sealed class ActiveScheduleHandleAttributeSubscriptionState { + data class Success(val value: ByteArray?) : ActiveScheduleHandleAttributeSubscriptionState() + + data class Error(val exception: Exception) : ActiveScheduleHandleAttributeSubscriptionState() + + object SubscriptionEstablished : ActiveScheduleHandleAttributeSubscriptionState() + } + + class PresetsAttribute(val value: List?) + + sealed class PresetsAttributeSubscriptionState { + data class Success(val value: List?) : + PresetsAttributeSubscriptionState() + + data class Error(val exception: Exception) : PresetsAttributeSubscriptionState() + + object SubscriptionEstablished : PresetsAttributeSubscriptionState() + } + + class SchedulesAttribute(val value: List?) + + sealed class SchedulesAttributeSubscriptionState { + data class Success(val value: List?) : + SchedulesAttributeSubscriptionState() + + data class Error(val exception: Exception) : SchedulesAttributeSubscriptionState() + + object SubscriptionEstablished : SchedulesAttributeSubscriptionState() + } + + class SetpointHoldExpiryTimestampAttribute(val value: UInt?) + + sealed class SetpointHoldExpiryTimestampAttributeSubscriptionState { + data class Success(val value: UInt?) : SetpointHoldExpiryTimestampAttributeSubscriptionState() + + data class Error(val exception: Exception) : + SetpointHoldExpiryTimestampAttributeSubscriptionState() + + object SubscriptionEstablished : SetpointHoldExpiryTimestampAttributeSubscriptionState() + } + + class QueuedPresetAttribute(val value: ThermostatClusterQueuedPresetStruct?) + + sealed class QueuedPresetAttributeSubscriptionState { + data class Success(val value: ThermostatClusterQueuedPresetStruct?) : + QueuedPresetAttributeSubscriptionState() + + data class Error(val exception: Exception) : QueuedPresetAttributeSubscriptionState() + + object SubscriptionEstablished : QueuedPresetAttributeSubscriptionState() + } + class GeneratedCommandListAttribute(val value: List) sealed class GeneratedCommandListAttributeSubscriptionState { @@ -386,6 +485,163 @@ class ThermostatCluster(private val controller: MatterController, private val en logger.log(Level.FINE, "Invoke command succeeded: ${response}") } + suspend fun setActiveScheduleRequest( + scheduleHandle: ByteArray, + timedInvokeTimeout: Duration? = null + ) { + val commandId: UInt = 5u + + val tlvWriter = TlvWriter() + tlvWriter.startStructure(AnonymousTag) + + val TAG_SCHEDULE_HANDLE_REQ: Int = 0 + tlvWriter.put(ContextSpecificTag(TAG_SCHEDULE_HANDLE_REQ), scheduleHandle) + tlvWriter.endStructure() + + val request: InvokeRequest = + InvokeRequest( + CommandPath(endpointId, clusterId = CLUSTER_ID, commandId), + tlvPayload = tlvWriter.getEncoded(), + timedRequest = timedInvokeTimeout + ) + + val response: InvokeResponse = controller.invoke(request) + logger.log(Level.FINE, "Invoke command succeeded: ${response}") + } + + suspend fun setActivePresetRequest( + presetHandle: ByteArray, + delayMinutes: UShort?, + timedInvokeTimeout: Duration? = null + ) { + val commandId: UInt = 6u + + val tlvWriter = TlvWriter() + tlvWriter.startStructure(AnonymousTag) + + val TAG_PRESET_HANDLE_REQ: Int = 0 + tlvWriter.put(ContextSpecificTag(TAG_PRESET_HANDLE_REQ), presetHandle) + + val TAG_DELAY_MINUTES_REQ: Int = 1 + delayMinutes?.let { tlvWriter.put(ContextSpecificTag(TAG_DELAY_MINUTES_REQ), delayMinutes) } + tlvWriter.endStructure() + + val request: InvokeRequest = + InvokeRequest( + CommandPath(endpointId, clusterId = CLUSTER_ID, commandId), + tlvPayload = tlvWriter.getEncoded(), + timedRequest = timedInvokeTimeout + ) + + val response: InvokeResponse = controller.invoke(request) + logger.log(Level.FINE, "Invoke command succeeded: ${response}") + } + + suspend fun startPresetsSchedulesEditRequest( + timeoutSeconds: UShort, + timedInvokeTimeout: Duration? = null + ) { + val commandId: UInt = 7u + + val tlvWriter = TlvWriter() + tlvWriter.startStructure(AnonymousTag) + + val TAG_TIMEOUT_SECONDS_REQ: Int = 0 + tlvWriter.put(ContextSpecificTag(TAG_TIMEOUT_SECONDS_REQ), timeoutSeconds) + tlvWriter.endStructure() + + val request: InvokeRequest = + InvokeRequest( + CommandPath(endpointId, clusterId = CLUSTER_ID, commandId), + tlvPayload = tlvWriter.getEncoded(), + timedRequest = timedInvokeTimeout + ) + + val response: InvokeResponse = controller.invoke(request) + logger.log(Level.FINE, "Invoke command succeeded: ${response}") + } + + suspend fun cancelPresetsSchedulesEditRequest(timedInvokeTimeout: Duration? = null) { + val commandId: UInt = 8u + + val tlvWriter = TlvWriter() + tlvWriter.startStructure(AnonymousTag) + tlvWriter.endStructure() + + val request: InvokeRequest = + InvokeRequest( + CommandPath(endpointId, clusterId = CLUSTER_ID, commandId), + tlvPayload = tlvWriter.getEncoded(), + timedRequest = timedInvokeTimeout + ) + + val response: InvokeResponse = controller.invoke(request) + logger.log(Level.FINE, "Invoke command succeeded: ${response}") + } + + suspend fun commitPresetsSchedulesRequest(timedInvokeTimeout: Duration? = null) { + val commandId: UInt = 9u + + val tlvWriter = TlvWriter() + tlvWriter.startStructure(AnonymousTag) + tlvWriter.endStructure() + + val request: InvokeRequest = + InvokeRequest( + CommandPath(endpointId, clusterId = CLUSTER_ID, commandId), + tlvPayload = tlvWriter.getEncoded(), + timedRequest = timedInvokeTimeout + ) + + val response: InvokeResponse = controller.invoke(request) + logger.log(Level.FINE, "Invoke command succeeded: ${response}") + } + + suspend fun cancelSetActivePresetRequest(timedInvokeTimeout: Duration? = null) { + val commandId: UInt = 10u + + val tlvWriter = TlvWriter() + tlvWriter.startStructure(AnonymousTag) + tlvWriter.endStructure() + + val request: InvokeRequest = + InvokeRequest( + CommandPath(endpointId, clusterId = CLUSTER_ID, commandId), + tlvPayload = tlvWriter.getEncoded(), + timedRequest = timedInvokeTimeout + ) + + val response: InvokeResponse = controller.invoke(request) + logger.log(Level.FINE, "Invoke command succeeded: ${response}") + } + + suspend fun setTemperatureSetpointHoldPolicy( + temperatureSetpointHoldPolicy: UByte, + timedInvokeTimeout: Duration? = null + ) { + val commandId: UInt = 11u + + val tlvWriter = TlvWriter() + tlvWriter.startStructure(AnonymousTag) + + val TAG_TEMPERATURE_SETPOINT_HOLD_POLICY_REQ: Int = 0 + tlvWriter.put( + ContextSpecificTag(TAG_TEMPERATURE_SETPOINT_HOLD_POLICY_REQ), + temperatureSetpointHoldPolicy + ) + tlvWriter.endStructure() + + val request: InvokeRequest = + InvokeRequest( + CommandPath(endpointId, clusterId = CLUSTER_ID, commandId), + tlvPayload = tlvWriter.getEncoded(), + timedRequest = timedInvokeTimeout + ) + + val response: InvokeResponse = controller.invoke(request) + logger.log(Level.FINE, "Invoke command succeeded: ${response}") + } + suspend fun readLocalTemperatureAttribute(): LocalTemperatureAttribute { val ATTRIBUTE_ID: UInt = 0u @@ -6142,6 +6398,1499 @@ class ThermostatCluster(private val controller: MatterController, private val en } } + suspend fun readPresetTypesAttribute(): PresetTypesAttribute { + val ATTRIBUTE_ID: UInt = 72u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Presettypes attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List? = + if (tlvReader.isNextTag(AnonymousTag)) { + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(ThermostatClusterPresetTypeStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + } else { + null + } + + return PresetTypesAttribute(decodedValue) + } + + suspend fun subscribePresetTypesAttribute( + minInterval: Int, + maxInterval: Int + ): Flow { + val ATTRIBUTE_ID: UInt = 72u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()) + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + PresetTypesAttributeSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { "Presettypes attribute not found in Node State update" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List? = + if (tlvReader.isNextTag(AnonymousTag)) { + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(ThermostatClusterPresetTypeStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + } else { + null + } + + decodedValue?.let { emit(PresetTypesAttributeSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(PresetTypesAttributeSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readScheduleTypesAttribute(): ScheduleTypesAttribute { + val ATTRIBUTE_ID: UInt = 73u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Scheduletypes attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List? = + if (tlvReader.isNextTag(AnonymousTag)) { + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(ThermostatClusterScheduleTypeStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + } else { + null + } + + return ScheduleTypesAttribute(decodedValue) + } + + suspend fun subscribeScheduleTypesAttribute( + minInterval: Int, + maxInterval: Int + ): Flow { + val ATTRIBUTE_ID: UInt = 73u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()) + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + ScheduleTypesAttributeSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { "Scheduletypes attribute not found in Node State update" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List? = + if (tlvReader.isNextTag(AnonymousTag)) { + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(ThermostatClusterScheduleTypeStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + } else { + null + } + + decodedValue?.let { emit(ScheduleTypesAttributeSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(ScheduleTypesAttributeSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readNumberOfPresetsAttribute(): UByte? { + val ATTRIBUTE_ID: UInt = 74u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Numberofpresets attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UByte? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUByte(AnonymousTag) + } else { + null + } + + return decodedValue + } + + suspend fun subscribeNumberOfPresetsAttribute( + minInterval: Int, + maxInterval: Int + ): Flow { + val ATTRIBUTE_ID: UInt = 74u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()) + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + UByteSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Numberofpresets attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UByte? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUByte(AnonymousTag) + } else { + null + } + + decodedValue?.let { emit(UByteSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(UByteSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readNumberOfSchedulesAttribute(): UByte? { + val ATTRIBUTE_ID: UInt = 75u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Numberofschedules attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UByte? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUByte(AnonymousTag) + } else { + null + } + + return decodedValue + } + + suspend fun subscribeNumberOfSchedulesAttribute( + minInterval: Int, + maxInterval: Int + ): Flow { + val ATTRIBUTE_ID: UInt = 75u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()) + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + UByteSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Numberofschedules attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UByte? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUByte(AnonymousTag) + } else { + null + } + + decodedValue?.let { emit(UByteSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(UByteSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readNumberOfScheduleTransitionsAttribute(): UByte? { + val ATTRIBUTE_ID: UInt = 76u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Numberofscheduletransitions attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UByte? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUByte(AnonymousTag) + } else { + null + } + + return decodedValue + } + + suspend fun subscribeNumberOfScheduleTransitionsAttribute( + minInterval: Int, + maxInterval: Int + ): Flow { + val ATTRIBUTE_ID: UInt = 76u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()) + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + UByteSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Numberofscheduletransitions attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UByte? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUByte(AnonymousTag) + } else { + null + } + + decodedValue?.let { emit(UByteSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(UByteSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readNumberOfScheduleTransitionPerDayAttribute(): + NumberOfScheduleTransitionPerDayAttribute { + val ATTRIBUTE_ID: UInt = 77u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { + "Numberofscheduletransitionperday attribute not found in response" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UByte? = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUByte(AnonymousTag) + } else { + null + } + } else { + tlvReader.getNull(AnonymousTag) + null + } + + return NumberOfScheduleTransitionPerDayAttribute(decodedValue) + } + + suspend fun subscribeNumberOfScheduleTransitionPerDayAttribute( + minInterval: Int, + maxInterval: Int + ): Flow { + val ATTRIBUTE_ID: UInt = 77u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()) + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + NumberOfScheduleTransitionPerDayAttributeSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Numberofscheduletransitionperday attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UByte? = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUByte(AnonymousTag) + } else { + null + } + } else { + tlvReader.getNull(AnonymousTag) + null + } + + decodedValue?.let { + emit(NumberOfScheduleTransitionPerDayAttributeSubscriptionState.Success(it)) + } + } + SubscriptionState.SubscriptionEstablished -> { + emit(NumberOfScheduleTransitionPerDayAttributeSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readActivePresetHandleAttribute(): ActivePresetHandleAttribute { + val ATTRIBUTE_ID: UInt = 78u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Activepresethandle attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: ByteArray? = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getByteArray(AnonymousTag) + } else { + null + } + } else { + tlvReader.getNull(AnonymousTag) + null + } + + return ActivePresetHandleAttribute(decodedValue) + } + + suspend fun subscribeActivePresetHandleAttribute( + minInterval: Int, + maxInterval: Int + ): Flow { + val ATTRIBUTE_ID: UInt = 78u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()) + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + ActivePresetHandleAttributeSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Activepresethandle attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: ByteArray? = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getByteArray(AnonymousTag) + } else { + null + } + } else { + tlvReader.getNull(AnonymousTag) + null + } + + decodedValue?.let { emit(ActivePresetHandleAttributeSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(ActivePresetHandleAttributeSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readActiveScheduleHandleAttribute(): ActiveScheduleHandleAttribute { + val ATTRIBUTE_ID: UInt = 79u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Activeschedulehandle attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: ByteArray? = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getByteArray(AnonymousTag) + } else { + null + } + } else { + tlvReader.getNull(AnonymousTag) + null + } + + return ActiveScheduleHandleAttribute(decodedValue) + } + + suspend fun subscribeActiveScheduleHandleAttribute( + minInterval: Int, + maxInterval: Int + ): Flow { + val ATTRIBUTE_ID: UInt = 79u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()) + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + ActiveScheduleHandleAttributeSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Activeschedulehandle attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: ByteArray? = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getByteArray(AnonymousTag) + } else { + null + } + } else { + tlvReader.getNull(AnonymousTag) + null + } + + decodedValue?.let { emit(ActiveScheduleHandleAttributeSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(ActiveScheduleHandleAttributeSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readPresetsAttribute(): PresetsAttribute { + val ATTRIBUTE_ID: UInt = 80u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Presets attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List? = + if (tlvReader.isNextTag(AnonymousTag)) { + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(ThermostatClusterPresetStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + } else { + null + } + + return PresetsAttribute(decodedValue) + } + + suspend fun writePresetsAttribute( + value: List, + timedWriteTimeout: Duration? = null + ) { + val ATTRIBUTE_ID: UInt = 80u + + val tlvWriter = TlvWriter() + tlvWriter.startArray(AnonymousTag) + for (item in value.iterator()) { + item.toTlv(AnonymousTag, tlvWriter) + } + tlvWriter.endArray() + + val writeRequests: WriteRequests = + WriteRequests( + requests = + listOf( + WriteRequest( + attributePath = + AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), + tlvPayload = tlvWriter.getEncoded() + ) + ), + timedRequest = timedWriteTimeout + ) + + val response: WriteResponse = controller.write(writeRequests) + + when (response) { + is WriteResponse.Success -> { + logger.log(Level.FINE, "Write command succeeded") + } + is WriteResponse.PartialWriteFailure -> { + val aggregatedErrorMessage = + response.failures.joinToString("\n") { failure -> + "Error at ${failure.attributePath}: ${failure.ex.message}" + } + + response.failures.forEach { failure -> + logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") + } + + throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") + } + } + } + + suspend fun subscribePresetsAttribute( + minInterval: Int, + maxInterval: Int + ): Flow { + val ATTRIBUTE_ID: UInt = 80u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()) + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + PresetsAttributeSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { "Presets attribute not found in Node State update" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List? = + if (tlvReader.isNextTag(AnonymousTag)) { + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(ThermostatClusterPresetStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + } else { + null + } + + decodedValue?.let { emit(PresetsAttributeSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(PresetsAttributeSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readSchedulesAttribute(): SchedulesAttribute { + val ATTRIBUTE_ID: UInt = 81u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Schedules attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List? = + if (tlvReader.isNextTag(AnonymousTag)) { + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(ThermostatClusterScheduleStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + } else { + null + } + + return SchedulesAttribute(decodedValue) + } + + suspend fun writeSchedulesAttribute( + value: List, + timedWriteTimeout: Duration? = null + ) { + val ATTRIBUTE_ID: UInt = 81u + + val tlvWriter = TlvWriter() + tlvWriter.startArray(AnonymousTag) + for (item in value.iterator()) { + item.toTlv(AnonymousTag, tlvWriter) + } + tlvWriter.endArray() + + val writeRequests: WriteRequests = + WriteRequests( + requests = + listOf( + WriteRequest( + attributePath = + AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), + tlvPayload = tlvWriter.getEncoded() + ) + ), + timedRequest = timedWriteTimeout + ) + + val response: WriteResponse = controller.write(writeRequests) + + when (response) { + is WriteResponse.Success -> { + logger.log(Level.FINE, "Write command succeeded") + } + is WriteResponse.PartialWriteFailure -> { + val aggregatedErrorMessage = + response.failures.joinToString("\n") { failure -> + "Error at ${failure.attributePath}: ${failure.ex.message}" + } + + response.failures.forEach { failure -> + logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") + } + + throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") + } + } + } + + suspend fun subscribeSchedulesAttribute( + minInterval: Int, + maxInterval: Int + ): Flow { + val ATTRIBUTE_ID: UInt = 81u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()) + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + SchedulesAttributeSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { "Schedules attribute not found in Node State update" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: List? = + if (tlvReader.isNextTag(AnonymousTag)) { + buildList { + tlvReader.enterArray(AnonymousTag) + while (!tlvReader.isEndOfContainer()) { + add(ThermostatClusterScheduleStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + } else { + null + } + + decodedValue?.let { emit(SchedulesAttributeSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(SchedulesAttributeSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readPresetsSchedulesEditableAttribute(): Boolean? { + val ATTRIBUTE_ID: UInt = 82u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Presetsscheduleseditable attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: Boolean? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getBoolean(AnonymousTag) + } else { + null + } + + return decodedValue + } + + suspend fun subscribePresetsSchedulesEditableAttribute( + minInterval: Int, + maxInterval: Int + ): Flow { + val ATTRIBUTE_ID: UInt = 82u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()) + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + BooleanSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Presetsscheduleseditable attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: Boolean? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getBoolean(AnonymousTag) + } else { + null + } + + decodedValue?.let { emit(BooleanSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(BooleanSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readTemperatureSetpointHoldPolicyAttribute(): UByte? { + val ATTRIBUTE_ID: UInt = 83u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { + "Temperaturesetpointholdpolicy attribute not found in response" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UByte? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUByte(AnonymousTag) + } else { + null + } + + return decodedValue + } + + suspend fun subscribeTemperatureSetpointHoldPolicyAttribute( + minInterval: Int, + maxInterval: Int + ): Flow { + val ATTRIBUTE_ID: UInt = 83u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()) + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + UByteSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Temperaturesetpointholdpolicy attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UByte? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUByte(AnonymousTag) + } else { + null + } + + decodedValue?.let { emit(UByteSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(UByteSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readSetpointHoldExpiryTimestampAttribute(): SetpointHoldExpiryTimestampAttribute { + val ATTRIBUTE_ID: UInt = 84u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Setpointholdexpirytimestamp attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UInt? = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUInt(AnonymousTag) + } else { + null + } + } else { + tlvReader.getNull(AnonymousTag) + null + } + + return SetpointHoldExpiryTimestampAttribute(decodedValue) + } + + suspend fun subscribeSetpointHoldExpiryTimestampAttribute( + minInterval: Int, + maxInterval: Int + ): Flow { + val ATTRIBUTE_ID: UInt = 84u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()) + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + SetpointHoldExpiryTimestampAttributeSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Setpointholdexpirytimestamp attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UInt? = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUInt(AnonymousTag) + } else { + null + } + } else { + tlvReader.getNull(AnonymousTag) + null + } + + decodedValue?.let { + emit(SetpointHoldExpiryTimestampAttributeSubscriptionState.Success(it)) + } + } + SubscriptionState.SubscriptionEstablished -> { + emit(SetpointHoldExpiryTimestampAttributeSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readQueuedPresetAttribute(): QueuedPresetAttribute { + val ATTRIBUTE_ID: UInt = 85u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Queuedpreset attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: ThermostatClusterQueuedPresetStruct? = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(AnonymousTag)) { + ThermostatClusterQueuedPresetStruct.fromTlv(AnonymousTag, tlvReader) + } else { + null + } + } else { + tlvReader.getNull(AnonymousTag) + null + } + + return QueuedPresetAttribute(decodedValue) + } + + suspend fun subscribeQueuedPresetAttribute( + minInterval: Int, + maxInterval: Int + ): Flow { + val ATTRIBUTE_ID: UInt = 85u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()) + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + QueuedPresetAttributeSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { "Queuedpreset attribute not found in Node State update" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: ThermostatClusterQueuedPresetStruct? = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(AnonymousTag)) { + ThermostatClusterQueuedPresetStruct.fromTlv(AnonymousTag, tlvReader) + } else { + null + } + } else { + tlvReader.getNull(AnonymousTag) + null + } + + decodedValue?.let { emit(QueuedPresetAttributeSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(QueuedPresetAttributeSubscriptionState.SubscriptionEstablished) + } + } + } + } + suspend fun readGeneratedCommandListAttribute(): GeneratedCommandListAttribute { val ATTRIBUTE_ID: UInt = 65528u 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 2ebed3b24f6c2c..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,11 +99,17 @@ 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", + "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ThermostatClusterPresetTypeStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ThermostatClusterQueuedPresetStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ThermostatClusterScheduleStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ThermostatClusterScheduleTransitionStruct.kt", + "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ThermostatClusterScheduleTypeStruct.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ThermostatClusterWeeklyScheduleTransitionStruct.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ThreadNetworkDiagnosticsClusterNeighborTableStruct.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/structs/ThreadNetworkDiagnosticsClusterOperationalDatasetComponents.kt", @@ -292,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/generated/java/matter/controller/cluster/structs/ThermostatClusterPresetStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/ThermostatClusterPresetStruct.kt new file mode 100644 index 00000000000000..498a7a1ee039f9 --- /dev/null +++ b/src/controller/java/generated/java/matter/controller/cluster/structs/ThermostatClusterPresetStruct.kt @@ -0,0 +1,140 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.controller.cluster.structs + +import java.util.Optional +import matter.controller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ThermostatClusterPresetStruct( + val presetHandle: ByteArray?, + val presetScenario: UByte, + val name: Optional?, + val coolingSetpoint: Optional, + val heatingSetpoint: Optional, + val builtIn: Boolean? +) { + override fun toString(): String = buildString { + append("ThermostatClusterPresetStruct {\n") + append("\tpresetHandle : $presetHandle\n") + append("\tpresetScenario : $presetScenario\n") + append("\tname : $name\n") + append("\tcoolingSetpoint : $coolingSetpoint\n") + append("\theatingSetpoint : $heatingSetpoint\n") + append("\tbuiltIn : $builtIn\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + if (presetHandle != null) { + put(ContextSpecificTag(TAG_PRESET_HANDLE), presetHandle) + } else { + putNull(ContextSpecificTag(TAG_PRESET_HANDLE)) + } + put(ContextSpecificTag(TAG_PRESET_SCENARIO), presetScenario) + if (name != null) { + if (name.isPresent) { + val optname = name.get() + put(ContextSpecificTag(TAG_NAME), optname) + } + } else { + putNull(ContextSpecificTag(TAG_NAME)) + } + if (coolingSetpoint.isPresent) { + val optcoolingSetpoint = coolingSetpoint.get() + put(ContextSpecificTag(TAG_COOLING_SETPOINT), optcoolingSetpoint) + } + if (heatingSetpoint.isPresent) { + val optheatingSetpoint = heatingSetpoint.get() + put(ContextSpecificTag(TAG_HEATING_SETPOINT), optheatingSetpoint) + } + if (builtIn != null) { + put(ContextSpecificTag(TAG_BUILT_IN), builtIn) + } else { + putNull(ContextSpecificTag(TAG_BUILT_IN)) + } + endStructure() + } + } + + companion object { + private const val TAG_PRESET_HANDLE = 0 + private const val TAG_PRESET_SCENARIO = 1 + private const val TAG_NAME = 2 + private const val TAG_COOLING_SETPOINT = 3 + private const val TAG_HEATING_SETPOINT = 4 + private const val TAG_BUILT_IN = 5 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ThermostatClusterPresetStruct { + tlvReader.enterStructure(tlvTag) + val presetHandle = + if (!tlvReader.isNull()) { + tlvReader.getByteArray(ContextSpecificTag(TAG_PRESET_HANDLE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PRESET_HANDLE)) + null + } + val presetScenario = tlvReader.getUByte(ContextSpecificTag(TAG_PRESET_SCENARIO)) + val name = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_NAME)) + null + } + val coolingSetpoint = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_COOLING_SETPOINT))) { + Optional.of(tlvReader.getShort(ContextSpecificTag(TAG_COOLING_SETPOINT))) + } else { + Optional.empty() + } + val heatingSetpoint = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_HEATING_SETPOINT))) { + Optional.of(tlvReader.getShort(ContextSpecificTag(TAG_HEATING_SETPOINT))) + } else { + Optional.empty() + } + val builtIn = + if (!tlvReader.isNull()) { + tlvReader.getBoolean(ContextSpecificTag(TAG_BUILT_IN)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_BUILT_IN)) + null + } + + tlvReader.exitContainer() + + return ThermostatClusterPresetStruct( + presetHandle, + presetScenario, + name, + coolingSetpoint, + heatingSetpoint, + builtIn + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/ThermostatClusterPresetTypeStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/ThermostatClusterPresetTypeStruct.kt new file mode 100644 index 00000000000000..d33ca6f93fdd6b --- /dev/null +++ b/src/controller/java/generated/java/matter/controller/cluster/structs/ThermostatClusterPresetTypeStruct.kt @@ -0,0 +1,64 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.controller.cluster.structs + +import matter.controller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ThermostatClusterPresetTypeStruct( + val presetScenario: UByte, + val numberOfPresets: UByte, + val presetTypeFeatures: UShort +) { + override fun toString(): String = buildString { + append("ThermostatClusterPresetTypeStruct {\n") + append("\tpresetScenario : $presetScenario\n") + append("\tnumberOfPresets : $numberOfPresets\n") + append("\tpresetTypeFeatures : $presetTypeFeatures\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_PRESET_SCENARIO), presetScenario) + put(ContextSpecificTag(TAG_NUMBER_OF_PRESETS), numberOfPresets) + put(ContextSpecificTag(TAG_PRESET_TYPE_FEATURES), presetTypeFeatures) + endStructure() + } + } + + companion object { + private const val TAG_PRESET_SCENARIO = 0 + private const val TAG_NUMBER_OF_PRESETS = 1 + private const val TAG_PRESET_TYPE_FEATURES = 2 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ThermostatClusterPresetTypeStruct { + tlvReader.enterStructure(tlvTag) + val presetScenario = tlvReader.getUByte(ContextSpecificTag(TAG_PRESET_SCENARIO)) + val numberOfPresets = tlvReader.getUByte(ContextSpecificTag(TAG_NUMBER_OF_PRESETS)) + val presetTypeFeatures = tlvReader.getUShort(ContextSpecificTag(TAG_PRESET_TYPE_FEATURES)) + + tlvReader.exitContainer() + + return ThermostatClusterPresetTypeStruct(presetScenario, numberOfPresets, presetTypeFeatures) + } + } +} diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/ThermostatClusterQueuedPresetStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/ThermostatClusterQueuedPresetStruct.kt new file mode 100644 index 00000000000000..80a2e263806dda --- /dev/null +++ b/src/controller/java/generated/java/matter/controller/cluster/structs/ThermostatClusterQueuedPresetStruct.kt @@ -0,0 +1,79 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.controller.cluster.structs + +import matter.controller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ThermostatClusterQueuedPresetStruct( + val presetHandle: ByteArray?, + val transitionTimestamp: UInt? +) { + override fun toString(): String = buildString { + append("ThermostatClusterQueuedPresetStruct {\n") + append("\tpresetHandle : $presetHandle\n") + append("\ttransitionTimestamp : $transitionTimestamp\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + if (presetHandle != null) { + put(ContextSpecificTag(TAG_PRESET_HANDLE), presetHandle) + } else { + putNull(ContextSpecificTag(TAG_PRESET_HANDLE)) + } + if (transitionTimestamp != null) { + put(ContextSpecificTag(TAG_TRANSITION_TIMESTAMP), transitionTimestamp) + } else { + putNull(ContextSpecificTag(TAG_TRANSITION_TIMESTAMP)) + } + endStructure() + } + } + + companion object { + private const val TAG_PRESET_HANDLE = 0 + private const val TAG_TRANSITION_TIMESTAMP = 1 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ThermostatClusterQueuedPresetStruct { + tlvReader.enterStructure(tlvTag) + val presetHandle = + if (!tlvReader.isNull()) { + tlvReader.getByteArray(ContextSpecificTag(TAG_PRESET_HANDLE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_PRESET_HANDLE)) + null + } + val transitionTimestamp = + if (!tlvReader.isNull()) { + tlvReader.getUInt(ContextSpecificTag(TAG_TRANSITION_TIMESTAMP)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_TRANSITION_TIMESTAMP)) + null + } + + tlvReader.exitContainer() + + return ThermostatClusterQueuedPresetStruct(presetHandle, transitionTimestamp) + } + } +} diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/ThermostatClusterScheduleStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/ThermostatClusterScheduleStruct.kt new file mode 100644 index 00000000000000..25b8ff012cf7bc --- /dev/null +++ b/src/controller/java/generated/java/matter/controller/cluster/structs/ThermostatClusterScheduleStruct.kt @@ -0,0 +1,142 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.controller.cluster.structs + +import java.util.Optional +import matter.controller.cluster.* +import matter.tlv.AnonymousTag +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ThermostatClusterScheduleStruct( + val scheduleHandle: ByteArray?, + val systemMode: UByte, + val name: Optional, + val presetHandle: Optional, + val transitions: List, + val builtIn: Optional? +) { + override fun toString(): String = buildString { + append("ThermostatClusterScheduleStruct {\n") + append("\tscheduleHandle : $scheduleHandle\n") + append("\tsystemMode : $systemMode\n") + append("\tname : $name\n") + append("\tpresetHandle : $presetHandle\n") + append("\ttransitions : $transitions\n") + append("\tbuiltIn : $builtIn\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + if (scheduleHandle != null) { + put(ContextSpecificTag(TAG_SCHEDULE_HANDLE), scheduleHandle) + } else { + putNull(ContextSpecificTag(TAG_SCHEDULE_HANDLE)) + } + put(ContextSpecificTag(TAG_SYSTEM_MODE), systemMode) + if (name.isPresent) { + val optname = name.get() + put(ContextSpecificTag(TAG_NAME), optname) + } + if (presetHandle.isPresent) { + val optpresetHandle = presetHandle.get() + put(ContextSpecificTag(TAG_PRESET_HANDLE), optpresetHandle) + } + startArray(ContextSpecificTag(TAG_TRANSITIONS)) + for (item in transitions.iterator()) { + item.toTlv(AnonymousTag, this) + } + endArray() + if (builtIn != null) { + if (builtIn.isPresent) { + val optbuiltIn = builtIn.get() + put(ContextSpecificTag(TAG_BUILT_IN), optbuiltIn) + } + } else { + putNull(ContextSpecificTag(TAG_BUILT_IN)) + } + endStructure() + } + } + + companion object { + private const val TAG_SCHEDULE_HANDLE = 0 + private const val TAG_SYSTEM_MODE = 1 + private const val TAG_NAME = 2 + private const val TAG_PRESET_HANDLE = 3 + private const val TAG_TRANSITIONS = 4 + private const val TAG_BUILT_IN = 5 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ThermostatClusterScheduleStruct { + tlvReader.enterStructure(tlvTag) + val scheduleHandle = + if (!tlvReader.isNull()) { + tlvReader.getByteArray(ContextSpecificTag(TAG_SCHEDULE_HANDLE)) + } else { + tlvReader.getNull(ContextSpecificTag(TAG_SCHEDULE_HANDLE)) + null + } + val systemMode = tlvReader.getUByte(ContextSpecificTag(TAG_SYSTEM_MODE)) + val name = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_NAME))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_NAME))) + } else { + Optional.empty() + } + val presetHandle = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_PRESET_HANDLE))) { + Optional.of(tlvReader.getByteArray(ContextSpecificTag(TAG_PRESET_HANDLE))) + } else { + Optional.empty() + } + val transitions = + buildList { + tlvReader.enterArray(ContextSpecificTag(TAG_TRANSITIONS)) + while (!tlvReader.isEndOfContainer()) { + add(ThermostatClusterScheduleTransitionStruct.fromTlv(AnonymousTag, tlvReader)) + } + tlvReader.exitContainer() + } + val builtIn = + if (!tlvReader.isNull()) { + if (tlvReader.isNextTag(ContextSpecificTag(TAG_BUILT_IN))) { + Optional.of(tlvReader.getBoolean(ContextSpecificTag(TAG_BUILT_IN))) + } else { + Optional.empty() + } + } else { + tlvReader.getNull(ContextSpecificTag(TAG_BUILT_IN)) + null + } + + tlvReader.exitContainer() + + return ThermostatClusterScheduleStruct( + scheduleHandle, + systemMode, + name, + presetHandle, + transitions, + builtIn + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/ThermostatClusterScheduleTransitionStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/ThermostatClusterScheduleTransitionStruct.kt new file mode 100644 index 00000000000000..bd9e4b6e3ca842 --- /dev/null +++ b/src/controller/java/generated/java/matter/controller/cluster/structs/ThermostatClusterScheduleTransitionStruct.kt @@ -0,0 +1,119 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.controller.cluster.structs + +import java.util.Optional +import matter.controller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ThermostatClusterScheduleTransitionStruct( + val dayOfWeek: UByte, + val transitionTime: UShort, + val presetHandle: Optional, + val systemMode: Optional, + val coolingSetpoint: Optional, + val heatingSetpoint: Optional +) { + override fun toString(): String = buildString { + append("ThermostatClusterScheduleTransitionStruct {\n") + append("\tdayOfWeek : $dayOfWeek\n") + append("\ttransitionTime : $transitionTime\n") + append("\tpresetHandle : $presetHandle\n") + append("\tsystemMode : $systemMode\n") + append("\tcoolingSetpoint : $coolingSetpoint\n") + append("\theatingSetpoint : $heatingSetpoint\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_DAY_OF_WEEK), dayOfWeek) + put(ContextSpecificTag(TAG_TRANSITION_TIME), transitionTime) + if (presetHandle.isPresent) { + val optpresetHandle = presetHandle.get() + put(ContextSpecificTag(TAG_PRESET_HANDLE), optpresetHandle) + } + if (systemMode.isPresent) { + val optsystemMode = systemMode.get() + put(ContextSpecificTag(TAG_SYSTEM_MODE), optsystemMode) + } + if (coolingSetpoint.isPresent) { + val optcoolingSetpoint = coolingSetpoint.get() + put(ContextSpecificTag(TAG_COOLING_SETPOINT), optcoolingSetpoint) + } + if (heatingSetpoint.isPresent) { + val optheatingSetpoint = heatingSetpoint.get() + put(ContextSpecificTag(TAG_HEATING_SETPOINT), optheatingSetpoint) + } + endStructure() + } + } + + companion object { + private const val TAG_DAY_OF_WEEK = 0 + private const val TAG_TRANSITION_TIME = 1 + private const val TAG_PRESET_HANDLE = 2 + private const val TAG_SYSTEM_MODE = 3 + private const val TAG_COOLING_SETPOINT = 4 + private const val TAG_HEATING_SETPOINT = 5 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ThermostatClusterScheduleTransitionStruct { + tlvReader.enterStructure(tlvTag) + val dayOfWeek = tlvReader.getUByte(ContextSpecificTag(TAG_DAY_OF_WEEK)) + val transitionTime = tlvReader.getUShort(ContextSpecificTag(TAG_TRANSITION_TIME)) + val presetHandle = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_PRESET_HANDLE))) { + Optional.of(tlvReader.getByteArray(ContextSpecificTag(TAG_PRESET_HANDLE))) + } else { + Optional.empty() + } + val systemMode = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_SYSTEM_MODE))) { + Optional.of(tlvReader.getUByte(ContextSpecificTag(TAG_SYSTEM_MODE))) + } else { + Optional.empty() + } + val coolingSetpoint = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_COOLING_SETPOINT))) { + Optional.of(tlvReader.getShort(ContextSpecificTag(TAG_COOLING_SETPOINT))) + } else { + Optional.empty() + } + val heatingSetpoint = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_HEATING_SETPOINT))) { + Optional.of(tlvReader.getShort(ContextSpecificTag(TAG_HEATING_SETPOINT))) + } else { + Optional.empty() + } + + tlvReader.exitContainer() + + return ThermostatClusterScheduleTransitionStruct( + dayOfWeek, + transitionTime, + presetHandle, + systemMode, + coolingSetpoint, + heatingSetpoint + ) + } + } +} diff --git a/src/controller/java/generated/java/matter/controller/cluster/structs/ThermostatClusterScheduleTypeStruct.kt b/src/controller/java/generated/java/matter/controller/cluster/structs/ThermostatClusterScheduleTypeStruct.kt new file mode 100644 index 00000000000000..91135f990547ff --- /dev/null +++ b/src/controller/java/generated/java/matter/controller/cluster/structs/ThermostatClusterScheduleTypeStruct.kt @@ -0,0 +1,68 @@ +/* + * + * Copyright (c) 2023 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package matter.controller.cluster.structs + +import matter.controller.cluster.* +import matter.tlv.ContextSpecificTag +import matter.tlv.Tag +import matter.tlv.TlvReader +import matter.tlv.TlvWriter + +class ThermostatClusterScheduleTypeStruct( + val systemMode: UByte, + val numberOfSchedules: UByte, + val scheduleTypeFeatures: UShort +) { + override fun toString(): String = buildString { + append("ThermostatClusterScheduleTypeStruct {\n") + append("\tsystemMode : $systemMode\n") + append("\tnumberOfSchedules : $numberOfSchedules\n") + append("\tscheduleTypeFeatures : $scheduleTypeFeatures\n") + append("}\n") + } + + fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { + tlvWriter.apply { + startStructure(tlvTag) + put(ContextSpecificTag(TAG_SYSTEM_MODE), systemMode) + put(ContextSpecificTag(TAG_NUMBER_OF_SCHEDULES), numberOfSchedules) + put(ContextSpecificTag(TAG_SCHEDULE_TYPE_FEATURES), scheduleTypeFeatures) + endStructure() + } + } + + companion object { + private const val TAG_SYSTEM_MODE = 0 + private const val TAG_NUMBER_OF_SCHEDULES = 1 + private const val TAG_SCHEDULE_TYPE_FEATURES = 2 + + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): ThermostatClusterScheduleTypeStruct { + tlvReader.enterStructure(tlvTag) + val systemMode = tlvReader.getUByte(ContextSpecificTag(TAG_SYSTEM_MODE)) + val numberOfSchedules = tlvReader.getUByte(ContextSpecificTag(TAG_NUMBER_OF_SCHEDULES)) + val scheduleTypeFeatures = tlvReader.getUShort(ContextSpecificTag(TAG_SCHEDULE_TYPE_FEATURES)) + + tlvReader.exitContainer() + + return ThermostatClusterScheduleTypeStruct( + systemMode, + numberOfSchedules, + scheduleTypeFeatures + ) + } + } +} diff --git a/src/controller/java/src/matter/onboardingpayload/OnboardingPayload.kt b/src/controller/java/src/matter/onboardingpayload/OnboardingPayload.kt index 6eb71d166e053a..f00b2cbef8ed54 100644 --- a/src/controller/java/src/matter/onboardingpayload/OnboardingPayload.kt +++ b/src/controller/java/src/matter/onboardingpayload/OnboardingPayload.kt @@ -115,15 +115,9 @@ class OnboardingPayload( */ var setupPinCode: Long = 0 ) { - var optionalQRCodeInfo: HashMap - private val optionalVendorData: HashMap - private val optionalExtensionData: HashMap - - init { - optionalQRCodeInfo = HashMap() - optionalVendorData = HashMap() - optionalExtensionData = HashMap() - } + var optionalQRCodeInfo: HashMap = HashMap() + private val optionalVendorData: HashMap = HashMap() + private val optionalExtensionData: HashMap = HashMap() constructor( version: Int, @@ -325,7 +319,7 @@ class OnboardingPayload( val info = OptionalQRCodeInfoExtension() info.tag = kSerialNumberTag info.type = OptionalQRCodeInfoType.TYPE_UINT32 - info.uint32 = serialNumber.toLong() + info.uint32 = serialNumber.toUInt() addOptionalExtensionData(info) } diff --git a/src/controller/java/src/matter/onboardingpayload/OptionalQRCodeInfo.kt b/src/controller/java/src/matter/onboardingpayload/OptionalQRCodeInfo.kt index 4bd203f9f5d14f..742c016d9507cd 100644 --- a/src/controller/java/src/matter/onboardingpayload/OptionalQRCodeInfo.kt +++ b/src/controller/java/src/matter/onboardingpayload/OptionalQRCodeInfo.kt @@ -31,10 +31,54 @@ open class OptionalQRCodeInfo { var type: OptionalQRCodeInfoType = OptionalQRCodeInfoType.TYPE_UNKNOWN var data: String? = null var int32: Int = 0 + + override fun equals(other: Any?): Boolean { + if (this === other) return true + if (other !is OptionalQRCodeInfo) return false + + return tag == other.tag && type == other.type && data == other.data && int32 == other.int32 + } + + override fun hashCode(): Int { + var result = tag + result = 31 * result + type.hashCode() + result = 31 * result + (data?.hashCode() ?: 0) + result = 31 * result + int32 + return result + } } class OptionalQRCodeInfoExtension : OptionalQRCodeInfo() { var int64: Long = 0 - var uint32: Long = 0 - var uint64: Long = 0 + var uint32: UInt = 0u + var uint64: ULong = 0u + + override fun equals(other: Any?): Boolean { + if (this === other) return true + if (javaClass != other?.javaClass) return false + if (!super.equals(other)) return false + if (other !is OptionalQRCodeInfoExtension) return false + + return int64 == other.int64 && uint32 == other.uint32 && uint64 == other.uint64 + } + + override fun toString(): String { + return "OptionalQRCodeInfoExtension(" + + "tag=$tag, " + + "type=$type, " + + "data=$data, " + + "int32=$int32, " + + "int64=$int64, " + + "uint32=$uint32, " + + "uint64=$uint64" + + ")" + } + + override fun hashCode(): Int { + var result = super.hashCode() + result = 31 * result + int64.hashCode() + result = 31 * result + uint32.hashCode() + result = 31 * result + uint64.hashCode() + return result + } } diff --git a/src/controller/java/src/matter/onboardingpayload/QRCodeOnboardingPayloadParser.kt b/src/controller/java/src/matter/onboardingpayload/QRCodeOnboardingPayloadParser.kt index 88350e343ae072..86b8040a52c33b 100644 --- a/src/controller/java/src/matter/onboardingpayload/QRCodeOnboardingPayloadParser.kt +++ b/src/controller/java/src/matter/onboardingpayload/QRCodeOnboardingPayloadParser.kt @@ -17,23 +17,30 @@ package matter.onboardingpayload +import java.nio.ByteBuffer import java.util.concurrent.atomic.AtomicInteger +import matter.tlv.ContextSpecificTag +import matter.tlv.Element +import matter.tlv.IntValue +import matter.tlv.TlvReader +import matter.tlv.Utf8StringValue /** * @class QRCodeOnboardingPayloadParser A class that can be used to convert a base38 encoded payload * to a OnboardingPayload object */ class QRCodeOnboardingPayloadParser(private val mBase38Representation: String) { + fun populatePayload(): OnboardingPayload { - var indexToReadFrom: AtomicInteger = AtomicInteger(0) - var outPayload: OnboardingPayload = OnboardingPayload() + val indexToReadFrom = AtomicInteger(0) + val outPayload = OnboardingPayload() val payload = extractPayload(mBase38Representation) - if (payload.length == 0) { + if (payload.isEmpty()) { throw UnrecognizedQrCodeException("Invalid argument") } - var buf = base38Decode(payload) + val buf = base38Decode(payload) var dest = readBits(buf, indexToReadFrom, kVersionFieldLengthInBits) outPayload.version = dest.toInt() @@ -60,11 +67,67 @@ class QRCodeOnboardingPayloadParser(private val mBase38Representation: String) { throw UnrecognizedQrCodeException("Invalid argument") } - // TODO: populate TLV optional fields + populateTLV(outPayload, buf, indexToReadFrom) return outPayload } + private fun populateTLV( + payload: OnboardingPayload, + payloadData: ArrayList, + index: AtomicInteger + ) { + val bitsLeftToRead = (payloadData.count() * 8) - index.get() + val tlvBytesLength = (bitsLeftToRead + 7) / 8 + + if (tlvBytesLength == 0) { + return + } + val byteBuffer = ByteBuffer.allocate(tlvBytesLength) + repeat(tlvBytesLength) { + val value = readBits(payloadData, index, 8) + byteBuffer.put(value.toByte()) + } + + val reader = TlvReader(byteBuffer.array()) + while (true) { + val element = reader.nextElement() + if (reader.isEndOfTlv()) { + break + } + parseTLVFields(element, payload) + } + } + + private fun parseTLVFields(element: Element, payload: OnboardingPayload) { + // update tag + val tag = element.tag + if (tag !is ContextSpecificTag) { + return + } + + if (tag.tagNumber < 0x80) { + // add serial number + if (tag.tagNumber == kSerialNumberTag) { + val value = element.value + if (value is IntValue) { + payload.addSerialNumber(value.value.toInt()) + } + if (value is Utf8StringValue) { + payload.addSerialNumber(value.value) + } + } + } else { + // add extension values + val value = element.value + if (value is IntValue) { + payload.addOptionalVendorData(tag.tagNumber, value.value.toInt()) + } else if (value is Utf8StringValue) { + payload.addOptionalVendorData(tag.tagNumber, value.value) + } + } + } + companion object { // Populate numberOfBits into dest from buf starting at startIndex fun readBits(buf: ArrayList, index: AtomicInteger, numberOfBitsToRead: Int): Long { diff --git a/src/controller/java/tests/matter/onboardingpayload/QRCodeTest.kt b/src/controller/java/tests/matter/onboardingpayload/QRCodeTest.kt index b97725c5c3946f..62dff45174b7ed 100644 --- a/src/controller/java/tests/matter/onboardingpayload/QRCodeTest.kt +++ b/src/controller/java/tests/matter/onboardingpayload/QRCodeTest.kt @@ -363,6 +363,56 @@ class QRCodeTest { .isEqualTo("MT:W0GU2OTB00KA0648G00") } + /* + * Test QRCode with optional data + * + * matches iOS test + * https://github.com/project-chip/connectedhomeip/blob/927962863180270091c1694d4b1ce2e9ea16b8b5/src/darwin/Framework/CHIPTests/MTRSetupPayloadParserTests.m#L155 + */ + @Test + fun testQRCodeWithOptionalData() { + val payload = + OnboardingPayload( + discriminator = 128, + setupPinCode = 2048, + version = 0, + vendorId = 12, + productId = 1, + commissioningFlow = CommissioningFlow.STANDARD.value, + discoveryCapabilities = mutableSetOf(DiscoveryCapability.SOFT_AP), + ) + val parsedQrCode = + OnboardingPayloadParser() + .parseQrCode("MT:M5L90MP500K64J0A33P0SET70" + ".QT52B.E23-WZE0WISA0DK5N1K8SQ1RYCU1O0") + assertThat(parsedQrCode).isEqualTo(payload) + + var optionalQRCodeInfo = OptionalQRCodeInfoExtension() + // Test 1st optional field + optionalQRCodeInfo.tag = 0 + optionalQRCodeInfo.type = OptionalQRCodeInfoType.TYPE_STRING + optionalQRCodeInfo.data = "123456789" + + assertThat(parsedQrCode.getAllOptionalExtensionData()[0]).isEqualTo(optionalQRCodeInfo) + // verify we can grab just the serial number as well + assertThat(parsedQrCode.getSerialNumber()).isEqualTo("123456789") + + // Test 2nd optional field + optionalQRCodeInfo = OptionalQRCodeInfoExtension() + optionalQRCodeInfo.tag = 130 + optionalQRCodeInfo.type = OptionalQRCodeInfoType.TYPE_STRING + optionalQRCodeInfo.data = "myData" + + assertThat(parsedQrCode.getAllOptionalVendorData()[0]).isEqualTo(optionalQRCodeInfo) + + // Test 3rd optional field + optionalQRCodeInfo = OptionalQRCodeInfoExtension() + optionalQRCodeInfo.tag = 131 + optionalQRCodeInfo.type = OptionalQRCodeInfoType.TYPE_INT32 + optionalQRCodeInfo.int32 = 12 + + assertThat(parsedQrCode.getAllOptionalVendorData()[1]).isEqualTo(optionalQRCodeInfo) + } + companion object { const val kDefaultPayloadQRCode: String = "MT:M5L90MP500K64J00000" } diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index 58fb6a4bdd6646..58910928212ab4 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) @@ -17472,6 +17124,22 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jnivalue, value); return value; } + case Attributes::MaxCookTime::Id: { + using TypeInfo = Attributes::MaxCookTime::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::PowerSetting::Id: { using TypeInfo = Attributes::PowerSetting::TypeInfo; TypeInfo::DecodableType cppValue; @@ -17536,6 +17204,63 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } + case Attributes::SupportedWatts::Id: { + using TypeInfo = Attributes::SupportedWatts::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/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(value, newElement_0); + } + return value; + } + case Attributes::SelectedWattIndex::Id: { + using TypeInfo = Attributes::SelectedWattIndex::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::WattRating::Id: { + using TypeInfo = Attributes::WattRating::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; @@ -18392,12 +18117,12 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } - case app::Clusters::HepaFilterMonitoring::Id: { - using namespace app::Clusters::HepaFilterMonitoring; + case app::Clusters::ScenesManagement::Id: { + using namespace app::Clusters::ScenesManagement; switch (aPath.mAttributeId) { - case Attributes::Condition::Id: { - using TypeInfo = Attributes::Condition::TypeInfo; + case Attributes::SceneCount::Id: { + using TypeInfo = Attributes::SceneCount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -18412,8 +18137,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::DegradationDirection::Id: { - using TypeInfo = Attributes::DegradationDirection::TypeInfo; + case Attributes::CurrentScene::Id: { + using TypeInfo = Attributes::CurrentScene::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -18428,8 +18153,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::ChangeIndication::Id: { - using TypeInfo = Attributes::ChangeIndication::TypeInfo; + case Attributes::CurrentGroup::Id: { + using TypeInfo = Attributes::CurrentGroup::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -18444,8 +18169,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::InPlaceIndicator::Id: { - using TypeInfo = Attributes::InPlaceIndicator::TypeInfo; + case Attributes::SceneValid::Id: { + using TypeInfo = Attributes::SceneValid::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -18460,8 +18185,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jnivalue, value); return value; } - case Attributes::LastChangedTime::Id: { - using TypeInfo = Attributes::LastChangedTime::TypeInfo; + case Attributes::NameSupport::Id: { + using TypeInfo = Attributes::NameSupport::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -18469,12 +18194,28 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR 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.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()); @@ -18483,8 +18224,24 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::ReplacementProductList::Id: { - using TypeInfo = Attributes::ReplacementProductList::TypeInfo; + 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) @@ -18499,39 +18256,73 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { auto & entry_0 = iter_value_0.GetValue(); jobject newElement_0; - jobject newElement_0_productIdentifierType; - std::string newElement_0_productIdentifierTypeClassName = "java/lang/Integer"; - std::string newElement_0_productIdentifierTypeCtorSignature = "(I)V"; - jint jninewElement_0_productIdentifierType = static_cast(entry_0.productIdentifierType); + 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_productIdentifierTypeClassName.c_str(), newElement_0_productIdentifierTypeCtorSignature.c_str(), - jninewElement_0_productIdentifierType, newElement_0_productIdentifierType); - jobject newElement_0_productIdentifierValue; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.productIdentifierValue, - newElement_0_productIdentifierValue)); + 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 replacementProductStructStructClass_1; + jclass sceneInfoStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$HepaFilterMonitoringClusterReplacementProductStruct", - replacementProductStructStructClass_1); + env, "chip/devicecontroller/ChipStructs$ScenesManagementClusterSceneInfoStruct", sceneInfoStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$HepaFilterMonitoringClusterReplacementProductStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$ScenesManagementClusterSceneInfoStruct"); return nullptr; } - jmethodID replacementProductStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, replacementProductStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/String;)V", - &replacementProductStructStructCtor_1); - if (err != CHIP_NO_ERROR || replacementProductStructStructCtor_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$HepaFilterMonitoringClusterReplacementProductStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$ScenesManagementClusterSceneInfoStruct constructor"); return nullptr; } - newElement_0 = env->NewObject(replacementProductStructStructClass_1, replacementProductStructStructCtor_1, - newElement_0_productIdentifierType, newElement_0_productIdentifierValue); + 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; @@ -18674,8 +18465,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } - case app::Clusters::ActivatedCarbonFilterMonitoring::Id: { - using namespace app::Clusters::ActivatedCarbonFilterMonitoring; + case app::Clusters::HepaFilterMonitoring::Id: { + using namespace app::Clusters::HepaFilterMonitoring; switch (aPath.mAttributeId) { case Attributes::Condition::Id: { @@ -18794,12 +18585,11 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jclass replacementProductStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ActivatedCarbonFilterMonitoringClusterReplacementProductStruct", + env, "chip/devicecontroller/ChipStructs$HepaFilterMonitoringClusterReplacementProductStruct", replacementProductStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, - "Could not find class ChipStructs$ActivatedCarbonFilterMonitoringClusterReplacementProductStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$HepaFilterMonitoringClusterReplacementProductStruct"); return nullptr; } @@ -18809,9 +18599,7 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR &replacementProductStructStructCtor_1); if (err != CHIP_NO_ERROR || replacementProductStructStructCtor_1 == nullptr) { - ChipLogError( - Zcl, - "Could not find ChipStructs$ActivatedCarbonFilterMonitoringClusterReplacementProductStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$HepaFilterMonitoringClusterReplacementProductStruct constructor"); return nullptr; } @@ -18959,12 +18747,12 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } - case app::Clusters::BooleanStateConfiguration::Id: { - using namespace app::Clusters::BooleanStateConfiguration; + case app::Clusters::ActivatedCarbonFilterMonitoring::Id: { + using namespace app::Clusters::ActivatedCarbonFilterMonitoring; switch (aPath.mAttributeId) { - case Attributes::CurrentSensitivityLevel::Id: { - using TypeInfo = Attributes::CurrentSensitivityLevel::TypeInfo; + case Attributes::Condition::Id: { + using TypeInfo = Attributes::Condition::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -18979,8 +18767,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::SupportedSensitivityLevels::Id: { - using TypeInfo = Attributes::SupportedSensitivityLevels::TypeInfo; + case Attributes::DegradationDirection::Id: { + using TypeInfo = Attributes::DegradationDirection::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -18995,8 +18783,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::DefaultSensitivityLevel::Id: { - using TypeInfo = Attributes::DefaultSensitivityLevel::TypeInfo; + case Attributes::ChangeIndication::Id: { + using TypeInfo = Attributes::ChangeIndication::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -19011,24 +18799,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::AlarmsActive::Id: { - using TypeInfo = Attributes::AlarmsActive::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::AlarmsSuppressed::Id: { - using TypeInfo = Attributes::AlarmsSuppressed::TypeInfo; + case Attributes::InPlaceIndicator::Id: { + using TypeInfo = Attributes::InPlaceIndicator::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -19036,15 +18808,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.Raw()); - 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::AlarmsEnabled::Id: { - using TypeInfo = Attributes::AlarmsEnabled::TypeInfo; + case Attributes::LastChangedTime::Id: { + using TypeInfo = Attributes::LastChangedTime::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -19052,47 +18824,22 @@ 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.Raw()); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); - return value; - } - case Attributes::AlarmsSupported::Id: { - using TypeInfo = Attributes::AlarmsSupported::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) + if (cppValue.IsNull()) { - return nullptr; + value = 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::SensorFault::Id: { - using TypeInfo = Attributes::SensorFault::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) + else { - return nullptr; + 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); } - 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::GeneratedCommandList::Id: { - using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; + case Attributes::ReplacementProductList::Id: { + using TypeInfo = Attributes::ReplacementProductList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -19107,30 +18854,86 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR { 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); + jobject newElement_0_productIdentifierType; + std::string newElement_0_productIdentifierTypeClassName = "java/lang/Integer"; + std::string newElement_0_productIdentifierTypeCtorSignature = "(I)V"; + jint jninewElement_0_productIdentifierType = static_cast(entry_0.productIdentifierType); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_productIdentifierTypeClassName.c_str(), newElement_0_productIdentifierTypeCtorSignature.c_str(), + jninewElement_0_productIdentifierType, newElement_0_productIdentifierType); + jobject newElement_0_productIdentifierValue; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.productIdentifierValue, + newElement_0_productIdentifierValue)); - auto iter_value_0 = cppValue.begin(); - while (iter_value_0.Next()) - { - auto & entry_0 = iter_value_0.GetValue(); + jclass replacementProductStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ActivatedCarbonFilterMonitoringClusterReplacementProductStruct", + replacementProductStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, + "Could not find class ChipStructs$ActivatedCarbonFilterMonitoringClusterReplacementProductStruct"); + return nullptr; + } + + jmethodID replacementProductStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, replacementProductStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/String;)V", + &replacementProductStructStructCtor_1); + if (err != CHIP_NO_ERROR || replacementProductStructStructCtor_1 == nullptr) + { + ChipLogError( + Zcl, + "Could not find ChipStructs$ActivatedCarbonFilterMonitoringClusterReplacementProductStruct constructor"); + return nullptr; + } + + newElement_0 = env->NewObject(replacementProductStructStructClass_1, replacementProductStructStructCtor_1, + newElement_0_productIdentifierType, newElement_0_productIdentifierValue); + 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"; @@ -19229,35 +19032,12 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } - case app::Clusters::ValveConfigurationAndControl::Id: { - using namespace app::Clusters::ValveConfigurationAndControl; + case app::Clusters::BooleanStateConfiguration::Id: { + using namespace app::Clusters::BooleanStateConfiguration; switch (aPath.mAttributeId) { - case Attributes::OpenDuration::Id: { - using TypeInfo = Attributes::OpenDuration::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::DefaultOpenDuration::Id: { - using TypeInfo = Attributes::DefaultOpenDuration::TypeInfo; + case Attributes::CurrentSensitivityLevel::Id: { + using TypeInfo = Attributes::CurrentSensitivityLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -19265,22 +19045,15 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR 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); - } + 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::AutoCloseTime::Id: { - using TypeInfo = Attributes::AutoCloseTime::TypeInfo; + case Attributes::SupportedSensitivityLevels::Id: { + using TypeInfo = Attributes::SupportedSensitivityLevels::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -19288,22 +19061,15 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR 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); - } + 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::RemainingDuration::Id: { - using TypeInfo = Attributes::RemainingDuration::TypeInfo; + case Attributes::DefaultSensitivityLevel::Id: { + using TypeInfo = Attributes::DefaultSensitivityLevel::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -19311,22 +19077,15 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR 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); - } + 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::CurrentState::Id: { - using TypeInfo = Attributes::CurrentState::TypeInfo; + case Attributes::AlarmsActive::Id: { + using TypeInfo = Attributes::AlarmsActive::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -19334,22 +19093,15 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR 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); - } + 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::TargetState::Id: { - using TypeInfo = Attributes::TargetState::TypeInfo; + case Attributes::AlarmsSuppressed::Id: { + using TypeInfo = Attributes::AlarmsSuppressed::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -19357,22 +19109,15 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR 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); - } + 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::CurrentLevel::Id: { - using TypeInfo = Attributes::CurrentLevel::TypeInfo; + case Attributes::AlarmsEnabled::Id: { + using TypeInfo = Attributes::AlarmsEnabled::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -19380,22 +19125,15 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR 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); - } + 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::TargetLevel::Id: { - using TypeInfo = Attributes::TargetLevel::TypeInfo; + case Attributes::AlarmsSupported::Id: { + using TypeInfo = Attributes::AlarmsSupported::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -19403,22 +19141,15 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR 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); - } + 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::DefaultOpenLevel::Id: { - using TypeInfo = Attributes::DefaultOpenLevel::TypeInfo; + case Attributes::SensorFault::Id: { + using TypeInfo = Attributes::SensorFault::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -19428,45 +19159,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); + jint jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } - case Attributes::ValveFault::Id: { - using TypeInfo = Attributes::ValveFault::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::LevelStep::Id: { - using TypeInfo = Attributes::LevelStep::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; + case Attributes::GeneratedCommandList::Id: { + using TypeInfo = Attributes::GeneratedCommandList::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -19603,12 +19302,12 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } break; } - case app::Clusters::ElectricalEnergyMeasurement::Id: { - using namespace app::Clusters::ElectricalEnergyMeasurement; + case app::Clusters::ValveConfigurationAndControl::Id: { + using namespace app::Clusters::ValveConfigurationAndControl; switch (aPath.mAttributeId) { - case Attributes::Accuracy::Id: { - using TypeInfo = Attributes::Accuracy::TypeInfo; + case Attributes::OpenDuration::Id: { + using TypeInfo = Attributes::OpenDuration::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -19616,217 +19315,591 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - jobject value_measurementType; - std::string value_measurementTypeClassName = "java/lang/Integer"; - std::string value_measurementTypeCtorSignature = "(I)V"; - jint jnivalue_measurementType = static_cast(cppValue.measurementType); - chip::JniReferences::GetInstance().CreateBoxedObject(value_measurementTypeClassName.c_str(), - value_measurementTypeCtorSignature.c_str(), - jnivalue_measurementType, value_measurementType); - jobject value_measured; - std::string value_measuredClassName = "java/lang/Boolean"; - std::string value_measuredCtorSignature = "(Z)V"; - jboolean jnivalue_measured = static_cast(cppValue.measured); - chip::JniReferences::GetInstance().CreateBoxedObject( - value_measuredClassName.c_str(), value_measuredCtorSignature.c_str(), jnivalue_measured, value_measured); - jobject value_minMeasuredValue; - std::string value_minMeasuredValueClassName = "java/lang/Long"; - std::string value_minMeasuredValueCtorSignature = "(J)V"; - jlong jnivalue_minMeasuredValue = static_cast(cppValue.minMeasuredValue); - chip::JniReferences::GetInstance().CreateBoxedObject(value_minMeasuredValueClassName.c_str(), - value_minMeasuredValueCtorSignature.c_str(), - jnivalue_minMeasuredValue, value_minMeasuredValue); - jobject value_maxMeasuredValue; - std::string value_maxMeasuredValueClassName = "java/lang/Long"; - std::string value_maxMeasuredValueCtorSignature = "(J)V"; - jlong jnivalue_maxMeasuredValue = static_cast(cppValue.maxMeasuredValue); - chip::JniReferences::GetInstance().CreateBoxedObject(value_maxMeasuredValueClassName.c_str(), - value_maxMeasuredValueCtorSignature.c_str(), - jnivalue_maxMeasuredValue, value_maxMeasuredValue); - jobject value_accuracyRanges; - chip::JniReferences::GetInstance().CreateArrayList(value_accuracyRanges); - - auto iter_value_accuracyRanges_1 = cppValue.accuracyRanges.begin(); - while (iter_value_accuracyRanges_1.Next()) + if (cppValue.IsNull()) { - auto & entry_1 = iter_value_accuracyRanges_1.GetValue(); - jobject newElement_1; - jobject newElement_1_rangeMin; - std::string newElement_1_rangeMinClassName = "java/lang/Long"; - std::string newElement_1_rangeMinCtorSignature = "(J)V"; - jlong jninewElement_1_rangeMin = static_cast(entry_1.rangeMin); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_rangeMinClassName.c_str(), - newElement_1_rangeMinCtorSignature.c_str(), - jninewElement_1_rangeMin, newElement_1_rangeMin); - jobject newElement_1_rangeMax; - std::string newElement_1_rangeMaxClassName = "java/lang/Long"; - std::string newElement_1_rangeMaxCtorSignature = "(J)V"; - jlong jninewElement_1_rangeMax = static_cast(entry_1.rangeMax); - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_rangeMaxClassName.c_str(), - newElement_1_rangeMaxCtorSignature.c_str(), - jninewElement_1_rangeMax, newElement_1_rangeMax); - jobject newElement_1_percentMax; - if (!entry_1.percentMax.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_percentMax); - } - else - { - jobject newElement_1_percentMaxInsideOptional; - std::string newElement_1_percentMaxInsideOptionalClassName = "java/lang/Integer"; - std::string newElement_1_percentMaxInsideOptionalCtorSignature = "(I)V"; - jint jninewElement_1_percentMaxInsideOptional = static_cast(entry_1.percentMax.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_1_percentMaxInsideOptionalClassName.c_str(), - newElement_1_percentMaxInsideOptionalCtorSignature.c_str(), jninewElement_1_percentMaxInsideOptional, - newElement_1_percentMaxInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_1_percentMaxInsideOptional, - newElement_1_percentMax); - } - jobject newElement_1_percentMin; - if (!entry_1.percentMin.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_percentMin); - } - else - { - jobject newElement_1_percentMinInsideOptional; - std::string newElement_1_percentMinInsideOptionalClassName = "java/lang/Integer"; - std::string newElement_1_percentMinInsideOptionalCtorSignature = "(I)V"; - jint jninewElement_1_percentMinInsideOptional = static_cast(entry_1.percentMin.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_1_percentMinInsideOptionalClassName.c_str(), - newElement_1_percentMinInsideOptionalCtorSignature.c_str(), jninewElement_1_percentMinInsideOptional, - newElement_1_percentMinInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_1_percentMinInsideOptional, - newElement_1_percentMin); - } - jobject newElement_1_percentTypical; - if (!entry_1.percentTypical.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_percentTypical); - } - else - { - jobject newElement_1_percentTypicalInsideOptional; - std::string newElement_1_percentTypicalInsideOptionalClassName = "java/lang/Integer"; - std::string newElement_1_percentTypicalInsideOptionalCtorSignature = "(I)V"; - jint jninewElement_1_percentTypicalInsideOptional = static_cast(entry_1.percentTypical.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_1_percentTypicalInsideOptionalClassName.c_str(), - newElement_1_percentTypicalInsideOptionalCtorSignature.c_str(), - jninewElement_1_percentTypicalInsideOptional, newElement_1_percentTypicalInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_1_percentTypicalInsideOptional, - newElement_1_percentTypical); - } - jobject newElement_1_fixedMax; - if (!entry_1.fixedMax.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_fixedMax); - } - else - { - jobject newElement_1_fixedMaxInsideOptional; - std::string newElement_1_fixedMaxInsideOptionalClassName = "java/lang/Long"; - std::string newElement_1_fixedMaxInsideOptionalCtorSignature = "(J)V"; - jlong jninewElement_1_fixedMaxInsideOptional = static_cast(entry_1.fixedMax.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_1_fixedMaxInsideOptionalClassName.c_str(), - newElement_1_fixedMaxInsideOptionalCtorSignature.c_str(), jninewElement_1_fixedMaxInsideOptional, - newElement_1_fixedMaxInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_1_fixedMaxInsideOptional, newElement_1_fixedMax); - } - jobject newElement_1_fixedMin; - if (!entry_1.fixedMin.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_fixedMin); - } - else - { - jobject newElement_1_fixedMinInsideOptional; - std::string newElement_1_fixedMinInsideOptionalClassName = "java/lang/Long"; - std::string newElement_1_fixedMinInsideOptionalCtorSignature = "(J)V"; - jlong jninewElement_1_fixedMinInsideOptional = static_cast(entry_1.fixedMin.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_1_fixedMinInsideOptionalClassName.c_str(), - newElement_1_fixedMinInsideOptionalCtorSignature.c_str(), jninewElement_1_fixedMinInsideOptional, - newElement_1_fixedMinInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_1_fixedMinInsideOptional, newElement_1_fixedMin); - } - jobject newElement_1_fixedTypical; - if (!entry_1.fixedTypical.HasValue()) - { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_fixedTypical); - } - else - { - jobject newElement_1_fixedTypicalInsideOptional; - std::string newElement_1_fixedTypicalInsideOptionalClassName = "java/lang/Long"; - std::string newElement_1_fixedTypicalInsideOptionalCtorSignature = "(J)V"; - jlong jninewElement_1_fixedTypicalInsideOptional = static_cast(entry_1.fixedTypical.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_1_fixedTypicalInsideOptionalClassName.c_str(), - newElement_1_fixedTypicalInsideOptionalCtorSignature.c_str(), jninewElement_1_fixedTypicalInsideOptional, - newElement_1_fixedTypicalInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_1_fixedTypicalInsideOptional, - newElement_1_fixedTypical); - } - - jclass measurementAccuracyRangeStructStructClass_2; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ElectricalEnergyMeasurementClusterMeasurementAccuracyRangeStruct", - measurementAccuracyRangeStructStructClass_2); - if (err != CHIP_NO_ERROR) - { - ChipLogError( - Zcl, "Could not find class ChipStructs$ElectricalEnergyMeasurementClusterMeasurementAccuracyRangeStruct"); - return nullptr; - } - - jmethodID measurementAccuracyRangeStructStructCtor_2; - err = chip::JniReferences::GetInstance().FindMethod( - env, measurementAccuracyRangeStructStructClass_2, "", - "(Ljava/lang/Long;Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" - "Optional;Ljava/util/Optional;Ljava/util/Optional;)V", - &measurementAccuracyRangeStructStructCtor_2); - if (err != CHIP_NO_ERROR || measurementAccuracyRangeStructStructCtor_2 == nullptr) - { - ChipLogError( - Zcl, - "Could not find ChipStructs$ElectricalEnergyMeasurementClusterMeasurementAccuracyRangeStruct constructor"); - return nullptr; - } - - newElement_1 = env->NewObject( - measurementAccuracyRangeStructStructClass_2, measurementAccuracyRangeStructStructCtor_2, newElement_1_rangeMin, - newElement_1_rangeMax, newElement_1_percentMax, newElement_1_percentMin, newElement_1_percentTypical, - newElement_1_fixedMax, newElement_1_fixedMin, newElement_1_fixedTypical); - chip::JniReferences::GetInstance().AddToList(value_accuracyRanges, newElement_1); + value = nullptr; } - - jclass measurementAccuracyStructStructClass_0; - err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ElectricalEnergyMeasurementClusterMeasurementAccuracyStruct", - measurementAccuracyStructStructClass_0); - if (err != CHIP_NO_ERROR) + else { - ChipLogError(Zcl, "Could not find class ChipStructs$ElectricalEnergyMeasurementClusterMeasurementAccuracyStruct"); - return nullptr; + 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); } - - jmethodID measurementAccuracyStructStructCtor_0; - err = chip::JniReferences::GetInstance().FindMethod( - env, measurementAccuracyStructStructClass_0, "", - "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/Long;Ljava/util/ArrayList;)V", - &measurementAccuracyStructStructCtor_0); - if (err != CHIP_NO_ERROR || measurementAccuracyStructStructCtor_0 == nullptr) + return value; + } + case Attributes::DefaultOpenDuration::Id: { + using TypeInfo = Attributes::DefaultOpenDuration::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { - ChipLogError(Zcl, - "Could not find ChipStructs$ElectricalEnergyMeasurementClusterMeasurementAccuracyStruct constructor"); return nullptr; } - - value = + 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::AutoCloseTime::Id: { + using TypeInfo = Attributes::AutoCloseTime::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::RemainingDuration::Id: { + using TypeInfo = Attributes::RemainingDuration::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::CurrentState::Id: { + using TypeInfo = Attributes::CurrentState::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::TargetState::Id: { + using TypeInfo = Attributes::TargetState::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::CurrentLevel::Id: { + using TypeInfo = Attributes::CurrentLevel::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::TargetLevel::Id: { + using TypeInfo = Attributes::TargetLevel::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::DefaultOpenLevel::Id: { + using TypeInfo = Attributes::DefaultOpenLevel::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::ValveFault::Id: { + using TypeInfo = Attributes::ValveFault::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::LevelStep::Id: { + using TypeInfo = Attributes::LevelStep::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::ElectricalEnergyMeasurement::Id: { + using namespace app::Clusters::ElectricalEnergyMeasurement; + switch (aPath.mAttributeId) + { + case Attributes::Accuracy::Id: { + using TypeInfo = Attributes::Accuracy::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + jobject value_measurementType; + std::string value_measurementTypeClassName = "java/lang/Integer"; + std::string value_measurementTypeCtorSignature = "(I)V"; + jint jnivalue_measurementType = static_cast(cppValue.measurementType); + chip::JniReferences::GetInstance().CreateBoxedObject(value_measurementTypeClassName.c_str(), + value_measurementTypeCtorSignature.c_str(), + jnivalue_measurementType, value_measurementType); + jobject value_measured; + std::string value_measuredClassName = "java/lang/Boolean"; + std::string value_measuredCtorSignature = "(Z)V"; + jboolean jnivalue_measured = static_cast(cppValue.measured); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_measuredClassName.c_str(), value_measuredCtorSignature.c_str(), jnivalue_measured, value_measured); + jobject value_minMeasuredValue; + std::string value_minMeasuredValueClassName = "java/lang/Long"; + std::string value_minMeasuredValueCtorSignature = "(J)V"; + jlong jnivalue_minMeasuredValue = static_cast(cppValue.minMeasuredValue); + chip::JniReferences::GetInstance().CreateBoxedObject(value_minMeasuredValueClassName.c_str(), + value_minMeasuredValueCtorSignature.c_str(), + jnivalue_minMeasuredValue, value_minMeasuredValue); + jobject value_maxMeasuredValue; + std::string value_maxMeasuredValueClassName = "java/lang/Long"; + std::string value_maxMeasuredValueCtorSignature = "(J)V"; + jlong jnivalue_maxMeasuredValue = static_cast(cppValue.maxMeasuredValue); + chip::JniReferences::GetInstance().CreateBoxedObject(value_maxMeasuredValueClassName.c_str(), + value_maxMeasuredValueCtorSignature.c_str(), + jnivalue_maxMeasuredValue, value_maxMeasuredValue); + jobject value_accuracyRanges; + chip::JniReferences::GetInstance().CreateArrayList(value_accuracyRanges); + + auto iter_value_accuracyRanges_1 = cppValue.accuracyRanges.begin(); + while (iter_value_accuracyRanges_1.Next()) + { + auto & entry_1 = iter_value_accuracyRanges_1.GetValue(); + jobject newElement_1; + jobject newElement_1_rangeMin; + std::string newElement_1_rangeMinClassName = "java/lang/Long"; + std::string newElement_1_rangeMinCtorSignature = "(J)V"; + jlong jninewElement_1_rangeMin = static_cast(entry_1.rangeMin); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_rangeMinClassName.c_str(), + newElement_1_rangeMinCtorSignature.c_str(), + jninewElement_1_rangeMin, newElement_1_rangeMin); + jobject newElement_1_rangeMax; + std::string newElement_1_rangeMaxClassName = "java/lang/Long"; + std::string newElement_1_rangeMaxCtorSignature = "(J)V"; + jlong jninewElement_1_rangeMax = static_cast(entry_1.rangeMax); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_rangeMaxClassName.c_str(), + newElement_1_rangeMaxCtorSignature.c_str(), + jninewElement_1_rangeMax, newElement_1_rangeMax); + jobject newElement_1_percentMax; + if (!entry_1.percentMax.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_percentMax); + } + else + { + jobject newElement_1_percentMaxInsideOptional; + std::string newElement_1_percentMaxInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_1_percentMaxInsideOptionalCtorSignature = "(I)V"; + jint jninewElement_1_percentMaxInsideOptional = static_cast(entry_1.percentMax.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_1_percentMaxInsideOptionalClassName.c_str(), + newElement_1_percentMaxInsideOptionalCtorSignature.c_str(), jninewElement_1_percentMaxInsideOptional, + newElement_1_percentMaxInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_1_percentMaxInsideOptional, + newElement_1_percentMax); + } + jobject newElement_1_percentMin; + if (!entry_1.percentMin.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_percentMin); + } + else + { + jobject newElement_1_percentMinInsideOptional; + std::string newElement_1_percentMinInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_1_percentMinInsideOptionalCtorSignature = "(I)V"; + jint jninewElement_1_percentMinInsideOptional = static_cast(entry_1.percentMin.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_1_percentMinInsideOptionalClassName.c_str(), + newElement_1_percentMinInsideOptionalCtorSignature.c_str(), jninewElement_1_percentMinInsideOptional, + newElement_1_percentMinInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_1_percentMinInsideOptional, + newElement_1_percentMin); + } + jobject newElement_1_percentTypical; + if (!entry_1.percentTypical.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_percentTypical); + } + else + { + jobject newElement_1_percentTypicalInsideOptional; + std::string newElement_1_percentTypicalInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_1_percentTypicalInsideOptionalCtorSignature = "(I)V"; + jint jninewElement_1_percentTypicalInsideOptional = static_cast(entry_1.percentTypical.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_1_percentTypicalInsideOptionalClassName.c_str(), + newElement_1_percentTypicalInsideOptionalCtorSignature.c_str(), + jninewElement_1_percentTypicalInsideOptional, newElement_1_percentTypicalInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_1_percentTypicalInsideOptional, + newElement_1_percentTypical); + } + jobject newElement_1_fixedMax; + if (!entry_1.fixedMax.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_fixedMax); + } + else + { + jobject newElement_1_fixedMaxInsideOptional; + std::string newElement_1_fixedMaxInsideOptionalClassName = "java/lang/Long"; + std::string newElement_1_fixedMaxInsideOptionalCtorSignature = "(J)V"; + jlong jninewElement_1_fixedMaxInsideOptional = static_cast(entry_1.fixedMax.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_1_fixedMaxInsideOptionalClassName.c_str(), + newElement_1_fixedMaxInsideOptionalCtorSignature.c_str(), jninewElement_1_fixedMaxInsideOptional, + newElement_1_fixedMaxInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_1_fixedMaxInsideOptional, newElement_1_fixedMax); + } + jobject newElement_1_fixedMin; + if (!entry_1.fixedMin.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_fixedMin); + } + else + { + jobject newElement_1_fixedMinInsideOptional; + std::string newElement_1_fixedMinInsideOptionalClassName = "java/lang/Long"; + std::string newElement_1_fixedMinInsideOptionalCtorSignature = "(J)V"; + jlong jninewElement_1_fixedMinInsideOptional = static_cast(entry_1.fixedMin.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_1_fixedMinInsideOptionalClassName.c_str(), + newElement_1_fixedMinInsideOptionalCtorSignature.c_str(), jninewElement_1_fixedMinInsideOptional, + newElement_1_fixedMinInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_1_fixedMinInsideOptional, newElement_1_fixedMin); + } + jobject newElement_1_fixedTypical; + if (!entry_1.fixedTypical.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_1_fixedTypical); + } + else + { + jobject newElement_1_fixedTypicalInsideOptional; + std::string newElement_1_fixedTypicalInsideOptionalClassName = "java/lang/Long"; + std::string newElement_1_fixedTypicalInsideOptionalCtorSignature = "(J)V"; + jlong jninewElement_1_fixedTypicalInsideOptional = static_cast(entry_1.fixedTypical.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_1_fixedTypicalInsideOptionalClassName.c_str(), + newElement_1_fixedTypicalInsideOptionalCtorSignature.c_str(), jninewElement_1_fixedTypicalInsideOptional, + newElement_1_fixedTypicalInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_1_fixedTypicalInsideOptional, + newElement_1_fixedTypical); + } + + jclass measurementAccuracyRangeStructStructClass_2; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ElectricalEnergyMeasurementClusterMeasurementAccuracyRangeStruct", + measurementAccuracyRangeStructStructClass_2); + if (err != CHIP_NO_ERROR) + { + ChipLogError( + Zcl, "Could not find class ChipStructs$ElectricalEnergyMeasurementClusterMeasurementAccuracyRangeStruct"); + return nullptr; + } + + jmethodID measurementAccuracyRangeStructStructCtor_2; + err = chip::JniReferences::GetInstance().FindMethod( + env, measurementAccuracyRangeStructStructClass_2, "", + "(Ljava/lang/Long;Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/" + "Optional;Ljava/util/Optional;Ljava/util/Optional;)V", + &measurementAccuracyRangeStructStructCtor_2); + if (err != CHIP_NO_ERROR || measurementAccuracyRangeStructStructCtor_2 == nullptr) + { + ChipLogError( + Zcl, + "Could not find ChipStructs$ElectricalEnergyMeasurementClusterMeasurementAccuracyRangeStruct constructor"); + return nullptr; + } + + newElement_1 = env->NewObject( + measurementAccuracyRangeStructStructClass_2, measurementAccuracyRangeStructStructCtor_2, newElement_1_rangeMin, + newElement_1_rangeMax, newElement_1_percentMax, newElement_1_percentMin, newElement_1_percentTypical, + newElement_1_fixedMax, newElement_1_fixedMin, newElement_1_fixedTypical); + chip::JniReferences::GetInstance().AddToList(value_accuracyRanges, newElement_1); + } + + jclass measurementAccuracyStructStructClass_0; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ElectricalEnergyMeasurementClusterMeasurementAccuracyStruct", + measurementAccuracyStructStructClass_0); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ElectricalEnergyMeasurementClusterMeasurementAccuracyStruct"); + return nullptr; + } + + jmethodID measurementAccuracyStructStructCtor_0; + err = chip::JniReferences::GetInstance().FindMethod( + env, measurementAccuracyStructStructClass_0, "", + "(Ljava/lang/Integer;Ljava/lang/Boolean;Ljava/lang/Long;Ljava/lang/Long;Ljava/util/ArrayList;)V", + &measurementAccuracyStructStructCtor_0); + if (err != CHIP_NO_ERROR || measurementAccuracyStructStructCtor_0 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$ElectricalEnergyMeasurementClusterMeasurementAccuracyStruct constructor"); + return nullptr; + } + + value = env->NewObject(measurementAccuracyStructStructClass_0, measurementAccuracyStructStructCtor_0, value_measurementType, value_measured, value_minMeasuredValue, value_maxMeasuredValue, value_accuracyRanges); return value; @@ -26017,8 +26090,168 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::Occupancy::Id: { - using TypeInfo = Attributes::Occupancy::TypeInfo; + case Attributes::Occupancy::Id: { + using TypeInfo = Attributes::Occupancy::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::AbsMinHeatSetpointLimit::Id: { + using TypeInfo = Attributes::AbsMinHeatSetpointLimit::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::AbsMaxHeatSetpointLimit::Id: { + using TypeInfo = Attributes::AbsMaxHeatSetpointLimit::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::AbsMinCoolSetpointLimit::Id: { + using TypeInfo = Attributes::AbsMinCoolSetpointLimit::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::AbsMaxCoolSetpointLimit::Id: { + using TypeInfo = Attributes::AbsMaxCoolSetpointLimit::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::PICoolingDemand::Id: { + using TypeInfo = Attributes::PICoolingDemand::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::PIHeatingDemand::Id: { + using TypeInfo = Attributes::PIHeatingDemand::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::HVACSystemTypeConfiguration::Id: { + using TypeInfo = Attributes::HVACSystemTypeConfiguration::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::LocalTemperatureCalibration::Id: { + using TypeInfo = Attributes::LocalTemperatureCalibration::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::OccupiedCoolingSetpoint::Id: { + using TypeInfo = Attributes::OccupiedCoolingSetpoint::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::OccupiedHeatingSetpoint::Id: { + using TypeInfo = Attributes::OccupiedHeatingSetpoint::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -26033,8 +26266,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::AbsMinHeatSetpointLimit::Id: { - using TypeInfo = Attributes::AbsMinHeatSetpointLimit::TypeInfo; + case Attributes::UnoccupiedCoolingSetpoint::Id: { + using TypeInfo = Attributes::UnoccupiedCoolingSetpoint::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -26049,8 +26282,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::AbsMaxHeatSetpointLimit::Id: { - using TypeInfo = Attributes::AbsMaxHeatSetpointLimit::TypeInfo; + case Attributes::UnoccupiedHeatingSetpoint::Id: { + using TypeInfo = Attributes::UnoccupiedHeatingSetpoint::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -26065,8 +26298,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::AbsMinCoolSetpointLimit::Id: { - using TypeInfo = Attributes::AbsMinCoolSetpointLimit::TypeInfo; + case Attributes::MinHeatSetpointLimit::Id: { + using TypeInfo = Attributes::MinHeatSetpointLimit::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -26081,8 +26314,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::AbsMaxCoolSetpointLimit::Id: { - using TypeInfo = Attributes::AbsMaxCoolSetpointLimit::TypeInfo; + case Attributes::MaxHeatSetpointLimit::Id: { + using TypeInfo = Attributes::MaxHeatSetpointLimit::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -26097,8 +26330,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::PICoolingDemand::Id: { - using TypeInfo = Attributes::PICoolingDemand::TypeInfo; + case Attributes::MinCoolSetpointLimit::Id: { + using TypeInfo = Attributes::MinCoolSetpointLimit::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -26113,8 +26346,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::PIHeatingDemand::Id: { - using TypeInfo = Attributes::PIHeatingDemand::TypeInfo; + case Attributes::MaxCoolSetpointLimit::Id: { + using TypeInfo = Attributes::MaxCoolSetpointLimit::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -26129,8 +26362,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::HVACSystemTypeConfiguration::Id: { - using TypeInfo = Attributes::HVACSystemTypeConfiguration::TypeInfo; + case Attributes::MinSetpointDeadBand::Id: { + using TypeInfo = Attributes::MinSetpointDeadBand::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -26145,8 +26378,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::LocalTemperatureCalibration::Id: { - using TypeInfo = Attributes::LocalTemperatureCalibration::TypeInfo; + case Attributes::RemoteSensing::Id: { + using TypeInfo = Attributes::RemoteSensing::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -26156,13 +26389,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); + jint jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } - case Attributes::OccupiedCoolingSetpoint::Id: { - using TypeInfo = Attributes::OccupiedCoolingSetpoint::TypeInfo; + case Attributes::ControlSequenceOfOperation::Id: { + using TypeInfo = Attributes::ControlSequenceOfOperation::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -26177,8 +26410,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::OccupiedHeatingSetpoint::Id: { - using TypeInfo = Attributes::OccupiedHeatingSetpoint::TypeInfo; + case Attributes::SystemMode::Id: { + using TypeInfo = Attributes::SystemMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -26193,8 +26426,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::UnoccupiedCoolingSetpoint::Id: { - using TypeInfo = Attributes::UnoccupiedCoolingSetpoint::TypeInfo; + case Attributes::ThermostatRunningMode::Id: { + using TypeInfo = Attributes::ThermostatRunningMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -26209,8 +26442,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::UnoccupiedHeatingSetpoint::Id: { - using TypeInfo = Attributes::UnoccupiedHeatingSetpoint::TypeInfo; + case Attributes::StartOfWeek::Id: { + using TypeInfo = Attributes::StartOfWeek::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -26225,8 +26458,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::MinHeatSetpointLimit::Id: { - using TypeInfo = Attributes::MinHeatSetpointLimit::TypeInfo; + case Attributes::NumberOfWeeklyTransitions::Id: { + using TypeInfo = Attributes::NumberOfWeeklyTransitions::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -26241,8 +26474,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::MaxHeatSetpointLimit::Id: { - using TypeInfo = Attributes::MaxHeatSetpointLimit::TypeInfo; + case Attributes::NumberOfDailyTransitions::Id: { + using TypeInfo = Attributes::NumberOfDailyTransitions::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -26257,8 +26490,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::MinCoolSetpointLimit::Id: { - using TypeInfo = Attributes::MinCoolSetpointLimit::TypeInfo; + case Attributes::TemperatureSetpointHold::Id: { + using TypeInfo = Attributes::TemperatureSetpointHold::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -26273,8 +26506,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::MaxCoolSetpointLimit::Id: { - using TypeInfo = Attributes::MaxCoolSetpointLimit::TypeInfo; + case Attributes::TemperatureSetpointHoldDuration::Id: { + using TypeInfo = Attributes::TemperatureSetpointHoldDuration::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -26282,15 +26515,22 @@ 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); + 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::MinSetpointDeadBand::Id: { - using TypeInfo = Attributes::MinSetpointDeadBand::TypeInfo; + case Attributes::ThermostatProgrammingOperationMode::Id: { + using TypeInfo = Attributes::ThermostatProgrammingOperationMode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -26300,13 +26540,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); + jint jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } - case Attributes::RemoteSensing::Id: { - using TypeInfo = Attributes::RemoteSensing::TypeInfo; + case Attributes::ThermostatRunningState::Id: { + using TypeInfo = Attributes::ThermostatRunningState::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -26321,8 +26561,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::ControlSequenceOfOperation::Id: { - using TypeInfo = Attributes::ControlSequenceOfOperation::TypeInfo; + case Attributes::SetpointChangeSource::Id: { + using TypeInfo = Attributes::SetpointChangeSource::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -26337,8 +26577,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::SystemMode::Id: { - using TypeInfo = Attributes::SystemMode::TypeInfo; + case Attributes::SetpointChangeAmount::Id: { + using TypeInfo = Attributes::SetpointChangeAmount::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -26346,15 +26586,153 @@ 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); + 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::ThermostatRunningMode::Id: { - using TypeInfo = Attributes::ThermostatRunningMode::TypeInfo; + case Attributes::SetpointChangeSourceTimestamp::Id: { + using TypeInfo = Attributes::SetpointChangeSourceTimestamp::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::OccupiedSetback::Id: { + using TypeInfo = Attributes::OccupiedSetback::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::OccupiedSetbackMin::Id: { + using TypeInfo = Attributes::OccupiedSetbackMin::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::OccupiedSetbackMax::Id: { + using TypeInfo = Attributes::OccupiedSetbackMax::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::UnoccupiedSetback::Id: { + using TypeInfo = Attributes::UnoccupiedSetback::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::UnoccupiedSetbackMin::Id: { + using TypeInfo = Attributes::UnoccupiedSetbackMin::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::UnoccupiedSetbackMax::Id: { + using TypeInfo = Attributes::UnoccupiedSetbackMax::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -26362,15 +26740,22 @@ 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); + 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::StartOfWeek::Id: { - using TypeInfo = Attributes::StartOfWeek::TypeInfo; + case Attributes::EmergencyHeatDelta::Id: { + using TypeInfo = Attributes::EmergencyHeatDelta::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -26385,8 +26770,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::NumberOfWeeklyTransitions::Id: { - using TypeInfo = Attributes::NumberOfWeeklyTransitions::TypeInfo; + case Attributes::ACType::Id: { + using TypeInfo = Attributes::ACType::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -26401,8 +26786,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::NumberOfDailyTransitions::Id: { - using TypeInfo = Attributes::NumberOfDailyTransitions::TypeInfo; + case Attributes::ACCapacity::Id: { + using TypeInfo = Attributes::ACCapacity::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -26417,8 +26802,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::TemperatureSetpointHold::Id: { - using TypeInfo = Attributes::TemperatureSetpointHold::TypeInfo; + case Attributes::ACRefrigerantType::Id: { + using TypeInfo = Attributes::ACRefrigerantType::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -26433,31 +26818,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::TemperatureSetpointHoldDuration::Id: { - using TypeInfo = Attributes::TemperatureSetpointHoldDuration::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::ThermostatProgrammingOperationMode::Id: { - using TypeInfo = Attributes::ThermostatProgrammingOperationMode::TypeInfo; + case Attributes::ACCompressorType::Id: { + using TypeInfo = Attributes::ACCompressorType::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -26467,13 +26829,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::ThermostatRunningState::Id: { - using TypeInfo = Attributes::ThermostatRunningState::TypeInfo; + case Attributes::ACErrorCode::Id: { + using TypeInfo = Attributes::ACErrorCode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -26481,15 +26843,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.Raw()); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, - value); + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + jlong jnivalue = static_cast(cppValue.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); return value; } - case Attributes::SetpointChangeSource::Id: { - using TypeInfo = Attributes::SetpointChangeSource::TypeInfo; + case Attributes::ACLouverPosition::Id: { + using TypeInfo = Attributes::ACLouverPosition::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -26504,8 +26866,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR value); return value; } - case Attributes::SetpointChangeAmount::Id: { - using TypeInfo = Attributes::SetpointChangeAmount::TypeInfo; + case Attributes::ACCoilTemperature::Id: { + using TypeInfo = Attributes::ACCoilTemperature::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -26527,8 +26889,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::SetpointChangeSourceTimestamp::Id: { - using TypeInfo = Attributes::SetpointChangeSourceTimestamp::TypeInfo; + case Attributes::ACCapacityformat::Id: { + using TypeInfo = Attributes::ACCapacityformat::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -26536,15 +26898,15 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR 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); + 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::OccupiedSetback::Id: { - using TypeInfo = Attributes::OccupiedSetback::TypeInfo; + case Attributes::PresetTypes::Id: { + using TypeInfo = Attributes::PresetTypes::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -26552,22 +26914,63 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - if (cppValue.IsNull()) - { - value = nullptr; - } - else + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) { - 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); + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + jobject newElement_0_presetScenario; + std::string newElement_0_presetScenarioClassName = "java/lang/Integer"; + std::string newElement_0_presetScenarioCtorSignature = "(I)V"; + jint jninewElement_0_presetScenario = static_cast(entry_0.presetScenario); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_presetScenarioClassName.c_str(), newElement_0_presetScenarioCtorSignature.c_str(), + jninewElement_0_presetScenario, newElement_0_presetScenario); + jobject newElement_0_numberOfPresets; + std::string newElement_0_numberOfPresetsClassName = "java/lang/Integer"; + std::string newElement_0_numberOfPresetsCtorSignature = "(I)V"; + jint jninewElement_0_numberOfPresets = static_cast(entry_0.numberOfPresets); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_numberOfPresetsClassName.c_str(), newElement_0_numberOfPresetsCtorSignature.c_str(), + jninewElement_0_numberOfPresets, newElement_0_numberOfPresets); + jobject newElement_0_presetTypeFeatures; + std::string newElement_0_presetTypeFeaturesClassName = "java/lang/Integer"; + std::string newElement_0_presetTypeFeaturesCtorSignature = "(I)V"; + jint jninewElement_0_presetTypeFeatures = static_cast(entry_0.presetTypeFeatures.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_presetTypeFeaturesClassName.c_str(), newElement_0_presetTypeFeaturesCtorSignature.c_str(), + jninewElement_0_presetTypeFeatures, newElement_0_presetTypeFeatures); + + jclass presetTypeStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ThermostatClusterPresetTypeStruct", presetTypeStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ThermostatClusterPresetTypeStruct"); + return nullptr; + } + + jmethodID presetTypeStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, presetTypeStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", + &presetTypeStructStructCtor_1); + if (err != CHIP_NO_ERROR || presetTypeStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ThermostatClusterPresetTypeStruct constructor"); + return nullptr; + } + + newElement_0 = + env->NewObject(presetTypeStructStructClass_1, presetTypeStructStructCtor_1, newElement_0_presetScenario, + newElement_0_numberOfPresets, newElement_0_presetTypeFeatures); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } - case Attributes::OccupiedSetbackMin::Id: { - using TypeInfo = Attributes::OccupiedSetbackMin::TypeInfo; + case Attributes::ScheduleTypes::Id: { + using TypeInfo = Attributes::ScheduleTypes::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -26575,22 +26978,63 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - if (cppValue.IsNull()) - { - value = nullptr; - } - else + chip::JniReferences::GetInstance().CreateArrayList(value); + + auto iter_value_0 = cppValue.begin(); + while (iter_value_0.Next()) { - 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); + auto & entry_0 = iter_value_0.GetValue(); + jobject newElement_0; + jobject newElement_0_systemMode; + std::string newElement_0_systemModeClassName = "java/lang/Integer"; + std::string newElement_0_systemModeCtorSignature = "(I)V"; + jint jninewElement_0_systemMode = static_cast(entry_0.systemMode); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_systemModeClassName.c_str(), + newElement_0_systemModeCtorSignature.c_str(), + jninewElement_0_systemMode, newElement_0_systemMode); + jobject newElement_0_numberOfSchedules; + std::string newElement_0_numberOfSchedulesClassName = "java/lang/Integer"; + std::string newElement_0_numberOfSchedulesCtorSignature = "(I)V"; + jint jninewElement_0_numberOfSchedules = static_cast(entry_0.numberOfSchedules); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_numberOfSchedulesClassName.c_str(), newElement_0_numberOfSchedulesCtorSignature.c_str(), + jninewElement_0_numberOfSchedules, newElement_0_numberOfSchedules); + jobject newElement_0_scheduleTypeFeatures; + std::string newElement_0_scheduleTypeFeaturesClassName = "java/lang/Integer"; + std::string newElement_0_scheduleTypeFeaturesCtorSignature = "(I)V"; + jint jninewElement_0_scheduleTypeFeatures = static_cast(entry_0.scheduleTypeFeatures.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_scheduleTypeFeaturesClassName.c_str(), newElement_0_scheduleTypeFeaturesCtorSignature.c_str(), + jninewElement_0_scheduleTypeFeatures, newElement_0_scheduleTypeFeatures); + + jclass scheduleTypeStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ThermostatClusterScheduleTypeStruct", scheduleTypeStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ThermostatClusterScheduleTypeStruct"); + return nullptr; + } + + jmethodID scheduleTypeStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, scheduleTypeStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", + &scheduleTypeStructStructCtor_1); + if (err != CHIP_NO_ERROR || scheduleTypeStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ThermostatClusterScheduleTypeStruct constructor"); + return nullptr; + } + + newElement_0 = + env->NewObject(scheduleTypeStructStructClass_1, scheduleTypeStructStructCtor_1, newElement_0_systemMode, + newElement_0_numberOfSchedules, newElement_0_scheduleTypeFeatures); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); } return value; } - case Attributes::OccupiedSetbackMax::Id: { - using TypeInfo = Attributes::OccupiedSetbackMax::TypeInfo; + case Attributes::NumberOfPresets::Id: { + using TypeInfo = Attributes::NumberOfPresets::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -26598,22 +27042,15 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR 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); - } + 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::UnoccupiedSetback::Id: { - using TypeInfo = Attributes::UnoccupiedSetback::TypeInfo; + case Attributes::NumberOfSchedules::Id: { + using TypeInfo = Attributes::NumberOfSchedules::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -26621,22 +27058,15 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR 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); - } + 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::UnoccupiedSetbackMin::Id: { - using TypeInfo = Attributes::UnoccupiedSetbackMin::TypeInfo; + case Attributes::NumberOfScheduleTransitions::Id: { + using TypeInfo = Attributes::NumberOfScheduleTransitions::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -26644,22 +27074,15 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR 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); - } + 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::UnoccupiedSetbackMax::Id: { - using TypeInfo = Attributes::UnoccupiedSetbackMax::TypeInfo; + case Attributes::NumberOfScheduleTransitionPerDay::Id: { + using TypeInfo = Attributes::NumberOfScheduleTransitionPerDay::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -26681,8 +27104,8 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } return value; } - case Attributes::EmergencyHeatDelta::Id: { - using TypeInfo = Attributes::EmergencyHeatDelta::TypeInfo; + case Attributes::ActivePresetHandle::Id: { + using TypeInfo = Attributes::ActivePresetHandle::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -26690,31 +27113,21 @@ 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); - return value; - } - case Attributes::ACType::Id: { - using TypeInfo = Attributes::ACType::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) + if (cppValue.IsNull()) { - return nullptr; + value = nullptr; + } + else + { + jbyteArray valueByteArray = env->NewByteArray(static_cast(cppValue.Value().size())); + env->SetByteArrayRegion(valueByteArray, 0, static_cast(cppValue.Value().size()), + reinterpret_cast(cppValue.Value().data())); + value = valueByteArray; } - 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::ACCapacity::Id: { - using TypeInfo = Attributes::ACCapacity::TypeInfo; + case Attributes::ActiveScheduleHandle::Id: { + using TypeInfo = Attributes::ActiveScheduleHandle::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -26722,15 +27135,21 @@ 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); + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + jbyteArray valueByteArray = env->NewByteArray(static_cast(cppValue.Value().size())); + env->SetByteArrayRegion(valueByteArray, 0, static_cast(cppValue.Value().size()), + reinterpret_cast(cppValue.Value().data())); + value = valueByteArray; + } return value; } - case Attributes::ACRefrigerantType::Id: { - using TypeInfo = Attributes::ACRefrigerantType::TypeInfo; + case Attributes::Presets::Id: { + using TypeInfo = Attributes::Presets::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -26738,15 +27157,133 @@ 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); + 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_presetHandle; + if (entry_0.presetHandle.IsNull()) + { + newElement_0_presetHandle = nullptr; + } + else + { + jbyteArray newElement_0_presetHandleByteArray = + env->NewByteArray(static_cast(entry_0.presetHandle.Value().size())); + env->SetByteArrayRegion(newElement_0_presetHandleByteArray, 0, + static_cast(entry_0.presetHandle.Value().size()), + reinterpret_cast(entry_0.presetHandle.Value().data())); + newElement_0_presetHandle = newElement_0_presetHandleByteArray; + } + jobject newElement_0_presetScenario; + std::string newElement_0_presetScenarioClassName = "java/lang/Integer"; + std::string newElement_0_presetScenarioCtorSignature = "(I)V"; + jint jninewElement_0_presetScenario = static_cast(entry_0.presetScenario); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_presetScenarioClassName.c_str(), newElement_0_presetScenarioCtorSignature.c_str(), + jninewElement_0_presetScenario, newElement_0_presetScenario); + jobject newElement_0_name; + if (!entry_0.name.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_name); + } + else + { + jobject newElement_0_nameInsideOptional; + if (entry_0.name.Value().IsNull()) + { + newElement_0_nameInsideOptional = nullptr; + } + else + { + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name.Value().Value(), + newElement_0_nameInsideOptional)); + } + chip::JniReferences::GetInstance().CreateOptional(newElement_0_nameInsideOptional, newElement_0_name); + } + jobject newElement_0_coolingSetpoint; + if (!entry_0.coolingSetpoint.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_coolingSetpoint); + } + else + { + jobject newElement_0_coolingSetpointInsideOptional; + std::string newElement_0_coolingSetpointInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_0_coolingSetpointInsideOptionalCtorSignature = "(I)V"; + jint jninewElement_0_coolingSetpointInsideOptional = static_cast(entry_0.coolingSetpoint.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_coolingSetpointInsideOptionalClassName.c_str(), + newElement_0_coolingSetpointInsideOptionalCtorSignature.c_str(), + jninewElement_0_coolingSetpointInsideOptional, newElement_0_coolingSetpointInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_coolingSetpointInsideOptional, + newElement_0_coolingSetpoint); + } + jobject newElement_0_heatingSetpoint; + if (!entry_0.heatingSetpoint.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_heatingSetpoint); + } + else + { + jobject newElement_0_heatingSetpointInsideOptional; + std::string newElement_0_heatingSetpointInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_0_heatingSetpointInsideOptionalCtorSignature = "(I)V"; + jint jninewElement_0_heatingSetpointInsideOptional = static_cast(entry_0.heatingSetpoint.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_heatingSetpointInsideOptionalClassName.c_str(), + newElement_0_heatingSetpointInsideOptionalCtorSignature.c_str(), + jninewElement_0_heatingSetpointInsideOptional, newElement_0_heatingSetpointInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_heatingSetpointInsideOptional, + newElement_0_heatingSetpoint); + } + jobject newElement_0_builtIn; + if (entry_0.builtIn.IsNull()) + { + newElement_0_builtIn = nullptr; + } + else + { + std::string newElement_0_builtInClassName = "java/lang/Boolean"; + std::string newElement_0_builtInCtorSignature = "(Z)V"; + jboolean jninewElement_0_builtIn = static_cast(entry_0.builtIn.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_builtInClassName.c_str(), + newElement_0_builtInCtorSignature.c_str(), + jninewElement_0_builtIn, newElement_0_builtIn); + } + + jclass presetStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ThermostatClusterPresetStruct", presetStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ThermostatClusterPresetStruct"); + return nullptr; + } + + jmethodID presetStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, presetStructStructClass_1, "", + "([BLjava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/lang/Boolean;)V", + &presetStructStructCtor_1); + if (err != CHIP_NO_ERROR || presetStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ThermostatClusterPresetStruct constructor"); + return nullptr; + } + + newElement_0 = env->NewObject(presetStructStructClass_1, presetStructStructCtor_1, newElement_0_presetHandle, + newElement_0_presetScenario, newElement_0_name, newElement_0_coolingSetpoint, + newElement_0_heatingSetpoint, newElement_0_builtIn); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } return value; } - case Attributes::ACCompressorType::Id: { - using TypeInfo = Attributes::ACCompressorType::TypeInfo; + case Attributes::Schedules::Id: { + using TypeInfo = Attributes::Schedules::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -26754,15 +27291,239 @@ 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); + 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_scheduleHandle; + if (entry_0.scheduleHandle.IsNull()) + { + newElement_0_scheduleHandle = nullptr; + } + else + { + jbyteArray newElement_0_scheduleHandleByteArray = + env->NewByteArray(static_cast(entry_0.scheduleHandle.Value().size())); + env->SetByteArrayRegion(newElement_0_scheduleHandleByteArray, 0, + static_cast(entry_0.scheduleHandle.Value().size()), + reinterpret_cast(entry_0.scheduleHandle.Value().data())); + newElement_0_scheduleHandle = newElement_0_scheduleHandleByteArray; + } + jobject newElement_0_systemMode; + std::string newElement_0_systemModeClassName = "java/lang/Integer"; + std::string newElement_0_systemModeCtorSignature = "(I)V"; + jint jninewElement_0_systemMode = static_cast(entry_0.systemMode); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_systemModeClassName.c_str(), + newElement_0_systemModeCtorSignature.c_str(), + jninewElement_0_systemMode, newElement_0_systemMode); + 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_presetHandle; + if (!entry_0.presetHandle.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_presetHandle); + } + else + { + jobject newElement_0_presetHandleInsideOptional; + jbyteArray newElement_0_presetHandleInsideOptionalByteArray = + env->NewByteArray(static_cast(entry_0.presetHandle.Value().size())); + env->SetByteArrayRegion(newElement_0_presetHandleInsideOptionalByteArray, 0, + static_cast(entry_0.presetHandle.Value().size()), + reinterpret_cast(entry_0.presetHandle.Value().data())); + newElement_0_presetHandleInsideOptional = newElement_0_presetHandleInsideOptionalByteArray; + chip::JniReferences::GetInstance().CreateOptional(newElement_0_presetHandleInsideOptional, + newElement_0_presetHandle); + } + jobject newElement_0_transitions; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_transitions); + + auto iter_newElement_0_transitions_2 = entry_0.transitions.begin(); + while (iter_newElement_0_transitions_2.Next()) + { + auto & entry_2 = iter_newElement_0_transitions_2.GetValue(); + jobject newElement_2; + jobject newElement_2_dayOfWeek; + std::string newElement_2_dayOfWeekClassName = "java/lang/Integer"; + std::string newElement_2_dayOfWeekCtorSignature = "(I)V"; + jint jninewElement_2_dayOfWeek = static_cast(entry_2.dayOfWeek.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_dayOfWeekClassName.c_str(), + newElement_2_dayOfWeekCtorSignature.c_str(), + jninewElement_2_dayOfWeek, newElement_2_dayOfWeek); + jobject newElement_2_transitionTime; + std::string newElement_2_transitionTimeClassName = "java/lang/Integer"; + std::string newElement_2_transitionTimeCtorSignature = "(I)V"; + jint jninewElement_2_transitionTime = static_cast(entry_2.transitionTime); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_transitionTimeClassName.c_str(), newElement_2_transitionTimeCtorSignature.c_str(), + jninewElement_2_transitionTime, newElement_2_transitionTime); + jobject newElement_2_presetHandle; + if (!entry_2.presetHandle.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_presetHandle); + } + else + { + jobject newElement_2_presetHandleInsideOptional; + jbyteArray newElement_2_presetHandleInsideOptionalByteArray = + env->NewByteArray(static_cast(entry_2.presetHandle.Value().size())); + env->SetByteArrayRegion(newElement_2_presetHandleInsideOptionalByteArray, 0, + static_cast(entry_2.presetHandle.Value().size()), + reinterpret_cast(entry_2.presetHandle.Value().data())); + newElement_2_presetHandleInsideOptional = newElement_2_presetHandleInsideOptionalByteArray; + chip::JniReferences::GetInstance().CreateOptional(newElement_2_presetHandleInsideOptional, + newElement_2_presetHandle); + } + jobject newElement_2_systemMode; + if (!entry_2.systemMode.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_systemMode); + } + else + { + jobject newElement_2_systemModeInsideOptional; + std::string newElement_2_systemModeInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_2_systemModeInsideOptionalCtorSignature = "(I)V"; + jint jninewElement_2_systemModeInsideOptional = static_cast(entry_2.systemMode.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_systemModeInsideOptionalClassName.c_str(), + newElement_2_systemModeInsideOptionalCtorSignature.c_str(), jninewElement_2_systemModeInsideOptional, + newElement_2_systemModeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_systemModeInsideOptional, + newElement_2_systemMode); + } + jobject newElement_2_coolingSetpoint; + if (!entry_2.coolingSetpoint.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_coolingSetpoint); + } + else + { + jobject newElement_2_coolingSetpointInsideOptional; + std::string newElement_2_coolingSetpointInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_2_coolingSetpointInsideOptionalCtorSignature = "(I)V"; + jint jninewElement_2_coolingSetpointInsideOptional = static_cast(entry_2.coolingSetpoint.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_coolingSetpointInsideOptionalClassName.c_str(), + newElement_2_coolingSetpointInsideOptionalCtorSignature.c_str(), + jninewElement_2_coolingSetpointInsideOptional, newElement_2_coolingSetpointInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_coolingSetpointInsideOptional, + newElement_2_coolingSetpoint); + } + jobject newElement_2_heatingSetpoint; + if (!entry_2.heatingSetpoint.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_heatingSetpoint); + } + else + { + jobject newElement_2_heatingSetpointInsideOptional; + std::string newElement_2_heatingSetpointInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_2_heatingSetpointInsideOptionalCtorSignature = "(I)V"; + jint jninewElement_2_heatingSetpointInsideOptional = static_cast(entry_2.heatingSetpoint.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_heatingSetpointInsideOptionalClassName.c_str(), + newElement_2_heatingSetpointInsideOptionalCtorSignature.c_str(), + jninewElement_2_heatingSetpointInsideOptional, newElement_2_heatingSetpointInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_heatingSetpointInsideOptional, + newElement_2_heatingSetpoint); + } + + jclass scheduleTransitionStructStructClass_3; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ThermostatClusterScheduleTransitionStruct", + scheduleTransitionStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ThermostatClusterScheduleTransitionStruct"); + return nullptr; + } + + jmethodID scheduleTransitionStructStructCtor_3; + err = chip::JniReferences::GetInstance().FindMethod( + env, scheduleTransitionStructStructClass_3, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/" + "util/Optional;)V", + &scheduleTransitionStructStructCtor_3); + if (err != CHIP_NO_ERROR || scheduleTransitionStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ThermostatClusterScheduleTransitionStruct constructor"); + return nullptr; + } + + newElement_2 = + env->NewObject(scheduleTransitionStructStructClass_3, scheduleTransitionStructStructCtor_3, + newElement_2_dayOfWeek, newElement_2_transitionTime, newElement_2_presetHandle, + newElement_2_systemMode, newElement_2_coolingSetpoint, newElement_2_heatingSetpoint); + chip::JniReferences::GetInstance().AddToList(newElement_0_transitions, newElement_2); + } + jobject newElement_0_builtIn; + if (!entry_0.builtIn.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_builtIn); + } + else + { + jobject newElement_0_builtInInsideOptional; + if (entry_0.builtIn.Value().IsNull()) + { + newElement_0_builtInInsideOptional = nullptr; + } + else + { + std::string newElement_0_builtInInsideOptionalClassName = "java/lang/Boolean"; + std::string newElement_0_builtInInsideOptionalCtorSignature = "(Z)V"; + jboolean jninewElement_0_builtInInsideOptional = static_cast(entry_0.builtIn.Value().Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_builtInInsideOptionalClassName.c_str(), + newElement_0_builtInInsideOptionalCtorSignature.c_str(), jninewElement_0_builtInInsideOptional, + newElement_0_builtInInsideOptional); + } + chip::JniReferences::GetInstance().CreateOptional(newElement_0_builtInInsideOptional, newElement_0_builtIn); + } + + jclass scheduleStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ThermostatClusterScheduleStruct", scheduleStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ThermostatClusterScheduleStruct"); + return nullptr; + } + + jmethodID scheduleStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, scheduleStructStructClass_1, "", + "([BLjava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/ArrayList;Ljava/util/Optional;)V", + &scheduleStructStructCtor_1); + if (err != CHIP_NO_ERROR || scheduleStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ThermostatClusterScheduleStruct constructor"); + return nullptr; + } + + newElement_0 = env->NewObject(scheduleStructStructClass_1, scheduleStructStructCtor_1, newElement_0_scheduleHandle, + newElement_0_systemMode, newElement_0_name, newElement_0_presetHandle, + newElement_0_transitions, newElement_0_builtIn); + chip::JniReferences::GetInstance().AddToList(value, newElement_0); + } return value; } - case Attributes::ACErrorCode::Id: { - using TypeInfo = Attributes::ACErrorCode::TypeInfo; + case Attributes::PresetsSchedulesEditable::Id: { + using TypeInfo = Attributes::PresetsSchedulesEditable::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -26770,15 +27531,15 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR return nullptr; } jobject value; - std::string valueClassName = "java/lang/Long"; - std::string valueCtorSignature = "(J)V"; - jlong jnivalue = static_cast(cppValue.Raw()); - 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::ACLouverPosition::Id: { - using TypeInfo = Attributes::ACLouverPosition::TypeInfo; + case Attributes::TemperatureSetpointHoldPolicy::Id: { + using TypeInfo = Attributes::TemperatureSetpointHoldPolicy::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -26788,13 +27549,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); + jint jnivalue = static_cast(cppValue.Raw()); chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, value); return value; } - case Attributes::ACCoilTemperature::Id: { - using TypeInfo = Attributes::ACCoilTemperature::TypeInfo; + case Attributes::SetpointHoldExpiryTimestamp::Id: { + using TypeInfo = Attributes::SetpointHoldExpiryTimestamp::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -26808,16 +27569,16 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR } 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); + 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::ACCapacityformat::Id: { - using TypeInfo = Attributes::ACCapacityformat::TypeInfo; + case Attributes::QueuedPreset::Id: { + using TypeInfo = Attributes::QueuedPreset::TypeInfo; TypeInfo::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) @@ -26825,11 +27586,62 @@ 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); + if (cppValue.IsNull()) + { + value = nullptr; + } + else + { + jobject value_presetHandle; + if (cppValue.Value().presetHandle.IsNull()) + { + value_presetHandle = nullptr; + } + else + { + jbyteArray value_presetHandleByteArray = + env->NewByteArray(static_cast(cppValue.Value().presetHandle.Value().size())); + env->SetByteArrayRegion(value_presetHandleByteArray, 0, + static_cast(cppValue.Value().presetHandle.Value().size()), + reinterpret_cast(cppValue.Value().presetHandle.Value().data())); + value_presetHandle = value_presetHandleByteArray; + } + jobject value_transitionTimestamp; + if (cppValue.Value().transitionTimestamp.IsNull()) + { + value_transitionTimestamp = nullptr; + } + else + { + std::string value_transitionTimestampClassName = "java/lang/Long"; + std::string value_transitionTimestampCtorSignature = "(J)V"; + jlong jnivalue_transitionTimestamp = static_cast(cppValue.Value().transitionTimestamp.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_transitionTimestampClassName.c_str(), value_transitionTimestampCtorSignature.c_str(), + jnivalue_transitionTimestamp, value_transitionTimestamp); + } + + jclass queuedPresetStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ThermostatClusterQueuedPresetStruct", queuedPresetStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ThermostatClusterQueuedPresetStruct"); + return nullptr; + } + + jmethodID queuedPresetStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, queuedPresetStructStructClass_1, "", + "([BLjava/lang/Long;)V", &queuedPresetStructStructCtor_1); + if (err != CHIP_NO_ERROR || queuedPresetStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ThermostatClusterQueuedPresetStruct constructor"); + return nullptr; + } + + value = env->NewObject(queuedPresetStructStructClass_1, queuedPresetStructStructCtor_1, value_presetHandle, + value_transitionTimestamp); + } return value; } case Attributes::GeneratedCommandList::Id: { diff --git a/src/controller/java/zap-generated/CHIPClientCallbacks.h b/src/controller/java/zap-generated/CHIPClientCallbacks.h index 14101937393e4c..65f8b84445e99d 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, @@ -653,6 +642,8 @@ typedef void (*MicrowaveOvenModeEventListListAttributeCallback)(void * context, const chip::app::DataModel::DecodableList & data); typedef void (*MicrowaveOvenModeAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*MicrowaveOvenControlSupportedWattsListAttributeCallback)(void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*MicrowaveOvenControlGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*MicrowaveOvenControlAcceptedCommandListListAttributeCallback)( @@ -689,6 +680,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< @@ -829,6 +832,18 @@ typedef void (*PumpConfigurationAndControlEventListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*PumpConfigurationAndControlAttributeListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); +typedef void (*ThermostatPresetTypesListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*ThermostatScheduleTypesListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*ThermostatPresetsListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & data); +typedef void (*ThermostatSchedulesListAttributeCallback)( + void * context, + const chip::app::DataModel::DecodableList & data); typedef void (*ThermostatGeneratedCommandListListAttributeCallback)( void * context, const chip::app::DataModel::DecodableList & data); typedef void (*ThermostatAcceptedCommandListListAttributeCallback)( diff --git a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp index bbb1d9df9158c1..8f6a3a734af413 100644 --- a/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp +++ b/src/controller/java/zap-generated/CHIPClustersWrite-JNI.cpp @@ -6771,6 +6771,399 @@ JNI_METHOD(void, ThermostatCluster, writeACCapacityformatAttribute) onFailure.release(); } +JNI_METHOD(void, ThermostatCluster, writePresetsAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + ListFreer listFreer; + using TypeInfo = chip::app::Clusters::Thermostat::Attributes::Presets::TypeInfo; + TypeInfo::Type cppValue; + + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + jint valueSize; + chip::JniReferences::GetInstance().GetListSize(value, valueSize); + if (valueSize != 0) + { + auto * listHolder_0 = new ListHolder(valueSize); + listFreer.add(listHolder_0); + + for (jint i_0 = 0; i_0 < valueSize; ++i_0) + { + jobject element_0; + chip::JniReferences::GetInstance().GetListItem(value, i_0, element_0); + jobject element_0_presetHandleItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "presetHandle", "[B", element_0_presetHandleItem_1); + if (element_0_presetHandleItem_1 == nullptr) + { + listHolder_0->mList[i_0].presetHandle.SetNull(); + } + else + { + auto & nonNullValue_2 = listHolder_0->mList[i_0].presetHandle.SetNonNull(); + cleanupByteArrays.push_back( + chip::Platform::MakeUnique(env, static_cast(element_0_presetHandleItem_1))); + nonNullValue_2 = cleanupByteArrays.back()->byteSpan(); + } + jobject element_0_presetScenarioItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "presetScenario", "Ljava/lang/Integer;", + element_0_presetScenarioItem_1); + listHolder_0->mList[i_0].presetScenario = + static_castmList[i_0].presetScenario)>>( + chip::JniReferences::GetInstance().IntegerToPrimitive(element_0_presetScenarioItem_1)); + jobject element_0_nameItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "name", "Ljava/util/Optional;", element_0_nameItem_1); + if (element_0_nameItem_1 != nullptr) + { + jobject optionalValue_2; + chip::JniReferences::GetInstance().GetOptionalValue(element_0_nameItem_1, optionalValue_2); + if (optionalValue_2 != nullptr) + { + auto & definedValue_2 = listHolder_0->mList[i_0].name.Emplace(); + if (optionalValue_2 == nullptr) + { + definedValue_2.SetNull(); + } + else + { + auto & nonNullValue_3 = definedValue_2.SetNonNull(); + cleanupStrings.push_back( + chip::Platform::MakeUnique(env, static_cast(optionalValue_2))); + nonNullValue_3 = cleanupStrings.back()->charSpan(); + } + } + } + jobject element_0_coolingSetpointItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "coolingSetpoint", "Ljava/util/Optional;", + element_0_coolingSetpointItem_1); + if (element_0_coolingSetpointItem_1 != nullptr) + { + jobject optionalValue_2; + chip::JniReferences::GetInstance().GetOptionalValue(element_0_coolingSetpointItem_1, optionalValue_2); + if (optionalValue_2 != nullptr) + { + auto & definedValue_2 = listHolder_0->mList[i_0].coolingSetpoint.Emplace(); + definedValue_2 = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionalValue_2)); + } + } + jobject element_0_heatingSetpointItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "heatingSetpoint", "Ljava/util/Optional;", + element_0_heatingSetpointItem_1); + if (element_0_heatingSetpointItem_1 != nullptr) + { + jobject optionalValue_2; + chip::JniReferences::GetInstance().GetOptionalValue(element_0_heatingSetpointItem_1, optionalValue_2); + if (optionalValue_2 != nullptr) + { + auto & definedValue_2 = listHolder_0->mList[i_0].heatingSetpoint.Emplace(); + definedValue_2 = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionalValue_2)); + } + } + jobject element_0_builtInItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "builtIn", "Ljava/lang/Boolean;", + element_0_builtInItem_1); + if (element_0_builtInItem_1 == nullptr) + { + listHolder_0->mList[i_0].builtIn.SetNull(); + } + else + { + auto & nonNullValue_2 = listHolder_0->mList[i_0].builtIn.SetNonNull(); + nonNullValue_2 = static_cast>( + chip::JniReferences::GetInstance().BooleanToPrimitive(element_0_builtInItem_1)); + } + } + cppValue = ListType_0(listHolder_0->mList, valueSize); + } + else + { + cppValue = ListType_0(); + } + } + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + +JNI_METHOD(void, ThermostatCluster, writeSchedulesAttribute) +(JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) +{ + chip::DeviceLayer::StackLock lock; + ListFreer listFreer; + using TypeInfo = chip::app::Clusters::Thermostat::Attributes::Schedules::TypeInfo; + TypeInfo::Type cppValue; + + std::vector> cleanupByteArrays; + std::vector> cleanupStrings; + + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + jint valueSize; + chip::JniReferences::GetInstance().GetListSize(value, valueSize); + if (valueSize != 0) + { + auto * listHolder_0 = new ListHolder(valueSize); + listFreer.add(listHolder_0); + + for (jint i_0 = 0; i_0 < valueSize; ++i_0) + { + jobject element_0; + chip::JniReferences::GetInstance().GetListItem(value, i_0, element_0); + jobject element_0_scheduleHandleItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "scheduleHandle", "[B", + element_0_scheduleHandleItem_1); + if (element_0_scheduleHandleItem_1 == nullptr) + { + listHolder_0->mList[i_0].scheduleHandle.SetNull(); + } + else + { + auto & nonNullValue_2 = listHolder_0->mList[i_0].scheduleHandle.SetNonNull(); + cleanupByteArrays.push_back(chip::Platform::MakeUnique( + env, static_cast(element_0_scheduleHandleItem_1))); + nonNullValue_2 = cleanupByteArrays.back()->byteSpan(); + } + jobject element_0_systemModeItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "systemMode", "Ljava/lang/Integer;", + element_0_systemModeItem_1); + listHolder_0->mList[i_0].systemMode = + static_castmList[i_0].systemMode)>>( + chip::JniReferences::GetInstance().IntegerToPrimitive(element_0_systemModeItem_1)); + jobject element_0_nameItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "name", "Ljava/util/Optional;", element_0_nameItem_1); + if (element_0_nameItem_1 != nullptr) + { + jobject optionalValue_2; + chip::JniReferences::GetInstance().GetOptionalValue(element_0_nameItem_1, optionalValue_2); + if (optionalValue_2 != nullptr) + { + auto & definedValue_2 = listHolder_0->mList[i_0].name.Emplace(); + cleanupStrings.push_back( + chip::Platform::MakeUnique(env, static_cast(optionalValue_2))); + definedValue_2 = cleanupStrings.back()->charSpan(); + } + } + jobject element_0_presetHandleItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "presetHandle", "Ljava/util/Optional;", + element_0_presetHandleItem_1); + if (element_0_presetHandleItem_1 != nullptr) + { + jobject optionalValue_2; + chip::JniReferences::GetInstance().GetOptionalValue(element_0_presetHandleItem_1, optionalValue_2); + if (optionalValue_2 != nullptr) + { + auto & definedValue_2 = listHolder_0->mList[i_0].presetHandle.Emplace(); + cleanupByteArrays.push_back( + chip::Platform::MakeUnique(env, static_cast(optionalValue_2))); + definedValue_2 = cleanupByteArrays.back()->byteSpan(); + } + } + jobject element_0_transitionsItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "transitions", "Ljava/util/ArrayList;", + element_0_transitionsItem_1); + { + using ListType_2 = std::remove_reference_tmList[i_0].transitions)>; + using ListMemberType_2 = ListMemberTypeGetter::Type; + jint element_0_transitionsItem_1Size; + chip::JniReferences::GetInstance().GetListSize(element_0_transitionsItem_1, element_0_transitionsItem_1Size); + if (element_0_transitionsItem_1Size != 0) + { + auto * listHolder_2 = new ListHolder(element_0_transitionsItem_1Size); + listFreer.add(listHolder_2); + + for (jint i_2 = 0; i_2 < element_0_transitionsItem_1Size; ++i_2) + { + jobject element_2; + chip::JniReferences::GetInstance().GetListItem(element_0_transitionsItem_1, i_2, element_2); + jobject element_2_dayOfWeekItem_3; + chip::JniReferences::GetInstance().GetObjectField(element_2, "dayOfWeek", "Ljava/lang/Integer;", + element_2_dayOfWeekItem_3); + listHolder_2->mList[i_2].dayOfWeek.SetRaw( + static_castmList[i_2].dayOfWeek)>::IntegerType>( + chip::JniReferences::GetInstance().IntegerToPrimitive(element_2_dayOfWeekItem_3))); + jobject element_2_transitionTimeItem_3; + chip::JniReferences::GetInstance().GetObjectField(element_2, "transitionTime", "Ljava/lang/Integer;", + element_2_transitionTimeItem_3); + listHolder_2->mList[i_2].transitionTime = + static_castmList[i_2].transitionTime)>>( + chip::JniReferences::GetInstance().IntegerToPrimitive(element_2_transitionTimeItem_3)); + jobject element_2_presetHandleItem_3; + chip::JniReferences::GetInstance().GetObjectField(element_2, "presetHandle", "Ljava/util/Optional;", + element_2_presetHandleItem_3); + if (element_2_presetHandleItem_3 != nullptr) + { + jobject optionalValue_4; + chip::JniReferences::GetInstance().GetOptionalValue(element_2_presetHandleItem_3, optionalValue_4); + if (optionalValue_4 != nullptr) + { + auto & definedValue_4 = listHolder_2->mList[i_2].presetHandle.Emplace(); + cleanupByteArrays.push_back(chip::Platform::MakeUnique( + env, static_cast(optionalValue_4))); + definedValue_4 = cleanupByteArrays.back()->byteSpan(); + } + } + jobject element_2_systemModeItem_3; + chip::JniReferences::GetInstance().GetObjectField(element_2, "systemMode", "Ljava/util/Optional;", + element_2_systemModeItem_3); + if (element_2_systemModeItem_3 != nullptr) + { + jobject optionalValue_4; + chip::JniReferences::GetInstance().GetOptionalValue(element_2_systemModeItem_3, optionalValue_4); + if (optionalValue_4 != nullptr) + { + auto & definedValue_4 = listHolder_2->mList[i_2].systemMode.Emplace(); + definedValue_4 = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionalValue_4)); + } + } + jobject element_2_coolingSetpointItem_3; + chip::JniReferences::GetInstance().GetObjectField(element_2, "coolingSetpoint", "Ljava/util/Optional;", + element_2_coolingSetpointItem_3); + if (element_2_coolingSetpointItem_3 != nullptr) + { + jobject optionalValue_4; + chip::JniReferences::GetInstance().GetOptionalValue(element_2_coolingSetpointItem_3, + optionalValue_4); + if (optionalValue_4 != nullptr) + { + auto & definedValue_4 = listHolder_2->mList[i_2].coolingSetpoint.Emplace(); + definedValue_4 = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionalValue_4)); + } + } + jobject element_2_heatingSetpointItem_3; + chip::JniReferences::GetInstance().GetObjectField(element_2, "heatingSetpoint", "Ljava/util/Optional;", + element_2_heatingSetpointItem_3); + if (element_2_heatingSetpointItem_3 != nullptr) + { + jobject optionalValue_4; + chip::JniReferences::GetInstance().GetOptionalValue(element_2_heatingSetpointItem_3, + optionalValue_4); + if (optionalValue_4 != nullptr) + { + auto & definedValue_4 = listHolder_2->mList[i_2].heatingSetpoint.Emplace(); + definedValue_4 = static_cast>( + chip::JniReferences::GetInstance().IntegerToPrimitive(optionalValue_4)); + } + } + } + listHolder_0->mList[i_0].transitions = ListType_2(listHolder_2->mList, element_0_transitionsItem_1Size); + } + else + { + listHolder_0->mList[i_0].transitions = ListType_2(); + } + } + jobject element_0_builtInItem_1; + chip::JniReferences::GetInstance().GetObjectField(element_0, "builtIn", "Ljava/util/Optional;", + element_0_builtInItem_1); + if (element_0_builtInItem_1 != nullptr) + { + jobject optionalValue_2; + chip::JniReferences::GetInstance().GetOptionalValue(element_0_builtInItem_1, optionalValue_2); + if (optionalValue_2 != nullptr) + { + auto & definedValue_2 = listHolder_0->mList[i_0].builtIn.Emplace(); + if (optionalValue_2 == nullptr) + { + definedValue_2.SetNull(); + } + else + { + auto & nonNullValue_3 = definedValue_2.SetNonNull(); + nonNullValue_3 = static_cast>( + chip::JniReferences::GetInstance().BooleanToPrimitive(optionalValue_2)); + } + } + } + } + cppValue = ListType_0(listHolder_0->mList, valueSize); + } + else + { + cppValue = ListType_0(); + } + } + + std::unique_ptr onSuccess( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onSuccess.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native success callback", CHIP_ERROR_NO_MEMORY)); + + std::unique_ptr onFailure( + Platform::New(callback), Platform::Delete); + VerifyOrReturn(onFailure.get() != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Error creating native failure callback", CHIP_ERROR_NO_MEMORY)); + + CHIP_ERROR err = CHIP_NO_ERROR; + ThermostatCluster * cppCluster = reinterpret_cast(clusterPtr); + VerifyOrReturn(cppCluster != nullptr, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException( + env, callback, "Could not get native cluster", CHIP_ERROR_INCORRECT_STATE)); + + auto successFn = chip::Callback::Callback::FromCancelable(onSuccess->Cancel()); + auto failureFn = chip::Callback::Callback::FromCancelable(onFailure->Cancel()); + + if (timedWriteTimeoutMs == nullptr) + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall); + } + else + { + err = cppCluster->WriteAttribute(cppValue, onSuccess->mContext, successFn->mCall, failureFn->mCall, + chip::JniReferences::GetInstance().IntegerToPrimitive(timedWriteTimeoutMs)); + } + VerifyOrReturn( + err == CHIP_NO_ERROR, + chip::AndroidClusterExceptions::GetInstance().ReturnIllegalStateException(env, callback, "Error writing attribute", err)); + + onSuccess.release(); + onFailure.release(); +} + JNI_METHOD(void, FanControlCluster, writeFanModeAttribute) (JNIEnv * env, jobject self, jlong clusterPtr, jobject callback, jobject value, jobject timedWriteTimeoutMs) { 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 fbfd2968e4217b..827f73f4f74a50 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,81 @@ 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); + 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); + } - 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; - } + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} - 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; - } +CHIPOnOffAcceptedCommandListAttributeCallback::CHIPOnOffAcceptedCommandListAttributeCallback(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; + } - 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); + javaCallbackRef = env->NewGlobalRef(javaCallback); + if (javaCallbackRef == nullptr) + { + ChipLogError(Zcl, "Could not create global reference for Java callback"); + } +} + +CHIPOnOffAcceptedCommandListAttributeCallback::~CHIPOnOffAcceptedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPOnOffAcceptedCommandListAttributeCallback::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); } @@ -789,9 +798,8 @@ void CHIPScenesFabricSceneInfoAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPScenesGeneratedCommandListAttributeCallback::CHIPScenesGeneratedCommandListAttributeCallback(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) @@ -807,7 +815,7 @@ CHIPScenesGeneratedCommandListAttributeCallback::CHIPScenesGeneratedCommandListA } } -CHIPScenesGeneratedCommandListAttributeCallback::~CHIPScenesGeneratedCommandListAttributeCallback() +CHIPOnOffEventListAttributeCallback::~CHIPOnOffEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -818,8 +826,8 @@ CHIPScenesGeneratedCommandListAttributeCallback::~CHIPScenesGeneratedCommandList env->DeleteGlobalRef(javaCallbackRef); } -void CHIPScenesGeneratedCommandListAttributeCallback::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; @@ -828,8 +836,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 +868,8 @@ void CHIPScenesGeneratedCommandListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPScenesAcceptedCommandListAttributeCallback::CHIPScenesAcceptedCommandListAttributeCallback(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) @@ -878,7 +885,7 @@ CHIPScenesAcceptedCommandListAttributeCallback::CHIPScenesAcceptedCommandListAtt } } -CHIPScenesAcceptedCommandListAttributeCallback::~CHIPScenesAcceptedCommandListAttributeCallback() +CHIPOnOffAttributeListAttributeCallback::~CHIPOnOffAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -889,8 +896,8 @@ CHIPScenesAcceptedCommandListAttributeCallback::~CHIPScenesAcceptedCommandListAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPScenesAcceptedCommandListAttributeCallback::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; @@ -899,8 +906,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 +938,10 @@ void CHIPScenesAcceptedCommandListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPScenesEventListAttributeCallback::CHIPScenesEventListAttributeCallback(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) @@ -948,7 +957,8 @@ CHIPScenesEventListAttributeCallback::CHIPScenesEventListAttributeCallback(jobje } } -CHIPScenesEventListAttributeCallback::~CHIPScenesEventListAttributeCallback() +CHIPOnOffSwitchConfigurationGeneratedCommandListAttributeCallback:: + ~CHIPOnOffSwitchConfigurationGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -959,8 +969,8 @@ CHIPScenesEventListAttributeCallback::~CHIPScenesEventListAttributeCallback() env->DeleteGlobalRef(javaCallbackRef); } -void CHIPScenesEventListAttributeCallback::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; @@ -969,8 +979,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 +1011,10 @@ void CHIPScenesEventListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPScenesAttributeListAttributeCallback::CHIPScenesAttributeListAttributeCallback(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) @@ -1018,7 +1030,8 @@ CHIPScenesAttributeListAttributeCallback::CHIPScenesAttributeListAttributeCallba } } -CHIPScenesAttributeListAttributeCallback::~CHIPScenesAttributeListAttributeCallback() +CHIPOnOffSwitchConfigurationAcceptedCommandListAttributeCallback:: + ~CHIPOnOffSwitchConfigurationAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1029,8 +1042,8 @@ CHIPScenesAttributeListAttributeCallback::~CHIPScenesAttributeListAttributeCallb env->DeleteGlobalRef(javaCallbackRef); } -void CHIPScenesAttributeListAttributeCallback::CallbackFn(void * context, - const chip::app::DataModel::DecodableList & list) +void CHIPOnOffSwitchConfigurationAcceptedCommandListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -1039,8 +1052,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 +1084,10 @@ void CHIPScenesAttributeListAttributeCallback::CallbackFn(void * context, env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPOnOffStartUpOnOffAttributeCallback::CHIPOnOffStartUpOnOffAttributeCallback(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) @@ -1088,7 +1103,7 @@ CHIPOnOffStartUpOnOffAttributeCallback::CHIPOnOffStartUpOnOffAttributeCallback(j } } -CHIPOnOffStartUpOnOffAttributeCallback::~CHIPOnOffStartUpOnOffAttributeCallback() +CHIPOnOffSwitchConfigurationEventListAttributeCallback::~CHIPOnOffSwitchConfigurationEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1099,8 +1114,8 @@ CHIPOnOffStartUpOnOffAttributeCallback::~CHIPOnOffStartUpOnOffAttributeCallback( env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOnOffStartUpOnOffAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPOnOffSwitchConfigurationEventListAttributeCallback::CallbackFn( + void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -1108,8 +1123,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 +1133,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) +CHIPOnOffSwitchConfigurationAttributeListAttributeCallback::CHIPOnOffSwitchConfigurationAttributeListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), + keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1155,7 +1175,7 @@ CHIPOnOffGeneratedCommandListAttributeCallback::CHIPOnOffGeneratedCommandListAtt } } -CHIPOnOffGeneratedCommandListAttributeCallback::~CHIPOnOffGeneratedCommandListAttributeCallback() +CHIPOnOffSwitchConfigurationAttributeListAttributeCallback::~CHIPOnOffSwitchConfigurationAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -1166,8 +1186,8 @@ CHIPOnOffGeneratedCommandListAttributeCallback::~CHIPOnOffGeneratedCommandListAt env->DeleteGlobalRef(javaCallbackRef); } -void CHIPOnOffGeneratedCommandListAttributeCallback::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; @@ -1176,508 +1196,8 @@ void CHIPOnOffGeneratedCommandListAttributeCallback::CallbackFn(void * context, 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); -} - -CHIPOnOffAcceptedCommandListAttributeCallback::CHIPOnOffAcceptedCommandListAttributeCallback(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"); - } -} - -CHIPOnOffAcceptedCommandListAttributeCallback::~CHIPOnOffAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOnOffAcceptedCommandListAttributeCallback::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); -} - -CHIPOnOffEventListAttributeCallback::CHIPOnOffEventListAttributeCallback(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"); - } -} - -CHIPOnOffEventListAttributeCallback::~CHIPOnOffEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOnOffEventListAttributeCallback::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); -} - -CHIPOnOffAttributeListAttributeCallback::CHIPOnOffAttributeListAttributeCallback(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"); - } -} - -CHIPOnOffAttributeListAttributeCallback::~CHIPOnOffAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOnOffAttributeListAttributeCallback::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); -} - -CHIPOnOffSwitchConfigurationGeneratedCommandListAttributeCallback:: - CHIPOnOffSwitchConfigurationGeneratedCommandListAttributeCallback(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"); - } -} - -CHIPOnOffSwitchConfigurationGeneratedCommandListAttributeCallback:: - ~CHIPOnOffSwitchConfigurationGeneratedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOnOffSwitchConfigurationGeneratedCommandListAttributeCallback::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); -} - -CHIPOnOffSwitchConfigurationAcceptedCommandListAttributeCallback::CHIPOnOffSwitchConfigurationAcceptedCommandListAttributeCallback( - 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"); - } -} - -CHIPOnOffSwitchConfigurationAcceptedCommandListAttributeCallback:: - ~CHIPOnOffSwitchConfigurationAcceptedCommandListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOnOffSwitchConfigurationAcceptedCommandListAttributeCallback::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); -} - -CHIPOnOffSwitchConfigurationEventListAttributeCallback::CHIPOnOffSwitchConfigurationEventListAttributeCallback(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"); - } -} - -CHIPOnOffSwitchConfigurationEventListAttributeCallback::~CHIPOnOffSwitchConfigurationEventListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOnOffSwitchConfigurationEventListAttributeCallback::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); -} - -CHIPOnOffSwitchConfigurationAttributeListAttributeCallback::CHIPOnOffSwitchConfigurationAttributeListAttributeCallback( - 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"); - } -} - -CHIPOnOffSwitchConfigurationAttributeListAttributeCallback::~CHIPOnOffSwitchConfigurationAttributeListAttributeCallback() -{ - JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); - if (env == nullptr) - { - ChipLogError(Zcl, "Could not delete global reference for Java callback"); - return; - } - env->DeleteGlobalRef(javaCallbackRef); -} - -void CHIPOnOffSwitchConfigurationAttributeListAttributeCallback::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); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -27426,6 +26946,78 @@ void CHIPMicrowaveOvenModeAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } +CHIPMicrowaveOvenControlSupportedWattsAttributeCallback::CHIPMicrowaveOvenControlSupportedWattsAttributeCallback( + 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"); + } +} + +CHIPMicrowaveOvenControlSupportedWattsAttributeCallback::~CHIPMicrowaveOvenControlSupportedWattsAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPMicrowaveOvenControlSupportedWattsAttributeCallback::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); +} + CHIPMicrowaveOvenControlGeneratedCommandListAttributeCallback::CHIPMicrowaveOvenControlGeneratedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : chip::Callback::Callback(CallbackFn, this), @@ -28928,9 +28520,9 @@ void CHIPRvcOperationalStateAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPHepaFilterMonitoringLastChangedTimeAttributeCallback::CHIPHepaFilterMonitoringLastChangedTimeAttributeCallback( - jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPScenesManagementLastConfiguredByAttributeCallback::CHIPScenesManagementLastConfiguredByAttributeCallback(jobject javaCallback, + bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -28947,7 +28539,7 @@ CHIPHepaFilterMonitoringLastChangedTimeAttributeCallback::CHIPHepaFilterMonitori } } -CHIPHepaFilterMonitoringLastChangedTimeAttributeCallback::~CHIPHepaFilterMonitoringLastChangedTimeAttributeCallback() +CHIPScenesManagementLastConfiguredByAttributeCallback::~CHIPScenesManagementLastConfiguredByAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -28958,8 +28550,8 @@ CHIPHepaFilterMonitoringLastChangedTimeAttributeCallback::~CHIPHepaFilterMonitor env->DeleteGlobalRef(javaCallbackRef); } -void CHIPHepaFilterMonitoringLastChangedTimeAttributeCallback::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; @@ -28967,8 +28559,8 @@ void CHIPHepaFilterMonitoringLastChangedTimeAttributeCallback::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; @@ -28996,9 +28588,9 @@ void CHIPHepaFilterMonitoringLastChangedTimeAttributeCallback::CallbackFn(void * env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPHepaFilterMonitoringReplacementProductListAttributeCallback::CHIPHepaFilterMonitoringReplacementProductListAttributeCallback( - 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(); @@ -29015,7 +28607,7 @@ CHIPHepaFilterMonitoringReplacementProductListAttributeCallback::CHIPHepaFilterM } } -CHIPHepaFilterMonitoringReplacementProductListAttributeCallback::~CHIPHepaFilterMonitoringReplacementProductListAttributeCallback() +CHIPScenesManagementFabricSceneInfoAttributeCallback::~CHIPScenesManagementFabricSceneInfoAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29026,10 +28618,10 @@ CHIPHepaFilterMonitoringReplacementProductListAttributeCallback::~CHIPHepaFilter env->DeleteGlobalRef(javaCallbackRef); } -void CHIPHepaFilterMonitoringReplacementProductListAttributeCallback::CallbackFn( +void CHIPScenesManagementFabricSceneInfoAttributeCallback::CallbackFn( void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::HepaFilterMonitoring::Structs::ReplacementProductStruct::DecodableType> & list) + const chip::app::DataModel::DecodableList & + list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -29038,8 +28630,8 @@ void CHIPHepaFilterMonitoringReplacementProductListAttributeCallback::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; @@ -29058,39 +28650,72 @@ void CHIPHepaFilterMonitoringReplacementProductListAttributeCallback::CallbackFn { auto & entry_0 = iter_arrayListObj_0.GetValue(); jobject newElement_0; - jobject newElement_0_productIdentifierType; - std::string newElement_0_productIdentifierTypeClassName = "java/lang/Integer"; - std::string newElement_0_productIdentifierTypeCtorSignature = "(I)V"; - jint jninewElement_0_productIdentifierType = static_cast(entry_0.productIdentifierType); + 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_productIdentifierTypeClassName.c_str(), newElement_0_productIdentifierTypeCtorSignature.c_str(), - jninewElement_0_productIdentifierType, newElement_0_productIdentifierType); - jobject newElement_0_productIdentifierValue; - LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.productIdentifierValue, - newElement_0_productIdentifierValue)); + 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 replacementProductStructStructClass_1; + jclass sceneInfoStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$HepaFilterMonitoringClusterReplacementProductStruct", - replacementProductStructStructClass_1); + env, "chip/devicecontroller/ChipStructs$ScenesManagementClusterSceneInfoStruct", sceneInfoStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$HepaFilterMonitoringClusterReplacementProductStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$ScenesManagementClusterSceneInfoStruct"); return; } - jmethodID replacementProductStructStructCtor_1; - err = chip::JniReferences::GetInstance().FindMethod(env, replacementProductStructStructClass_1, "", - "(Ljava/lang/Integer;Ljava/lang/String;)V", - &replacementProductStructStructCtor_1); - if (err != CHIP_NO_ERROR || replacementProductStructStructCtor_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$HepaFilterMonitoringClusterReplacementProductStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$ScenesManagementClusterSceneInfoStruct constructor"); return; } - newElement_0 = env->NewObject(replacementProductStructStructClass_1, replacementProductStructStructCtor_1, - newElement_0_productIdentifierType, newElement_0_productIdentifierValue); + 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); } @@ -29098,9 +28723,9 @@ void CHIPHepaFilterMonitoringReplacementProductListAttributeCallback::CallbackFn env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPHepaFilterMonitoringGeneratedCommandListAttributeCallback::CHIPHepaFilterMonitoringGeneratedCommandListAttributeCallback( +CHIPScenesManagementGeneratedCommandListAttributeCallback::CHIPScenesManagementGeneratedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -29117,7 +28742,7 @@ CHIPHepaFilterMonitoringGeneratedCommandListAttributeCallback::CHIPHepaFilterMon } } -CHIPHepaFilterMonitoringGeneratedCommandListAttributeCallback::~CHIPHepaFilterMonitoringGeneratedCommandListAttributeCallback() +CHIPScenesManagementGeneratedCommandListAttributeCallback::~CHIPScenesManagementGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29128,7 +28753,7 @@ CHIPHepaFilterMonitoringGeneratedCommandListAttributeCallback::~CHIPHepaFilterMo env->DeleteGlobalRef(javaCallbackRef); } -void CHIPHepaFilterMonitoringGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPScenesManagementGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -29138,8 +28763,8 @@ void CHIPHepaFilterMonitoringGeneratedCommandListAttributeCallback::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; @@ -29170,9 +28795,9 @@ void CHIPHepaFilterMonitoringGeneratedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPHepaFilterMonitoringAcceptedCommandListAttributeCallback::CHIPHepaFilterMonitoringAcceptedCommandListAttributeCallback( +CHIPScenesManagementAcceptedCommandListAttributeCallback::CHIPScenesManagementAcceptedCommandListAttributeCallback( jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -29189,7 +28814,7 @@ CHIPHepaFilterMonitoringAcceptedCommandListAttributeCallback::CHIPHepaFilterMoni } } -CHIPHepaFilterMonitoringAcceptedCommandListAttributeCallback::~CHIPHepaFilterMonitoringAcceptedCommandListAttributeCallback() +CHIPScenesManagementAcceptedCommandListAttributeCallback::~CHIPScenesManagementAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29200,7 +28825,7 @@ CHIPHepaFilterMonitoringAcceptedCommandListAttributeCallback::~CHIPHepaFilterMon env->DeleteGlobalRef(javaCallbackRef); } -void CHIPHepaFilterMonitoringAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPScenesManagementAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -29210,8 +28835,8 @@ void CHIPHepaFilterMonitoringAcceptedCommandListAttributeCallback::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; @@ -29242,9 +28867,9 @@ void CHIPHepaFilterMonitoringAcceptedCommandListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPHepaFilterMonitoringEventListAttributeCallback::CHIPHepaFilterMonitoringEventListAttributeCallback(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) @@ -29260,7 +28885,7 @@ CHIPHepaFilterMonitoringEventListAttributeCallback::CHIPHepaFilterMonitoringEven } } -CHIPHepaFilterMonitoringEventListAttributeCallback::~CHIPHepaFilterMonitoringEventListAttributeCallback() +CHIPScenesManagementEventListAttributeCallback::~CHIPScenesManagementEventListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29271,8 +28896,8 @@ CHIPHepaFilterMonitoringEventListAttributeCallback::~CHIPHepaFilterMonitoringEve env->DeleteGlobalRef(javaCallbackRef); } -void CHIPHepaFilterMonitoringEventListAttributeCallback::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; @@ -29281,8 +28906,8 @@ void CHIPHepaFilterMonitoringEventListAttributeCallback::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; @@ -29313,10 +28938,9 @@ void CHIPHepaFilterMonitoringEventListAttributeCallback::CallbackFn(void * conte env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPHepaFilterMonitoringAttributeListAttributeCallback::CHIPHepaFilterMonitoringAttributeListAttributeCallback(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) @@ -29332,7 +28956,7 @@ CHIPHepaFilterMonitoringAttributeListAttributeCallback::CHIPHepaFilterMonitoring } } -CHIPHepaFilterMonitoringAttributeListAttributeCallback::~CHIPHepaFilterMonitoringAttributeListAttributeCallback() +CHIPScenesManagementAttributeListAttributeCallback::~CHIPScenesManagementAttributeListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29343,7 +28967,7 @@ CHIPHepaFilterMonitoringAttributeListAttributeCallback::~CHIPHepaFilterMonitorin env->DeleteGlobalRef(javaCallbackRef); } -void CHIPHepaFilterMonitoringAttributeListAttributeCallback::CallbackFn( +void CHIPScenesManagementAttributeListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -29353,8 +28977,8 @@ void CHIPHepaFilterMonitoringAttributeListAttributeCallback::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; @@ -29385,9 +29009,9 @@ void CHIPHepaFilterMonitoringAttributeListAttributeCallback::CallbackFn( env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPActivatedCarbonFilterMonitoringLastChangedTimeAttributeCallback:: - CHIPActivatedCarbonFilterMonitoringLastChangedTimeAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPHepaFilterMonitoringLastChangedTimeAttributeCallback::CHIPHepaFilterMonitoringLastChangedTimeAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -29404,8 +29028,7 @@ CHIPActivatedCarbonFilterMonitoringLastChangedTimeAttributeCallback:: } } -CHIPActivatedCarbonFilterMonitoringLastChangedTimeAttributeCallback:: - ~CHIPActivatedCarbonFilterMonitoringLastChangedTimeAttributeCallback() +CHIPHepaFilterMonitoringLastChangedTimeAttributeCallback::~CHIPHepaFilterMonitoringLastChangedTimeAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29416,8 +29039,8 @@ CHIPActivatedCarbonFilterMonitoringLastChangedTimeAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPActivatedCarbonFilterMonitoringLastChangedTimeAttributeCallback::CallbackFn( - void * context, const chip::app::DataModel::Nullable & value) +void CHIPHepaFilterMonitoringLastChangedTimeAttributeCallback::CallbackFn(void * context, + const chip::app::DataModel::Nullable & value) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -29425,8 +29048,8 @@ void CHIPActivatedCarbonFilterMonitoringLastChangedTimeAttributeCallback::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; @@ -29454,10 +29077,9 @@ void CHIPActivatedCarbonFilterMonitoringLastChangedTimeAttributeCallback::Callba env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } -CHIPActivatedCarbonFilterMonitoringReplacementProductListAttributeCallback:: - CHIPActivatedCarbonFilterMonitoringReplacementProductListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, - this), +CHIPHepaFilterMonitoringReplacementProductListAttributeCallback::CHIPHepaFilterMonitoringReplacementProductListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -29474,8 +29096,7 @@ CHIPActivatedCarbonFilterMonitoringReplacementProductListAttributeCallback:: } } -CHIPActivatedCarbonFilterMonitoringReplacementProductListAttributeCallback:: - ~CHIPActivatedCarbonFilterMonitoringReplacementProductListAttributeCallback() +CHIPHepaFilterMonitoringReplacementProductListAttributeCallback::~CHIPHepaFilterMonitoringReplacementProductListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29486,10 +29107,10 @@ CHIPActivatedCarbonFilterMonitoringReplacementProductListAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPActivatedCarbonFilterMonitoringReplacementProductListAttributeCallback::CallbackFn( +void CHIPHepaFilterMonitoringReplacementProductListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList< - chip::app::Clusters::ActivatedCarbonFilterMonitoring::Structs::ReplacementProductStruct::DecodableType> & list) + chip::app::Clusters::HepaFilterMonitoring::Structs::ReplacementProductStruct::DecodableType> & list) { chip::DeviceLayer::StackUnlock unlock; CHIP_ERROR err = CHIP_NO_ERROR; @@ -29498,9 +29119,8 @@ void CHIPActivatedCarbonFilterMonitoringReplacementProductListAttributeCallback: VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr - cppCallback(reinterpret_cast(context), - maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -29532,11 +29152,11 @@ void CHIPActivatedCarbonFilterMonitoringReplacementProductListAttributeCallback: jclass replacementProductStructStructClass_1; err = chip::JniReferences::GetInstance().GetClassRef( - env, "chip/devicecontroller/ChipStructs$ActivatedCarbonFilterMonitoringClusterReplacementProductStruct", + env, "chip/devicecontroller/ChipStructs$HepaFilterMonitoringClusterReplacementProductStruct", replacementProductStructStructClass_1); if (err != CHIP_NO_ERROR) { - ChipLogError(Zcl, "Could not find class ChipStructs$ActivatedCarbonFilterMonitoringClusterReplacementProductStruct"); + ChipLogError(Zcl, "Could not find class ChipStructs$HepaFilterMonitoringClusterReplacementProductStruct"); return; } @@ -29546,8 +29166,7 @@ void CHIPActivatedCarbonFilterMonitoringReplacementProductListAttributeCallback: &replacementProductStructStructCtor_1); if (err != CHIP_NO_ERROR || replacementProductStructStructCtor_1 == nullptr) { - ChipLogError(Zcl, - "Could not find ChipStructs$ActivatedCarbonFilterMonitoringClusterReplacementProductStruct constructor"); + ChipLogError(Zcl, "Could not find ChipStructs$HepaFilterMonitoringClusterReplacementProductStruct constructor"); return; } @@ -29560,9 +29179,9 @@ void CHIPActivatedCarbonFilterMonitoringReplacementProductListAttributeCallback: env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPActivatedCarbonFilterMonitoringGeneratedCommandListAttributeCallback:: - CHIPActivatedCarbonFilterMonitoringGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPHepaFilterMonitoringGeneratedCommandListAttributeCallback::CHIPHepaFilterMonitoringGeneratedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -29579,8 +29198,7 @@ CHIPActivatedCarbonFilterMonitoringGeneratedCommandListAttributeCallback:: } } -CHIPActivatedCarbonFilterMonitoringGeneratedCommandListAttributeCallback:: - ~CHIPActivatedCarbonFilterMonitoringGeneratedCommandListAttributeCallback() +CHIPHepaFilterMonitoringGeneratedCommandListAttributeCallback::~CHIPHepaFilterMonitoringGeneratedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29591,7 +29209,7 @@ CHIPActivatedCarbonFilterMonitoringGeneratedCommandListAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPActivatedCarbonFilterMonitoringGeneratedCommandListAttributeCallback::CallbackFn( +void CHIPHepaFilterMonitoringGeneratedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -29601,8 +29219,8 @@ void CHIPActivatedCarbonFilterMonitoringGeneratedCommandListAttributeCallback::C VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + reinterpret_cast(context), maybeDestroy); // It's valid for javaCallbackRef to be nullptr if the Java code passed in a null callback. javaCallbackRef = cppCallback->javaCallbackRef; @@ -29633,9 +29251,9 @@ void CHIPActivatedCarbonFilterMonitoringGeneratedCommandListAttributeCallback::C env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); } -CHIPActivatedCarbonFilterMonitoringAcceptedCommandListAttributeCallback:: - CHIPActivatedCarbonFilterMonitoringAcceptedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : - chip::Callback::Callback(CallbackFn, this), +CHIPHepaFilterMonitoringAcceptedCommandListAttributeCallback::CHIPHepaFilterMonitoringAcceptedCommandListAttributeCallback( + jobject javaCallback, bool keepAlive) : + chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); @@ -29652,8 +29270,7 @@ CHIPActivatedCarbonFilterMonitoringAcceptedCommandListAttributeCallback:: } } -CHIPActivatedCarbonFilterMonitoringAcceptedCommandListAttributeCallback:: - ~CHIPActivatedCarbonFilterMonitoringAcceptedCommandListAttributeCallback() +CHIPHepaFilterMonitoringAcceptedCommandListAttributeCallback::~CHIPHepaFilterMonitoringAcceptedCommandListAttributeCallback() { JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); if (env == nullptr) @@ -29664,7 +29281,7 @@ CHIPActivatedCarbonFilterMonitoringAcceptedCommandListAttributeCallback:: env->DeleteGlobalRef(javaCallbackRef); } -void CHIPActivatedCarbonFilterMonitoringAcceptedCommandListAttributeCallback::CallbackFn( +void CHIPHepaFilterMonitoringAcceptedCommandListAttributeCallback::CallbackFn( void * context, const chip::app::DataModel::DecodableList & list) { chip::DeviceLayer::StackUnlock unlock; @@ -29674,8 +29291,472 @@ void CHIPActivatedCarbonFilterMonitoringAcceptedCommandListAttributeCallback::Ca VerifyOrReturn(env != nullptr, ChipLogError(Zcl, "Could not get JNI env")); - std::unique_ptr cppCallback( - reinterpret_cast(context), maybeDestroy); + std::unique_ptr cppCallback( + 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); +} + +CHIPHepaFilterMonitoringEventListAttributeCallback::CHIPHepaFilterMonitoringEventListAttributeCallback(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"); + } +} + +CHIPHepaFilterMonitoringEventListAttributeCallback::~CHIPHepaFilterMonitoringEventListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPHepaFilterMonitoringEventListAttributeCallback::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); +} + +CHIPHepaFilterMonitoringAttributeListAttributeCallback::CHIPHepaFilterMonitoringAttributeListAttributeCallback(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"); + } +} + +CHIPHepaFilterMonitoringAttributeListAttributeCallback::~CHIPHepaFilterMonitoringAttributeListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPHepaFilterMonitoringAttributeListAttributeCallback::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); +} + +CHIPActivatedCarbonFilterMonitoringLastChangedTimeAttributeCallback:: + CHIPActivatedCarbonFilterMonitoringLastChangedTimeAttributeCallback(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"); + } +} + +CHIPActivatedCarbonFilterMonitoringLastChangedTimeAttributeCallback:: + ~CHIPActivatedCarbonFilterMonitoringLastChangedTimeAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPActivatedCarbonFilterMonitoringLastChangedTimeAttributeCallback::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); +} + +CHIPActivatedCarbonFilterMonitoringReplacementProductListAttributeCallback:: + CHIPActivatedCarbonFilterMonitoringReplacementProductListAttributeCallback(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"); + } +} + +CHIPActivatedCarbonFilterMonitoringReplacementProductListAttributeCallback:: + ~CHIPActivatedCarbonFilterMonitoringReplacementProductListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPActivatedCarbonFilterMonitoringReplacementProductListAttributeCallback::CallbackFn( + void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::ActivatedCarbonFilterMonitoring::Structs::ReplacementProductStruct::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_productIdentifierType; + std::string newElement_0_productIdentifierTypeClassName = "java/lang/Integer"; + std::string newElement_0_productIdentifierTypeCtorSignature = "(I)V"; + jint jninewElement_0_productIdentifierType = static_cast(entry_0.productIdentifierType); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_productIdentifierTypeClassName.c_str(), newElement_0_productIdentifierTypeCtorSignature.c_str(), + jninewElement_0_productIdentifierType, newElement_0_productIdentifierType); + jobject newElement_0_productIdentifierValue; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.productIdentifierValue, + newElement_0_productIdentifierValue)); + + jclass replacementProductStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ActivatedCarbonFilterMonitoringClusterReplacementProductStruct", + replacementProductStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ActivatedCarbonFilterMonitoringClusterReplacementProductStruct"); + return; + } + + jmethodID replacementProductStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, replacementProductStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/String;)V", + &replacementProductStructStructCtor_1); + if (err != CHIP_NO_ERROR || replacementProductStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, + "Could not find ChipStructs$ActivatedCarbonFilterMonitoringClusterReplacementProductStruct constructor"); + return; + } + + newElement_0 = env->NewObject(replacementProductStructStructClass_1, replacementProductStructStructCtor_1, + newElement_0_productIdentifierType, newElement_0_productIdentifierValue); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPActivatedCarbonFilterMonitoringGeneratedCommandListAttributeCallback:: + CHIPActivatedCarbonFilterMonitoringGeneratedCommandListAttributeCallback(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"); + } +} + +CHIPActivatedCarbonFilterMonitoringGeneratedCommandListAttributeCallback:: + ~CHIPActivatedCarbonFilterMonitoringGeneratedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPActivatedCarbonFilterMonitoringGeneratedCommandListAttributeCallback::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); +} + +CHIPActivatedCarbonFilterMonitoringAcceptedCommandListAttributeCallback:: + CHIPActivatedCarbonFilterMonitoringAcceptedCommandListAttributeCallback(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"); + } +} + +CHIPActivatedCarbonFilterMonitoringAcceptedCommandListAttributeCallback:: + ~CHIPActivatedCarbonFilterMonitoringAcceptedCommandListAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPActivatedCarbonFilterMonitoringAcceptedCommandListAttributeCallback::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; @@ -39236,6 +39317,952 @@ void CHIPThermostatACCoilTemperatureAttributeCallback::CallbackFn(void * context env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); } +CHIPThermostatPresetTypesAttributeCallback::CHIPThermostatPresetTypesAttributeCallback(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"); + } +} + +CHIPThermostatPresetTypesAttributeCallback::~CHIPThermostatPresetTypesAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPThermostatPresetTypesAttributeCallback::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; + jobject newElement_0_presetScenario; + std::string newElement_0_presetScenarioClassName = "java/lang/Integer"; + std::string newElement_0_presetScenarioCtorSignature = "(I)V"; + jint jninewElement_0_presetScenario = static_cast(entry_0.presetScenario); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_presetScenarioClassName.c_str(), + newElement_0_presetScenarioCtorSignature.c_str(), + jninewElement_0_presetScenario, newElement_0_presetScenario); + jobject newElement_0_numberOfPresets; + std::string newElement_0_numberOfPresetsClassName = "java/lang/Integer"; + std::string newElement_0_numberOfPresetsCtorSignature = "(I)V"; + jint jninewElement_0_numberOfPresets = static_cast(entry_0.numberOfPresets); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_numberOfPresetsClassName.c_str(), + newElement_0_numberOfPresetsCtorSignature.c_str(), + jninewElement_0_numberOfPresets, newElement_0_numberOfPresets); + jobject newElement_0_presetTypeFeatures; + std::string newElement_0_presetTypeFeaturesClassName = "java/lang/Integer"; + std::string newElement_0_presetTypeFeaturesCtorSignature = "(I)V"; + jint jninewElement_0_presetTypeFeatures = static_cast(entry_0.presetTypeFeatures.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_presetTypeFeaturesClassName.c_str(), newElement_0_presetTypeFeaturesCtorSignature.c_str(), + jninewElement_0_presetTypeFeatures, newElement_0_presetTypeFeatures); + + jclass presetTypeStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ThermostatClusterPresetTypeStruct", presetTypeStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ThermostatClusterPresetTypeStruct"); + return; + } + + jmethodID presetTypeStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, presetTypeStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", + &presetTypeStructStructCtor_1); + if (err != CHIP_NO_ERROR || presetTypeStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ThermostatClusterPresetTypeStruct constructor"); + return; + } + + newElement_0 = env->NewObject(presetTypeStructStructClass_1, presetTypeStructStructCtor_1, newElement_0_presetScenario, + newElement_0_numberOfPresets, newElement_0_presetTypeFeatures); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPThermostatScheduleTypesAttributeCallback::CHIPThermostatScheduleTypesAttributeCallback(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"); + } +} + +CHIPThermostatScheduleTypesAttributeCallback::~CHIPThermostatScheduleTypesAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPThermostatScheduleTypesAttributeCallback::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; + jobject newElement_0_systemMode; + std::string newElement_0_systemModeClassName = "java/lang/Integer"; + std::string newElement_0_systemModeCtorSignature = "(I)V"; + jint jninewElement_0_systemMode = static_cast(entry_0.systemMode); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_systemModeClassName.c_str(), + newElement_0_systemModeCtorSignature.c_str(), + jninewElement_0_systemMode, newElement_0_systemMode); + jobject newElement_0_numberOfSchedules; + std::string newElement_0_numberOfSchedulesClassName = "java/lang/Integer"; + std::string newElement_0_numberOfSchedulesCtorSignature = "(I)V"; + jint jninewElement_0_numberOfSchedules = static_cast(entry_0.numberOfSchedules); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_numberOfSchedulesClassName.c_str(), newElement_0_numberOfSchedulesCtorSignature.c_str(), + jninewElement_0_numberOfSchedules, newElement_0_numberOfSchedules); + jobject newElement_0_scheduleTypeFeatures; + std::string newElement_0_scheduleTypeFeaturesClassName = "java/lang/Integer"; + std::string newElement_0_scheduleTypeFeaturesCtorSignature = "(I)V"; + jint jninewElement_0_scheduleTypeFeatures = static_cast(entry_0.scheduleTypeFeatures.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_scheduleTypeFeaturesClassName.c_str(), newElement_0_scheduleTypeFeaturesCtorSignature.c_str(), + jninewElement_0_scheduleTypeFeatures, newElement_0_scheduleTypeFeatures); + + jclass scheduleTypeStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ThermostatClusterScheduleTypeStruct", scheduleTypeStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ThermostatClusterScheduleTypeStruct"); + return; + } + + jmethodID scheduleTypeStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod(env, scheduleTypeStructStructClass_1, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/lang/Integer;)V", + &scheduleTypeStructStructCtor_1); + if (err != CHIP_NO_ERROR || scheduleTypeStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ThermostatClusterScheduleTypeStruct constructor"); + return; + } + + newElement_0 = env->NewObject(scheduleTypeStructStructClass_1, scheduleTypeStructStructCtor_1, newElement_0_systemMode, + newElement_0_numberOfSchedules, newElement_0_scheduleTypeFeatures); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPThermostatNumberOfScheduleTransitionPerDayAttributeCallback::CHIPThermostatNumberOfScheduleTransitionPerDayAttributeCallback( + 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"); + } +} + +CHIPThermostatNumberOfScheduleTransitionPerDayAttributeCallback::~CHIPThermostatNumberOfScheduleTransitionPerDayAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPThermostatNumberOfScheduleTransitionPerDayAttributeCallback::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); + } + + env->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPThermostatActivePresetHandleAttributeCallback::CHIPThermostatActivePresetHandleAttributeCallback(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"); + } +} + +CHIPThermostatActivePresetHandleAttributeCallback::~CHIPThermostatActivePresetHandleAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPThermostatActivePresetHandleAttributeCallback::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", "([B)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + 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->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPThermostatActiveScheduleHandleAttributeCallback::CHIPThermostatActiveScheduleHandleAttributeCallback(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"); + } +} + +CHIPThermostatActiveScheduleHandleAttributeCallback::~CHIPThermostatActiveScheduleHandleAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPThermostatActiveScheduleHandleAttributeCallback::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", "([B)V", &javaMethod); + VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogError(Zcl, "Could not find onSuccess() method")); + + jobject javaValue; + if (value.IsNull()) + { + 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->CallVoidMethod(javaCallbackRef, javaMethod, javaValue); +} + +CHIPThermostatPresetsAttributeCallback::CHIPThermostatPresetsAttributeCallback(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"); + } +} + +CHIPThermostatPresetsAttributeCallback::~CHIPThermostatPresetsAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPThermostatPresetsAttributeCallback::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; + jobject newElement_0_presetHandle; + if (entry_0.presetHandle.IsNull()) + { + newElement_0_presetHandle = nullptr; + } + else + { + jbyteArray newElement_0_presetHandleByteArray = + env->NewByteArray(static_cast(entry_0.presetHandle.Value().size())); + env->SetByteArrayRegion(newElement_0_presetHandleByteArray, 0, static_cast(entry_0.presetHandle.Value().size()), + reinterpret_cast(entry_0.presetHandle.Value().data())); + newElement_0_presetHandle = newElement_0_presetHandleByteArray; + } + jobject newElement_0_presetScenario; + std::string newElement_0_presetScenarioClassName = "java/lang/Integer"; + std::string newElement_0_presetScenarioCtorSignature = "(I)V"; + jint jninewElement_0_presetScenario = static_cast(entry_0.presetScenario); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_presetScenarioClassName.c_str(), + newElement_0_presetScenarioCtorSignature.c_str(), + jninewElement_0_presetScenario, newElement_0_presetScenario); + jobject newElement_0_name; + if (!entry_0.name.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_name); + } + else + { + jobject newElement_0_nameInsideOptional; + if (entry_0.name.Value().IsNull()) + { + newElement_0_nameInsideOptional = nullptr; + } + else + { + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(entry_0.name.Value().Value(), + newElement_0_nameInsideOptional)); + } + chip::JniReferences::GetInstance().CreateOptional(newElement_0_nameInsideOptional, newElement_0_name); + } + jobject newElement_0_coolingSetpoint; + if (!entry_0.coolingSetpoint.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_coolingSetpoint); + } + else + { + jobject newElement_0_coolingSetpointInsideOptional; + std::string newElement_0_coolingSetpointInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_0_coolingSetpointInsideOptionalCtorSignature = "(I)V"; + jint jninewElement_0_coolingSetpointInsideOptional = static_cast(entry_0.coolingSetpoint.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_coolingSetpointInsideOptionalClassName.c_str(), + newElement_0_coolingSetpointInsideOptionalCtorSignature.c_str(), jninewElement_0_coolingSetpointInsideOptional, + newElement_0_coolingSetpointInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_coolingSetpointInsideOptional, + newElement_0_coolingSetpoint); + } + jobject newElement_0_heatingSetpoint; + if (!entry_0.heatingSetpoint.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_heatingSetpoint); + } + else + { + jobject newElement_0_heatingSetpointInsideOptional; + std::string newElement_0_heatingSetpointInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_0_heatingSetpointInsideOptionalCtorSignature = "(I)V"; + jint jninewElement_0_heatingSetpointInsideOptional = static_cast(entry_0.heatingSetpoint.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_heatingSetpointInsideOptionalClassName.c_str(), + newElement_0_heatingSetpointInsideOptionalCtorSignature.c_str(), jninewElement_0_heatingSetpointInsideOptional, + newElement_0_heatingSetpointInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_0_heatingSetpointInsideOptional, + newElement_0_heatingSetpoint); + } + jobject newElement_0_builtIn; + if (entry_0.builtIn.IsNull()) + { + newElement_0_builtIn = nullptr; + } + else + { + std::string newElement_0_builtInClassName = "java/lang/Boolean"; + std::string newElement_0_builtInCtorSignature = "(Z)V"; + jboolean jninewElement_0_builtIn = static_cast(entry_0.builtIn.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_builtInClassName.c_str(), + newElement_0_builtInCtorSignature.c_str(), + jninewElement_0_builtIn, newElement_0_builtIn); + } + + jclass presetStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef(env, "chip/devicecontroller/ChipStructs$ThermostatClusterPresetStruct", + presetStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ThermostatClusterPresetStruct"); + return; + } + + jmethodID presetStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, presetStructStructClass_1, "", + "([BLjava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/Optional;Ljava/lang/Boolean;)V", + &presetStructStructCtor_1); + if (err != CHIP_NO_ERROR || presetStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ThermostatClusterPresetStruct constructor"); + return; + } + + newElement_0 = env->NewObject(presetStructStructClass_1, presetStructStructCtor_1, newElement_0_presetHandle, + newElement_0_presetScenario, newElement_0_name, newElement_0_coolingSetpoint, + newElement_0_heatingSetpoint, newElement_0_builtIn); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPThermostatSchedulesAttributeCallback::CHIPThermostatSchedulesAttributeCallback(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"); + } +} + +CHIPThermostatSchedulesAttributeCallback::~CHIPThermostatSchedulesAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPThermostatSchedulesAttributeCallback::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; + jobject newElement_0_scheduleHandle; + if (entry_0.scheduleHandle.IsNull()) + { + newElement_0_scheduleHandle = nullptr; + } + else + { + jbyteArray newElement_0_scheduleHandleByteArray = + env->NewByteArray(static_cast(entry_0.scheduleHandle.Value().size())); + env->SetByteArrayRegion(newElement_0_scheduleHandleByteArray, 0, + static_cast(entry_0.scheduleHandle.Value().size()), + reinterpret_cast(entry_0.scheduleHandle.Value().data())); + newElement_0_scheduleHandle = newElement_0_scheduleHandleByteArray; + } + jobject newElement_0_systemMode; + std::string newElement_0_systemModeClassName = "java/lang/Integer"; + std::string newElement_0_systemModeCtorSignature = "(I)V"; + jint jninewElement_0_systemMode = static_cast(entry_0.systemMode); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_0_systemModeClassName.c_str(), + newElement_0_systemModeCtorSignature.c_str(), + jninewElement_0_systemMode, newElement_0_systemMode); + 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_presetHandle; + if (!entry_0.presetHandle.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_presetHandle); + } + else + { + jobject newElement_0_presetHandleInsideOptional; + jbyteArray newElement_0_presetHandleInsideOptionalByteArray = + env->NewByteArray(static_cast(entry_0.presetHandle.Value().size())); + env->SetByteArrayRegion(newElement_0_presetHandleInsideOptionalByteArray, 0, + static_cast(entry_0.presetHandle.Value().size()), + reinterpret_cast(entry_0.presetHandle.Value().data())); + newElement_0_presetHandleInsideOptional = newElement_0_presetHandleInsideOptionalByteArray; + chip::JniReferences::GetInstance().CreateOptional(newElement_0_presetHandleInsideOptional, newElement_0_presetHandle); + } + jobject newElement_0_transitions; + chip::JniReferences::GetInstance().CreateArrayList(newElement_0_transitions); + + auto iter_newElement_0_transitions_2 = entry_0.transitions.begin(); + while (iter_newElement_0_transitions_2.Next()) + { + auto & entry_2 = iter_newElement_0_transitions_2.GetValue(); + jobject newElement_2; + jobject newElement_2_dayOfWeek; + std::string newElement_2_dayOfWeekClassName = "java/lang/Integer"; + std::string newElement_2_dayOfWeekCtorSignature = "(I)V"; + jint jninewElement_2_dayOfWeek = static_cast(entry_2.dayOfWeek.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_dayOfWeekClassName.c_str(), + newElement_2_dayOfWeekCtorSignature.c_str(), + jninewElement_2_dayOfWeek, newElement_2_dayOfWeek); + jobject newElement_2_transitionTime; + std::string newElement_2_transitionTimeClassName = "java/lang/Integer"; + std::string newElement_2_transitionTimeCtorSignature = "(I)V"; + jint jninewElement_2_transitionTime = static_cast(entry_2.transitionTime); + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_2_transitionTimeClassName.c_str(), + newElement_2_transitionTimeCtorSignature.c_str(), + jninewElement_2_transitionTime, newElement_2_transitionTime); + jobject newElement_2_presetHandle; + if (!entry_2.presetHandle.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_presetHandle); + } + else + { + jobject newElement_2_presetHandleInsideOptional; + jbyteArray newElement_2_presetHandleInsideOptionalByteArray = + env->NewByteArray(static_cast(entry_2.presetHandle.Value().size())); + env->SetByteArrayRegion(newElement_2_presetHandleInsideOptionalByteArray, 0, + static_cast(entry_2.presetHandle.Value().size()), + reinterpret_cast(entry_2.presetHandle.Value().data())); + newElement_2_presetHandleInsideOptional = newElement_2_presetHandleInsideOptionalByteArray; + chip::JniReferences::GetInstance().CreateOptional(newElement_2_presetHandleInsideOptional, + newElement_2_presetHandle); + } + jobject newElement_2_systemMode; + if (!entry_2.systemMode.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_systemMode); + } + else + { + jobject newElement_2_systemModeInsideOptional; + std::string newElement_2_systemModeInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_2_systemModeInsideOptionalCtorSignature = "(I)V"; + jint jninewElement_2_systemModeInsideOptional = static_cast(entry_2.systemMode.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_systemModeInsideOptionalClassName.c_str(), + newElement_2_systemModeInsideOptionalCtorSignature.c_str(), jninewElement_2_systemModeInsideOptional, + newElement_2_systemModeInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_systemModeInsideOptional, newElement_2_systemMode); + } + jobject newElement_2_coolingSetpoint; + if (!entry_2.coolingSetpoint.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_coolingSetpoint); + } + else + { + jobject newElement_2_coolingSetpointInsideOptional; + std::string newElement_2_coolingSetpointInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_2_coolingSetpointInsideOptionalCtorSignature = "(I)V"; + jint jninewElement_2_coolingSetpointInsideOptional = static_cast(entry_2.coolingSetpoint.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_coolingSetpointInsideOptionalClassName.c_str(), + newElement_2_coolingSetpointInsideOptionalCtorSignature.c_str(), jninewElement_2_coolingSetpointInsideOptional, + newElement_2_coolingSetpointInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_coolingSetpointInsideOptional, + newElement_2_coolingSetpoint); + } + jobject newElement_2_heatingSetpoint; + if (!entry_2.heatingSetpoint.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_2_heatingSetpoint); + } + else + { + jobject newElement_2_heatingSetpointInsideOptional; + std::string newElement_2_heatingSetpointInsideOptionalClassName = "java/lang/Integer"; + std::string newElement_2_heatingSetpointInsideOptionalCtorSignature = "(I)V"; + jint jninewElement_2_heatingSetpointInsideOptional = static_cast(entry_2.heatingSetpoint.Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_2_heatingSetpointInsideOptionalClassName.c_str(), + newElement_2_heatingSetpointInsideOptionalCtorSignature.c_str(), jninewElement_2_heatingSetpointInsideOptional, + newElement_2_heatingSetpointInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_2_heatingSetpointInsideOptional, + newElement_2_heatingSetpoint); + } + + jclass scheduleTransitionStructStructClass_3; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ThermostatClusterScheduleTransitionStruct", + scheduleTransitionStructStructClass_3); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ThermostatClusterScheduleTransitionStruct"); + return; + } + + jmethodID scheduleTransitionStructStructCtor_3; + err = chip::JniReferences::GetInstance().FindMethod(env, scheduleTransitionStructStructClass_3, "", + "(Ljava/lang/Integer;Ljava/lang/Integer;Ljava/util/Optional;Ljava/" + "util/Optional;Ljava/util/Optional;Ljava/util/Optional;)V", + &scheduleTransitionStructStructCtor_3); + if (err != CHIP_NO_ERROR || scheduleTransitionStructStructCtor_3 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ThermostatClusterScheduleTransitionStruct constructor"); + return; + } + + newElement_2 = env->NewObject(scheduleTransitionStructStructClass_3, scheduleTransitionStructStructCtor_3, + newElement_2_dayOfWeek, newElement_2_transitionTime, newElement_2_presetHandle, + newElement_2_systemMode, newElement_2_coolingSetpoint, newElement_2_heatingSetpoint); + chip::JniReferences::GetInstance().AddToList(newElement_0_transitions, newElement_2); + } + jobject newElement_0_builtIn; + if (!entry_0.builtIn.HasValue()) + { + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_0_builtIn); + } + else + { + jobject newElement_0_builtInInsideOptional; + if (entry_0.builtIn.Value().IsNull()) + { + newElement_0_builtInInsideOptional = nullptr; + } + else + { + std::string newElement_0_builtInInsideOptionalClassName = "java/lang/Boolean"; + std::string newElement_0_builtInInsideOptionalCtorSignature = "(Z)V"; + jboolean jninewElement_0_builtInInsideOptional = static_cast(entry_0.builtIn.Value().Value()); + chip::JniReferences::GetInstance().CreateBoxedObject( + newElement_0_builtInInsideOptionalClassName.c_str(), newElement_0_builtInInsideOptionalCtorSignature.c_str(), + jninewElement_0_builtInInsideOptional, newElement_0_builtInInsideOptional); + } + chip::JniReferences::GetInstance().CreateOptional(newElement_0_builtInInsideOptional, newElement_0_builtIn); + } + + jclass scheduleStructStructClass_1; + err = chip::JniReferences::GetInstance().GetClassRef( + env, "chip/devicecontroller/ChipStructs$ThermostatClusterScheduleStruct", scheduleStructStructClass_1); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipStructs$ThermostatClusterScheduleStruct"); + return; + } + + jmethodID scheduleStructStructCtor_1; + err = chip::JniReferences::GetInstance().FindMethod( + env, scheduleStructStructClass_1, "", + "([BLjava/lang/Integer;Ljava/util/Optional;Ljava/util/Optional;Ljava/util/ArrayList;Ljava/util/Optional;)V", + &scheduleStructStructCtor_1); + if (err != CHIP_NO_ERROR || scheduleStructStructCtor_1 == nullptr) + { + ChipLogError(Zcl, "Could not find ChipStructs$ThermostatClusterScheduleStruct constructor"); + return; + } + + newElement_0 = env->NewObject(scheduleStructStructClass_1, scheduleStructStructCtor_1, newElement_0_scheduleHandle, + newElement_0_systemMode, newElement_0_name, newElement_0_presetHandle, + newElement_0_transitions, newElement_0_builtIn); + chip::JniReferences::GetInstance().AddToList(arrayListObj, newElement_0); + } + + env->ExceptionClear(); + env->CallVoidMethod(javaCallbackRef, javaMethod, arrayListObj); +} + +CHIPThermostatSetpointHoldExpiryTimestampAttributeCallback::CHIPThermostatSetpointHoldExpiryTimestampAttributeCallback( + 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"); + } +} + +CHIPThermostatSetpointHoldExpiryTimestampAttributeCallback::~CHIPThermostatSetpointHoldExpiryTimestampAttributeCallback() +{ + JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); + if (env == nullptr) + { + ChipLogError(Zcl, "Could not delete global reference for Java callback"); + return; + } + env->DeleteGlobalRef(javaCallbackRef); +} + +void CHIPThermostatSetpointHoldExpiryTimestampAttributeCallback::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); +} + CHIPThermostatGeneratedCommandListAttributeCallback::CHIPThermostatGeneratedCommandListAttributeCallback(jobject javaCallback, bool keepAlive) : chip::Callback::Callback(CallbackFn, this), keepAlive(keepAlive) diff --git a/src/controller/python/BUILD.gn b/src/controller/python/BUILD.gn index 4b84c63d5ff30d..c8d2ac32779726 100644 --- a/src/controller/python/BUILD.gn +++ b/src/controller/python/BUILD.gn @@ -269,10 +269,7 @@ chip_python_wheel_action("chip-core") { if (chip_controller) { sources += [ "chip/ChipDeviceCtrl.py" ] } else { - sources += [ - "chip/server/__init__.py", - "chip/server/types.py", - ] + sources += [ "chip/server/__init__.py" ] } }, { diff --git a/src/controller/python/chip/ChipDeviceCtrl.py b/src/controller/python/chip/ChipDeviceCtrl.py index c21cc5388f81af..5f57c5e8266d9e 100644 --- a/src/controller/python/chip/ChipDeviceCtrl.py +++ b/src/controller/python/chip/ChipDeviceCtrl.py @@ -690,8 +690,12 @@ def DiscoverAllCommissioning(self): self.devCtrl) ).raise_on_error() + class CommissioningWindowPasscode(enum.IntEnum): + kOriginalSetupCode = 0, + kTokenWithRandomPin = 1, + def OpenCommissioningWindow(self, nodeid: int, timeout: int, iteration: int, - discriminator: int, option: int) -> CommissioningParameters: + discriminator: int, option: CommissioningWindowPasscode) -> CommissioningParameters: ''' Opens a commissioning window on the device with the given nodeid. nodeid: Node id of the device timeout: Command timeout diff --git a/src/controller/python/chip/ChipStack.py b/src/controller/python/chip/ChipStack.py index d64fa347faecf1..6df7e41de4433a 100644 --- a/src/controller/python/chip/ChipStack.py +++ b/src/controller/python/chip/ChipStack.py @@ -448,7 +448,7 @@ def _AllDirsToRoot(self, dir): def _loadLib(self): if self._ChipStackLib is None: self._ChipStackLib = chip.native.GetLibraryHandle() - self._chipDLLPath = chip.native.FindNativeLibraryPath() + self._chipDLLPath = chip.native.FindNativeLibraryPath(chip.native.Library.CONTROLLER) self._ChipStackLib.pychip_DeviceController_StackInit.argtypes = [c_void_p, c_bool] self._ChipStackLib.pychip_DeviceController_StackInit.restype = PyChipError diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 7954593df97171..2c5cfc50944076 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, @@ -5680,6 +5500,8 @@ class ChipClusters: "cookMode": "int", "cookTime": "int", "powerSetting": "int", + "wattSettingIndex": "int", + "startAfterSetting": "bool", }, }, 0x00000001: { @@ -5691,8 +5513,14 @@ class ChipClusters: }, }, "attributes": { - 0x00000001: { + 0x00000000: { "attributeName": "CookTime", + "attributeId": 0x00000000, + "type": "int", + "reportable": True, + }, + 0x00000001: { + "attributeName": "MaxCookTime", "attributeId": 0x00000001, "type": "int", "reportable": True, @@ -5721,6 +5549,24 @@ class ChipClusters: "type": "int", "reportable": True, }, + 0x00000006: { + "attributeName": "SupportedWatts", + "attributeId": 0x00000006, + "type": "int", + "reportable": True, + }, + 0x00000007: { + "attributeName": "SelectedWattIndex", + "attributeId": 0x00000007, + "type": "int", + "reportable": True, + }, + 0x00000008: { + "attributeName": "WattRating", + "attributeId": 0x00000008, + "type": "int", + "reportable": True, + }, 0x0000FFF8: { "attributeName": "GeneratedCommandList", "attributeId": 0x0000FFF8, @@ -5967,6 +5813,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, @@ -8112,6 +8138,53 @@ class ChipClusters: "args": { }, }, + 0x00000005: { + "commandId": 0x00000005, + "commandName": "SetActiveScheduleRequest", + "args": { + "scheduleHandle": "bytes", + }, + }, + 0x00000006: { + "commandId": 0x00000006, + "commandName": "SetActivePresetRequest", + "args": { + "presetHandle": "bytes", + "delayMinutes": "int", + }, + }, + 0x00000007: { + "commandId": 0x00000007, + "commandName": "StartPresetsSchedulesEditRequest", + "args": { + "timeoutSeconds": "int", + }, + }, + 0x00000008: { + "commandId": 0x00000008, + "commandName": "CancelPresetsSchedulesEditRequest", + "args": { + }, + }, + 0x00000009: { + "commandId": 0x00000009, + "commandName": "CommitPresetsSchedulesRequest", + "args": { + }, + }, + 0x0000000A: { + "commandId": 0x0000000A, + "commandName": "CancelSetActivePresetRequest", + "args": { + }, + }, + 0x0000000B: { + "commandId": 0x0000000B, + "commandName": "SetTemperatureSetpointHoldPolicy", + "args": { + "temperatureSetpointHoldPolicy": "int", + }, + }, }, "attributes": { 0x00000000: { @@ -8435,6 +8508,92 @@ class ChipClusters: "reportable": True, "writable": True, }, + 0x00000048: { + "attributeName": "PresetTypes", + "attributeId": 0x00000048, + "type": "", + "reportable": True, + }, + 0x00000049: { + "attributeName": "ScheduleTypes", + "attributeId": 0x00000049, + "type": "", + "reportable": True, + }, + 0x0000004A: { + "attributeName": "NumberOfPresets", + "attributeId": 0x0000004A, + "type": "int", + "reportable": True, + }, + 0x0000004B: { + "attributeName": "NumberOfSchedules", + "attributeId": 0x0000004B, + "type": "int", + "reportable": True, + }, + 0x0000004C: { + "attributeName": "NumberOfScheduleTransitions", + "attributeId": 0x0000004C, + "type": "int", + "reportable": True, + }, + 0x0000004D: { + "attributeName": "NumberOfScheduleTransitionPerDay", + "attributeId": 0x0000004D, + "type": "int", + "reportable": True, + }, + 0x0000004E: { + "attributeName": "ActivePresetHandle", + "attributeId": 0x0000004E, + "type": "bytes", + "reportable": True, + }, + 0x0000004F: { + "attributeName": "ActiveScheduleHandle", + "attributeId": 0x0000004F, + "type": "bytes", + "reportable": True, + }, + 0x00000050: { + "attributeName": "Presets", + "attributeId": 0x00000050, + "type": "", + "reportable": True, + "writable": True, + }, + 0x00000051: { + "attributeName": "Schedules", + "attributeId": 0x00000051, + "type": "", + "reportable": True, + "writable": True, + }, + 0x00000052: { + "attributeName": "PresetsSchedulesEditable", + "attributeId": 0x00000052, + "type": "bool", + "reportable": True, + }, + 0x00000053: { + "attributeName": "TemperatureSetpointHoldPolicy", + "attributeId": 0x00000053, + "type": "int", + "reportable": True, + }, + 0x00000054: { + "attributeName": "SetpointHoldExpiryTimestamp", + "attributeId": 0x00000054, + "type": "int", + "reportable": True, + }, + 0x00000055: { + "attributeName": "QueuedPreset", + "attributeId": 0x00000055, + "type": "", + "reportable": True, + }, 0x0000FFF8: { "attributeName": "GeneratedCommandList", "attributeId": 0x0000FFF8, @@ -13973,7 +14132,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, @@ -14032,6 +14190,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, @@ -14089,7 +14248,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, @@ -14148,6 +14306,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 ecc9b63039e8bc..6cfb1520eb2936 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 @@ -17415,6 +16700,7 @@ class Enums: class ModeTag(MatterIntEnum): kIdle = 0x4000 kCleaning = 0x4001 + kMapping = 0x4002 # kUnknownEnumValue intentionally not defined. This enum never goes # through DataModel::Decode, likely because it is a part of a derived # cluster. As a result having kUnknownEnumValue in this enum is error @@ -19908,11 +19194,15 @@ class MicrowaveOvenControl(Cluster): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="cookTime", Tag=0x00000001, Type=uint), - ClusterObjectFieldDescriptor(Label="powerSetting", Tag=0x00000002, Type=uint), + ClusterObjectFieldDescriptor(Label="cookTime", Tag=0x00000000, Type=uint), + ClusterObjectFieldDescriptor(Label="maxCookTime", Tag=0x00000001, Type=uint), + ClusterObjectFieldDescriptor(Label="powerSetting", Tag=0x00000002, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="minPower", Tag=0x00000003, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="maxPower", Tag=0x00000004, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="powerStep", Tag=0x00000005, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="supportedWatts", Tag=0x00000006, Type=typing.Optional[typing.List[uint]]), + ClusterObjectFieldDescriptor(Label="selectedWattIndex", Tag=0x00000007, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="wattRating", Tag=0x00000008, 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]), @@ -19922,10 +19212,14 @@ def descriptor(cls) -> ClusterObjectDescriptor: ]) cookTime: 'uint' = None - powerSetting: 'uint' = None + maxCookTime: 'uint' = None + powerSetting: 'typing.Optional[uint]' = None minPower: 'typing.Optional[uint]' = None maxPower: 'typing.Optional[uint]' = None powerStep: 'typing.Optional[uint]' = None + supportedWatts: 'typing.Optional[typing.List[uint]]' = None + selectedWattIndex: 'typing.Optional[uint]' = None + wattRating: 'typing.Optional[uint]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -19933,6 +19227,12 @@ def descriptor(cls) -> ClusterObjectDescriptor: featureMap: 'uint' = None clusterRevision: 'uint' = None + class Bitmaps: + class Feature(IntFlag): + kPowerAsNumber = 0x1 + kPowerInWatts = 0x2 + kPowerNumberLimits = 0x4 + class Commands: @dataclass class SetCookingParameters(ClusterCommand): @@ -19948,11 +19248,15 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="cookMode", Tag=0, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="cookTime", Tag=1, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="powerSetting", Tag=2, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="wattSettingIndex", Tag=3, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="startAfterSetting", Tag=4, Type=typing.Optional[bool]), ]) cookMode: 'typing.Optional[uint]' = None cookTime: 'typing.Optional[uint]' = None powerSetting: 'typing.Optional[uint]' = None + wattSettingIndex: 'typing.Optional[uint]' = None + startAfterSetting: 'typing.Optional[bool]' = None @dataclass class AddMoreTime(ClusterCommand): @@ -19977,6 +19281,22 @@ class CookTime(ClusterAttributeDescriptor): def cluster_id(cls) -> int: return 0x0000005F + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=uint) + + value: 'uint' = 0 + + @dataclass + class MaxCookTime(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0000005F + @ChipUtility.classproperty def attribute_id(cls) -> int: return 0x00000001 @@ -19999,9 +19319,9 @@ def attribute_id(cls) -> int: @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 MinPower(ClusterAttributeDescriptor): @@ -20052,62 +19372,62 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[uint]' = None @dataclass - class GeneratedCommandList(ClusterAttributeDescriptor): + class SupportedWatts(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x0000005F @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFF8 + return 0x00000006 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[uint]) + return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[uint]]) - value: 'typing.List[uint]' = field(default_factory=lambda: []) + value: 'typing.Optional[typing.List[uint]]' = None @dataclass - class AcceptedCommandList(ClusterAttributeDescriptor): + class SelectedWattIndex(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x0000005F @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFF9 + 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 EventList(ClusterAttributeDescriptor): + class WattRating(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x0000005F @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFFA + return 0x00000008 @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 AttributeList(ClusterAttributeDescriptor): + class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: return 0x0000005F @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x0000FFFB + return 0x0000FFF8 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -20116,7 +19436,55 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass - class FeatureMap(ClusterAttributeDescriptor): + class AcceptedCommandList(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x0000005F + + @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 0x0000005F + + @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 0x0000005F + + @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 0x0000005F @@ -20515,179 +19883,901 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="errorState", Tag=0, Type=OperationalState.Structs.ErrorStateStruct), ]) - errorState: 'OperationalState.Structs.ErrorStateStruct' = field(default_factory=lambda: OperationalState.Structs.ErrorStateStruct()) + errorState: 'OperationalState.Structs.ErrorStateStruct' = field(default_factory=lambda: OperationalState.Structs.ErrorStateStruct()) + + @dataclass + class OperationCompletion(ClusterEvent): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000060 + + @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 RvcOperationalState(Cluster): + id: typing.ClassVar[int] = 0x00000061 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="phaseList", Tag=0x00000000, Type=typing.Union[Nullable, typing.List[str]]), + ClusterObjectFieldDescriptor(Label="currentPhase", Tag=0x00000001, Type=typing.Union[Nullable, uint]), + ClusterObjectFieldDescriptor(Label="countdownTime", Tag=0x00000002, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="operationalStateList", Tag=0x00000003, Type=typing.List[RvcOperationalState.Structs.OperationalStateStruct]), + ClusterObjectFieldDescriptor(Label="operationalState", Tag=0x00000004, Type=uint), + ClusterObjectFieldDescriptor(Label="operationalError", Tag=0x00000005, Type=RvcOperationalState.Structs.ErrorStateStruct), + 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), + ]) + + phaseList: 'typing.Union[Nullable, typing.List[str]]' = None + currentPhase: 'typing.Union[Nullable, uint]' = None + countdownTime: 'typing.Union[None, Nullable, uint]' = None + operationalStateList: 'typing.List[RvcOperationalState.Structs.OperationalStateStruct]' = None + operationalState: 'uint' = None + operationalError: 'RvcOperationalState.Structs.ErrorStateStruct' = 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 ErrorStateEnum(MatterIntEnum): + kFailedToFindChargingDock = 0x40 + kStuck = 0x41 + kDustBinMissing = 0x42 + kDustBinFull = 0x43 + kWaterTankEmpty = 0x44 + kWaterTankMissing = 0x45 + kWaterTankLidOpen = 0x46 + kMopCleaningPadMissing = 0x47 + # kUnknownEnumValue intentionally not defined. This enum never goes + # through DataModel::Decode, likely because it is a part of a derived + # cluster. As a result having kUnknownEnumValue in this enum is error + # prone, and was removed. See + # src/app/common/templates/config-data.yaml. + + class OperationalStateEnum(MatterIntEnum): + kSeekingCharger = 0x40 + kCharging = 0x41 + kDocked = 0x42 + # kUnknownEnumValue intentionally not defined. This enum never goes + # through DataModel::Decode, likely because it is a part of a derived + # cluster. As a result having kUnknownEnumValue in this enum is error + # prone, and was removed. See + # src/app/common/templates/config-data.yaml. + + 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 OperationCompletion(ClusterEvent): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000060 - - @ChipUtility.classproperty - def event_id(cls) -> int: - return 0x00000001 + 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="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]), + ClusterObjectFieldDescriptor(Label="groupID", Tag=0, Type=uint), ]) - completionErrorCode: 'uint' = 0 - totalOperationalTime: 'typing.Union[None, Nullable, uint]' = None - pausedTime: 'typing.Union[None, Nullable, uint]' = None - - -@dataclass -class RvcOperationalState(Cluster): - id: typing.ClassVar[int] = 0x00000061 - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="phaseList", Tag=0x00000000, Type=typing.Union[Nullable, typing.List[str]]), - ClusterObjectFieldDescriptor(Label="currentPhase", Tag=0x00000001, Type=typing.Union[Nullable, uint]), - ClusterObjectFieldDescriptor(Label="countdownTime", Tag=0x00000002, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="operationalStateList", Tag=0x00000003, Type=typing.List[RvcOperationalState.Structs.OperationalStateStruct]), - ClusterObjectFieldDescriptor(Label="operationalState", Tag=0x00000004, Type=uint), - ClusterObjectFieldDescriptor(Label="operationalError", Tag=0x00000005, Type=RvcOperationalState.Structs.ErrorStateStruct), - 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), - ]) - - phaseList: 'typing.Union[Nullable, typing.List[str]]' = None - currentPhase: 'typing.Union[Nullable, uint]' = None - countdownTime: 'typing.Union[None, Nullable, uint]' = None - operationalStateList: 'typing.List[RvcOperationalState.Structs.OperationalStateStruct]' = None - operationalState: 'uint' = None - operationalError: 'RvcOperationalState.Structs.ErrorStateStruct' = 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 ErrorStateEnum(MatterIntEnum): - kFailedToFindChargingDock = 0x40 - kStuck = 0x41 - kDustBinMissing = 0x42 - kDustBinFull = 0x43 - kWaterTankEmpty = 0x44 - kWaterTankMissing = 0x45 - kWaterTankLidOpen = 0x46 - kMopCleaningPadMissing = 0x47 - # kUnknownEnumValue intentionally not defined. This enum never goes - # through DataModel::Decode, likely because it is a part of a derived - # cluster. As a result having kUnknownEnumValue in this enum is error - # prone, and was removed. See - # src/app/common/templates/config-data.yaml. - - class OperationalStateEnum(MatterIntEnum): - kSeekingCharger = 0x40 - kCharging = 0x41 - kDocked = 0x42 - # kUnknownEnumValue intentionally not defined. This enum never goes - # through DataModel::Decode, likely because it is a part of a derived - # cluster. As a result having kUnknownEnumValue in this enum is error - # prone, and was removed. See - # src/app/common/templates/config-data.yaml. + groupID: 'uint' = 0 - class Structs: @dataclass - class ErrorStateStruct(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="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="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]]), ]) - errorStateID: 'uint' = 0 - errorStateLabel: 'typing.Optional[str]' = None - errorStateDetails: 'typing.Optional[str]' = None + status: 'uint' = 0 + capacity: 'typing.Union[Nullable, uint]' = NullValue + groupID: 'uint' = 0 + sceneList: 'typing.Optional[typing.List[uint]]' = None @dataclass - class OperationalStateStruct(ClusterObject): + 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] = 'EnhancedAddSceneResponse' + @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="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]), ]) - operationalStateID: 'uint' = 0 - operationalStateLabel: 'typing.Optional[str]' = None + groupID: 'uint' = 0 + sceneID: 'uint' = 0 + transitionTime: 'uint' = 0 + sceneName: 'str' = "" + extensionFieldSets: 'typing.List[ScenesManagement.Structs.ExtensionFieldSet]' = field(default_factory=lambda: []) - 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' + 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 Stop(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000061 - command_id: typing.ClassVar[int] = 0x00000001 + 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 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' + 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 Resume(ClusterCommand): - cluster_id: typing.ClassVar[int] = 0x00000061 - command_id: typing.ClassVar[int] = 0x00000003 + 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 @@ -20695,17 +20785,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: @@ -20713,15 +20807,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: @@ -20729,15 +20823,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: @@ -20745,35 +20839,67 @@ 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 SceneValid(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000062 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000003 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) + + value: 'typing.Optional[bool]' = None + + @dataclass + class NameSupport(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000062 + + @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 OperationalStateList(ClusterAttributeDescriptor): + class LastConfiguredBy(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000061 + return 0x00000062 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000003 + return 0x00000005 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.List[RvcOperationalState.Structs.OperationalStateStruct]) + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - value: 'typing.List[RvcOperationalState.Structs.OperationalStateStruct]' = field(default_factory=lambda: []) + value: 'typing.Union[None, Nullable, uint]' = None @dataclass - class OperationalState(ClusterAttributeDescriptor): + class SceneTableSize(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000061 + return 0x00000062 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000004 + return 0x00000006 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -20782,26 +20908,26 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 @dataclass - class OperationalError(ClusterAttributeDescriptor): + class FabricSceneInfo(ClusterAttributeDescriptor): @ChipUtility.classproperty def cluster_id(cls) -> int: - return 0x00000061 + return 0x00000062 @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000005 + return 0x00000007 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=RvcOperationalState.Structs.ErrorStateStruct) + return ClusterObjectFieldDescriptor(Type=typing.List[ScenesManagement.Structs.SceneInfoStruct]) - value: 'RvcOperationalState.Structs.ErrorStateStruct' = field(default_factory=lambda: RvcOperationalState.Structs.ErrorStateStruct()) + 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: @@ -20817,7 +20943,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: @@ -20833,7 +20959,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: @@ -20849,7 +20975,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: @@ -20865,7 +20991,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: @@ -20881,7 +21007,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: @@ -20893,49 +21019,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): @@ -29142,6 +29225,20 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="ACLouverPosition", Tag=0x00000045, Type=typing.Optional[Thermostat.Enums.ACLouverPositionEnum]), ClusterObjectFieldDescriptor(Label="ACCoilTemperature", Tag=0x00000046, Type=typing.Union[None, Nullable, int]), ClusterObjectFieldDescriptor(Label="ACCapacityformat", Tag=0x00000047, Type=typing.Optional[Thermostat.Enums.ACCapacityFormatEnum]), + ClusterObjectFieldDescriptor(Label="presetTypes", Tag=0x00000048, Type=typing.Optional[typing.List[Thermostat.Structs.PresetTypeStruct]]), + ClusterObjectFieldDescriptor(Label="scheduleTypes", Tag=0x00000049, Type=typing.Optional[typing.List[Thermostat.Structs.ScheduleTypeStruct]]), + ClusterObjectFieldDescriptor(Label="numberOfPresets", Tag=0x0000004A, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="numberOfSchedules", Tag=0x0000004B, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="numberOfScheduleTransitions", Tag=0x0000004C, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="numberOfScheduleTransitionPerDay", Tag=0x0000004D, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="activePresetHandle", Tag=0x0000004E, Type=typing.Union[None, Nullable, bytes]), + ClusterObjectFieldDescriptor(Label="activeScheduleHandle", Tag=0x0000004F, Type=typing.Union[None, Nullable, bytes]), + ClusterObjectFieldDescriptor(Label="presets", Tag=0x00000050, Type=typing.Optional[typing.List[Thermostat.Structs.PresetStruct]]), + ClusterObjectFieldDescriptor(Label="schedules", Tag=0x00000051, Type=typing.Optional[typing.List[Thermostat.Structs.ScheduleStruct]]), + ClusterObjectFieldDescriptor(Label="presetsSchedulesEditable", Tag=0x00000052, Type=typing.Optional[bool]), + ClusterObjectFieldDescriptor(Label="temperatureSetpointHoldPolicy", Tag=0x00000053, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="setpointHoldExpiryTimestamp", Tag=0x00000054, Type=typing.Union[None, Nullable, uint]), + ClusterObjectFieldDescriptor(Label="queuedPreset", Tag=0x00000055, Type=typing.Union[None, Nullable, Thermostat.Structs.QueuedPresetStruct]), 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]), @@ -29199,6 +29296,20 @@ def descriptor(cls) -> ClusterObjectDescriptor: ACLouverPosition: 'typing.Optional[Thermostat.Enums.ACLouverPositionEnum]' = None ACCoilTemperature: 'typing.Union[None, Nullable, int]' = None ACCapacityformat: 'typing.Optional[Thermostat.Enums.ACCapacityFormatEnum]' = None + presetTypes: 'typing.Optional[typing.List[Thermostat.Structs.PresetTypeStruct]]' = None + scheduleTypes: 'typing.Optional[typing.List[Thermostat.Structs.ScheduleTypeStruct]]' = None + numberOfPresets: 'typing.Optional[uint]' = None + numberOfSchedules: 'typing.Optional[uint]' = None + numberOfScheduleTransitions: 'typing.Optional[uint]' = None + numberOfScheduleTransitionPerDay: 'typing.Union[None, Nullable, uint]' = None + activePresetHandle: 'typing.Union[None, Nullable, bytes]' = None + activeScheduleHandle: 'typing.Union[None, Nullable, bytes]' = None + presets: 'typing.Optional[typing.List[Thermostat.Structs.PresetStruct]]' = None + schedules: 'typing.Optional[typing.List[Thermostat.Structs.ScheduleStruct]]' = None + presetsSchedulesEditable: 'typing.Optional[bool]' = None + temperatureSetpointHoldPolicy: 'typing.Optional[uint]' = None + setpointHoldExpiryTimestamp: 'typing.Union[None, Nullable, uint]' = None + queuedPreset: 'typing.Union[None, Nullable, Thermostat.Structs.QueuedPresetStruct]' = None generatedCommandList: 'typing.List[uint]' = None acceptedCommandList: 'typing.List[uint]' = None eventList: 'typing.List[uint]' = None @@ -29274,6 +29385,20 @@ class ControlSequenceOfOperationEnum(MatterIntEnum): # enum value. This specific should never be transmitted. kUnknownEnumValue = 6, + class PresetScenarioEnum(MatterIntEnum): + kUnspecified = 0x00 + kOccupied = 0x01 + kUnoccupied = 0x02 + kSleep = 0x03 + kWake = 0x04 + kVacation = 0x05 + kUserDefined = 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 SetpointChangeSourceEnum(MatterIntEnum): kManual = 0x00 kSchedule = 0x01 @@ -29359,6 +29484,10 @@ class Feature(IntFlag): kSetback = 0x10 kAutoMode = 0x20 kLocalTemperatureNotExposed = 0x40 + kMatterScheduleConfiguration = 0x80 + kPresets = 0x100 + kSetpoints = 0x200 + kQueuedPresetsSupported = 0x400 class HVACSystemTypeBitmap(IntFlag): kCoolingStage = 0x3 @@ -29366,6 +29495,10 @@ class HVACSystemTypeBitmap(IntFlag): kHeatingIsHeatPump = 0x10 kHeatingUsesFuel = 0x20 + class PresetTypeFeaturesBitmap(IntFlag): + kAutomatic = 0x1 + kSupportsNames = 0x2 + class ProgrammingOperationModeBitmap(IntFlag): kScheduleActive = 0x1 kAutoRecovery = 0x2 @@ -29399,27 +29532,270 @@ class ScheduleModeBitmap(IntFlag): kHeatSetpointPresent = 0x1 kCoolSetpointPresent = 0x2 - class Structs: + class ScheduleTypeFeaturesBitmap(IntFlag): + kSupportsPresets = 0x1 + kSupportsSetpoints = 0x2 + kSupportsNames = 0x4 + kSupportsOff = 0x8 + + class TemperatureSetpointHoldPolicyBitmap(IntFlag): + kHoldDurationElapsed = 0x1 + kHoldDurationElapsedOrPresetChanged = 0x2 + + class Structs: + @dataclass + class ScheduleTransitionStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="dayOfWeek", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="transitionTime", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="presetHandle", Tag=2, Type=typing.Optional[bytes]), + ClusterObjectFieldDescriptor(Label="systemMode", Tag=3, Type=typing.Optional[Thermostat.Enums.SystemModeEnum]), + ClusterObjectFieldDescriptor(Label="coolingSetpoint", Tag=4, Type=typing.Optional[int]), + ClusterObjectFieldDescriptor(Label="heatingSetpoint", Tag=5, Type=typing.Optional[int]), + ]) + + dayOfWeek: 'uint' = 0 + transitionTime: 'uint' = 0 + presetHandle: 'typing.Optional[bytes]' = None + systemMode: 'typing.Optional[Thermostat.Enums.SystemModeEnum]' = None + coolingSetpoint: 'typing.Optional[int]' = None + heatingSetpoint: 'typing.Optional[int]' = None + + @dataclass + class ScheduleStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="scheduleHandle", Tag=0, Type=typing.Union[Nullable, bytes]), + ClusterObjectFieldDescriptor(Label="systemMode", Tag=1, Type=Thermostat.Enums.SystemModeEnum), + ClusterObjectFieldDescriptor(Label="name", Tag=2, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="presetHandle", Tag=3, Type=typing.Optional[bytes]), + ClusterObjectFieldDescriptor(Label="transitions", Tag=4, Type=typing.List[Thermostat.Structs.ScheduleTransitionStruct]), + ClusterObjectFieldDescriptor(Label="builtIn", Tag=5, Type=typing.Union[None, Nullable, bool]), + ]) + + scheduleHandle: 'typing.Union[Nullable, bytes]' = NullValue + systemMode: 'Thermostat.Enums.SystemModeEnum' = 0 + name: 'typing.Optional[str]' = None + presetHandle: 'typing.Optional[bytes]' = None + transitions: 'typing.List[Thermostat.Structs.ScheduleTransitionStruct]' = field(default_factory=lambda: []) + builtIn: 'typing.Union[None, Nullable, bool]' = None + + @dataclass + class PresetStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="presetHandle", Tag=0, Type=typing.Union[Nullable, bytes]), + ClusterObjectFieldDescriptor(Label="presetScenario", Tag=1, Type=Thermostat.Enums.PresetScenarioEnum), + ClusterObjectFieldDescriptor(Label="name", Tag=2, Type=typing.Union[None, Nullable, str]), + ClusterObjectFieldDescriptor(Label="coolingSetpoint", Tag=3, Type=typing.Optional[int]), + ClusterObjectFieldDescriptor(Label="heatingSetpoint", Tag=4, Type=typing.Optional[int]), + ClusterObjectFieldDescriptor(Label="builtIn", Tag=5, Type=typing.Union[Nullable, bool]), + ]) + + presetHandle: 'typing.Union[Nullable, bytes]' = NullValue + presetScenario: 'Thermostat.Enums.PresetScenarioEnum' = 0 + name: 'typing.Union[None, Nullable, str]' = None + coolingSetpoint: 'typing.Optional[int]' = None + heatingSetpoint: 'typing.Optional[int]' = None + builtIn: 'typing.Union[Nullable, bool]' = NullValue + + @dataclass + class PresetTypeStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="presetScenario", Tag=0, Type=Thermostat.Enums.PresetScenarioEnum), + ClusterObjectFieldDescriptor(Label="numberOfPresets", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="presetTypeFeatures", Tag=2, Type=uint), + ]) + + presetScenario: 'Thermostat.Enums.PresetScenarioEnum' = 0 + numberOfPresets: 'uint' = 0 + presetTypeFeatures: 'uint' = 0 + + @dataclass + class QueuedPresetStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="presetHandle", Tag=0, Type=typing.Union[Nullable, bytes]), + ClusterObjectFieldDescriptor(Label="transitionTimestamp", Tag=1, Type=typing.Union[Nullable, uint]), + ]) + + presetHandle: 'typing.Union[Nullable, bytes]' = NullValue + transitionTimestamp: 'typing.Union[Nullable, uint]' = NullValue + + @dataclass + class ScheduleTypeStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="systemMode", Tag=0, Type=Thermostat.Enums.SystemModeEnum), + ClusterObjectFieldDescriptor(Label="numberOfSchedules", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="scheduleTypeFeatures", Tag=2, Type=uint), + ]) + + systemMode: 'Thermostat.Enums.SystemModeEnum' = 0 + numberOfSchedules: 'uint' = 0 + scheduleTypeFeatures: 'uint' = 0 + + @dataclass + class WeeklyScheduleTransitionStruct(ClusterObject): + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="transitionTime", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="heatSetpoint", Tag=1, Type=typing.Union[Nullable, int]), + ClusterObjectFieldDescriptor(Label="coolSetpoint", Tag=2, Type=typing.Union[Nullable, int]), + ]) + + transitionTime: 'uint' = 0 + heatSetpoint: 'typing.Union[Nullable, int]' = NullValue + coolSetpoint: 'typing.Union[Nullable, int]' = NullValue + + class Commands: + @dataclass + class SetpointRaiseLower(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000201 + 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="mode", Tag=0, Type=Thermostat.Enums.SetpointRaiseLowerModeEnum), + ClusterObjectFieldDescriptor(Label="amount", Tag=1, Type=int), + ]) + + mode: 'Thermostat.Enums.SetpointRaiseLowerModeEnum' = 0 + amount: 'int' = 0 + + @dataclass + class GetWeeklyScheduleResponse(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000201 + 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="numberOfTransitionsForSequence", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="dayOfWeekForSequence", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="modeForSequence", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="transitions", Tag=3, Type=typing.List[Thermostat.Structs.WeeklyScheduleTransitionStruct]), + ]) + + numberOfTransitionsForSequence: 'uint' = 0 + dayOfWeekForSequence: 'uint' = 0 + modeForSequence: 'uint' = 0 + transitions: 'typing.List[Thermostat.Structs.WeeklyScheduleTransitionStruct]' = field(default_factory=lambda: []) + + @dataclass + class SetWeeklySchedule(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000201 + command_id: typing.ClassVar[int] = 0x00000001 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="numberOfTransitionsForSequence", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="dayOfWeekForSequence", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="modeForSequence", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="transitions", Tag=3, Type=typing.List[Thermostat.Structs.WeeklyScheduleTransitionStruct]), + ]) + + numberOfTransitionsForSequence: 'uint' = 0 + dayOfWeekForSequence: 'uint' = 0 + modeForSequence: 'uint' = 0 + transitions: 'typing.List[Thermostat.Structs.WeeklyScheduleTransitionStruct]' = field(default_factory=lambda: []) + + @dataclass + class GetWeeklySchedule(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000201 + command_id: typing.ClassVar[int] = 0x00000002 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = 'GetWeeklyScheduleResponse' + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="daysToReturn", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="modeToReturn", Tag=1, Type=uint), + ]) + + daysToReturn: 'uint' = 0 + modeToReturn: 'uint' = 0 + + @dataclass + class ClearWeeklySchedule(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000201 + command_id: typing.ClassVar[int] = 0x00000003 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ]) + + @dataclass + class SetActiveScheduleRequest(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000201 + 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="scheduleHandle", Tag=0, Type=bytes), + ]) + + scheduleHandle: 'bytes' = b"" + @dataclass - class WeeklyScheduleTransitionStruct(ClusterObject): + class SetActivePresetRequest(ClusterCommand): + cluster_id: typing.ClassVar[int] = 0x00000201 + command_id: typing.ClassVar[int] = 0x00000006 + is_client: typing.ClassVar[bool] = True + response_type: typing.ClassVar[str] = None + @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="transitionTime", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="heatSetpoint", Tag=1, Type=typing.Union[Nullable, int]), - ClusterObjectFieldDescriptor(Label="coolSetpoint", Tag=2, Type=typing.Union[Nullable, int]), + ClusterObjectFieldDescriptor(Label="presetHandle", Tag=0, Type=bytes), + ClusterObjectFieldDescriptor(Label="delayMinutes", Tag=1, Type=typing.Optional[uint]), ]) - transitionTime: 'uint' = 0 - heatSetpoint: 'typing.Union[Nullable, int]' = NullValue - coolSetpoint: 'typing.Union[Nullable, int]' = NullValue + presetHandle: 'bytes' = b"" + delayMinutes: 'typing.Optional[uint]' = None - class Commands: @dataclass - class SetpointRaiseLower(ClusterCommand): + class StartPresetsSchedulesEditRequest(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000201 - command_id: typing.ClassVar[int] = 0x00000000 + command_id: typing.ClassVar[int] = 0x00000007 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -29427,39 +29803,28 @@ class SetpointRaiseLower(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="mode", Tag=0, Type=Thermostat.Enums.SetpointRaiseLowerModeEnum), - ClusterObjectFieldDescriptor(Label="amount", Tag=1, Type=int), + ClusterObjectFieldDescriptor(Label="timeoutSeconds", Tag=0, Type=uint), ]) - mode: 'Thermostat.Enums.SetpointRaiseLowerModeEnum' = 0 - amount: 'int' = 0 + timeoutSeconds: 'uint' = 0 @dataclass - class GetWeeklyScheduleResponse(ClusterCommand): + class CancelPresetsSchedulesEditRequest(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000201 - command_id: typing.ClassVar[int] = 0x00000000 - is_client: typing.ClassVar[bool] = False + 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="numberOfTransitionsForSequence", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="dayOfWeekForSequence", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="modeForSequence", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="transitions", Tag=3, Type=typing.List[Thermostat.Structs.WeeklyScheduleTransitionStruct]), ]) - numberOfTransitionsForSequence: 'uint' = 0 - dayOfWeekForSequence: 'uint' = 0 - modeForSequence: 'uint' = 0 - transitions: 'typing.List[Thermostat.Structs.WeeklyScheduleTransitionStruct]' = field(default_factory=lambda: []) - @dataclass - class SetWeeklySchedule(ClusterCommand): + class CommitPresetsSchedulesRequest(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000201 - command_id: typing.ClassVar[int] = 0x00000001 + command_id: typing.ClassVar[int] = 0x00000009 is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -29467,39 +29832,25 @@ class SetWeeklySchedule(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="numberOfTransitionsForSequence", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="dayOfWeekForSequence", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="modeForSequence", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="transitions", Tag=3, Type=typing.List[Thermostat.Structs.WeeklyScheduleTransitionStruct]), ]) - numberOfTransitionsForSequence: 'uint' = 0 - dayOfWeekForSequence: 'uint' = 0 - modeForSequence: 'uint' = 0 - transitions: 'typing.List[Thermostat.Structs.WeeklyScheduleTransitionStruct]' = field(default_factory=lambda: []) - @dataclass - class GetWeeklySchedule(ClusterCommand): + class CancelSetActivePresetRequest(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000201 - command_id: typing.ClassVar[int] = 0x00000002 + command_id: typing.ClassVar[int] = 0x0000000A is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = 'GetWeeklyScheduleResponse' + response_type: typing.ClassVar[str] = None @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="daysToReturn", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="modeToReturn", Tag=1, Type=uint), ]) - daysToReturn: 'uint' = 0 - modeToReturn: 'uint' = 0 - @dataclass - class ClearWeeklySchedule(ClusterCommand): + class SetTemperatureSetpointHoldPolicy(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x00000201 - command_id: typing.ClassVar[int] = 0x00000003 + command_id: typing.ClassVar[int] = 0x0000000B is_client: typing.ClassVar[bool] = True response_type: typing.ClassVar[str] = None @@ -29507,8 +29858,11 @@ class ClearWeeklySchedule(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ + ClusterObjectFieldDescriptor(Label="temperatureSetpointHoldPolicy", Tag=0, Type=uint), ]) + temperatureSetpointHoldPolicy: 'uint' = 0 + class Attributes: @dataclass class LocalTemperature(ClusterAttributeDescriptor): @@ -30294,6 +30648,230 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[Thermostat.Enums.ACCapacityFormatEnum]' = None + @dataclass + class PresetTypes(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000201 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000048 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[Thermostat.Structs.PresetTypeStruct]]) + + value: 'typing.Optional[typing.List[Thermostat.Structs.PresetTypeStruct]]' = None + + @dataclass + class ScheduleTypes(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000201 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000049 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[Thermostat.Structs.ScheduleTypeStruct]]) + + value: 'typing.Optional[typing.List[Thermostat.Structs.ScheduleTypeStruct]]' = None + + @dataclass + class NumberOfPresets(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000201 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000004A + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + + @dataclass + class NumberOfSchedules(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000201 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000004B + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + + @dataclass + class NumberOfScheduleTransitions(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000201 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000004C + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + + @dataclass + class NumberOfScheduleTransitionPerDay(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000201 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000004D + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + + value: 'typing.Union[None, Nullable, uint]' = None + + @dataclass + class ActivePresetHandle(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000201 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000004E + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, bytes]) + + value: 'typing.Union[None, Nullable, bytes]' = None + + @dataclass + class ActiveScheduleHandle(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000201 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x0000004F + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, bytes]) + + value: 'typing.Union[None, Nullable, bytes]' = None + + @dataclass + class Presets(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000201 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000050 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[Thermostat.Structs.PresetStruct]]) + + value: 'typing.Optional[typing.List[Thermostat.Structs.PresetStruct]]' = None + + @dataclass + class Schedules(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000201 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000051 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[typing.List[Thermostat.Structs.ScheduleStruct]]) + + value: 'typing.Optional[typing.List[Thermostat.Structs.ScheduleStruct]]' = None + + @dataclass + class PresetsSchedulesEditable(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000201 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000052 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[bool]) + + value: 'typing.Optional[bool]' = None + + @dataclass + class TemperatureSetpointHoldPolicy(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000201 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000053 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + + @dataclass + class SetpointHoldExpiryTimestamp(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000201 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000054 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) + + value: 'typing.Union[None, Nullable, uint]' = None + + @dataclass + class QueuedPreset(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000201 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00000055 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, Thermostat.Structs.QueuedPresetStruct]) + + value: 'typing.Union[None, Nullable, Thermostat.Structs.QueuedPresetStruct]' = None + @dataclass class GeneratedCommandList(ClusterAttributeDescriptor): @ChipUtility.classproperty diff --git a/src/controller/python/chip/clusters/__init__.py b/src/controller/python/chip/clusters/__init__.py index 89e9107d7398f6..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, @@ -48,7 +48,7 @@ __all__ = [Attribute, CHIPClusters, Command, AccessControl, AccountLogin, Actions, ActivatedCarbonFilterMonitoring, AdministratorCommissioning, AirQuality, ApplicationBasic, ApplicationLauncher, AudioOutput, BallastConfiguration, BarrierControl, BasicInformation, - BinaryInputBasic, Binding, BooleanStateConfiguration, BooleanState, BridgedDeviceBasicInformation, CarbonDioxideConcentrationMeasurement, + BinaryInputBasic, Binding, BooleanState, BooleanStateConfiguration, BridgedDeviceBasicInformation, CarbonDioxideConcentrationMeasurement, CarbonMonoxideConcentrationMeasurement, Channel, ColorControl, ContentLauncher, Descriptor, DeviceEnergyManagement, DiagnosticLogs, DishwasherAlarm, DishwasherMode, DoorLock, ElectricalMeasurement, EnergyEvse, EthernetNetworkDiagnostics, FanControl, FaultInjection, FixedLabel, FlowMeasurement, @@ -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/controller/python/chip/native/__init__.py b/src/controller/python/chip/native/__init__.py index 7801129c948532..ce8b7620f498f9 100644 --- a/src/controller/python/chip/native/__init__.py +++ b/src/controller/python/chip/native/__init__.py @@ -1,14 +1,34 @@ +# +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + import ctypes import enum import glob import os import platform import typing +from dataclasses import dataclass import chip.exceptions import construct -NATIVE_LIBRARY_BASE_NAME = "_ChipDeviceCtrl.so" + +class Library(enum.Enum): + CONTROLLER = "_ChipDeviceCtrl.so" + SERVER = "_ChipServer.so" def _AllDirsToRoot(dir): @@ -119,7 +139,22 @@ def __ne__(self, other): return not self == other -def FindNativeLibraryPath() -> str: +PostAttributeChangeCallback = ctypes.CFUNCTYPE( + None, + ctypes.c_uint16, + ctypes.c_uint16, + ctypes.c_uint16, + ctypes.c_uint8, + ctypes.c_uint16, + # TODO: This should be a pointer to uint8_t, but ctypes does not provide + # such a type. The best approximation is c_char_p, however, this + # requires the caller to pass NULL-terminate C-string which might + # not be the case here. + ctypes.c_char_p, +) + + +def FindNativeLibraryPath(library: Library) -> str: """Find the native CHIP dll/so path.""" scriptDir = os.path.dirname(os.path.abspath(__file__)) @@ -129,7 +164,7 @@ def FindNativeLibraryPath() -> str: # modules. dmDLLPath = os.path.join( os.path.dirname(scriptDir), # file should be inside 'chip' - NATIVE_LIBRARY_BASE_NAME) + library.value) if os.path.exists(dmDLLPath): return dmDLLPath @@ -143,7 +178,7 @@ def FindNativeLibraryPath() -> str: "build", buildMachineGlob, "src/controller/python/.libs", - NATIVE_LIBRARY_BASE_NAME, + library.value, ) for dir in _AllDirsToRoot(scriptDir): dmDLLPathGlob = os.path.join(dir, relDMDLLPathGlob) @@ -152,8 +187,7 @@ def FindNativeLibraryPath() -> str: return dmDLLPath raise Exception( - "Unable to locate Chip Device Manager DLL (%s); expected location: %s" % - (NATIVE_LIBRARY_BASE_NAME, scriptDir)) + f"Unable to locate CHIP DLL ({library.value}); expected location: {scriptDir}") class NativeLibraryHandleMethodArguments: @@ -168,22 +202,38 @@ def Set(self, methodName: str, resultType, argumentTypes: list): method.argtype = argumentTypes -_nativeLibraryHandle: ctypes.CDLL = None +@dataclass +class _Handle: + dll: ctypes.CDLL = None + initialized: bool = False + + +_nativeLibraryHandles: typing.Dict[Library, _Handle] = {} + + +def _GetLibraryHandle(lib: Library, expectAlreadyInitialized: bool) -> ctypes.CDLL: + """Get a memoized _Handle to the chip native code dll.""" + + global _nativeLibraryHandles + if lib not in _nativeLibraryHandles: + handle = _Handle(ctypes.CDLL(FindNativeLibraryPath(lib))) + _nativeLibraryHandles[lib] = handle -def _GetLibraryHandle(shouldInit: bool) -> ctypes.CDLL: - """Get a memoized handle to the chip native code dll.""" + setter = NativeLibraryHandleMethodArguments(handle.dll) + if lib == Library.CONTROLLER: + setter.Set("pychip_CommonStackInit", PyChipError, [ctypes.c_char_p]) + setter.Set("pychip_FormatError", None, + [ctypes.POINTER(PyChipError), ctypes.c_char_p, ctypes.c_uint32]) + elif lib == Library.SERVER: + setter.Set("pychip_server_native_init", PyChipError, []) + setter.Set("pychip_server_set_callbacks", None, [PostAttributeChangeCallback]) - global _nativeLibraryHandle - if _nativeLibraryHandle is None: - if shouldInit: - raise Exception("Common stack has not been initialized!") - _nativeLibraryHandle = ctypes.CDLL(FindNativeLibraryPath()) - setter = NativeLibraryHandleMethodArguments(_nativeLibraryHandle) - setter.Set("pychip_CommonStackInit", PyChipError, [ctypes.c_char_p]) - setter.Set("pychip_FormatError", None, [ctypes.POINTER(PyChipError), ctypes.c_char_p, ctypes.c_uint32]) + handle = _nativeLibraryHandles[lib] + if expectAlreadyInitialized and not handle.initialized: + raise Exception("CHIP handle has not been initialized!") - return _nativeLibraryHandle + return handle def Init(bluetoothAdapter: int = None): @@ -194,12 +244,15 @@ def Init(bluetoothAdapter: int = None): params.BluetoothAdapterId = bluetoothAdapter if bluetoothAdapter is not None else 0 params = CommonStackParams.build(params) - _GetLibraryHandle(False).pychip_CommonStackInit(ctypes.c_char_p(params)) + handle = _GetLibraryHandle(Library.CONTROLLER, False) + handle.dll.pychip_CommonStackInit(ctypes.c_char_p(params)).raise_on_error() + handle.initialized = True class HandleFlags(enum.Flag): REQUIRE_INITIALIZATION = enum.auto() -def GetLibraryHandle(flags=HandleFlags.REQUIRE_INITIALIZATION): - return _GetLibraryHandle(HandleFlags.REQUIRE_INITIALIZATION in flags) +def GetLibraryHandle(flags=HandleFlags.REQUIRE_INITIALIZATION) -> ctypes.CDLL: + handle = _GetLibraryHandle(Library.CONTROLLER, HandleFlags.REQUIRE_INITIALIZATION in flags) + return handle.dll diff --git a/src/controller/python/chip/server/ServerInit.cpp b/src/controller/python/chip/server/ServerInit.cpp index 611d4948ceb0b6..39edd7a2ad6b2c 100644 --- a/src/controller/python/chip/server/ServerInit.cpp +++ b/src/controller/python/chip/server/ServerInit.cpp @@ -27,6 +27,7 @@ #include #include +#include #include // #include @@ -118,21 +119,11 @@ void pychip_server_set_callbacks(PostAttributeChangeCallback cb) gPythonServerDelegate.SetPostAttributeChangeCallback(cb); } -void pychip_server_native_init() +PyChipError pychip_server_native_init() { - CHIP_ERROR err = CHIP_NO_ERROR; - err = chip::Platform::MemoryInit(); - if (err != CHIP_NO_ERROR) - { - ChipLogError(DeviceLayer, "Failed to initialize CHIP stack: memory init failed: %s", chip::ErrorStr(err)); - } - - err = chip::DeviceLayer::PlatformMgr().InitChipStack(); - if (err != CHIP_NO_ERROR) - { - ChipLogError(DeviceLayer, "Failed to initialize CHIP stack: platform init failed: %s", chip::ErrorStr(err)); - } + PyReturnErrorOnFailure(ToPyChipError(Platform::MemoryInit())); + PyReturnErrorOnFailure(ToPyChipError(DeviceLayer::PlatformMgr().InitChipStack())); static chip::DeviceLayer::TestOnlyCommissionableDataProvider TestOnlyCommissionableDataProvider; chip::DeviceLayer::SetCommissionableDataProvider(&TestOnlyCommissionableDataProvider); @@ -169,24 +160,20 @@ void pychip_server_native_init() // Init ZCL Data Model and CHIP App Server static chip::CommonCaseDeviceServerInitParams initParams; - (void) initParams.InitializeStaticResourcesBeforeServerInit(); + PyReturnErrorOnFailure(ToPyChipError(initParams.InitializeStaticResourcesBeforeServerInit())); initParams.operationalServicePort = CHIP_PORT; initParams.userDirectedCommissioningPort = CHIP_UDC_PORT; - chip::Server::GetInstance().Init(initParams); + PyReturnErrorOnFailure(ToPyChipError(chip::Server::GetInstance().Init(initParams))); // Initialize device attestation config SetDeviceAttestationCredentialsProvider(chip::Credentials::Examples::GetExampleDACProvider()); - err = chip::DeviceLayer::PlatformMgr().StartEventLoopTask(); - if (err != CHIP_NO_ERROR) - { - ChipLogError(DeviceLayer, "Failed to initialize CHIP stack: platform init failed: %s", chip::ErrorStr(err)); - } + PyReturnErrorOnFailure(ToPyChipError(chip::DeviceLayer::PlatformMgr().StartEventLoopTask())); atexit(CleanShutdown); - return /*err*/; + return ToPyChipError(CHIP_NO_ERROR); } } diff --git a/src/controller/python/chip/server/__init__.py b/src/controller/python/chip/server/__init__.py index d0b046ffe689d5..8280ec09186790 100644 --- a/src/controller/python/chip/server/__init__.py +++ b/src/controller/python/chip/server/__init__.py @@ -1,91 +1,32 @@ -import ctypes -import glob -import os -import platform - -from chip.server.types import PostAttributeChangeCallback - -NATIVE_LIBRARY_BASE_NAME = "_ChipServer.so" - - -def _AllDirsToRoot(dir): - """Return all parent paths of a directory.""" - dir = os.path.abspath(dir) - while True: - yield dir - parent = os.path.dirname(dir) - if parent == "" or parent == dir: - break - dir = parent - - -def FindNativeLibraryPath() -> str: - """Find the native CHIP dll/so path.""" - - scriptDir = os.path.dirname(os.path.abspath(__file__)) - - # When properly installed in the chip package, the Chip Device Manager DLL will - # be located in the package root directory, along side the package's - # modules. - dmDLLPath = os.path.join( - os.path.dirname(scriptDir), # file should be inside 'chip' - NATIVE_LIBRARY_BASE_NAME, - ) - if os.path.exists(dmDLLPath): - return dmDLLPath - - # For the convenience of developers, search the list of parent paths relative to the - # running script looking for an CHIP build directory containing the Chip Device - # Manager DLL. This makes it possible to import and use the ChipDeviceMgr module - # directly from a built copy of the CHIP source tree. - buildMachineGlob = "%s-*-%s*" % (platform.machine(), - platform.system().lower()) - relDMDLLPathGlob = os.path.join( - "build", - buildMachineGlob, - "src/controller/python/.libs", - NATIVE_LIBRARY_BASE_NAME, - ) - for dir in _AllDirsToRoot(scriptDir): - dmDLLPathGlob = os.path.join(dir, relDMDLLPathGlob) - for dmDLLPath in glob.glob(dmDLLPathGlob): - if os.path.exists(dmDLLPath): - return dmDLLPath - - raise Exception( - "Unable to locate Chip Server DLL (%s); expected location: %s" - % (NATIVE_LIBRARY_BASE_NAME, scriptDir) - ) - - -class NativeLibraryHandleMethodArguments: - """Convenience wrapper to set native method argtype and restype for methods.""" - - def __init__(self, handle): - self.handle = handle - - def Set(self, methodName: str, resultType, argumentTypes: list): - method = getattr(self.handle, methodName) - method.restype = resultType - method.argtype = argumentTypes +# +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import ctypes -_nativeLibraryHandle: ctypes.CDLL = None +from chip import native +from chip.native import PostAttributeChangeCallback def GetLibraryHandle(cb: PostAttributeChangeCallback) -> ctypes.CDLL: """Get a memoized handle to the chip native code dll.""" - global _nativeLibraryHandle - if _nativeLibraryHandle is None: - _nativeLibraryHandle = ctypes.CDLL(FindNativeLibraryPath()) - - setter = NativeLibraryHandleMethodArguments(_nativeLibraryHandle) - setter.Set("pychip_server_native_init", None, []) - setter.Set("pychip_server_set_callbacks", - None, [PostAttributeChangeCallback]) - - _nativeLibraryHandle.pychip_server_native_init() - _nativeLibraryHandle.pychip_server_set_callbacks(cb) + handle = native._GetLibraryHandle(native.Library.SERVER, False) + if not handle.initialized: + handle.dll.pychip_server_native_init().raise_on_error() + handle.dll.pychip_server_set_callbacks(cb) + handle.initialized = True - return _nativeLibraryHandle + return handle.dll diff --git a/src/controller/python/chip/server/types.py b/src/controller/python/chip/server/types.py deleted file mode 100644 index 3df693d1049861..00000000000000 --- a/src/controller/python/chip/server/types.py +++ /dev/null @@ -1,12 +0,0 @@ -from ctypes import CFUNCTYPE, c_char_p, c_uint8, c_uint16 - -PostAttributeChangeCallback = CFUNCTYPE( - None, - # py_object, - c_uint16, - c_uint16, - c_uint16, - c_uint8, - c_uint16, - c_char_p, -) diff --git a/src/darwin/Framework/CHIP/MTRDefines.h b/src/darwin/Framework/CHIP/MTRDefines.h index 6bfe4f9d14cc04..232a97f33dd7c9 100644 --- a/src/darwin/Framework/CHIP/MTRDefines.h +++ b/src/darwin/Framework/CHIP/MTRDefines.h @@ -83,7 +83,7 @@ #endif #ifndef MTR_PER_CONTROLLER_STORAGE_ENABLED -#define MTR_PER_CONTROLLER_STORAGE_ENABLED 0 +#define MTR_PER_CONTROLLER_STORAGE_ENABLED 1 #endif #pragma mark - Types 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 b8c6f1a59ac4bb..61c99664562981 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; @@ -2607,6 +2556,9 @@ static BOOL AttributeIsSpecifiedInMicrowaveOvenControlCluster(AttributeId aAttri case Attributes::CookTime::Id: { return YES; } + case Attributes::MaxCookTime::Id: { + return YES; + } case Attributes::PowerSetting::Id: { return YES; } @@ -2619,6 +2571,15 @@ static BOOL AttributeIsSpecifiedInMicrowaveOvenControlCluster(AttributeId aAttri case Attributes::PowerStep::Id: { return YES; } + case Attributes::SupportedWatts::Id: { + return YES; + } + case Attributes::SelectedWattIndex::Id: { + return YES; + } + case Attributes::WattRating::Id: { + return YES; + } case Attributes::GeneratedCommandList::Id: { return YES; } @@ -2732,6 +2693,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; @@ -3777,6 +3789,48 @@ static BOOL AttributeIsSpecifiedInThermostatCluster(AttributeId aAttributeId) case Attributes::ACCapacityformat::Id: { return YES; } + case Attributes::PresetTypes::Id: { + return YES; + } + case Attributes::ScheduleTypes::Id: { + return YES; + } + case Attributes::NumberOfPresets::Id: { + return YES; + } + case Attributes::NumberOfSchedules::Id: { + return YES; + } + case Attributes::NumberOfScheduleTransitions::Id: { + return YES; + } + case Attributes::NumberOfScheduleTransitionPerDay::Id: { + return YES; + } + case Attributes::ActivePresetHandle::Id: { + return YES; + } + case Attributes::ActiveScheduleHandle::Id: { + return YES; + } + case Attributes::Presets::Id: { + return YES; + } + case Attributes::Schedules::Id: { + return YES; + } + case Attributes::PresetsSchedulesEditable::Id: { + return YES; + } + case Attributes::TemperatureSetpointHoldPolicy::Id: { + return YES; + } + case Attributes::SetpointHoldExpiryTimestamp::Id: { + return YES; + } + case Attributes::QueuedPreset::Id: { + return YES; + } case Attributes::GeneratedCommandList::Id: { return YES; } @@ -6255,9 +6309,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); } @@ -6423,6 +6474,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 20633dafe53b0c..6308eacacf72f9 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; @@ -6818,6 +6693,17 @@ static id _Nullable DecodeAttributeValueForMicrowaveOvenControlCluster(Attribute value = [NSNumber numberWithUnsignedInt:cppValue]; return value; } + case Attributes::MaxCookTime::Id: { + using TypeInfo = Attributes::MaxCookTime::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } case Attributes::PowerSetting::Id: { using TypeInfo = Attributes::PowerSetting::TypeInfo; TypeInfo::DecodableType cppValue; @@ -6862,6 +6748,54 @@ static id _Nullable DecodeAttributeValueForMicrowaveOvenControlCluster(Attribute value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } + case Attributes::SupportedWatts::Id: { + using TypeInfo = Attributes::SupportedWatts::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(); + 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) { + *aError = err; + return nil; + } + value = array_0; + } + return value; + } + case Attributes::SelectedWattIndex::Id: { + using TypeInfo = Attributes::SelectedWattIndex::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::WattRating::Id: { + using TypeInfo = Attributes::WattRating::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; + } default: { break; } @@ -7184,6 +7118,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; @@ -10611,30 +10670,223 @@ static id _Nullable DecodeAttributeValueForThermostatCluster(AttributeId aAttrib } return value; } - case Attributes::ThermostatProgrammingOperationMode::Id: { - using TypeInfo = Attributes::ThermostatProgrammingOperationMode::TypeInfo; + case Attributes::ThermostatProgrammingOperationMode::Id: { + using TypeInfo = Attributes::ThermostatProgrammingOperationMode::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::ThermostatRunningState::Id: { + using TypeInfo = Attributes::ThermostatRunningState::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedShort:cppValue.Raw()]; + return value; + } + case Attributes::SetpointChangeSource::Id: { + using TypeInfo = Attributes::SetpointChangeSource::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + return value; + } + case Attributes::SetpointChangeAmount::Id: { + using TypeInfo = Attributes::SetpointChangeAmount::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 numberWithShort:cppValue.Value()]; + } + return value; + } + case Attributes::SetpointChangeSourceTimestamp::Id: { + using TypeInfo = Attributes::SetpointChangeSourceTimestamp::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } + case Attributes::OccupiedSetback::Id: { + using TypeInfo = Attributes::OccupiedSetback::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 numberWithUnsignedChar:cppValue.Value()]; + } + return value; + } + case Attributes::OccupiedSetbackMin::Id: { + using TypeInfo = Attributes::OccupiedSetbackMin::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 numberWithUnsignedChar:cppValue.Value()]; + } + return value; + } + case Attributes::OccupiedSetbackMax::Id: { + using TypeInfo = Attributes::OccupiedSetbackMax::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 numberWithUnsignedChar:cppValue.Value()]; + } + return value; + } + case Attributes::UnoccupiedSetback::Id: { + using TypeInfo = Attributes::UnoccupiedSetback::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 numberWithUnsignedChar:cppValue.Value()]; + } + return value; + } + case Attributes::UnoccupiedSetbackMin::Id: { + using TypeInfo = Attributes::UnoccupiedSetbackMin::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 numberWithUnsignedChar:cppValue.Value()]; + } + return value; + } + case Attributes::UnoccupiedSetbackMax::Id: { + using TypeInfo = Attributes::UnoccupiedSetbackMax::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 numberWithUnsignedChar:cppValue.Value()]; + } + return value; + } + case Attributes::EmergencyHeatDelta::Id: { + using TypeInfo = Attributes::EmergencyHeatDelta::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::ACType::Id: { + using TypeInfo = Attributes::ACType::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + return value; + } + case Attributes::ACCapacity::Id: { + using TypeInfo = Attributes::ACCapacity::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::ACRefrigerantType::Id: { + using TypeInfo = Attributes::ACRefrigerantType::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + return value; + } + case Attributes::ACCompressorType::Id: { + using TypeInfo = Attributes::ACCompressorType::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::ThermostatRunningState::Id: { - using TypeInfo = Attributes::ThermostatRunningState::TypeInfo; + case Attributes::ACErrorCode::Id: { + using TypeInfo = Attributes::ACErrorCode::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue.Raw()]; + value = [NSNumber numberWithUnsignedInt:cppValue.Raw()]; return value; } - case Attributes::SetpointChangeSource::Id: { - using TypeInfo = Attributes::SetpointChangeSource::TypeInfo; + case Attributes::ACLouverPosition::Id: { + using TypeInfo = Attributes::ACLouverPosition::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -10644,8 +10896,8 @@ static id _Nullable DecodeAttributeValueForThermostatCluster(AttributeId aAttrib value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::SetpointChangeAmount::Id: { - using TypeInfo = Attributes::SetpointChangeAmount::TypeInfo; + case Attributes::ACCoilTemperature::Id: { + using TypeInfo = Attributes::ACCoilTemperature::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -10659,94 +10911,110 @@ static id _Nullable DecodeAttributeValueForThermostatCluster(AttributeId aAttrib } return value; } - case Attributes::SetpointChangeSourceTimestamp::Id: { - using TypeInfo = Attributes::SetpointChangeSourceTimestamp::TypeInfo; + case Attributes::ACCapacityformat::Id: { + using TypeInfo = Attributes::ACCapacityformat::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue]; + value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::OccupiedSetback::Id: { - using TypeInfo = Attributes::OccupiedSetback::TypeInfo; + case Attributes::PresetTypes::Id: { + using TypeInfo = Attributes::PresetTypes::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 numberWithUnsignedChar:cppValue.Value()]; + 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(); + MTRThermostatClusterPresetTypeStruct * newElement_0; + newElement_0 = [MTRThermostatClusterPresetTypeStruct new]; + newElement_0.presetScenario = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.presetScenario)]; + newElement_0.numberOfPresets = [NSNumber numberWithUnsignedChar:entry_0.numberOfPresets]; + newElement_0.presetTypeFeatures = [NSNumber numberWithUnsignedShort:entry_0.presetTypeFeatures.Raw()]; + [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; } - case Attributes::OccupiedSetbackMin::Id: { - using TypeInfo = Attributes::OccupiedSetbackMin::TypeInfo; + case Attributes::ScheduleTypes::Id: { + using TypeInfo = Attributes::ScheduleTypes::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 numberWithUnsignedChar:cppValue.Value()]; + 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(); + MTRThermostatClusterScheduleTypeStruct * newElement_0; + newElement_0 = [MTRThermostatClusterScheduleTypeStruct new]; + newElement_0.systemMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.systemMode)]; + newElement_0.numberOfSchedules = [NSNumber numberWithUnsignedChar:entry_0.numberOfSchedules]; + newElement_0.scheduleTypeFeatures = [NSNumber numberWithUnsignedShort:entry_0.scheduleTypeFeatures.Raw()]; + [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; } - case Attributes::OccupiedSetbackMax::Id: { - using TypeInfo = Attributes::OccupiedSetbackMax::TypeInfo; + case Attributes::NumberOfPresets::Id: { + using TypeInfo = Attributes::NumberOfPresets::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 numberWithUnsignedChar:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::UnoccupiedSetback::Id: { - using TypeInfo = Attributes::UnoccupiedSetback::TypeInfo; + case Attributes::NumberOfSchedules::Id: { + using TypeInfo = Attributes::NumberOfSchedules::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 numberWithUnsignedChar:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::UnoccupiedSetbackMin::Id: { - using TypeInfo = Attributes::UnoccupiedSetbackMin::TypeInfo; + case Attributes::NumberOfScheduleTransitions::Id: { + using TypeInfo = Attributes::NumberOfScheduleTransitions::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 numberWithUnsignedChar:cppValue.Value()]; - } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; return value; } - case Attributes::UnoccupiedSetbackMax::Id: { - using TypeInfo = Attributes::UnoccupiedSetbackMax::TypeInfo; + case Attributes::NumberOfScheduleTransitionPerDay::Id: { + using TypeInfo = Attributes::NumberOfScheduleTransitionPerDay::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -10760,85 +11028,215 @@ static id _Nullable DecodeAttributeValueForThermostatCluster(AttributeId aAttrib } return value; } - case Attributes::EmergencyHeatDelta::Id: { - using TypeInfo = Attributes::EmergencyHeatDelta::TypeInfo; + case Attributes::ActivePresetHandle::Id: { + using TypeInfo = Attributes::ActivePresetHandle::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::ACType::Id: { - using TypeInfo = Attributes::ACType::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; + NSData * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = AsData(cppValue.Value()); } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; return value; } - case Attributes::ACCapacity::Id: { - using TypeInfo = Attributes::ACCapacity::TypeInfo; + case Attributes::ActiveScheduleHandle::Id: { + using TypeInfo = Attributes::ActiveScheduleHandle::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedShort:cppValue]; + NSData * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = AsData(cppValue.Value()); + } return value; } - case Attributes::ACRefrigerantType::Id: { - using TypeInfo = Attributes::ACRefrigerantType::TypeInfo; + case Attributes::Presets::Id: { + using TypeInfo = Attributes::Presets::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + 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(); + MTRThermostatClusterPresetStruct * newElement_0; + newElement_0 = [MTRThermostatClusterPresetStruct new]; + if (entry_0.presetHandle.IsNull()) { + newElement_0.presetHandle = nil; + } else { + newElement_0.presetHandle = AsData(entry_0.presetHandle.Value()); + } + newElement_0.presetScenario = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.presetScenario)]; + if (entry_0.name.HasValue()) { + if (entry_0.name.Value().IsNull()) { + newElement_0.name = nil; + } else { + newElement_0.name = AsString(entry_0.name.Value().Value()); + if (newElement_0.name == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + } + } else { + newElement_0.name = nil; + } + if (entry_0.coolingSetpoint.HasValue()) { + newElement_0.coolingSetpoint = [NSNumber numberWithShort:entry_0.coolingSetpoint.Value()]; + } else { + newElement_0.coolingSetpoint = nil; + } + if (entry_0.heatingSetpoint.HasValue()) { + newElement_0.heatingSetpoint = [NSNumber numberWithShort:entry_0.heatingSetpoint.Value()]; + } else { + newElement_0.heatingSetpoint = nil; + } + if (entry_0.builtIn.IsNull()) { + newElement_0.builtIn = nil; + } else { + newElement_0.builtIn = [NSNumber numberWithBool:entry_0.builtIn.Value()]; + } + [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; } - case Attributes::ACCompressorType::Id: { - using TypeInfo = Attributes::ACCompressorType::TypeInfo; + case Attributes::Schedules::Id: { + using TypeInfo = Attributes::Schedules::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + 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(); + MTRThermostatClusterScheduleStruct * newElement_0; + newElement_0 = [MTRThermostatClusterScheduleStruct new]; + if (entry_0.scheduleHandle.IsNull()) { + newElement_0.scheduleHandle = nil; + } else { + newElement_0.scheduleHandle = AsData(entry_0.scheduleHandle.Value()); + } + newElement_0.systemMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.systemMode)]; + if (entry_0.name.HasValue()) { + newElement_0.name = AsString(entry_0.name.Value()); + if (newElement_0.name == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + *aError = err; + return nil; + } + } else { + newElement_0.name = nil; + } + if (entry_0.presetHandle.HasValue()) { + newElement_0.presetHandle = AsData(entry_0.presetHandle.Value()); + } else { + newElement_0.presetHandle = nil; + } + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + auto iter_2 = entry_0.transitions.begin(); + while (iter_2.Next()) { + auto & entry_2 = iter_2.GetValue(); + MTRThermostatClusterScheduleTransitionStruct * newElement_2; + newElement_2 = [MTRThermostatClusterScheduleTransitionStruct new]; + newElement_2.dayOfWeek = [NSNumber numberWithUnsignedChar:entry_2.dayOfWeek.Raw()]; + newElement_2.transitionTime = [NSNumber numberWithUnsignedShort:entry_2.transitionTime]; + if (entry_2.presetHandle.HasValue()) { + newElement_2.presetHandle = AsData(entry_2.presetHandle.Value()); + } else { + newElement_2.presetHandle = nil; + } + if (entry_2.systemMode.HasValue()) { + newElement_2.systemMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_2.systemMode.Value())]; + } else { + newElement_2.systemMode = nil; + } + if (entry_2.coolingSetpoint.HasValue()) { + newElement_2.coolingSetpoint = [NSNumber numberWithShort:entry_2.coolingSetpoint.Value()]; + } else { + newElement_2.coolingSetpoint = nil; + } + if (entry_2.heatingSetpoint.HasValue()) { + newElement_2.heatingSetpoint = [NSNumber numberWithShort:entry_2.heatingSetpoint.Value()]; + } else { + newElement_2.heatingSetpoint = nil; + } + [array_2 addObject:newElement_2]; + } + CHIP_ERROR err = iter_2.GetStatus(); + if (err != CHIP_NO_ERROR) { + *aError = err; + return nil; + } + newElement_0.transitions = array_2; + } + if (entry_0.builtIn.HasValue()) { + if (entry_0.builtIn.Value().IsNull()) { + newElement_0.builtIn = nil; + } else { + newElement_0.builtIn = [NSNumber numberWithBool:entry_0.builtIn.Value().Value()]; + } + } else { + newElement_0.builtIn = nil; + } + [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; } - case Attributes::ACErrorCode::Id: { - using TypeInfo = Attributes::ACErrorCode::TypeInfo; + case Attributes::PresetsSchedulesEditable::Id: { + using TypeInfo = Attributes::PresetsSchedulesEditable::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedInt:cppValue.Raw()]; + value = [NSNumber numberWithBool:cppValue]; return value; } - case Attributes::ACLouverPosition::Id: { - using TypeInfo = Attributes::ACLouverPosition::TypeInfo; + case Attributes::TemperatureSetpointHoldPolicy::Id: { + using TypeInfo = Attributes::TemperatureSetpointHoldPolicy::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + value = [NSNumber numberWithUnsignedChar:cppValue.Raw()]; return value; } - case Attributes::ACCoilTemperature::Id: { - using TypeInfo = Attributes::ACCoilTemperature::TypeInfo; + case Attributes::SetpointHoldExpiryTimestamp::Id: { + using TypeInfo = Attributes::SetpointHoldExpiryTimestamp::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { @@ -10848,19 +11246,33 @@ static id _Nullable DecodeAttributeValueForThermostatCluster(AttributeId aAttrib if (cppValue.IsNull()) { value = nil; } else { - value = [NSNumber numberWithShort:cppValue.Value()]; + value = [NSNumber numberWithUnsignedInt:cppValue.Value()]; } return value; } - case Attributes::ACCapacityformat::Id: { - using TypeInfo = Attributes::ACCapacityformat::TypeInfo; + case Attributes::QueuedPreset::Id: { + using TypeInfo = Attributes::QueuedPreset::TypeInfo; TypeInfo::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); if (*aError != CHIP_NO_ERROR) { return nil; } - NSNumber * _Nonnull value; - value = [NSNumber numberWithUnsignedChar:chip::to_underlying(cppValue)]; + MTRThermostatClusterQueuedPresetStruct * _Nullable value; + if (cppValue.IsNull()) { + value = nil; + } else { + value = [MTRThermostatClusterQueuedPresetStruct new]; + if (cppValue.Value().presetHandle.IsNull()) { + value.presetHandle = nil; + } else { + value.presetHandle = AsData(cppValue.Value().presetHandle.Value()); + } + if (cppValue.Value().transitionTimestamp.IsNull()) { + value.transitionTimestamp = nil; + } else { + value.transitionTimestamp = [NSNumber numberWithUnsignedInt:cppValue.Value().transitionTimestamp.Value()]; + } + } return value; } default: { @@ -18071,9 +18483,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); } @@ -18239,6 +18648,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 7271543d1242db..1c3298fb15b308 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 * @@ -6443,6 +6273,12 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributeCookTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeMaxCookTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeMaxCookTimeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeMaxCookTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributePowerSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributePowerSettingWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -6467,6 +6303,24 @@ MTR_PROVISIONALLY_AVAILABLE reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; + (void)readAttributePowerStepWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)readAttributeSupportedWattsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeSupportedWattsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeSupportedWattsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeSelectedWattIndexWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeSelectedWattIndexWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeSelectedWattIndexWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeWattRatingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeWattRatingWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeWattRatingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _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 @@ -6780,6 +6634,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 * @@ -9146,11 +9170,59 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) /** * Command ClearWeeklySchedule * - * The Clear Weekly Schedule command is used to clear the weekly schedule. + * This command is used to clear the weekly schedule. The ClearWeeklySchedule command has no payload. */ - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklyScheduleParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)clearWeeklyScheduleWithCompletion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Command SetActiveScheduleRequest + * + * This command is used to set the active schedule. + */ +- (void)setActiveScheduleRequestWithParams:(MTRThermostatClusterSetActiveScheduleRequestParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command SetActivePresetRequest + * + * This command is used to set the active preset. + */ +- (void)setActivePresetRequestWithParams:(MTRThermostatClusterSetActivePresetRequestParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command StartPresetsSchedulesEditRequest + * + * This command is used to start editing the presets and schedules. + */ +- (void)startPresetsSchedulesEditRequestWithParams:(MTRThermostatClusterStartPresetsSchedulesEditRequestParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +/** + * Command CancelPresetsSchedulesEditRequest + * + * This command is used to cancel editing presets and schedules. + */ +- (void)cancelPresetsSchedulesEditRequestWithParams:(MTRThermostatClusterCancelPresetsSchedulesEditRequestParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)cancelPresetsSchedulesEditRequestWithCompletion:(MTRStatusCompletion)completion + MTR_PROVISIONALLY_AVAILABLE; +/** + * Command CommitPresetsSchedulesRequest + * + * This command is used to notify the server that all edits are done and should be committed. + */ +- (void)commitPresetsSchedulesRequestWithParams:(MTRThermostatClusterCommitPresetsSchedulesRequestParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)commitPresetsSchedulesRequestWithCompletion:(MTRStatusCompletion)completion + MTR_PROVISIONALLY_AVAILABLE; +/** + * Command CancelSetActivePresetRequest + * + * This command is sent to cancel a queued preset. + */ +- (void)cancelSetActivePresetRequestWithParams:(MTRThermostatClusterCancelSetActivePresetRequestParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)cancelSetActivePresetRequestWithCompletion:(MTRStatusCompletion)completion + MTR_PROVISIONALLY_AVAILABLE; +/** + * Command SetTemperatureSetpointHoldPolicy + * + * This command sets the set point hold policy. + */ +- (void)setTemperatureSetpointHoldPolicyWithParams:(MTRThermostatClusterSetTemperatureSetpointHoldPolicyParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; - (void)readAttributeLocalTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)subscribeAttributeLocalTemperatureWithParams:(MTRSubscribeParams *)params @@ -9500,6 +9572,94 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeACCapacityformatWithClusterStateCache:(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)readAttributePresetTypesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributePresetTypesWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributePresetTypesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeScheduleTypesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeScheduleTypesWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeScheduleTypesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeNumberOfPresetsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeNumberOfPresetsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeNumberOfPresetsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeNumberOfSchedulesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeNumberOfSchedulesWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeNumberOfSchedulesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeNumberOfScheduleTransitionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeNumberOfScheduleTransitionsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeNumberOfScheduleTransitionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeNumberOfScheduleTransitionPerDayWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeNumberOfScheduleTransitionPerDayWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeNumberOfScheduleTransitionPerDayWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeActivePresetHandleWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeActivePresetHandleWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeActivePresetHandleWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeActiveScheduleHandleWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeActiveScheduleHandleWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeActiveScheduleHandleWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributePresetsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributePresetsWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributePresetsWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributePresetsWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributePresetsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeSchedulesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeSchedulesWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeSchedulesWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeSchedulesWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeSchedulesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributePresetsSchedulesEditableWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributePresetsSchedulesEditableWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributePresetsSchedulesEditableWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeTemperatureSetpointHoldPolicyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeTemperatureSetpointHoldPolicyWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeTemperatureSetpointHoldPolicyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeSetpointHoldExpiryTimestampWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeSetpointHoldExpiryTimestampWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeSetpointHoldExpiryTimestampWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeQueuedPresetWithCompletion:(void (^)(MTRThermostatClusterQueuedPresetStruct * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeQueuedPresetWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRThermostatClusterQueuedPresetStruct * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeQueuedPresetWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRThermostatClusterQueuedPresetStruct * _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 @@ -15710,25 +15870,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, @@ -16830,6 +16971,7 @@ typedef NS_OPTIONS(uint32_t, MTRLaundryWasherControlsFeature) { typedef NS_ENUM(uint16_t, MTRRVCRunModeModeTag) { MTRRVCRunModeModeTagIdle MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x4000, MTRRVCRunModeModeTagCleaning MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x4001, + MTRRVCRunModeModeTagMapping MTR_PROVISIONALLY_AVAILABLE = 0x4002, } MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); typedef NS_ENUM(uint8_t, MTRRVCRunModeStatusCode) { @@ -16966,6 +17108,12 @@ typedef NS_OPTIONS(uint32_t, MTRMicrowaveOvenModeFeature) { MTRMicrowaveOvenModeFeatureOnOff MTR_PROVISIONALLY_AVAILABLE = 0x1, } MTR_PROVISIONALLY_AVAILABLE; +typedef NS_OPTIONS(uint32_t, MTRMicrowaveOvenControlFeature) { + MTRMicrowaveOvenControlFeaturePowerAsNumber MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRMicrowaveOvenControlFeaturePowerInWatts MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRMicrowaveOvenControlFeaturePowerNumberLimits MTR_PROVISIONALLY_AVAILABLE = 0x4, +} MTR_PROVISIONALLY_AVAILABLE; + typedef NS_ENUM(uint8_t, MTROperationalStateErrorState) { MTROperationalStateErrorStateNoError MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x00, MTROperationalStateErrorStateUnableToStartOrResume MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x01, @@ -16997,6 +17145,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, @@ -18002,6 +18165,16 @@ typedef NS_ENUM(uint8_t, MTRThermostatControlSequence) { MTRThermostatControlSequenceCoolingAndHeatingWithReheat MTR_DEPRECATED("Please use MTRThermostatControlSequenceOfOperationCoolingAndHeatingWithReheat", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)) = 0x05, } MTR_DEPRECATED("Please use MTRThermostatControlSequenceOfOperation", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)); +typedef NS_ENUM(uint8_t, MTRThermostatPresetScenario) { + MTRThermostatPresetScenarioUnspecified MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRThermostatPresetScenarioOccupied MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRThermostatPresetScenarioUnoccupied MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRThermostatPresetScenarioSleep MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRThermostatPresetScenarioWake MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTRThermostatPresetScenarioVacation MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTRThermostatPresetScenarioUserDefined MTR_PROVISIONALLY_AVAILABLE = 0x06, +} MTR_PROVISIONALLY_AVAILABLE; + typedef NS_ENUM(uint8_t, MTRThermostatSetpointChangeSource) { MTRThermostatSetpointChangeSourceManual MTR_PROVISIONALLY_AVAILABLE = 0x00, MTRThermostatSetpointChangeSourceSchedule MTR_PROVISIONALLY_AVAILABLE = 0x01, @@ -18075,6 +18248,10 @@ typedef NS_OPTIONS(uint32_t, MTRThermostatFeature) { MTRThermostatFeatureAutoMode MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x20, MTRThermostatFeatureAutomode MTR_DEPRECATED("Please use MTRThermostatFeatureAutoMode", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x20, MTRThermostatFeatureLocalTemperatureNotExposed MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)) = 0x40, + MTRThermostatFeatureMatterScheduleConfiguration MTR_PROVISIONALLY_AVAILABLE = 0x80, + MTRThermostatFeaturePresets MTR_PROVISIONALLY_AVAILABLE = 0x100, + MTRThermostatFeatureSetpoints MTR_PROVISIONALLY_AVAILABLE = 0x200, + MTRThermostatFeatureQueuedPresetsSupported MTR_PROVISIONALLY_AVAILABLE = 0x400, } MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); typedef NS_OPTIONS(uint8_t, MTRThermostatHVACSystemTypeBitmap) { @@ -18084,6 +18261,11 @@ typedef NS_OPTIONS(uint8_t, MTRThermostatHVACSystemTypeBitmap) { MTRThermostatHVACSystemTypeBitmapHeatingUsesFuel MTR_PROVISIONALLY_AVAILABLE = 0x20, } MTR_PROVISIONALLY_AVAILABLE; +typedef NS_OPTIONS(uint16_t, MTRThermostatPresetTypeFeaturesBitmap) { + MTRThermostatPresetTypeFeaturesBitmapAutomatic MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRThermostatPresetTypeFeaturesBitmapSupportsNames MTR_PROVISIONALLY_AVAILABLE = 0x2, +} MTR_PROVISIONALLY_AVAILABLE; + typedef NS_OPTIONS(uint8_t, MTRThermostatProgrammingOperationModeBitmap) { MTRThermostatProgrammingOperationModeBitmapScheduleActive MTR_PROVISIONALLY_AVAILABLE = 0x1, MTRThermostatProgrammingOperationModeBitmapAutoRecovery MTR_PROVISIONALLY_AVAILABLE = 0x2, @@ -18141,6 +18323,18 @@ typedef NS_OPTIONS(uint8_t, MTRThermostatModeForSequence) { MTRThermostatModeForSequenceCoolSetpointFieldPresent MTR_DEPRECATED("Please use MTRThermostatScheduleModeBitmapCoolSetpointPresent", ios(16.1, 16.4), macos(13.0, 13.3), watchos(9.1, 9.4), tvos(16.1, 16.4)) = 0x2, } MTR_DEPRECATED("Please use MTRThermostatScheduleModeBitmap", ios(16.1, 17.4), macos(13.0, 14.4), watchos(9.1, 10.4), tvos(16.1, 17.4)); +typedef NS_OPTIONS(uint16_t, MTRThermostatScheduleTypeFeaturesBitmap) { + MTRThermostatScheduleTypeFeaturesBitmapSupportsPresets MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRThermostatScheduleTypeFeaturesBitmapSupportsSetpoints MTR_PROVISIONALLY_AVAILABLE = 0x2, + MTRThermostatScheduleTypeFeaturesBitmapSupportsNames MTR_PROVISIONALLY_AVAILABLE = 0x4, + MTRThermostatScheduleTypeFeaturesBitmapSupportsOff MTR_PROVISIONALLY_AVAILABLE = 0x8, +} MTR_PROVISIONALLY_AVAILABLE; + +typedef NS_OPTIONS(uint8_t, MTRThermostatTemperatureSetpointHoldPolicyBitmap) { + MTRThermostatTemperatureSetpointHoldPolicyBitmapHoldDurationElapsed MTR_PROVISIONALLY_AVAILABLE = 0x1, + MTRThermostatTemperatureSetpointHoldPolicyBitmapHoldDurationElapsedOrPresetChanged MTR_PROVISIONALLY_AVAILABLE = 0x2, +} MTR_PROVISIONALLY_AVAILABLE; + typedef NS_ENUM(uint8_t, MTRFanControlAirflowDirection) { MTRFanControlAirflowDirectionForward MTR_PROVISIONALLY_AVAILABLE = 0x00, MTRFanControlAirflowDirectionReverse MTR_PROVISIONALLY_AVAILABLE = 0x01, @@ -19320,112 +19514,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 c91da32da25ad3..1bda7cb36cd7bf 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -1377,132 +1377,72 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device @end -@implementation MTRBaseClusterScenes +@implementation MTRBaseClusterOnOff -- (void)addSceneWithParams:(MTRScenesClusterAddSceneParams *)params completion:(void (^)(MTRScenesClusterAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)offWithCompletion:(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 - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRScenesClusterAddSceneResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; + [self offWithParams:nil completion:completion]; } -- (void)viewSceneWithParams:(MTRScenesClusterViewSceneParams *)params completion:(void (^)(MTRScenesClusterViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)offWithParams:(MTROnOffClusterOffParams * _Nullable)params 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()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRScenesClusterViewSceneResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } -- (void)removeSceneWithParams:(MTRScenesClusterRemoveSceneParams *)params completion:(void (^)(MTRScenesClusterRemoveSceneResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)onWithCompletion:(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 - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRScenesClusterRemoveSceneResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; + [self onWithParams:nil completion:completion]; } -- (void)removeAllScenesWithParams:(MTRScenesClusterRemoveAllScenesParams *)params completion:(void (^)(MTRScenesClusterRemoveAllScenesResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)onWithParams:(MTROnOffClusterOnParams * _Nullable)params 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()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRScenesClusterRemoveAllScenesResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } -- (void)storeSceneWithParams:(MTRScenesClusterStoreSceneParams *)params completion:(void (^)(MTRScenesClusterStoreSceneResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)toggleWithCompletion:(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 - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRScenesClusterStoreSceneResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; + [self toggleWithParams:nil completion:completion]; } -- (void)recallSceneWithParams:(MTRScenesClusterRecallSceneParams *)params completion:(MTRStatusCompletion)completion +- (void)toggleWithParams:(MTROnOffClusterToggleParams * _Nullable)params completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRScenesClusterRecallSceneParams + params = [[MTROnOffClusterToggleParams alloc] init]; } @@ -1512,7 +1452,7 @@ - (void)recallSceneWithParams:(MTRScenesClusterRecallSceneParams *)params comple 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()) @@ -1523,106 +1463,86 @@ - (void)recallSceneWithParams:(MTRScenesClusterRecallSceneParams *)params comple queue:self.callbackQueue completion:responseHandler]; } -- (void)getSceneMembershipWithParams:(MTRScenesClusterGetSceneMembershipParams *)params completion:(void (^)(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)offWithEffectWithParams:(MTROnOffClusterOffWithEffectParams *)params 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()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRScenesClusterGetSceneMembershipResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } -- (void)enhancedAddSceneWithParams:(MTRScenesClusterEnhancedAddSceneParams *)params completion:(void (^)(MTRScenesClusterEnhancedAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)onWithRecallGlobalSceneWithCompletion:(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 - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRScenesClusterEnhancedAddSceneResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; + [self onWithRecallGlobalSceneWithParams:nil completion:completion]; } -- (void)enhancedViewSceneWithParams:(MTRScenesClusterEnhancedViewSceneParams *)params completion:(void (^)(MTRScenesClusterEnhancedViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)onWithRecallGlobalSceneWithParams:(MTROnOffClusterOnWithRecallGlobalSceneParams * _Nullable)params 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()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRScenesClusterEnhancedViewSceneResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } -- (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params completion:(void (^)(MTRScenesClusterCopySceneResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params 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()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRScenesClusterCopySceneResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } -- (void)readAttributeSceneCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOnOffWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Scenes::Attributes::SceneCount::TypeInfo; + using TypeInfo = OnOff::Attributes::OnOff::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -1631,11 +1551,11 @@ - (void)readAttributeSceneCountWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeSceneCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOnOffWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Scenes::Attributes::SceneCount::TypeInfo; + using TypeInfo = OnOff::Attributes::OnOff::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -1645,9 +1565,9 @@ - (void)subscribeAttributeSceneCountWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSceneCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOnOffWithClusterStateCache:(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; + using TypeInfo = OnOff::Attributes::OnOff::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -1656,9 +1576,9 @@ + (void)readAttributeSceneCountWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeCurrentSceneWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGlobalSceneControlWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Scenes::Attributes::CurrentScene::TypeInfo; + using TypeInfo = OnOff::Attributes::GlobalSceneControl::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -1667,11 +1587,11 @@ - (void)readAttributeCurrentSceneWithCompletion:(void (^)(NSNumber * _Nullable v completion:completion]; } -- (void)subscribeAttributeCurrentSceneWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGlobalSceneControlWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Scenes::Attributes::CurrentScene::TypeInfo; + using TypeInfo = OnOff::Attributes::GlobalSceneControl::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -1681,9 +1601,9 @@ - (void)subscribeAttributeCurrentSceneWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCurrentSceneWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGlobalSceneControlWithClusterStateCache:(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; + using TypeInfo = OnOff::Attributes::GlobalSceneControl::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -1692,9 +1612,9 @@ + (void)readAttributeCurrentSceneWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } -- (void)readAttributeCurrentGroupWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOnTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Scenes::Attributes::CurrentGroup::TypeInfo; + using TypeInfo = OnOff::Attributes::OnTime::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -1703,47 +1623,39 @@ - (void)readAttributeCurrentGroupWithCompletion:(void (^)(NSNumber * _Nullable v completion:completion]; } -- (void)subscribeAttributeCurrentGroupWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeOnTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - 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]; + [self writeAttributeOnTimeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } - -+ (void)readAttributeCurrentGroupWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeOnTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - using TypeInfo = Scenes::Attributes::CurrentGroup::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; -- (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]; + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = OnOff::Attributes::OnTime::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeSceneValidWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOnTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Scenes::Attributes::SceneValid::TypeInfo; + using TypeInfo = OnOff::Attributes::OnTime::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -1753,9 +1665,9 @@ - (void)subscribeAttributeSceneValidWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSceneValidWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOnTimeWithClusterStateCache:(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; + using TypeInfo = OnOff::Attributes::OnTime::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -1764,9 +1676,9 @@ + (void)readAttributeSceneValidWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeNameSupportWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOffWaitTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Scenes::Attributes::NameSupport::TypeInfo; + using TypeInfo = OnOff::Attributes::OffWaitTime::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -1775,47 +1687,39 @@ - (void)readAttributeNameSupportWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)subscribeAttributeNameSupportWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - 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]; + [self writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } - -+ (void)readAttributeNameSupportWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - using TypeInfo = Scenes::Attributes::NameSupport::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; -- (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]; + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = OnOff::Attributes::OffWaitTime::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeLastConfiguredByWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOffWaitTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Scenes::Attributes::LastConfiguredBy::TypeInfo; + using TypeInfo = OnOff::Attributes::OffWaitTime::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -1825,9 +1729,9 @@ - (void)subscribeAttributeLastConfiguredByWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLastConfiguredByWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOffWaitTimeWithClusterStateCache:(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; + using TypeInfo = OnOff::Attributes::OffWaitTime::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -1836,9 +1740,9 @@ + (void)readAttributeLastConfiguredByWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeSceneTableSizeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeStartUpOnOffWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Scenes::Attributes::SceneTableSize::TypeInfo; + using TypeInfo = OnOff::Attributes::StartUpOnOff::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -1847,47 +1751,44 @@ - (void)readAttributeSceneTableSizeWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeSceneTableSizeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - 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]; + [self writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } - -+ (void)readAttributeSceneTableSizeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - using TypeInfo = Scenes::Attributes::SceneTableSize::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; -- (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]; + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = OnOff::Attributes::StartUpOnOff::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>(value.unsignedCharValue); + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeFabricSceneInfoWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeStartUpOnOffWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Scenes::Attributes::FabricSceneInfo::TypeInfo; + using TypeInfo = OnOff::Attributes::StartUpOnOff::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -1897,9 +1798,9 @@ - (void)subscribeAttributeFabricSceneInfoWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFabricSceneInfoWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeStartUpOnOffWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Scenes::Attributes::FabricSceneInfo::TypeInfo; + using TypeInfo = OnOff::Attributes::StartUpOnOff::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -1910,7 +1811,7 @@ + (void)readAttributeFabricSceneInfoWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Scenes::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = OnOff::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -1923,7 +1824,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Scenes::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = OnOff::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -1935,7 +1836,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 = Scenes::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = OnOff::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -1946,7 +1847,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Scenes::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OnOff::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -1959,7 +1860,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Scenes::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OnOff::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -1971,7 +1872,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 = Scenes::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OnOff::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -1982,7 +1883,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Scenes::Attributes::EventList::TypeInfo; + using TypeInfo = OnOff::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -1995,7 +1896,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Scenes::Attributes::EventList::TypeInfo; + using TypeInfo = OnOff::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -2007,7 +1908,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 = Scenes::Attributes::EventList::TypeInfo; + using TypeInfo = OnOff::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -2018,7 +1919,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Scenes::Attributes::AttributeList::TypeInfo; + using TypeInfo = OnOff::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -2031,7 +1932,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Scenes::Attributes::AttributeList::TypeInfo; + using TypeInfo = OnOff::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -2043,7 +1944,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 = Scenes::Attributes::AttributeList::TypeInfo; + using TypeInfo = OnOff::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -2054,7 +1955,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Scenes::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OnOff::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -2067,7 +1968,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Scenes::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OnOff::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -2079,7 +1980,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 = Scenes::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OnOff::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -2090,7 +1991,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Scenes::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OnOff::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -2103,7 +2004,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Scenes::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OnOff::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -2115,7 +2016,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 = Scenes::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OnOff::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -2126,98 +2027,67 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterScenes (Deprecated) +@implementation MTRBaseClusterOnOff (Deprecated) -- (void)addSceneWithParams:(MTRScenesClusterAddSceneParams *)params completionHandler:(void (^)(MTRScenesClusterAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)offWithParams:(MTROnOffClusterOffParams * _Nullable)params completionHandler:(MTRStatusCompletion)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); - }]; + [self offWithParams:params completion: + completionHandler]; } -- (void)viewSceneWithParams:(MTRScenesClusterViewSceneParams *)params completionHandler:(void (^)(MTRScenesClusterViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)offWithCompletionHandler:(MTRStatusCompletion)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); - }]; + [self offWithParams:nil completionHandler:completionHandler]; } -- (void)removeSceneWithParams:(MTRScenesClusterRemoveSceneParams *)params completionHandler:(void (^)(MTRScenesClusterRemoveSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)onWithParams:(MTROnOffClusterOnParams * _Nullable)params completionHandler:(MTRStatusCompletion)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); - }]; + [self onWithParams:params completion: + completionHandler]; } -- (void)removeAllScenesWithParams:(MTRScenesClusterRemoveAllScenesParams *)params completionHandler:(void (^)(MTRScenesClusterRemoveAllScenesResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)onWithCompletionHandler:(MTRStatusCompletion)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); - }]; + [self onWithParams:nil completionHandler:completionHandler]; } -- (void)storeSceneWithParams:(MTRScenesClusterStoreSceneParams *)params completionHandler:(void (^)(MTRScenesClusterStoreSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)toggleWithParams:(MTROnOffClusterToggleParams * _Nullable)params completionHandler:(MTRStatusCompletion)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); - }]; + [self toggleWithParams:params completion: + completionHandler]; } -- (void)recallSceneWithParams:(MTRScenesClusterRecallSceneParams *)params completionHandler:(MTRStatusCompletion)completionHandler +- (void)toggleWithCompletionHandler:(MTRStatusCompletion)completionHandler { - [self recallSceneWithParams:params completion: - completionHandler]; + [self toggleWithParams:nil completionHandler:completionHandler]; } -- (void)getSceneMembershipWithParams:(MTRScenesClusterGetSceneMembershipParams *)params completionHandler:(void (^)(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)offWithEffectWithParams:(MTROnOffClusterOffWithEffectParams *)params completionHandler:(MTRStatusCompletion)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); - }]; + [self offWithEffectWithParams:params completion: + completionHandler]; } -- (void)enhancedAddSceneWithParams:(MTRScenesClusterEnhancedAddSceneParams *)params completionHandler:(void (^)(MTRScenesClusterEnhancedAddSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)onWithRecallGlobalSceneWithParams:(MTROnOffClusterOnWithRecallGlobalSceneParams * _Nullable)params completionHandler:(MTRStatusCompletion)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); - }]; + [self onWithRecallGlobalSceneWithParams:params completion: + completionHandler]; } -- (void)enhancedViewSceneWithParams:(MTRScenesClusterEnhancedViewSceneParams *)params completionHandler:(void (^)(MTRScenesClusterEnhancedViewSceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)onWithRecallGlobalSceneWithCompletionHandler:(MTRStatusCompletion)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); - }]; + [self onWithRecallGlobalSceneWithParams:nil completionHandler:completionHandler]; } -- (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params completionHandler:(void (^)(MTRScenesClusterCopySceneResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params completionHandler:(MTRStatusCompletion)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); - }]; + [self onWithTimedOffWithParams:params completion: + completionHandler]; } -- (void)readAttributeSceneCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeOnOffWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeSceneCountWithCompletion: + [self readAttributeOnOffWithCompletion: ^(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 +- (void)subscribeAttributeOnOffWithMinInterval:(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) { @@ -2226,33 +2096,33 @@ - (void)subscribeAttributeSceneCountWithMinInterval:(NSNumber * _Nonnull)minInte 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); - }]; + [self subscribeAttributeOnOffWithParams: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 ++ (void)readAttributeOnOffWithAttributeCache:(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); - }]; + [self readAttributeOnOffWithClusterStateCache: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 +- (void)readAttributeGlobalSceneControlWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeCurrentSceneWithCompletion: + [self readAttributeGlobalSceneControlWithCompletion: ^(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 +- (void)subscribeAttributeGlobalSceneControlWithMinInterval:(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) { @@ -2261,33 +2131,41 @@ - (void)subscribeAttributeCurrentSceneWithMinInterval:(NSNumber * _Nonnull)minIn 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); - }]; + [self subscribeAttributeGlobalSceneControlWithParams: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 ++ (void)readAttributeGlobalSceneControlWithAttributeCache:(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); - }]; + [self readAttributeGlobalSceneControlWithClusterStateCache: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 +- (void)readAttributeOnTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeCurrentGroupWithCompletion: + [self readAttributeOnTimeWithCompletion: ^(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 +- (void)writeAttributeOnTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOnTimeWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeOnTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOnTimeWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeOnTimeWithMinInterval:(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) { @@ -2296,33 +2174,41 @@ - (void)subscribeAttributeCurrentGroupWithMinInterval:(NSNumber * _Nonnull)minIn 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); - }]; + [self subscribeAttributeOnTimeWithParams: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 ++ (void)readAttributeOnTimeWithAttributeCache:(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); - }]; + [self readAttributeOnTimeWithClusterStateCache: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 +- (void)readAttributeOffWaitTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeSceneValidWithCompletion: + [self readAttributeOffWaitTimeWithCompletion: ^(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 +- (void)writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOffWaitTimeWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOffWaitTimeWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeOffWaitTimeWithMinInterval:(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) { @@ -2331,68 +2217,41 @@ - (void)subscribeAttributeSceneValidWithMinInterval:(NSNumber * _Nonnull)minInte 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); - }]; + [self subscribeAttributeOffWaitTimeWithParams: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 ++ (void)readAttributeOffWaitTimeWithAttributeCache:(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: + [self readAttributeOffWaitTimeWithClusterStateCache: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 +- (void)readAttributeStartUpOnOffWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeLastConfiguredByWithCompletion: + [self readAttributeStartUpOnOffWithCompletion: ^(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 +- (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeStartUpOnOffWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeStartUpOnOffWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeStartUpOnOffWithMinInterval:(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) { @@ -2401,19 +2260,19 @@ - (void)subscribeAttributeLastConfiguredByWithMinInterval:(NSNumber * _Nonnull)m 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); - }]; + [self subscribeAttributeStartUpOnOffWithParams: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 ++ (void)readAttributeStartUpOnOffWithAttributeCache:(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); - }]; + [self readAttributeStartUpOnOffWithClusterStateCache: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 @@ -2600,308 +2459,11 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device @end -@implementation MTRBaseClusterOnOff - -- (void)offWithCompletion:(MTRStatusCompletion)completion -{ - [self offWithParams:nil completion:completion]; -} -- (void)offWithParams:(MTROnOffClusterOffParams * _Nullable)params 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 - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)onWithCompletion:(MTRStatusCompletion)completion -{ - [self onWithParams:nil completion:completion]; -} -- (void)onWithParams:(MTROnOffClusterOnParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTROnOffClusterOnParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = OnOff::Commands::On::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)toggleWithCompletion:(MTRStatusCompletion)completion -{ - [self toggleWithParams:nil completion:completion]; -} -- (void)toggleWithParams:(MTROnOffClusterToggleParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTROnOffClusterToggleParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = OnOff::Commands::Toggle::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)offWithEffectWithParams:(MTROnOffClusterOffWithEffectParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTROnOffClusterOffWithEffectParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = OnOff::Commands::OffWithEffect::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)onWithRecallGlobalSceneWithCompletion:(MTRStatusCompletion)completion -{ - [self onWithRecallGlobalSceneWithParams:nil completion:completion]; -} -- (void)onWithRecallGlobalSceneWithParams:(MTROnOffClusterOnWithRecallGlobalSceneParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTROnOffClusterOnWithRecallGlobalSceneParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = OnOff::Commands::OnWithRecallGlobalScene::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)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTROnOffClusterOnWithTimedOffParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = OnOff::Commands::OnWithTimedOff::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)readAttributeOnOffWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OnOff::Attributes::OnOff::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeOnOffWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = OnOff::Attributes::OnOff::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeOnOffWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OnOff::Attributes::OnOff::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeGlobalSceneControlWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OnOff::Attributes::GlobalSceneControl::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeGlobalSceneControlWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = OnOff::Attributes::GlobalSceneControl::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeGlobalSceneControlWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OnOff::Attributes::GlobalSceneControl::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeOnTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OnOff::Attributes::OnTime::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeOnTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeOnTimeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeOnTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = OnOff::Attributes::OnTime::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeOnTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = OnOff::Attributes::OnTime::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeOnTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OnOff::Attributes::OnTime::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} +@implementation MTRBaseClusterOnOffSwitchConfiguration -- (void)readAttributeOffWaitTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSwitchTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOff::Attributes::OffWaitTime::TypeInfo; + using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchType::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -2910,39 +2472,11 @@ - (void)readAttributeOffWaitTimeWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = OnOff::Attributes::OffWaitTime::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeOffWaitTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSwitchTypeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OnOff::Attributes::OffWaitTime::TypeInfo; + using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchType::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -2952,9 +2486,9 @@ - (void)subscribeAttributeOffWaitTimeWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOffWaitTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSwitchTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOff::Attributes::OffWaitTime::TypeInfo; + using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchType::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -2963,9 +2497,9 @@ + (void)readAttributeOffWaitTimeWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeStartUpOnOffWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSwitchActionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOff::Attributes::StartUpOnOff::TypeInfo; + using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -2974,11 +2508,11 @@ - (void)readAttributeStartUpOnOffWithCompletion:(void (^)(NSNumber * _Nullable v completion:completion]; } -- (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -2993,25 +2527,20 @@ - (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value params:( } ListFreer listFreer; - using TypeInfo = OnOff::Attributes::StartUpOnOff::TypeInfo; + using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>(value.unsignedCharValue); - } + cppValue = value.unsignedCharValue; chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeStartUpOnOffWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSwitchActionsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OnOff::Attributes::StartUpOnOff::TypeInfo; + using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -3021,9 +2550,9 @@ - (void)subscribeAttributeStartUpOnOffWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeStartUpOnOffWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSwitchActionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOff::Attributes::StartUpOnOff::TypeInfo; + using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -3034,7 +2563,7 @@ + (void)readAttributeStartUpOnOffWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOff::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = OnOffSwitchConfiguration::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -3047,7 +2576,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OnOff::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = OnOffSwitchConfiguration::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -3059,7 +2588,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 = OnOff::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = OnOffSwitchConfiguration::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -3070,7 +2599,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOff::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OnOffSwitchConfiguration::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -3083,7 +2612,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OnOff::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OnOffSwitchConfiguration::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -3095,7 +2624,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 = OnOff::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OnOffSwitchConfiguration::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -3106,7 +2635,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOff::Attributes::EventList::TypeInfo; + using TypeInfo = OnOffSwitchConfiguration::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -3119,7 +2648,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OnOff::Attributes::EventList::TypeInfo; + using TypeInfo = OnOffSwitchConfiguration::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -3131,7 +2660,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 = OnOff::Attributes::EventList::TypeInfo; + using TypeInfo = OnOffSwitchConfiguration::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -3142,7 +2671,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOff::Attributes::AttributeList::TypeInfo; + using TypeInfo = OnOffSwitchConfiguration::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -3155,7 +2684,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OnOff::Attributes::AttributeList::TypeInfo; + using TypeInfo = OnOffSwitchConfiguration::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -3167,7 +2696,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 = OnOff::Attributes::AttributeList::TypeInfo; + using TypeInfo = OnOffSwitchConfiguration::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -3178,7 +2707,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOff::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OnOffSwitchConfiguration::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -3191,7 +2720,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OnOff::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OnOffSwitchConfiguration::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -3203,7 +2732,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 = OnOff::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OnOffSwitchConfiguration::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -3214,7 +2743,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOff::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OnOffSwitchConfiguration::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -3227,7 +2756,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OnOff::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OnOffSwitchConfiguration::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -3239,7 +2768,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 = OnOff::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OnOffSwitchConfiguration::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -3250,231 +2779,63 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterOnOff (Deprecated) +@implementation MTRBaseClusterOnOffSwitchConfiguration (Deprecated) -- (void)offWithParams:(MTROnOffClusterOffParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +- (void)readAttributeSwitchTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self offWithParams:params completion: - completionHandler]; + [self readAttributeSwitchTypeWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)offWithCompletionHandler:(MTRStatusCompletion)completionHandler +- (void)subscribeAttributeSwitchTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self offWithParams:nil completionHandler:completionHandler]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeSwitchTypeWithParams: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)onWithParams:(MTROnOffClusterOnParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self onWithParams:params completion: - completionHandler]; -} -- (void)onWithCompletionHandler:(MTRStatusCompletion)completionHandler -{ - [self onWithParams:nil completionHandler:completionHandler]; -} -- (void)toggleWithParams:(MTROnOffClusterToggleParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self toggleWithParams:params completion: - completionHandler]; -} -- (void)toggleWithCompletionHandler:(MTRStatusCompletion)completionHandler -{ - [self toggleWithParams:nil completionHandler:completionHandler]; -} -- (void)offWithEffectWithParams:(MTROnOffClusterOffWithEffectParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self offWithEffectWithParams:params completion: - completionHandler]; -} -- (void)onWithRecallGlobalSceneWithParams:(MTROnOffClusterOnWithRecallGlobalSceneParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self onWithRecallGlobalSceneWithParams:params completion: - completionHandler]; -} -- (void)onWithRecallGlobalSceneWithCompletionHandler:(MTRStatusCompletion)completionHandler -{ - [self onWithRecallGlobalSceneWithParams:nil completionHandler:completionHandler]; -} -- (void)onWithTimedOffWithParams:(MTROnOffClusterOnWithTimedOffParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self onWithTimedOffWithParams:params completion: - completionHandler]; -} - -- (void)readAttributeOnOffWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeOnOffWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeOnOffWithMinInterval:(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 subscribeAttributeOnOffWithParams: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)readAttributeOnOffWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeOnOffWithClusterStateCache: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)readAttributeGlobalSceneControlWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGlobalSceneControlWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeGlobalSceneControlWithMinInterval:(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 subscribeAttributeGlobalSceneControlWithParams: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)readAttributeGlobalSceneControlWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGlobalSceneControlWithClusterStateCache: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)readAttributeOnTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeOnTimeWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeOnTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeOnTimeWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeOnTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeOnTimeWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeOnTimeWithMinInterval:(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 subscribeAttributeOnTimeWithParams: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)readAttributeOnTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeOnTimeWithClusterStateCache: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)readAttributeOffWaitTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeOffWaitTimeWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeOffWaitTimeWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeOffWaitTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeOffWaitTimeWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeOffWaitTimeWithMinInterval:(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 subscribeAttributeOffWaitTimeWithParams: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)readAttributeOffWaitTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSwitchTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeOffWaitTimeWithClusterStateCache: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); - }]; + [self readAttributeSwitchTypeWithClusterStateCache: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)readAttributeStartUpOnOffWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeSwitchActionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeStartUpOnOffWithCompletion: + [self readAttributeSwitchActionsWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeStartUpOnOffWithValue:value params:nil completion:completionHandler]; + [self writeAttributeSwitchActionsWithValue:value params:nil completion:completionHandler]; } -- (void)writeAttributeStartUpOnOffWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeStartUpOnOffWithValue:value params:params completion:completionHandler]; + [self writeAttributeSwitchActionsWithValue:value params:params completion:completionHandler]; } -- (void)subscribeAttributeStartUpOnOffWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSwitchActionsWithMinInterval:(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) { @@ -3483,19 +2844,19 @@ - (void)subscribeAttributeStartUpOnOffWithMinInterval:(NSNumber * _Nonnull)minIn subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeStartUpOnOffWithParams: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); - }]; + [self subscribeAttributeSwitchActionsWithParams: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)readAttributeStartUpOnOffWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSwitchActionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeStartUpOnOffWithClusterStateCache: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); - }]; + [self readAttributeSwitchActionsWithClusterStateCache: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 @@ -3682,11 +3043,228 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device @end -@implementation MTRBaseClusterOnOffSwitchConfiguration +@implementation MTRBaseClusterLevelControl -- (void)readAttributeSwitchTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)moveToLevelWithParams:(MTRLevelControlClusterMoveToLevelParams *)params completion:(MTRStatusCompletion)completion { - using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchType::TypeInfo; + 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 + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)moveWithParams:(MTRLevelControlClusterMoveParams *)params 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 + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)stepWithParams:(MTRLevelControlClusterStepParams *)params 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 + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)stopWithParams:(MTRLevelControlClusterStopParams *)params 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 + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)moveToLevelWithOnOffWithParams:(MTRLevelControlClusterMoveToLevelWithOnOffParams *)params 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 + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)moveWithOnOffWithParams:(MTRLevelControlClusterMoveWithOnOffParams *)params 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 + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)stepWithOnOffWithParams:(MTRLevelControlClusterStepWithOnOffParams *)params 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 + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)stopWithOnOffWithParams:(MTRLevelControlClusterStopWithOnOffParams *)params 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 + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFrequencyParams *)params 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 + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeCurrentLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = LevelControl::Attributes::CurrentLevel::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -3695,11 +3273,11 @@ - (void)readAttributeSwitchTypeWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeSwitchTypeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchType::TypeInfo; + using TypeInfo = LevelControl::Attributes::CurrentLevel::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -3709,9 +3287,9 @@ - (void)subscribeAttributeSwitchTypeWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSwitchTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchType::TypeInfo; + using TypeInfo = LevelControl::Attributes::CurrentLevel::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -3720,9 +3298,9 @@ + (void)readAttributeSwitchTypeWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeSwitchActionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRemainingTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; + using TypeInfo = LevelControl::Attributes::RemainingTime::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -3731,39 +3309,11 @@ - (void)readAttributeSwitchActionsWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeSwitchActionsWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeRemainingTimeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; + using TypeInfo = LevelControl::Attributes::RemainingTime::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -3773,9 +3323,9 @@ - (void)subscribeAttributeSwitchActionsWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSwitchActionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRemainingTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOffSwitchConfiguration::Attributes::SwitchActions::TypeInfo; + using TypeInfo = LevelControl::Attributes::RemainingTime::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -3784,9 +3334,9 @@ + (void)readAttributeSwitchActionsWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOffSwitchConfiguration::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = LevelControl::Attributes::MinLevel::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -3795,11 +3345,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)subscribeAttributeMinLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OnOffSwitchConfiguration::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = LevelControl::Attributes::MinLevel::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -3809,9 +3359,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)readAttributeMinLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOffSwitchConfiguration::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = LevelControl::Attributes::MinLevel::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -3820,9 +3370,9 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOffSwitchConfiguration::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = LevelControl::Attributes::MaxLevel::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -3831,11 +3381,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)subscribeAttributeMaxLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OnOffSwitchConfiguration::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = LevelControl::Attributes::MaxLevel::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -3845,9 +3395,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)readAttributeMaxLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOffSwitchConfiguration::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = LevelControl::Attributes::MaxLevel::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -3856,9 +3406,9 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOffSwitchConfiguration::Attributes::EventList::TypeInfo; + using TypeInfo = LevelControl::Attributes::CurrentFrequency::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -3867,11 +3417,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)subscribeAttributeCurrentFrequencyWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OnOffSwitchConfiguration::Attributes::EventList::TypeInfo; + using TypeInfo = LevelControl::Attributes::CurrentFrequency::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -3881,9 +3431,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)readAttributeCurrentFrequencyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOffSwitchConfiguration::Attributes::EventList::TypeInfo; + using TypeInfo = LevelControl::Attributes::CurrentFrequency::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -3892,9 +3442,9 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOffSwitchConfiguration::Attributes::AttributeList::TypeInfo; + using TypeInfo = LevelControl::Attributes::MinFrequency::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -3903,11 +3453,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)subscribeAttributeMinFrequencyWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OnOffSwitchConfiguration::Attributes::AttributeList::TypeInfo; + using TypeInfo = LevelControl::Attributes::MinFrequency::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -3917,9 +3467,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)readAttributeMinFrequencyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOffSwitchConfiguration::Attributes::AttributeList::TypeInfo; + using TypeInfo = LevelControl::Attributes::MinFrequency::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -3928,9 +3478,9 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOffSwitchConfiguration::Attributes::FeatureMap::TypeInfo; + using TypeInfo = LevelControl::Attributes::MaxFrequency::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -3939,11 +3489,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)subscribeAttributeMaxFrequencyWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OnOffSwitchConfiguration::Attributes::FeatureMap::TypeInfo; + using TypeInfo = LevelControl::Attributes::MaxFrequency::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -3953,9 +3503,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)readAttributeMaxFrequencyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOffSwitchConfiguration::Attributes::FeatureMap::TypeInfo; + using TypeInfo = LevelControl::Attributes::MaxFrequency::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -3964,9 +3514,9 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOptionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOffSwitchConfiguration::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = LevelControl::Attributes::Options::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -3975,11 +3525,39 @@ - (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)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = OnOffSwitchConfiguration::Attributes::ClusterRevision::TypeInfo; + [self writeAttributeOptionsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = LevelControl::Attributes::Options::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeOptionsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = LevelControl::Attributes::Options::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -3989,9 +3567,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)readAttributeOptionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OnOffSwitchConfiguration::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = LevelControl::Attributes::Options::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -4000,507 +3578,326 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -@end - -@implementation MTRBaseClusterOnOffSwitchConfiguration (Deprecated) +- (void)readAttributeOnOffTransitionTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = LevelControl::Attributes::OnOffTransitionTime::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} -- (void)readAttributeSwitchTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self readAttributeSwitchTypeWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)subscribeAttributeSwitchTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeSwitchTypeWithParams: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); - }]; + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = LevelControl::Attributes::OnOffTransitionTime::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedShortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -+ (void)readAttributeSwitchTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeOnOffTransitionTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeSwitchTypeWithClusterStateCache: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); - }]; + using TypeInfo = LevelControl::Attributes::OnOffTransitionTime::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeSwitchActionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOnOffTransitionTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeSwitchActionsWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = LevelControl::Attributes::OnOffTransitionTime::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler + +- (void)readAttributeOnLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self writeAttributeSwitchActionsWithValue:value params:nil completion:completionHandler]; + using TypeInfo = LevelControl::Attributes::OnLevel::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)writeAttributeSwitchActionsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler + +- (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - [self writeAttributeSwitchActionsWithValue:value params:params completion:completionHandler]; + [self writeAttributeOnLevelWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } -- (void)subscribeAttributeSwitchActionsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeSwitchActionsWithParams: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); - }]; + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = LevelControl::Attributes::OnLevel::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -+ (void)readAttributeSwitchActionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeOnLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeSwitchActionsWithClusterStateCache: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); - }]; + using TypeInfo = LevelControl::Attributes::OnLevel::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOnLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeGeneratedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = LevelControl::Attributes::OnLevel::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (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 + +- (void)readAttributeOnTransitionTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - 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); - }]; + using TypeInfo = LevelControl::Attributes::OnTransitionTime::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - [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); - }]; + [self writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } +- (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = LevelControl::Attributes::OnTransitionTime::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeOnTransitionTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeAcceptedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = LevelControl::Attributes::OnTransitionTime::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (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 + ++ (void)readAttributeOnTransitionTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - 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); - }]; + using TypeInfo = LevelControl::Attributes::OnTransitionTime::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeOffTransitionTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [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); - }]; + using TypeInfo = LevelControl::Attributes::OffTransitionTime::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - [self readAttributeAttributeListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } -- (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 +- (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - 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); - }]; + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = LevelControl::Attributes::OffTransitionTime::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeOffTransitionTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [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); - }]; + using TypeInfo = LevelControl::Attributes::OffTransitionTime::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOffTransitionTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeFeatureMapWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = LevelControl::Attributes::OffTransitionTime::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (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 + +- (void)readAttributeDefaultMoveRateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - 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 MTRBaseClusterLevelControl - -- (void)moveToLevelWithParams:(MTRLevelControlClusterMoveToLevelParams *)params 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 - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)moveWithParams:(MTRLevelControlClusterMoveParams *)params 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 - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)stepWithParams:(MTRLevelControlClusterStepParams *)params 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 - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)stopWithParams:(MTRLevelControlClusterStopParams *)params 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 - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)moveToLevelWithOnOffWithParams:(MTRLevelControlClusterMoveToLevelWithOnOffParams *)params 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 - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)moveWithOnOffWithParams:(MTRLevelControlClusterMoveWithOnOffParams *)params 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 - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil + using TypeInfo = LevelControl::Attributes::DefaultMoveRate::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil queue:self.callbackQueue - completion:responseHandler]; + completion:completion]; } -- (void)stepWithOnOffWithParams:(MTRLevelControlClusterStepWithOnOffParams *)params 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 - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)stopWithOnOffWithParams:(MTRLevelControlClusterStopWithOnOffParams *)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value 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 - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; + [self writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } -- (void)moveToClosestFrequencyWithParams:(MTRLevelControlClusterMoveToClosestFrequencyParams *)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - if (params == nil) { - params = [[MTRLevelControlClusterMoveToClosestFrequencyParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } - using RequestType = LevelControl::Commands::MoveToClosestFrequency::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]; -} + ListFreer listFreer; + using TypeInfo = LevelControl::Attributes::DefaultMoveRate::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } -- (void)readAttributeCurrentLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = LevelControl::Attributes::CurrentLevel::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeCurrentLevelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDefaultMoveRateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LevelControl::Attributes::CurrentLevel::TypeInfo; + using TypeInfo = LevelControl::Attributes::DefaultMoveRate::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -4510,9 +3907,9 @@ - (void)subscribeAttributeCurrentLevelWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCurrentLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDefaultMoveRateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LevelControl::Attributes::CurrentLevel::TypeInfo; + using TypeInfo = LevelControl::Attributes::DefaultMoveRate::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -4521,9 +3918,9 @@ + (void)readAttributeCurrentLevelWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } -- (void)readAttributeRemainingTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeStartUpCurrentLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LevelControl::Attributes::RemainingTime::TypeInfo; + using TypeInfo = LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -4532,11 +3929,44 @@ - (void)readAttributeRemainingTimeWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeRemainingTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - using TypeInfo = LevelControl::Attributes::RemainingTime::TypeInfo; + [self writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeStartUpCurrentLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -4546,9 +3976,9 @@ - (void)subscribeAttributeRemainingTimeWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRemainingTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeStartUpCurrentLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LevelControl::Attributes::RemainingTime::TypeInfo; + using TypeInfo = LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -4557,9 +3987,9 @@ + (void)readAttributeRemainingTimeWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeMinLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LevelControl::Attributes::MinLevel::TypeInfo; + using TypeInfo = LevelControl::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -4568,11 +3998,11 @@ - (void)readAttributeMinLevelWithCompletion:(void (^)(NSNumber * _Nullable value completion:completion]; } -- (void)subscribeAttributeMinLevelWithParams:(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 = LevelControl::Attributes::MinLevel::TypeInfo; + using TypeInfo = LevelControl::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -4582,9 +4012,9 @@ - (void)subscribeAttributeMinLevelWithParams:(MTRSubscribeParams * _Nonnull)para subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMinLevelWithClusterStateCache:(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 = LevelControl::Attributes::MinLevel::TypeInfo; + using TypeInfo = LevelControl::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -4593,9 +4023,9 @@ + (void)readAttributeMinLevelWithClusterStateCache:(MTRClusterStateCacheContaine completion:completion]; } -- (void)readAttributeMaxLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LevelControl::Attributes::MaxLevel::TypeInfo; + using TypeInfo = LevelControl::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -4604,11 +4034,11 @@ - (void)readAttributeMaxLevelWithCompletion:(void (^)(NSNumber * _Nullable value completion:completion]; } -- (void)subscribeAttributeMaxLevelWithParams:(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 = LevelControl::Attributes::MaxLevel::TypeInfo; + using TypeInfo = LevelControl::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -4618,9 +4048,9 @@ - (void)subscribeAttributeMaxLevelWithParams:(MTRSubscribeParams * _Nonnull)para subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMaxLevelWithClusterStateCache:(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 = LevelControl::Attributes::MaxLevel::TypeInfo; + using TypeInfo = LevelControl::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -4629,9 +4059,9 @@ + (void)readAttributeMaxLevelWithClusterStateCache:(MTRClusterStateCacheContaine completion:completion]; } -- (void)readAttributeCurrentFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LevelControl::Attributes::CurrentFrequency::TypeInfo; + using TypeInfo = LevelControl::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -4640,11 +4070,11 @@ - (void)readAttributeCurrentFrequencyWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)subscribeAttributeCurrentFrequencyWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LevelControl::Attributes::CurrentFrequency::TypeInfo; + using TypeInfo = LevelControl::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -4654,9 +4084,9 @@ - (void)subscribeAttributeCurrentFrequencyWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCurrentFrequencyWithClusterStateCache:(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 = LevelControl::Attributes::CurrentFrequency::TypeInfo; + using TypeInfo = LevelControl::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -4665,9 +4095,9 @@ + (void)readAttributeCurrentFrequencyWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeMinFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LevelControl::Attributes::MinFrequency::TypeInfo; + using TypeInfo = LevelControl::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -4676,11 +4106,11 @@ - (void)readAttributeMinFrequencyWithCompletion:(void (^)(NSNumber * _Nullable v completion:completion]; } -- (void)subscribeAttributeMinFrequencyWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _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 = LevelControl::Attributes::MinFrequency::TypeInfo; + using TypeInfo = LevelControl::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -4690,9 +4120,9 @@ - (void)subscribeAttributeMinFrequencyWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMinFrequencyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _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 = LevelControl::Attributes::MinFrequency::TypeInfo; + using TypeInfo = LevelControl::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -4701,9 +4131,9 @@ + (void)readAttributeMinFrequencyWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } -- (void)readAttributeMaxFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LevelControl::Attributes::MaxFrequency::TypeInfo; + using TypeInfo = LevelControl::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -4712,11 +4142,11 @@ - (void)readAttributeMaxFrequencyWithCompletion:(void (^)(NSNumber * _Nullable v completion:completion]; } -- (void)subscribeAttributeMaxFrequencyWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _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 = LevelControl::Attributes::MaxFrequency::TypeInfo; + using TypeInfo = LevelControl::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -4726,9 +4156,9 @@ - (void)subscribeAttributeMaxFrequencyWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMaxFrequencyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _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 = LevelControl::Attributes::MaxFrequency::TypeInfo; + using TypeInfo = LevelControl::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -4737,9 +4167,9 @@ + (void)readAttributeMaxFrequencyWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } -- (void)readAttributeOptionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LevelControl::Attributes::Options::TypeInfo; + using TypeInfo = LevelControl::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -4748,39 +4178,11 @@ - (void)readAttributeOptionsWithCompletion:(void (^)(NSNumber * _Nullable value, completion:completion]; } -- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeOptionsWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeOptionsWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = LevelControl::Attributes::Options::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeOptionsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _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 = LevelControl::Attributes::Options::TypeInfo; + using TypeInfo = LevelControl::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -4790,9 +4192,9 @@ - (void)subscribeAttributeOptionsWithParams:(MTRSubscribeParams * _Nonnull)param subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOptionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _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 = LevelControl::Attributes::Options::TypeInfo; + using TypeInfo = LevelControl::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -4801,632 +4203,7 @@ + (void)readAttributeOptionsWithClusterStateCache:(MTRClusterStateCacheContainer completion:completion]; } -- (void)readAttributeOnOffTransitionTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = LevelControl::Attributes::OnOffTransitionTime::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeOnOffTransitionTimeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = LevelControl::Attributes::OnOffTransitionTime::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeOnOffTransitionTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = LevelControl::Attributes::OnOffTransitionTime::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeOnOffTransitionTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = LevelControl::Attributes::OnOffTransitionTime::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeOnLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = LevelControl::Attributes::OnLevel::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeOnLevelWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeOnLevelWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = LevelControl::Attributes::OnLevel::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeOnLevelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = LevelControl::Attributes::OnLevel::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeOnLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = LevelControl::Attributes::OnLevel::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeOnTransitionTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = LevelControl::Attributes::OnTransitionTime::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeOnTransitionTimeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = LevelControl::Attributes::OnTransitionTime::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeOnTransitionTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = LevelControl::Attributes::OnTransitionTime::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeOnTransitionTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = LevelControl::Attributes::OnTransitionTime::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeOffTransitionTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = LevelControl::Attributes::OffTransitionTime::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeOffTransitionTimeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = LevelControl::Attributes::OffTransitionTime::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeOffTransitionTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = LevelControl::Attributes::OffTransitionTime::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeOffTransitionTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = LevelControl::Attributes::OffTransitionTime::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeDefaultMoveRateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = LevelControl::Attributes::DefaultMoveRate::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeDefaultMoveRateWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = LevelControl::Attributes::DefaultMoveRate::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeDefaultMoveRateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = LevelControl::Attributes::DefaultMoveRate::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeDefaultMoveRateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = LevelControl::Attributes::DefaultMoveRate::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeStartUpCurrentLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeStartUpCurrentLevelWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeStartUpCurrentLevelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = LevelControl::Attributes::StartUpCurrentLevel::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeStartUpCurrentLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = LevelControl::Attributes::StartUpCurrentLevel::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 = LevelControl::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 = LevelControl::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 = LevelControl::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 = LevelControl::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 = LevelControl::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 = LevelControl::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 = LevelControl::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 = LevelControl::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 = LevelControl::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 = LevelControl::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 = LevelControl::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 = LevelControl::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 = LevelControl::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 = LevelControl::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 = LevelControl::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 = LevelControl::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 = LevelControl::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 = LevelControl::Attributes::ClusterRevision::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -@end +@end @implementation MTRBaseClusterLevelControl (Deprecated) @@ -12702,83 +11479,587 @@ - (void)subscribeAttributeReachableWithMinInterval:(NSNumber * _Nonnull)minInter reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeReachableWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeReachableWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeReachableWithClusterStateCache: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)readAttributeUniqueIDWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeUniqueIDWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeUniqueIDWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _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 subscribeAttributeUniqueIDWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeUniqueIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeUniqueIDWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeCapabilityMinimaWithCompletionHandler:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCapabilityMinimaWithCompletion: + ^(MTRBasicInformationClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeCapabilityMinimaWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _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 subscribeAttributeCapabilityMinimaWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(MTRBasicInformationClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeCapabilityMinimaWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCapabilityMinimaWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(MTRBasicInformationClusterCapabilityMinimaStruct * _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 MTRBaseClusterOTASoftwareUpdateProvider + +- (void)queryImageWithParams:(MTROTASoftwareUpdateProviderClusterQueryImageParams *)params completion:(void (^)(MTROTASoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTROTASoftwareUpdateProviderClusterQueryImageParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = OtaSoftwareUpdateProvider::Commands::QueryImage::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTROTASoftwareUpdateProviderClusterQueryImageResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)applyUpdateRequestWithParams:(MTROTASoftwareUpdateProviderClusterApplyUpdateRequestParams *)params completion:(void (^)(MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTROTASoftwareUpdateProviderClusterApplyUpdateRequestParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)notifyUpdateAppliedWithParams:(MTROTASoftwareUpdateProviderClusterNotifyUpdateAppliedParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTROTASoftwareUpdateProviderClusterNotifyUpdateAppliedParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::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)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = OtaSoftwareUpdateProvider::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 = OtaSoftwareUpdateProvider::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 = OtaSoftwareUpdateProvider::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 = OtaSoftwareUpdateProvider::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 = OtaSoftwareUpdateProvider::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 = OtaSoftwareUpdateProvider::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 = OtaSoftwareUpdateProvider::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 = OtaSoftwareUpdateProvider::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 = OtaSoftwareUpdateProvider::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 = OtaSoftwareUpdateProvider::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 = OtaSoftwareUpdateProvider::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 = OtaSoftwareUpdateProvider::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 = OtaSoftwareUpdateProvider::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 = OtaSoftwareUpdateProvider::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 { - [self readAttributeReachableWithClusterStateCache: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); - }]; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::FeatureMap::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeUniqueIDWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeUniqueIDWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::ClusterRevision::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeUniqueIDWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + 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 subscribeAttributeUniqueIDWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::ClusterRevision::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeUniqueIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeUniqueIDWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = OtaSoftwareUpdateProvider::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeCapabilityMinimaWithCompletionHandler:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error))completionHandler +@end + +@implementation MTRBaseClusterOtaSoftwareUpdateProvider +@end + +@implementation MTRBaseClusterOtaSoftwareUpdateProvider (Deprecated) + +- (void)queryImageWithParams:(MTROtaSoftwareUpdateProviderClusterQueryImageParams *)params completionHandler:(void (^)(MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - [self readAttributeCapabilityMinimaWithCompletion: - ^(MTRBasicInformationClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self queryImageWithParams:params completion: + ^(MTROTASoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } -- (void)subscribeAttributeCapabilityMinimaWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error))reportHandler +- (void)applyUpdateRequestWithParams:(MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams *)params completionHandler:(void (^)(MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeCapabilityMinimaWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(MTRBasicInformationClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self applyUpdateRequestWithParams:params completion: + ^(MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } -+ (void)readAttributeCapabilityMinimaWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(MTRBasicClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error))completionHandler +- (void)notifyUpdateAppliedWithParams:(MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams *)params completionHandler:(MTRStatusCompletion)completionHandler { - [self readAttributeCapabilityMinimaWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(MTRBasicInformationClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self notifyUpdateAppliedWithParams:params completion: + completionHandler]; } - (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler @@ -12965,84 +12246,231 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device @end -@implementation MTRBaseClusterOTASoftwareUpdateProvider +@implementation MTRBaseClusterOTASoftwareUpdateRequestor -- (void)queryImageWithParams:(MTROTASoftwareUpdateProviderClusterQueryImageParams *)params completion:(void (^)(MTROTASoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)announceOTAProviderWithParams:(MTROTASoftwareUpdateRequestorClusterAnnounceOTAProviderParams *)params completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTROTASoftwareUpdateProviderClusterQueryImageParams + params = [[MTROTASoftwareUpdateRequestorClusterAnnounceOTAProviderParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); + completion(error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = OtaSoftwareUpdateProvider::Commands::QueryImage::Type; + using RequestType = OtaSoftwareUpdateRequestor::Commands::AnnounceOTAProvider::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROTASoftwareUpdateProviderClusterQueryImageResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } -- (void)applyUpdateRequestWithParams:(MTROTASoftwareUpdateProviderClusterApplyUpdateRequestParams *)params completion:(void (^)(MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, NSError * _Nullable error))completion + +- (void)readAttributeDefaultOTAProvidersWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - if (params == nil) { - params = [[MTROTASoftwareUpdateProviderClusterApplyUpdateRequestParams - alloc] init]; - } + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOTAProviders::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + completion:completion]; +} - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; +- (void)writeAttributeDefaultOTAProvidersWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeDefaultOTAProvidersWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeDefaultOTAProvidersWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } - using RequestType = OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams.class + ListFreer listFreer; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOTAProviders::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.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 < value.count; ++i_0) { + if ( ! [value[i_0] isKindOfClass: [MTROTASoftwareUpdateRequestorClusterProviderLocation class]] ) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (MTROTASoftwareUpdateRequestorClusterProviderLocation *)value[i_0]; + listHolder_0->mList[i_0].providerNodeID = element_0.providerNodeID.unsignedLongLongValue; + listHolder_0->mList[i_0].endpoint = element_0.endpoint.unsignedShortValue; + listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedCharValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeDefaultOTAProvidersWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOTAProviders::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeDefaultOTAProvidersWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOTAProviders::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeUpdatePossibleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil queue:self.callbackQueue - completion:responseHandler]; + completion:completion]; } -- (void)notifyUpdateAppliedWithParams:(MTROTASoftwareUpdateProviderClusterNotifyUpdateAppliedParams *)params completion:(MTRStatusCompletion)completion + +- (void)subscribeAttributeUpdatePossibleWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - if (params == nil) { - params = [[MTROTASoftwareUpdateProviderClusterNotifyUpdateAppliedParams - alloc] init]; - } + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; ++ (void)readAttributeUpdatePossibleWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; +- (void)readAttributeUpdateStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateState::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} - using RequestType = OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil +- (void)subscribeAttributeUpdateStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateState::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeUpdateStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateState::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeUpdateStateProgressWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil queue:self.callbackQueue - completion:responseHandler]; + completion:completion]; +} + +- (void)subscribeAttributeUpdateStateProgressWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeUpdateStateProgressWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::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 = OtaSoftwareUpdateProvider::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -13055,7 +12483,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -13067,7 +12495,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 = OtaSoftwareUpdateProvider::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -13078,7 +12506,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -13091,7 +12519,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -13103,7 +12531,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 = OtaSoftwareUpdateProvider::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -13114,7 +12542,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::EventList::TypeInfo; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -13127,7 +12555,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::EventList::TypeInfo; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -13139,7 +12567,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 = OtaSoftwareUpdateProvider::Attributes::EventList::TypeInfo; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -13150,7 +12578,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AttributeList::TypeInfo; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -13163,7 +12591,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::AttributeList::TypeInfo; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -13175,7 +12603,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 = OtaSoftwareUpdateProvider::Attributes::AttributeList::TypeInfo; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -13186,7 +12614,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -13199,90 +12627,222 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + using TypeInfo = OtaSoftwareUpdateRequestor::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 = OtaSoftwareUpdateRequestor::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 = OtaSoftwareUpdateRequestor::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 = OtaSoftwareUpdateRequestor::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 = OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +@end + +@implementation MTRBaseClusterOtaSoftwareUpdateRequestor +@end + +@implementation MTRBaseClusterOtaSoftwareUpdateRequestor (Deprecated) + +- (void)announceOtaProviderWithParams:(MTROtaSoftwareUpdateRequestorClusterAnnounceOtaProviderParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self announceOTAProviderWithParams:params completion: + completionHandler]; +} + +- (void)readAttributeDefaultOtaProvidersWithParams:(MTRReadParams * _Nullable)params completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDefaultOTAProvidersWithParams:params completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeDefaultOTAProvidersWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeDefaultOTAProvidersWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeDefaultOtaProvidersWithMinInterval:(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 subscribeAttributeDefaultOTAProvidersWithParams: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)readAttributeDefaultOtaProvidersWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDefaultOTAProvidersWithClusterStateCache: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)readAttributeUpdatePossibleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeUpdatePossibleWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeUpdatePossibleWithMinInterval:(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 subscribeAttributeUpdatePossibleWithParams: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)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeUpdatePossibleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::FeatureMap::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeUpdatePossibleWithClusterStateCache: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)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUpdateStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeUpdateStateWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUpdateStateWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeUpdateStateWithParams: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)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeUpdateStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = OtaSoftwareUpdateProvider::Attributes::ClusterRevision::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeUpdateStateWithClusterStateCache: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); + }]; } -@end - -@implementation MTRBaseClusterOtaSoftwareUpdateProvider -@end - -@implementation MTRBaseClusterOtaSoftwareUpdateProvider (Deprecated) - -- (void)queryImageWithParams:(MTROtaSoftwareUpdateProviderClusterQueryImageParams *)params completionHandler:(void (^)(MTROtaSoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)readAttributeUpdateStateProgressWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self queryImageWithParams:params completion: - ^(MTROTASoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + [self readAttributeUpdateStateProgressWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)applyUpdateRequestWithParams:(MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams *)params completionHandler:(void (^)(MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeUpdateStateProgressWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self applyUpdateRequestWithParams:params completion: - ^(MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeUpdateStateProgressWithParams: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)notifyUpdateAppliedWithParams:(MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams *)params completionHandler:(MTRStatusCompletion)completionHandler ++ (void)readAttributeUpdateStateProgressWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self notifyUpdateAppliedWithParams:params completion: - completionHandler]; + [self readAttributeUpdateStateProgressWithClusterStateCache: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 @@ -13469,49 +13029,24 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device @end -@implementation MTRBaseClusterOTASoftwareUpdateRequestor - -- (void)announceOTAProviderWithParams:(MTROTASoftwareUpdateRequestorClusterAnnounceOTAProviderParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTROTASoftwareUpdateRequestorClusterAnnounceOTAProviderParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = OtaSoftwareUpdateRequestor::Commands::AnnounceOTAProvider::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]; -} +@implementation MTRBaseClusterLocalizationConfiguration -- (void)readAttributeDefaultOTAProvidersWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActiveLocaleWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOTAProviders::TypeInfo; + using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) - params:params + params:nil queue:self.callbackQueue completion:completion]; } -- (void)writeAttributeDefaultOTAProvidersWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeDefaultOTAProvidersWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; + [self writeAttributeActiveLocaleWithValue:(NSString * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeDefaultOTAProvidersWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -13526,115 +13061,20 @@ - (void)writeAttributeDefaultOTAProvidersWithValue:(NSArray * _Nonnull)value par } ListFreer listFreer; - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOTAProviders::TypeInfo; + using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.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 < value.count; ++i_0) { - if ( ! [value[i_0] isKindOfClass: [MTROTASoftwareUpdateRequestorClusterProviderLocation class]] ) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTROTASoftwareUpdateRequestorClusterProviderLocation *)value[i_0]; - listHolder_0->mList[i_0].providerNodeID = element_0.providerNodeID.unsignedLongLongValue; - listHolder_0->mList[i_0].endpoint = element_0.endpoint.unsignedShortValue; - listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedCharValue; - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); - } - } + cppValue = AsCharSpan(value); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeDefaultOTAProvidersWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOTAProviders::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeDefaultOTAProvidersWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::DefaultOTAProviders::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeUpdatePossibleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeUpdatePossibleWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeUpdatePossibleWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeUpdateStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateState::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeUpdateStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActiveLocaleWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateState::TypeInfo; + using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -13644,9 +13084,9 @@ - (void)subscribeAttributeUpdateStateWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeUpdateStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActiveLocaleWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateState::TypeInfo; + using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -13655,9 +13095,9 @@ + (void)readAttributeUpdateStateWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeUpdateStateProgressWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSupportedLocalesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::TypeInfo; + using TypeInfo = LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -13666,11 +13106,11 @@ - (void)readAttributeUpdateStateProgressWithCompletion:(void (^)(NSNumber * _Nul completion:completion]; } -- (void)subscribeAttributeUpdateStateProgressWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSupportedLocalesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::TypeInfo; + using TypeInfo = LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -13680,9 +13120,9 @@ - (void)subscribeAttributeUpdateStateProgressWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeUpdateStateProgressWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSupportedLocalesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::TypeInfo; + using TypeInfo = LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -13693,7 +13133,7 @@ + (void)readAttributeUpdateStateProgressWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = LocalizationConfiguration::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -13706,7 +13146,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = LocalizationConfiguration::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -13718,7 +13158,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 = OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = LocalizationConfiguration::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -13729,7 +13169,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = LocalizationConfiguration::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -13742,7 +13182,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = LocalizationConfiguration::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -13754,7 +13194,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 = OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = LocalizationConfiguration::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -13765,7 +13205,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::EventList::TypeInfo; + using TypeInfo = LocalizationConfiguration::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -13778,7 +13218,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::EventList::TypeInfo; + using TypeInfo = LocalizationConfiguration::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -13790,7 +13230,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 = OtaSoftwareUpdateRequestor::Attributes::EventList::TypeInfo; + using TypeInfo = LocalizationConfiguration::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -13801,7 +13241,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AttributeList::TypeInfo; + using TypeInfo = LocalizationConfiguration::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -13814,7 +13254,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::AttributeList::TypeInfo; + using TypeInfo = LocalizationConfiguration::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -13826,7 +13266,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 = OtaSoftwareUpdateRequestor::Attributes::AttributeList::TypeInfo; + using TypeInfo = LocalizationConfiguration::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -13837,7 +13277,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::FeatureMap::TypeInfo; + using TypeInfo = LocalizationConfiguration::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -13850,7 +13290,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::FeatureMap::TypeInfo; + using TypeInfo = LocalizationConfiguration::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -13862,7 +13302,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 = OtaSoftwareUpdateRequestor::Attributes::FeatureMap::TypeInfo; + using TypeInfo = LocalizationConfiguration::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -13873,7 +13313,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = LocalizationConfiguration::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -13886,7 +13326,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = LocalizationConfiguration::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -13898,7 +13338,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 = OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = LocalizationConfiguration::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -13909,107 +13349,28 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterOtaSoftwareUpdateRequestor -@end - -@implementation MTRBaseClusterOtaSoftwareUpdateRequestor (Deprecated) - -- (void)announceOtaProviderWithParams:(MTROtaSoftwareUpdateRequestorClusterAnnounceOtaProviderParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self announceOTAProviderWithParams:params completion: - completionHandler]; -} - -- (void)readAttributeDefaultOtaProvidersWithParams:(MTRReadParams * _Nullable)params completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeDefaultOTAProvidersWithParams:params completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeDefaultOTAProvidersWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeDefaultOtaProvidersWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeDefaultOTAProvidersWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeDefaultOtaProvidersWithMinInterval:(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 subscribeAttributeDefaultOTAProvidersWithParams: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)readAttributeDefaultOtaProvidersWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeDefaultOTAProvidersWithClusterStateCache: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); - }]; -} +@implementation MTRBaseClusterLocalizationConfiguration (Deprecated) -- (void)readAttributeUpdatePossibleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeActiveLocaleWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeUpdatePossibleWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeActiveLocaleWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeUpdatePossibleWithMinInterval:(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 subscribeAttributeUpdatePossibleWithParams: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)readAttributeUpdatePossibleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - [self readAttributeUpdatePossibleWithClusterStateCache: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); - }]; + [self writeAttributeActiveLocaleWithValue:value params:nil completion:completionHandler]; } - -- (void)readAttributeUpdateStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - [self readAttributeUpdateStateWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self writeAttributeActiveLocaleWithValue:value params:params completion:completionHandler]; } -- (void)subscribeAttributeUpdateStateWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActiveLocaleWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -14018,33 +13379,33 @@ - (void)subscribeAttributeUpdateStateWithMinInterval:(NSNumber * _Nonnull)minInt subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeUpdateStateWithParams: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); - }]; + [self subscribeAttributeActiveLocaleWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeUpdateStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeActiveLocaleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeUpdateStateWithClusterStateCache: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); - }]; + [self readAttributeActiveLocaleWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeUpdateStateProgressWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeSupportedLocalesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeUpdateStateProgressWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeSupportedLocalesWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeUpdateStateProgressWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSupportedLocalesWithMinInterval:(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) { @@ -14053,19 +13414,19 @@ - (void)subscribeAttributeUpdateStateProgressWithMinInterval:(NSNumber * _Nonnul subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeUpdateStateProgressWithParams: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); - }]; + [self subscribeAttributeSupportedLocalesWithParams: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)readAttributeUpdateStateProgressWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSupportedLocalesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeUpdateStateProgressWithClusterStateCache: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); - }]; + [self readAttributeSupportedLocalesWithClusterStateCache: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)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler @@ -14252,11 +13613,11 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device @end -@implementation MTRBaseClusterLocalizationConfiguration +@implementation MTRBaseClusterTimeFormatLocalization -- (void)readAttributeActiveLocaleWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeHourFormatWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::HourFormat::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -14265,11 +13626,11 @@ - (void)readAttributeActiveLocaleWithCompletion:(void (^)(NSString * _Nullable v completion:completion]; } -- (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeActiveLocaleWithValue:(NSString * _Nonnull) value params:nil completion:completion]; + [self writeAttributeHourFormatWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -14284,20 +13645,20 @@ - (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value params:(M } ListFreer listFreer; - using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::HourFormat::TypeInfo; TypeInfo::Type cppValue; - cppValue = AsCharSpan(value); + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeActiveLocaleWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeHourFormatWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::HourFormat::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -14307,9 +13668,9 @@ - (void)subscribeAttributeActiveLocaleWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeActiveLocaleWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeHourFormatWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LocalizationConfiguration::Attributes::ActiveLocale::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::HourFormat::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -14318,9 +13679,9 @@ + (void)readAttributeActiveLocaleWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } -- (void)readAttributeSupportedLocalesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActiveCalendarTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::ActiveCalendarType::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -14329,11 +13690,39 @@ - (void)readAttributeSupportedLocalesWithCompletion:(void (^)(NSArray * _Nullabl completion:completion]; } -- (void)subscribeAttributeSupportedLocalesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo; + [self writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = TimeFormatLocalization::Attributes::ActiveCalendarType::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeActiveCalendarTypeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = TimeFormatLocalization::Attributes::ActiveCalendarType::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -14343,9 +13732,45 @@ - (void)subscribeAttributeSupportedLocalesWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSupportedLocalesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActiveCalendarTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LocalizationConfiguration::Attributes::SupportedLocales::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::ActiveCalendarType::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeSupportedCalendarTypesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = TimeFormatLocalization::Attributes::SupportedCalendarTypes::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeSupportedCalendarTypesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = TimeFormatLocalization::Attributes::SupportedCalendarTypes::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeSupportedCalendarTypesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = TimeFormatLocalization::Attributes::SupportedCalendarTypes::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -14356,7 +13781,7 @@ + (void)readAttributeSupportedLocalesWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LocalizationConfiguration::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -14369,7 +13794,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LocalizationConfiguration::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -14381,7 +13806,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 = LocalizationConfiguration::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -14392,7 +13817,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LocalizationConfiguration::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -14405,7 +13830,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LocalizationConfiguration::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -14417,7 +13842,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 = LocalizationConfiguration::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -14428,7 +13853,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LocalizationConfiguration::Attributes::EventList::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -14441,7 +13866,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LocalizationConfiguration::Attributes::EventList::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -14453,7 +13878,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 = LocalizationConfiguration::Attributes::EventList::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -14464,7 +13889,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LocalizationConfiguration::Attributes::AttributeList::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -14477,7 +13902,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LocalizationConfiguration::Attributes::AttributeList::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -14489,7 +13914,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 = LocalizationConfiguration::Attributes::AttributeList::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -14500,7 +13925,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LocalizationConfiguration::Attributes::FeatureMap::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -14513,7 +13938,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LocalizationConfiguration::Attributes::FeatureMap::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -14525,7 +13950,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 = LocalizationConfiguration::Attributes::FeatureMap::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -14536,7 +13961,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LocalizationConfiguration::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -14549,7 +13974,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LocalizationConfiguration::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -14561,7 +13986,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 = LocalizationConfiguration::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = TimeFormatLocalization::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -14572,28 +13997,28 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterLocalizationConfiguration (Deprecated) +@implementation MTRBaseClusterTimeFormatLocalization (Deprecated) -- (void)readAttributeActiveLocaleWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeHourFormatWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeActiveLocaleWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { + [self readAttributeHourFormatWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeActiveLocaleWithValue:value params:nil completion:completionHandler]; + [self writeAttributeHourFormatWithValue:value params:nil completion:completionHandler]; } -- (void)writeAttributeActiveLocaleWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeActiveLocaleWithValue:value params:params completion:completionHandler]; + [self writeAttributeHourFormatWithValue:value params:params completion:completionHandler]; } -- (void)subscribeAttributeActiveLocaleWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeHourFormatWithMinInterval:(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) { @@ -14602,33 +14027,76 @@ - (void)subscribeAttributeActiveLocaleWithMinInterval:(NSNumber * _Nonnull)minIn subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeActiveLocaleWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeHourFormatWithParams: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)readAttributeActiveLocaleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeHourFormatWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeActiveLocaleWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeHourFormatWithClusterStateCache: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)readAttributeSupportedLocalesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeActiveCalendarTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeSupportedLocalesWithCompletion: + [self readAttributeActiveCalendarTypeWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeActiveCalendarTypeWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeActiveCalendarTypeWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeActiveCalendarTypeWithMinInterval:(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 subscribeAttributeActiveCalendarTypeWithParams: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)readAttributeActiveCalendarTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeActiveCalendarTypeWithClusterStateCache: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)readAttributeSupportedCalendarTypesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSupportedCalendarTypesWithCompletion: ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeSupportedLocalesWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSupportedCalendarTypesWithMinInterval:(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) { @@ -14637,19 +14105,19 @@ - (void)subscribeAttributeSupportedLocalesWithMinInterval:(NSNumber * _Nonnull)m subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeSupportedLocalesWithParams: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); - }]; + [self subscribeAttributeSupportedCalendarTypesWithParams: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)readAttributeSupportedLocalesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSupportedCalendarTypesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeSupportedLocalesWithClusterStateCache: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); - }]; + [self readAttributeSupportedCalendarTypesWithClusterStateCache: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)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler @@ -14836,75 +14304,11 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device @end -@implementation MTRBaseClusterTimeFormatLocalization - -- (void)readAttributeHourFormatWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = TimeFormatLocalization::Attributes::HourFormat::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeHourFormatWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = TimeFormatLocalization::Attributes::HourFormat::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeHourFormatWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = TimeFormatLocalization::Attributes::HourFormat::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeHourFormatWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = TimeFormatLocalization::Attributes::HourFormat::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} +@implementation MTRBaseClusterUnitLocalization -- (void)readAttributeActiveCalendarTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTemperatureUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeFormatLocalization::Attributes::ActiveCalendarType::TypeInfo; + using TypeInfo = UnitLocalization::Attributes::TemperatureUnit::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -14913,11 +14317,11 @@ - (void)readAttributeActiveCalendarTypeWithCompletion:(void (^)(NSNumber * _Null completion:completion]; } -- (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -14932,7 +14336,7 @@ - (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value par } ListFreer listFreer; - using TypeInfo = TimeFormatLocalization::Attributes::ActiveCalendarType::TypeInfo; + using TypeInfo = UnitLocalization::Attributes::TemperatureUnit::TypeInfo; TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); @@ -14941,47 +14345,11 @@ - (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value par std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeActiveCalendarTypeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = TimeFormatLocalization::Attributes::ActiveCalendarType::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeActiveCalendarTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = TimeFormatLocalization::Attributes::ActiveCalendarType::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeSupportedCalendarTypesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = TimeFormatLocalization::Attributes::SupportedCalendarTypes::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeSupportedCalendarTypesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTemperatureUnitWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TimeFormatLocalization::Attributes::SupportedCalendarTypes::TypeInfo; + using TypeInfo = UnitLocalization::Attributes::TemperatureUnit::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -14991,9 +14359,9 @@ - (void)subscribeAttributeSupportedCalendarTypesWithParams:(MTRSubscribeParams * subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSupportedCalendarTypesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTemperatureUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeFormatLocalization::Attributes::SupportedCalendarTypes::TypeInfo; + using TypeInfo = UnitLocalization::Attributes::TemperatureUnit::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -15004,7 +14372,7 @@ + (void)readAttributeSupportedCalendarTypesWithClusterStateCache:(MTRClusterStat - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeFormatLocalization::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = UnitLocalization::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -15017,7 +14385,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TimeFormatLocalization::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = UnitLocalization::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -15029,7 +14397,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 = TimeFormatLocalization::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = UnitLocalization::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -15040,7 +14408,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeFormatLocalization::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = UnitLocalization::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -15053,7 +14421,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TimeFormatLocalization::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = UnitLocalization::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -15065,7 +14433,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 = TimeFormatLocalization::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = UnitLocalization::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -15076,7 +14444,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeFormatLocalization::Attributes::EventList::TypeInfo; + using TypeInfo = UnitLocalization::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -15089,7 +14457,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TimeFormatLocalization::Attributes::EventList::TypeInfo; + using TypeInfo = UnitLocalization::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -15101,7 +14469,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 = TimeFormatLocalization::Attributes::EventList::TypeInfo; + using TypeInfo = UnitLocalization::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -15112,7 +14480,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeFormatLocalization::Attributes::AttributeList::TypeInfo; + using TypeInfo = UnitLocalization::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -15125,7 +14493,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TimeFormatLocalization::Attributes::AttributeList::TypeInfo; + using TypeInfo = UnitLocalization::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -15137,7 +14505,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 = TimeFormatLocalization::Attributes::AttributeList::TypeInfo; + using TypeInfo = UnitLocalization::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -15148,7 +14516,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeFormatLocalization::Attributes::FeatureMap::TypeInfo; + using TypeInfo = UnitLocalization::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -15161,7 +14529,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TimeFormatLocalization::Attributes::FeatureMap::TypeInfo; + using TypeInfo = UnitLocalization::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -15173,7 +14541,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 = TimeFormatLocalization::Attributes::FeatureMap::TypeInfo; + using TypeInfo = UnitLocalization::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -15184,7 +14552,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeFormatLocalization::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = UnitLocalization::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -15197,7 +14565,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TimeFormatLocalization::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = UnitLocalization::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -15209,7 +14577,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 = TimeFormatLocalization::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = UnitLocalization::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -15220,28 +14588,28 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterTimeFormatLocalization (Deprecated) +@implementation MTRBaseClusterUnitLocalization (Deprecated) -- (void)readAttributeHourFormatWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeTemperatureUnitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeHourFormatWithCompletion: + [self readAttributeTemperatureUnitWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeHourFormatWithValue:value params:nil completion:completionHandler]; + [self writeAttributeTemperatureUnitWithValue:value params:nil completion:completionHandler]; } -- (void)writeAttributeHourFormatWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - [self writeAttributeHourFormatWithValue:value params:params completion:completionHandler]; + [self writeAttributeTemperatureUnitWithValue:value params:params completion:completionHandler]; } -- (void)subscribeAttributeHourFormatWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTemperatureUnitWithMinInterval:(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) { @@ -15250,98 +14618,20 @@ - (void)subscribeAttributeHourFormatWithMinInterval:(NSNumber * _Nonnull)minInte subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeHourFormatWithParams: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)readAttributeHourFormatWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeHourFormatWithClusterStateCache: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)readAttributeActiveCalendarTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeActiveCalendarTypeWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeActiveCalendarTypeWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeActiveCalendarTypeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeActiveCalendarTypeWithValue:value params:params completion:completionHandler]; + [self subscribeAttributeTemperatureUnitWithParams: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)subscribeAttributeActiveCalendarTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeTemperatureUnitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeActiveCalendarTypeWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + [self readAttributeTemperatureUnitWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -+ (void)readAttributeActiveCalendarTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeActiveCalendarTypeWithClusterStateCache: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)readAttributeSupportedCalendarTypesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSupportedCalendarTypesWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeSupportedCalendarTypesWithMinInterval:(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 subscribeAttributeSupportedCalendarTypesWithParams: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)readAttributeSupportedCalendarTypesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSupportedCalendarTypesWithClusterStateCache: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)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { @@ -15527,11 +14817,11 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device @end -@implementation MTRBaseClusterUnitLocalization +@implementation MTRBaseClusterPowerSourceConfiguration -- (void)readAttributeTemperatureUnitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSourcesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = UnitLocalization::Attributes::TemperatureUnit::TypeInfo; + using TypeInfo = PowerSourceConfiguration::Attributes::Sources::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -15540,39 +14830,11 @@ - (void)readAttributeTemperatureUnitWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = UnitLocalization::Attributes::TemperatureUnit::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeTemperatureUnitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSourcesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = UnitLocalization::Attributes::TemperatureUnit::TypeInfo; + using TypeInfo = PowerSourceConfiguration::Attributes::Sources::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -15582,9 +14844,9 @@ - (void)subscribeAttributeTemperatureUnitWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTemperatureUnitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSourcesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = UnitLocalization::Attributes::TemperatureUnit::TypeInfo; + using TypeInfo = PowerSourceConfiguration::Attributes::Sources::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -15595,7 +14857,7 @@ + (void)readAttributeTemperatureUnitWithClusterStateCache:(MTRClusterStateCacheC - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = UnitLocalization::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = PowerSourceConfiguration::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -15608,7 +14870,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = UnitLocalization::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = PowerSourceConfiguration::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -15620,7 +14882,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 = UnitLocalization::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = PowerSourceConfiguration::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -15631,7 +14893,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = UnitLocalization::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = PowerSourceConfiguration::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -15644,7 +14906,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = UnitLocalization::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = PowerSourceConfiguration::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -15656,7 +14918,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 = UnitLocalization::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = PowerSourceConfiguration::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -15667,7 +14929,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = UnitLocalization::Attributes::EventList::TypeInfo; + using TypeInfo = PowerSourceConfiguration::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -15680,7 +14942,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = UnitLocalization::Attributes::EventList::TypeInfo; + using TypeInfo = PowerSourceConfiguration::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -15692,7 +14954,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 = UnitLocalization::Attributes::EventList::TypeInfo; + using TypeInfo = PowerSourceConfiguration::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -15703,7 +14965,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = UnitLocalization::Attributes::AttributeList::TypeInfo; + using TypeInfo = PowerSourceConfiguration::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -15716,7 +14978,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = UnitLocalization::Attributes::AttributeList::TypeInfo; + using TypeInfo = PowerSourceConfiguration::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -15728,7 +14990,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 = UnitLocalization::Attributes::AttributeList::TypeInfo; + using TypeInfo = PowerSourceConfiguration::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -15739,7 +15001,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = UnitLocalization::Attributes::FeatureMap::TypeInfo; + using TypeInfo = PowerSourceConfiguration::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -15752,7 +15014,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = UnitLocalization::Attributes::FeatureMap::TypeInfo; + using TypeInfo = PowerSourceConfiguration::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -15764,7 +15026,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 = UnitLocalization::Attributes::FeatureMap::TypeInfo; + using TypeInfo = PowerSourceConfiguration::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -15775,7 +15037,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = UnitLocalization::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = PowerSourceConfiguration::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -15788,7 +15050,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = UnitLocalization::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = PowerSourceConfiguration::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -15800,7 +15062,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 = UnitLocalization::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = PowerSourceConfiguration::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -15811,28 +15073,20 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterUnitLocalization (Deprecated) +@implementation MTRBaseClusterPowerSourceConfiguration (Deprecated) -- (void)readAttributeTemperatureUnitWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeSourcesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeTemperatureUnitWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeSourcesWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeTemperatureUnitWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeTemperatureUnitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeTemperatureUnitWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeTemperatureUnitWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSourcesWithMinInterval:(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) { @@ -15841,19 +15095,19 @@ - (void)subscribeAttributeTemperatureUnitWithMinInterval:(NSNumber * _Nonnull)mi subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeTemperatureUnitWithParams: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); - }]; + [self subscribeAttributeSourcesWithParams: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)readAttributeTemperatureUnitWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSourcesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeTemperatureUnitWithClusterStateCache: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); - }]; + [self readAttributeSourcesWithClusterStateCache: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)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler @@ -16038,13 +15292,85 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -@end - -@implementation MTRBaseClusterPowerSourceConfiguration +@end + +@implementation MTRBaseClusterPowerSource + +- (void)readAttributeStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = PowerSource::Attributes::Status::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeStatusWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = PowerSource::Attributes::Status::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = PowerSource::Attributes::Status::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeOrderWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = PowerSource::Attributes::Order::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeOrderWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = PowerSource::Attributes::Order::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeOrderWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = PowerSource::Attributes::Order::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} -- (void)readAttributeSourcesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDescriptionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSourceConfiguration::Attributes::Sources::TypeInfo; + using TypeInfo = PowerSource::Attributes::Description::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16053,11 +15379,11 @@ - (void)readAttributeSourcesWithCompletion:(void (^)(NSArray * _Nullable value, completion:completion]; } -- (void)subscribeAttributeSourcesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSourceConfiguration::Attributes::Sources::TypeInfo; + using TypeInfo = PowerSource::Attributes::Description::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16067,9 +15393,9 @@ - (void)subscribeAttributeSourcesWithParams:(MTRSubscribeParams * _Nonnull)param subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSourcesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDescriptionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSourceConfiguration::Attributes::Sources::TypeInfo; + using TypeInfo = PowerSource::Attributes::Description::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -16078,9 +15404,9 @@ + (void)readAttributeSourcesWithClusterStateCache:(MTRClusterStateCacheContainer completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWiredAssessedInputVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSourceConfiguration::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = PowerSource::Attributes::WiredAssessedInputVoltage::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16089,11 +15415,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)subscribeAttributeWiredAssessedInputVoltageWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSourceConfiguration::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = PowerSource::Attributes::WiredAssessedInputVoltage::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16103,9 +15429,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)readAttributeWiredAssessedInputVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSourceConfiguration::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = PowerSource::Attributes::WiredAssessedInputVoltage::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -16114,9 +15440,9 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWiredAssessedInputFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSourceConfiguration::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = PowerSource::Attributes::WiredAssessedInputFrequency::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16125,11 +15451,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)subscribeAttributeWiredAssessedInputFrequencyWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSourceConfiguration::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = PowerSource::Attributes::WiredAssessedInputFrequency::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16139,9 +15465,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)readAttributeWiredAssessedInputFrequencyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSourceConfiguration::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = PowerSource::Attributes::WiredAssessedInputFrequency::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -16150,9 +15476,9 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWiredCurrentTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSourceConfiguration::Attributes::EventList::TypeInfo; + using TypeInfo = PowerSource::Attributes::WiredCurrentType::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16161,11 +15487,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)subscribeAttributeWiredCurrentTypeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSourceConfiguration::Attributes::EventList::TypeInfo; + using TypeInfo = PowerSource::Attributes::WiredCurrentType::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16175,9 +15501,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)readAttributeWiredCurrentTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSourceConfiguration::Attributes::EventList::TypeInfo; + using TypeInfo = PowerSource::Attributes::WiredCurrentType::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -16186,9 +15512,9 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWiredAssessedCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSourceConfiguration::Attributes::AttributeList::TypeInfo; + using TypeInfo = PowerSource::Attributes::WiredAssessedCurrent::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16197,11 +15523,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)subscribeAttributeWiredAssessedCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSourceConfiguration::Attributes::AttributeList::TypeInfo; + using TypeInfo = PowerSource::Attributes::WiredAssessedCurrent::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16211,9 +15537,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)readAttributeWiredAssessedCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSourceConfiguration::Attributes::AttributeList::TypeInfo; + using TypeInfo = PowerSource::Attributes::WiredAssessedCurrent::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -16222,9 +15548,9 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWiredNominalVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSourceConfiguration::Attributes::FeatureMap::TypeInfo; + using TypeInfo = PowerSource::Attributes::WiredNominalVoltage::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16233,11 +15559,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)subscribeAttributeWiredNominalVoltageWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSourceConfiguration::Attributes::FeatureMap::TypeInfo; + using TypeInfo = PowerSource::Attributes::WiredNominalVoltage::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16247,9 +15573,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)readAttributeWiredNominalVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSourceConfiguration::Attributes::FeatureMap::TypeInfo; + using TypeInfo = PowerSource::Attributes::WiredNominalVoltage::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -16258,9 +15584,9 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWiredMaximumCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSourceConfiguration::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = PowerSource::Attributes::WiredMaximumCurrent::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16269,11 +15595,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)subscribeAttributeWiredMaximumCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSourceConfiguration::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = PowerSource::Attributes::WiredMaximumCurrent::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16283,9 +15609,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)readAttributeWiredMaximumCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSourceConfiguration::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = PowerSource::Attributes::WiredMaximumCurrent::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -16294,234 +15620,225 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -@end - -@implementation MTRBaseClusterPowerSourceConfiguration (Deprecated) - -- (void)readAttributeSourcesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSourcesWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeSourcesWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeWiredPresentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeSourcesWithParams: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); - }]; + using TypeInfo = PowerSource::Attributes::WiredPresent::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeSourcesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeWiredPresentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeSourcesWithClusterStateCache: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); - }]; + using TypeInfo = PowerSource::Attributes::WiredPresent::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeWiredPresentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeGeneratedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = PowerSource::Attributes::WiredPresent::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (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 + +- (void)readAttributeActiveWiredFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - 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); - }]; + using TypeInfo = PowerSource::Attributes::ActiveWiredFaults::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeActiveWiredFaultsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [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); - }]; + using TypeInfo = PowerSource::Attributes::ActiveWiredFaults::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeActiveWiredFaultsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAcceptedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = PowerSource::Attributes::ActiveWiredFaults::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (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 + +- (void)readAttributeBatVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - 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); - }]; + using TypeInfo = PowerSource::Attributes::BatVoltage::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeBatVoltageWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [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); - }]; + using TypeInfo = PowerSource::Attributes::BatVoltage::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBatVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAttributeListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = PowerSource::Attributes::BatVoltage::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (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 + +- (void)readAttributeBatPercentRemainingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - 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); - }]; + using TypeInfo = PowerSource::Attributes::BatPercentRemaining::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeBatPercentRemainingWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [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); - }]; + using TypeInfo = PowerSource::Attributes::BatPercentRemaining::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBatPercentRemainingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeFeatureMapWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = PowerSource::Attributes::BatPercentRemaining::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (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 + +- (void)readAttributeBatTimeRemainingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - 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); - }]; + using TypeInfo = PowerSource::Attributes::BatTimeRemaining::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeBatTimeRemainingWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [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); - }]; + using TypeInfo = PowerSource::Attributes::BatTimeRemaining::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBatTimeRemainingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeClusterRevisionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = PowerSource::Attributes::BatTimeRemaining::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (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 + +- (void)readAttributeBatChargeLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - 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); - }]; + using TypeInfo = PowerSource::Attributes::BatChargeLevel::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeBatChargeLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [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); - }]; + using TypeInfo = PowerSource::Attributes::BatChargeLevel::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue ++ (void)readAttributeBatChargeLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + using TypeInfo = PowerSource::Attributes::BatChargeLevel::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -@end - -@implementation MTRBaseClusterPowerSource - -- (void)readAttributeStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatReplacementNeededWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::Status::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatReplacementNeeded::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16530,11 +15847,11 @@ - (void)readAttributeStatusWithCompletion:(void (^)(NSNumber * _Nullable value, completion:completion]; } -- (void)subscribeAttributeStatusWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatReplacementNeededWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::Status::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatReplacementNeeded::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16544,9 +15861,9 @@ - (void)subscribeAttributeStatusWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatReplacementNeededWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::Status::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatReplacementNeeded::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -16555,9 +15872,9 @@ + (void)readAttributeStatusWithClusterStateCache:(MTRClusterStateCacheContainer completion:completion]; } -- (void)readAttributeOrderWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatReplaceabilityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::Order::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatReplaceability::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16566,11 +15883,11 @@ - (void)readAttributeOrderWithCompletion:(void (^)(NSNumber * _Nullable value, N completion:completion]; } -- (void)subscribeAttributeOrderWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatReplaceabilityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::Order::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatReplaceability::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16580,9 +15897,9 @@ - (void)subscribeAttributeOrderWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOrderWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatReplaceabilityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::Order::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatReplaceability::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -16591,9 +15908,9 @@ + (void)readAttributeOrderWithClusterStateCache:(MTRClusterStateCacheContainer * completion:completion]; } -- (void)readAttributeDescriptionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatPresentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::Description::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatPresent::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16602,11 +15919,11 @@ - (void)readAttributeDescriptionWithCompletion:(void (^)(NSString * _Nullable va completion:completion]; } -- (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatPresentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::Description::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatPresent::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16616,9 +15933,9 @@ - (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeDescriptionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatPresentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::Description::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatPresent::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -16627,9 +15944,9 @@ + (void)readAttributeDescriptionWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeWiredAssessedInputVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActiveBatFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::WiredAssessedInputVoltage::TypeInfo; + using TypeInfo = PowerSource::Attributes::ActiveBatFaults::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16638,11 +15955,11 @@ - (void)readAttributeWiredAssessedInputVoltageWithCompletion:(void (^)(NSNumber completion:completion]; } -- (void)subscribeAttributeWiredAssessedInputVoltageWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActiveBatFaultsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::WiredAssessedInputVoltage::TypeInfo; + using TypeInfo = PowerSource::Attributes::ActiveBatFaults::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16652,9 +15969,9 @@ - (void)subscribeAttributeWiredAssessedInputVoltageWithParams:(MTRSubscribeParam subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeWiredAssessedInputVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActiveBatFaultsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::WiredAssessedInputVoltage::TypeInfo; + using TypeInfo = PowerSource::Attributes::ActiveBatFaults::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -16663,9 +15980,9 @@ + (void)readAttributeWiredAssessedInputVoltageWithClusterStateCache:(MTRClusterS completion:completion]; } -- (void)readAttributeWiredAssessedInputFrequencyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatReplacementDescriptionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::WiredAssessedInputFrequency::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatReplacementDescription::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16674,11 +15991,11 @@ - (void)readAttributeWiredAssessedInputFrequencyWithCompletion:(void (^)(NSNumbe completion:completion]; } -- (void)subscribeAttributeWiredAssessedInputFrequencyWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatReplacementDescriptionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::WiredAssessedInputFrequency::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatReplacementDescription::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16688,9 +16005,9 @@ - (void)subscribeAttributeWiredAssessedInputFrequencyWithParams:(MTRSubscribePar subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeWiredAssessedInputFrequencyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatReplacementDescriptionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::WiredAssessedInputFrequency::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatReplacementDescription::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -16699,9 +16016,9 @@ + (void)readAttributeWiredAssessedInputFrequencyWithClusterStateCache:(MTRCluste completion:completion]; } -- (void)readAttributeWiredCurrentTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatCommonDesignationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::WiredCurrentType::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatCommonDesignation::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16710,11 +16027,11 @@ - (void)readAttributeWiredCurrentTypeWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)subscribeAttributeWiredCurrentTypeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatCommonDesignationWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::WiredCurrentType::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatCommonDesignation::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16724,9 +16041,9 @@ - (void)subscribeAttributeWiredCurrentTypeWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeWiredCurrentTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatCommonDesignationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::WiredCurrentType::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatCommonDesignation::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -16735,9 +16052,9 @@ + (void)readAttributeWiredCurrentTypeWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeWiredAssessedCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatANSIDesignationWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::WiredAssessedCurrent::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatANSIDesignation::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16746,11 +16063,11 @@ - (void)readAttributeWiredAssessedCurrentWithCompletion:(void (^)(NSNumber * _Nu completion:completion]; } -- (void)subscribeAttributeWiredAssessedCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatANSIDesignationWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::WiredAssessedCurrent::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatANSIDesignation::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16760,9 +16077,9 @@ - (void)subscribeAttributeWiredAssessedCurrentWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeWiredAssessedCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatANSIDesignationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::WiredAssessedCurrent::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatANSIDesignation::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -16771,9 +16088,9 @@ + (void)readAttributeWiredAssessedCurrentWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeWiredNominalVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatIECDesignationWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::WiredNominalVoltage::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatIECDesignation::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16782,11 +16099,11 @@ - (void)readAttributeWiredNominalVoltageWithCompletion:(void (^)(NSNumber * _Nul completion:completion]; } -- (void)subscribeAttributeWiredNominalVoltageWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatIECDesignationWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::WiredNominalVoltage::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatIECDesignation::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16796,9 +16113,9 @@ - (void)subscribeAttributeWiredNominalVoltageWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeWiredNominalVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatIECDesignationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::WiredNominalVoltage::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatIECDesignation::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -16807,9 +16124,9 @@ + (void)readAttributeWiredNominalVoltageWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeWiredMaximumCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatApprovedChemistryWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::WiredMaximumCurrent::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatApprovedChemistry::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16818,11 +16135,11 @@ - (void)readAttributeWiredMaximumCurrentWithCompletion:(void (^)(NSNumber * _Nul completion:completion]; } -- (void)subscribeAttributeWiredMaximumCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatApprovedChemistryWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::WiredMaximumCurrent::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatApprovedChemistry::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16832,9 +16149,9 @@ - (void)subscribeAttributeWiredMaximumCurrentWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeWiredMaximumCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatApprovedChemistryWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::WiredMaximumCurrent::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatApprovedChemistry::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -16843,9 +16160,9 @@ + (void)readAttributeWiredMaximumCurrentWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeWiredPresentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::WiredPresent::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatCapacity::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16854,11 +16171,11 @@ - (void)readAttributeWiredPresentWithCompletion:(void (^)(NSNumber * _Nullable v completion:completion]; } -- (void)subscribeAttributeWiredPresentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatCapacityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::WiredPresent::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatCapacity::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16868,9 +16185,9 @@ - (void)subscribeAttributeWiredPresentWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeWiredPresentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatCapacityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::WiredPresent::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatCapacity::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -16879,9 +16196,9 @@ + (void)readAttributeWiredPresentWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } -- (void)readAttributeActiveWiredFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatQuantityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::ActiveWiredFaults::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatQuantity::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16890,11 +16207,11 @@ - (void)readAttributeActiveWiredFaultsWithCompletion:(void (^)(NSArray * _Nullab completion:completion]; } -- (void)subscribeAttributeActiveWiredFaultsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatQuantityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::ActiveWiredFaults::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatQuantity::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16904,9 +16221,9 @@ - (void)subscribeAttributeActiveWiredFaultsWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeActiveWiredFaultsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatQuantityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::ActiveWiredFaults::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatQuantity::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -16915,9 +16232,9 @@ + (void)readAttributeActiveWiredFaultsWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributeBatVoltageWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatChargeStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::BatVoltage::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatChargeState::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16926,11 +16243,11 @@ - (void)readAttributeBatVoltageWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeBatVoltageWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatChargeStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::BatVoltage::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatChargeState::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16940,9 +16257,9 @@ - (void)subscribeAttributeBatVoltageWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeBatVoltageWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatChargeStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::BatVoltage::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatChargeState::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -16951,9 +16268,9 @@ + (void)readAttributeBatVoltageWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeBatPercentRemainingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatTimeToFullChargeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::BatPercentRemaining::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatTimeToFullCharge::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16962,11 +16279,11 @@ - (void)readAttributeBatPercentRemainingWithCompletion:(void (^)(NSNumber * _Nul completion:completion]; } -- (void)subscribeAttributeBatPercentRemainingWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeBatTimeToFullChargeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::BatPercentRemaining::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatTimeToFullCharge::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16976,9 +16293,9 @@ - (void)subscribeAttributeBatPercentRemainingWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeBatPercentRemainingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatTimeToFullChargeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::BatPercentRemaining::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatTimeToFullCharge::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -16987,9 +16304,9 @@ + (void)readAttributeBatPercentRemainingWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeBatTimeRemainingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatFunctionalWhileChargingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::BatTimeRemaining::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatFunctionalWhileCharging::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -16998,11 +16315,11 @@ - (void)readAttributeBatTimeRemainingWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)subscribeAttributeBatTimeRemainingWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatFunctionalWhileChargingWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::BatTimeRemaining::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatFunctionalWhileCharging::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -17012,9 +16329,9 @@ - (void)subscribeAttributeBatTimeRemainingWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeBatTimeRemainingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatFunctionalWhileChargingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::BatTimeRemaining::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatFunctionalWhileCharging::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -17023,9 +16340,9 @@ + (void)readAttributeBatTimeRemainingWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeBatChargeLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatChargingCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::BatChargeLevel::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatChargingCurrent::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -17034,11 +16351,11 @@ - (void)readAttributeBatChargeLevelWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeBatChargeLevelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatChargingCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::BatChargeLevel::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatChargingCurrent::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -17048,9 +16365,9 @@ - (void)subscribeAttributeBatChargeLevelWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeBatChargeLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatChargingCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::BatChargeLevel::TypeInfo; + using TypeInfo = PowerSource::Attributes::BatChargingCurrent::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -17059,9 +16376,9 @@ + (void)readAttributeBatChargeLevelWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } -- (void)readAttributeBatReplacementNeededWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActiveBatChargeFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::BatReplacementNeeded::TypeInfo; + using TypeInfo = PowerSource::Attributes::ActiveBatChargeFaults::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -17070,11 +16387,11 @@ - (void)readAttributeBatReplacementNeededWithCompletion:(void (^)(NSNumber * _Nu completion:completion]; } -- (void)subscribeAttributeBatReplacementNeededWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActiveBatChargeFaultsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::BatReplacementNeeded::TypeInfo; + using TypeInfo = PowerSource::Attributes::ActiveBatChargeFaults::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -17084,9 +16401,9 @@ - (void)subscribeAttributeBatReplacementNeededWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeBatReplacementNeededWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActiveBatChargeFaultsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::BatReplacementNeeded::TypeInfo; + using TypeInfo = PowerSource::Attributes::ActiveBatChargeFaults::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -17095,9 +16412,9 @@ + (void)readAttributeBatReplacementNeededWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeBatReplaceabilityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEndpointListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::BatReplaceability::TypeInfo; + using TypeInfo = PowerSource::Attributes::EndpointList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -17106,11 +16423,11 @@ - (void)readAttributeBatReplaceabilityWithCompletion:(void (^)(NSNumber * _Nulla completion:completion]; } -- (void)subscribeAttributeBatReplaceabilityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEndpointListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::BatReplaceability::TypeInfo; + using TypeInfo = PowerSource::Attributes::EndpointList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -17120,9 +16437,9 @@ - (void)subscribeAttributeBatReplaceabilityWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeBatReplaceabilityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEndpointListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::BatReplaceability::TypeInfo; + using TypeInfo = PowerSource::Attributes::EndpointList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -17131,9 +16448,9 @@ + (void)readAttributeBatReplaceabilityWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributeBatPresentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::BatPresent::TypeInfo; + using TypeInfo = PowerSource::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -17142,11 +16459,11 @@ - (void)readAttributeBatPresentWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeBatPresentWithParams:(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 = PowerSource::Attributes::BatPresent::TypeInfo; + using TypeInfo = PowerSource::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -17156,9 +16473,9 @@ - (void)subscribeAttributeBatPresentWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeBatPresentWithClusterStateCache:(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 = PowerSource::Attributes::BatPresent::TypeInfo; + using TypeInfo = PowerSource::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -17167,9 +16484,9 @@ + (void)readAttributeBatPresentWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeActiveBatFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::ActiveBatFaults::TypeInfo; + using TypeInfo = PowerSource::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -17178,11 +16495,11 @@ - (void)readAttributeActiveBatFaultsWithCompletion:(void (^)(NSArray * _Nullable completion:completion]; } -- (void)subscribeAttributeActiveBatFaultsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _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 = PowerSource::Attributes::ActiveBatFaults::TypeInfo; + using TypeInfo = PowerSource::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -17192,9 +16509,9 @@ - (void)subscribeAttributeActiveBatFaultsWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeActiveBatFaultsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _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 = PowerSource::Attributes::ActiveBatFaults::TypeInfo; + using TypeInfo = PowerSource::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -17203,9 +16520,9 @@ + (void)readAttributeActiveBatFaultsWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -- (void)readAttributeBatReplacementDescriptionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::BatReplacementDescription::TypeInfo; + using TypeInfo = PowerSource::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -17214,11 +16531,11 @@ - (void)readAttributeBatReplacementDescriptionWithCompletion:(void (^)(NSString completion:completion]; } -- (void)subscribeAttributeBatReplacementDescriptionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::BatReplacementDescription::TypeInfo; + using TypeInfo = PowerSource::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -17228,9 +16545,9 @@ - (void)subscribeAttributeBatReplacementDescriptionWithParams:(MTRSubscribeParam subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeBatReplacementDescriptionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _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 = PowerSource::Attributes::BatReplacementDescription::TypeInfo; + using TypeInfo = PowerSource::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -17239,9 +16556,9 @@ + (void)readAttributeBatReplacementDescriptionWithClusterStateCache:(MTRClusterS completion:completion]; } -- (void)readAttributeBatCommonDesignationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::BatCommonDesignation::TypeInfo; + using TypeInfo = PowerSource::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -17250,11 +16567,11 @@ - (void)readAttributeBatCommonDesignationWithCompletion:(void (^)(NSNumber * _Nu completion:completion]; } -- (void)subscribeAttributeBatCommonDesignationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _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 = PowerSource::Attributes::BatCommonDesignation::TypeInfo; + using TypeInfo = PowerSource::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -17264,9 +16581,9 @@ - (void)subscribeAttributeBatCommonDesignationWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeBatCommonDesignationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _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 = PowerSource::Attributes::BatCommonDesignation::TypeInfo; + using TypeInfo = PowerSource::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -17275,9 +16592,9 @@ + (void)readAttributeBatCommonDesignationWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeBatANSIDesignationWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::BatANSIDesignation::TypeInfo; + using TypeInfo = PowerSource::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -17286,11 +16603,11 @@ - (void)readAttributeBatANSIDesignationWithCompletion:(void (^)(NSString * _Null completion:completion]; } -- (void)subscribeAttributeBatANSIDesignationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _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 = PowerSource::Attributes::BatANSIDesignation::TypeInfo; + using TypeInfo = PowerSource::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -17300,9 +16617,9 @@ - (void)subscribeAttributeBatANSIDesignationWithParams:(MTRSubscribeParams * _No subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeBatANSIDesignationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _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 = PowerSource::Attributes::BatANSIDesignation::TypeInfo; + using TypeInfo = PowerSource::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -17311,9 +16628,9 @@ + (void)readAttributeBatANSIDesignationWithClusterStateCache:(MTRClusterStateCac completion:completion]; } -- (void)readAttributeBatIECDesignationWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = PowerSource::Attributes::BatIECDesignation::TypeInfo; + using TypeInfo = PowerSource::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -17322,11 +16639,11 @@ - (void)readAttributeBatIECDesignationWithCompletion:(void (^)(NSString * _Nulla completion:completion]; } -- (void)subscribeAttributeBatIECDesignationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _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 = PowerSource::Attributes::BatIECDesignation::TypeInfo; + using TypeInfo = PowerSource::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -17336,9 +16653,9 @@ - (void)subscribeAttributeBatIECDesignationWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeBatIECDesignationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _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 = PowerSource::Attributes::BatIECDesignation::TypeInfo; + using TypeInfo = PowerSource::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -17347,562 +16664,722 @@ + (void)readAttributeBatIECDesignationWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributeBatApprovedChemistryWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterPowerSource (Deprecated) + +- (void)readAttributeStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeStatusWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeStatusWithMinInterval:(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 subscribeAttributeStatusWithParams: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)readAttributeStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeStatusWithClusterStateCache: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)readAttributeOrderWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOrderWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeOrderWithMinInterval:(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 subscribeAttributeOrderWithParams: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)readAttributeOrderWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOrderWithClusterStateCache: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)readAttributeDescriptionWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDescriptionWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _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 subscribeAttributeDescriptionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDescriptionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeWiredAssessedInputVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeWiredAssessedInputVoltageWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeWiredAssessedInputVoltageWithMinInterval:(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 subscribeAttributeWiredAssessedInputVoltageWithParams: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)readAttributeWiredAssessedInputVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeWiredAssessedInputVoltageWithClusterStateCache: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)readAttributeWiredAssessedInputFrequencyWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeWiredAssessedInputFrequencyWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeWiredAssessedInputFrequencyWithMinInterval:(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 subscribeAttributeWiredAssessedInputFrequencyWithParams: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)readAttributeWiredAssessedInputFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeWiredAssessedInputFrequencyWithClusterStateCache: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)readAttributeWiredCurrentTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::BatApprovedChemistry::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeWiredCurrentTypeWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeBatApprovedChemistryWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeWiredCurrentTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::BatApprovedChemistry::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeWiredCurrentTypeWithParams: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)readAttributeBatApprovedChemistryWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeWiredCurrentTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::BatApprovedChemistry::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeWiredCurrentTypeWithClusterStateCache: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)readAttributeBatCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWiredAssessedCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::BatCapacity::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeWiredAssessedCurrentWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeBatCapacityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeWiredAssessedCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::BatCapacity::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeWiredAssessedCurrentWithParams: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)readAttributeBatCapacityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeWiredAssessedCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::BatCapacity::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeWiredAssessedCurrentWithClusterStateCache: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)readAttributeBatQuantityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWiredNominalVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::BatQuantity::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeWiredNominalVoltageWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeBatQuantityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeWiredNominalVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::BatQuantity::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeWiredNominalVoltageWithParams: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)readAttributeBatQuantityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeWiredNominalVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::BatQuantity::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeWiredNominalVoltageWithClusterStateCache: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)readAttributeBatChargeStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWiredMaximumCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::BatChargeState::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeWiredMaximumCurrentWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeBatChargeStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeWiredMaximumCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::BatChargeState::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeWiredMaximumCurrentWithParams: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)readAttributeBatChargeStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeWiredMaximumCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::BatChargeState::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeWiredMaximumCurrentWithClusterStateCache: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)readAttributeBatTimeToFullChargeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWiredPresentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::BatTimeToFullCharge::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeWiredPresentWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeBatTimeToFullChargeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeWiredPresentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::BatTimeToFullCharge::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeWiredPresentWithParams: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)readAttributeBatTimeToFullChargeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeWiredPresentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::BatTimeToFullCharge::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeWiredPresentWithClusterStateCache: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)readAttributeBatFunctionalWhileChargingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActiveWiredFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::BatFunctionalWhileCharging::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeActiveWiredFaultsWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeBatFunctionalWhileChargingWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActiveWiredFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::BatFunctionalWhileCharging::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeActiveWiredFaultsWithParams: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)readAttributeBatFunctionalWhileChargingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActiveWiredFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::BatFunctionalWhileCharging::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeActiveWiredFaultsWithClusterStateCache: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)readAttributeBatChargingCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::BatChargingCurrent::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeBatVoltageWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeBatChargingCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::BatChargingCurrent::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeBatVoltageWithParams: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)readAttributeBatChargingCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::BatChargingCurrent::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeBatVoltageWithClusterStateCache: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)readAttributeActiveBatChargeFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatPercentRemainingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::ActiveBatChargeFaults::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeBatPercentRemainingWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeActiveBatChargeFaultsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatPercentRemainingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::ActiveBatChargeFaults::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeBatPercentRemainingWithParams: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)readAttributeActiveBatChargeFaultsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatPercentRemainingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::ActiveBatChargeFaults::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeBatPercentRemainingWithClusterStateCache: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)readAttributeEndpointListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatTimeRemainingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::EndpointList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeBatTimeRemainingWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeEndpointListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatTimeRemainingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::EndpointList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeBatTimeRemainingWithParams: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)readAttributeEndpointListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatTimeRemainingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::EndpointList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeBatTimeRemainingWithClusterStateCache: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)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatChargeLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeBatChargeLevelWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatChargeLevelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeBatChargeLevelWithParams: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)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatChargeLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::GeneratedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeBatChargeLevelWithClusterStateCache: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)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatReplacementNeededWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeBatReplacementNeededWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatReplacementNeededWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeBatReplacementNeededWithParams: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)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatReplacementNeededWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::AcceptedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeBatReplacementNeededWithClusterStateCache: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)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatReplaceabilityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeBatReplaceabilityWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatReplaceabilityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeBatReplaceabilityWithParams: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)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatReplaceabilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeBatReplaceabilityWithClusterStateCache: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)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatPresentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeBatPresentWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatPresentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeBatPresentWithParams: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)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatPresentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::AttributeList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeBatPresentWithClusterStateCache: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)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActiveBatFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeActiveBatFaultsWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActiveBatFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeActiveBatFaultsWithParams: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)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActiveBatFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::FeatureMap::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeActiveBatFaultsWithClusterStateCache: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)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatReplacementDescriptionWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeBatReplacementDescriptionWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatReplacementDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = PowerSource::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeBatReplacementDescriptionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBatReplacementDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = PowerSource::Attributes::ClusterRevision::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeBatReplacementDescriptionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -@end - -@implementation MTRBaseClusterPowerSource (Deprecated) - -- (void)readAttributeStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeBatCommonDesignationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeStatusWithCompletion: + [self readAttributeBatCommonDesignationWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeStatusWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatCommonDesignationWithMinInterval:(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) { @@ -17911,33 +17388,33 @@ - (void)subscribeAttributeStatusWithMinInterval:(NSNumber * _Nonnull)minInterval subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeStatusWithParams: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); - }]; + [self subscribeAttributeBatCommonDesignationWithParams: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)readAttributeStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBatCommonDesignationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeStatusWithClusterStateCache: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); - }]; + [self readAttributeBatCommonDesignationWithClusterStateCache: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)readAttributeOrderWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeBatANSIDesignationWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeOrderWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeBatANSIDesignationWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeOrderWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatANSIDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -17946,33 +17423,33 @@ - (void)subscribeAttributeOrderWithMinInterval:(NSNumber * _Nonnull)minInterval subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeOrderWithParams: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); - }]; + [self subscribeAttributeBatANSIDesignationWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeOrderWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBatANSIDesignationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeOrderWithClusterStateCache: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); - }]; + [self readAttributeBatANSIDesignationWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeDescriptionWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeBatIECDesignationWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeDescriptionWithCompletion: + [self readAttributeBatIECDesignationWithCompletion: ^(NSString * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatIECDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -17981,33 +17458,33 @@ - (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInt subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeDescriptionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeBatIECDesignationWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBatIECDesignationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeDescriptionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeBatIECDesignationWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeWiredAssessedInputVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeBatApprovedChemistryWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeWiredAssessedInputVoltageWithCompletion: + [self readAttributeBatApprovedChemistryWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeWiredAssessedInputVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatApprovedChemistryWithMinInterval:(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) { @@ -18016,33 +17493,33 @@ - (void)subscribeAttributeWiredAssessedInputVoltageWithMinInterval:(NSNumber * _ subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeWiredAssessedInputVoltageWithParams: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); - }]; + [self subscribeAttributeBatApprovedChemistryWithParams: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)readAttributeWiredAssessedInputVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBatApprovedChemistryWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeWiredAssessedInputVoltageWithClusterStateCache: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); - }]; + [self readAttributeBatApprovedChemistryWithClusterStateCache: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)readAttributeWiredAssessedInputFrequencyWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeBatCapacityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeWiredAssessedInputFrequencyWithCompletion: + [self readAttributeBatCapacityWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeWiredAssessedInputFrequencyWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatCapacityWithMinInterval:(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) { @@ -18051,33 +17528,33 @@ - (void)subscribeAttributeWiredAssessedInputFrequencyWithMinInterval:(NSNumber * subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeWiredAssessedInputFrequencyWithParams: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); - }]; + [self subscribeAttributeBatCapacityWithParams: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)readAttributeWiredAssessedInputFrequencyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBatCapacityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeWiredAssessedInputFrequencyWithClusterStateCache: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); - }]; + [self readAttributeBatCapacityWithClusterStateCache: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)readAttributeWiredCurrentTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeBatQuantityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeWiredCurrentTypeWithCompletion: + [self readAttributeBatQuantityWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeWiredCurrentTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatQuantityWithMinInterval:(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) { @@ -18086,33 +17563,33 @@ - (void)subscribeAttributeWiredCurrentTypeWithMinInterval:(NSNumber * _Nonnull)m subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeWiredCurrentTypeWithParams: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); - }]; + [self subscribeAttributeBatQuantityWithParams: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)readAttributeWiredCurrentTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBatQuantityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeWiredCurrentTypeWithClusterStateCache: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); - }]; + [self readAttributeBatQuantityWithClusterStateCache: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)readAttributeWiredAssessedCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeBatChargeStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeWiredAssessedCurrentWithCompletion: + [self readAttributeBatChargeStateWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeWiredAssessedCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatChargeStateWithMinInterval:(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) { @@ -18121,30 +17598,30 @@ - (void)subscribeAttributeWiredAssessedCurrentWithMinInterval:(NSNumber * _Nonnu subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeWiredAssessedCurrentWithParams: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); - }]; + [self subscribeAttributeBatChargeStateWithParams: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)readAttributeWiredAssessedCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBatChargeStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeWiredAssessedCurrentWithClusterStateCache: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); - }]; + [self readAttributeBatChargeStateWithClusterStateCache: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)readAttributeWiredNominalVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeBatTimeToFullChargeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeWiredNominalVoltageWithCompletion: + [self readAttributeBatTimeToFullChargeWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeWiredNominalVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)subscribeAttributeBatTimeToFullChargeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -18156,33 +17633,33 @@ - (void)subscribeAttributeWiredNominalVoltageWithMinInterval:(NSNumber * _Nonnul subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeWiredNominalVoltageWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + [self subscribeAttributeBatTimeToFullChargeWithParams: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)readAttributeWiredNominalVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBatTimeToFullChargeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeWiredNominalVoltageWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + [self readAttributeBatTimeToFullChargeWithClusterStateCache: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)readAttributeWiredMaximumCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeBatFunctionalWhileChargingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeWiredMaximumCurrentWithCompletion: + [self readAttributeBatFunctionalWhileChargingWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeWiredMaximumCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatFunctionalWhileChargingWithMinInterval:(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) { @@ -18191,33 +17668,33 @@ - (void)subscribeAttributeWiredMaximumCurrentWithMinInterval:(NSNumber * _Nonnul subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeWiredMaximumCurrentWithParams: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); - }]; + [self subscribeAttributeBatFunctionalWhileChargingWithParams: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)readAttributeWiredMaximumCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBatFunctionalWhileChargingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeWiredMaximumCurrentWithClusterStateCache: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); - }]; + [self readAttributeBatFunctionalWhileChargingWithClusterStateCache: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)readAttributeWiredPresentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeBatChargingCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeWiredPresentWithCompletion: + [self readAttributeBatChargingCurrentWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeWiredPresentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBatChargingCurrentWithMinInterval:(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) { @@ -18226,33 +17703,33 @@ - (void)subscribeAttributeWiredPresentWithMinInterval:(NSNumber * _Nonnull)minIn subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeWiredPresentWithParams: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); - }]; + [self subscribeAttributeBatChargingCurrentWithParams: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)readAttributeWiredPresentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBatChargingCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeWiredPresentWithClusterStateCache: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); - }]; + [self readAttributeBatChargingCurrentWithClusterStateCache: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)readAttributeActiveWiredFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeActiveBatChargeFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeActiveWiredFaultsWithCompletion: + [self readAttributeActiveBatChargeFaultsWithCompletion: ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeActiveWiredFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActiveBatChargeFaultsWithMinInterval:(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) { @@ -18261,33 +17738,33 @@ - (void)subscribeAttributeActiveWiredFaultsWithMinInterval:(NSNumber * _Nonnull) subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeActiveWiredFaultsWithParams: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); - }]; + [self subscribeAttributeActiveBatChargeFaultsWithParams: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)readAttributeActiveWiredFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeActiveBatChargeFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeActiveWiredFaultsWithClusterStateCache: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); - }]; + [self readAttributeActiveBatChargeFaultsWithClusterStateCache: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)readAttributeBatVoltageWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeBatVoltageWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeGeneratedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeBatVoltageWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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) { @@ -18296,33 +17773,33 @@ - (void)subscribeAttributeBatVoltageWithMinInterval:(NSNumber * _Nonnull)minInte subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeBatVoltageWithParams: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); - }]; + [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)readAttributeBatVoltageWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeBatVoltageWithClusterStateCache: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); - }]; + [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)readAttributeBatPercentRemainingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeBatPercentRemainingWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeAcceptedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeBatPercentRemainingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -18331,33 +17808,33 @@ - (void)subscribeAttributeBatPercentRemainingWithMinInterval:(NSNumber * _Nonnul subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeBatPercentRemainingWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [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); + reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeBatPercentRemainingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeBatPercentRemainingWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [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); + completionHandler(static_cast(value), error); }]; } -- (void)readAttributeBatTimeRemainingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeBatTimeRemainingWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeAttributeListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeBatTimeRemainingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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) { @@ -18366,33 +17843,68 @@ - (void)subscribeAttributeBatTimeRemainingWithMinInterval:(NSNumber * _Nonnull)m subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeBatTimeRemainingWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [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. - reportHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -+ (void)readAttributeBatTimeRemainingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeBatTimeRemainingWithClusterStateCache: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); - }]; + [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)readAttributeBatChargeLevelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeBatChargeLevelWithCompletion: + [self readAttributeClusterRevisionWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeBatChargeLevelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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) { @@ -18401,418 +17913,586 @@ - (void)subscribeAttributeBatChargeLevelWithMinInterval:(NSNumber * _Nonnull)min subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeBatChargeLevelWithParams: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); - }]; + [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)readAttributeBatChargeLevelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeBatChargeLevelWithClusterStateCache: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); - }]; + [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); + }]; } -- (void)readAttributeBatReplacementNeededWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue +{ + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; +} + +@end + +@implementation MTRBaseClusterGeneralCommissioning + +- (void)armFailSafeWithParams:(MTRGeneralCommissioningClusterArmFailSafeParams *)params completion:(void (^)(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRGeneralCommissioningClusterArmFailSafeParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = GeneralCommissioning::Commands::ArmFailSafe::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRGeneralCommissioningClusterArmFailSafeResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)setRegulatoryConfigWithParams:(MTRGeneralCommissioningClusterSetRegulatoryConfigParams *)params completion:(void (^)(MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRGeneralCommissioningClusterSetRegulatoryConfigParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = GeneralCommissioning::Commands::SetRegulatoryConfig::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)commissioningCompleteWithCompletion:(void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + [self commissioningCompleteWithParams:nil completion:completion]; +} +- (void)commissioningCompleteWithParams:(MTRGeneralCommissioningClusterCommissioningCompleteParams * _Nullable)params completion:(void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRGeneralCommissioningClusterCommissioningCompleteParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = GeneralCommissioning::Commands::CommissioningComplete::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRGeneralCommissioningClusterCommissioningCompleteResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeBreadcrumbWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedLongLongValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeBreadcrumbWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeBreadcrumbWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeBasicCommissioningInfoWithCompletion:(void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeBatReplacementNeededWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = GeneralCommissioning::Attributes::BasicCommissioningInfo::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeBatReplacementNeededWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeBasicCommissioningInfoWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _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 subscribeAttributeBatReplacementNeededWithParams: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); - }]; + using TypeInfo = GeneralCommissioning::Attributes::BasicCommissioningInfo::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeBatReplacementNeededWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeBasicCommissioningInfoWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeBatReplacementNeededWithClusterStateCache: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); - }]; + using TypeInfo = GeneralCommissioning::Attributes::BasicCommissioningInfo::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeBatReplaceabilityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRegulatoryConfigWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeBatReplaceabilityWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = GeneralCommissioning::Attributes::RegulatoryConfig::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeBatReplaceabilityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeRegulatoryConfigWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + 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 subscribeAttributeBatReplaceabilityWithParams: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); - }]; + using TypeInfo = GeneralCommissioning::Attributes::RegulatoryConfig::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeBatReplaceabilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeRegulatoryConfigWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeBatReplaceabilityWithClusterStateCache: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); - }]; + using TypeInfo = GeneralCommissioning::Attributes::RegulatoryConfig::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeBatPresentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeLocationCapabilityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeBatPresentWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = GeneralCommissioning::Attributes::LocationCapability::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeBatPresentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeLocationCapabilityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + 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 subscribeAttributeBatPresentWithParams: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); - }]; + using TypeInfo = GeneralCommissioning::Attributes::LocationCapability::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeBatPresentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeLocationCapabilityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeBatPresentWithClusterStateCache: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); - }]; + using TypeInfo = GeneralCommissioning::Attributes::LocationCapability::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeActiveBatFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeSupportsConcurrentConnectionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeActiveBatFaultsWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = GeneralCommissioning::Attributes::SupportsConcurrentConnection::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeActiveBatFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeSupportsConcurrentConnectionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + 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 subscribeAttributeActiveBatFaultsWithParams: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); - }]; + using TypeInfo = GeneralCommissioning::Attributes::SupportsConcurrentConnection::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeActiveBatFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeSupportsConcurrentConnectionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeActiveBatFaultsWithClusterStateCache: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); - }]; + using TypeInfo = GeneralCommissioning::Attributes::SupportsConcurrentConnection::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeBatReplacementDescriptionWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeBatReplacementDescriptionWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = GeneralCommissioning::Attributes::GeneratedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeBatReplacementDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + 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 subscribeAttributeBatReplacementDescriptionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = GeneralCommissioning::Attributes::GeneratedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeBatReplacementDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeBatReplacementDescriptionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = GeneralCommissioning::Attributes::GeneratedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeBatCommonDesignationWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeBatCommonDesignationWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = GeneralCommissioning::Attributes::AcceptedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeBatCommonDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - 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 { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeBatCommonDesignationWithParams: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); - }]; + using TypeInfo = GeneralCommissioning::Attributes::AcceptedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeBatCommonDesignationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeBatCommonDesignationWithClusterStateCache: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); - }]; + using TypeInfo = GeneralCommissioning::Attributes::AcceptedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeBatANSIDesignationWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeBatANSIDesignationWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = GeneralCommissioning::Attributes::EventList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeBatANSIDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + 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 subscribeAttributeBatANSIDesignationWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = GeneralCommissioning::Attributes::EventList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeBatANSIDesignationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeBatANSIDesignationWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = GeneralCommissioning::Attributes::EventList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeBatIECDesignationWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeBatIECDesignationWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = GeneralCommissioning::Attributes::AttributeList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeBatIECDesignationWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + 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 subscribeAttributeBatIECDesignationWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = GeneralCommissioning::Attributes::AttributeList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeBatIECDesignationWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeBatIECDesignationWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = GeneralCommissioning::Attributes::AttributeList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeBatApprovedChemistryWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeBatApprovedChemistryWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = GeneralCommissioning::Attributes::FeatureMap::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeBatApprovedChemistryWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + 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 subscribeAttributeBatApprovedChemistryWithParams: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); - }]; + using TypeInfo = GeneralCommissioning::Attributes::FeatureMap::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeBatApprovedChemistryWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeBatApprovedChemistryWithClusterStateCache: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); - }]; + using TypeInfo = GeneralCommissioning::Attributes::FeatureMap::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeBatCapacityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeBatCapacityWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = GeneralCommissioning::Attributes::ClusterRevision::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeBatCapacityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + 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 subscribeAttributeBatCapacityWithParams: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); - }]; + using TypeInfo = GeneralCommissioning::Attributes::ClusterRevision::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeBatCapacityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeBatCapacityWithClusterStateCache: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); - }]; + using TypeInfo = GeneralCommissioning::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeBatQuantityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +@end + +@implementation MTRBaseClusterGeneralCommissioning (Deprecated) + +- (void)armFailSafeWithParams:(MTRGeneralCommissioningClusterArmFailSafeParams *)params completionHandler:(void (^)(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - [self readAttributeBatQuantityWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self armFailSafeWithParams:params completion: + ^(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } -- (void)subscribeAttributeBatQuantityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)setRegulatoryConfigWithParams:(MTRGeneralCommissioningClusterSetRegulatoryConfigParams *)params completionHandler:(void (^)(MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeBatQuantityWithParams: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); - }]; + [self setRegulatoryConfigWithParams:params completion: + ^(MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } -+ (void)readAttributeBatQuantityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)commissioningCompleteWithParams:(MTRGeneralCommissioningClusterCommissioningCompleteParams * _Nullable)params completionHandler:(void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - [self readAttributeBatQuantityWithClusterStateCache: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); - }]; + [self commissioningCompleteWithParams:params completion: + ^(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; +} +- (void)commissioningCompleteWithCompletionHandler:(void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self commissioningCompleteWithParams:nil completionHandler:completionHandler]; } -- (void)readAttributeBatChargeStateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeBreadcrumbWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeBatChargeStateWithCompletion: + [self readAttributeBreadcrumbWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeBatChargeStateWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeBreadcrumbWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeBreadcrumbWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeBreadcrumbWithMinInterval:(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) { @@ -18821,33 +18501,33 @@ - (void)subscribeAttributeBatChargeStateWithMinInterval:(NSNumber * _Nonnull)min subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeBatChargeStateWithParams: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); - }]; + [self subscribeAttributeBreadcrumbWithParams: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)readAttributeBatChargeStateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBreadcrumbWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeBatChargeStateWithClusterStateCache: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); - }]; + [self readAttributeBreadcrumbWithClusterStateCache: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)readAttributeBatTimeToFullChargeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeBasicCommissioningInfoWithCompletionHandler:(void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeBatTimeToFullChargeWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeBasicCommissioningInfoWithCompletion: + ^(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeBatTimeToFullChargeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBasicCommissioningInfoWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -18856,33 +18536,33 @@ - (void)subscribeAttributeBatTimeToFullChargeWithMinInterval:(NSNumber * _Nonnul subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeBatTimeToFullChargeWithParams: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)readAttributeBatTimeToFullChargeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeBatTimeToFullChargeWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self subscribeAttributeBasicCommissioningInfoWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + reportHandler(static_cast(value), error); }]; } ++ (void)readAttributeBasicCommissioningInfoWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeBasicCommissioningInfoWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} -- (void)readAttributeBatFunctionalWhileChargingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRegulatoryConfigWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeBatFunctionalWhileChargingWithCompletion: + [self readAttributeRegulatoryConfigWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeBatFunctionalWhileChargingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRegulatoryConfigWithMinInterval:(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) { @@ -18891,30 +18571,30 @@ - (void)subscribeAttributeBatFunctionalWhileChargingWithMinInterval:(NSNumber * subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeBatFunctionalWhileChargingWithParams: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); - }]; + [self subscribeAttributeRegulatoryConfigWithParams: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)readAttributeBatFunctionalWhileChargingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRegulatoryConfigWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeBatFunctionalWhileChargingWithClusterStateCache: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); - }]; + [self readAttributeRegulatoryConfigWithClusterStateCache: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)readAttributeBatChargingCurrentWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeLocationCapabilityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeBatChargingCurrentWithCompletion: + [self readAttributeLocationCapabilityWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeBatChargingCurrentWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)subscribeAttributeLocationCapabilityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -18926,33 +18606,33 @@ - (void)subscribeAttributeBatChargingCurrentWithMinInterval:(NSNumber * _Nonnull subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeBatChargingCurrentWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + [self subscribeAttributeLocationCapabilityWithParams: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)readAttributeBatChargingCurrentWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeLocationCapabilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeBatChargingCurrentWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + [self readAttributeLocationCapabilityWithClusterStateCache: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)readAttributeActiveBatChargeFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeSupportsConcurrentConnectionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeActiveBatChargeFaultsWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { + [self readAttributeSupportsConcurrentConnectionWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeActiveBatChargeFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSupportsConcurrentConnectionWithMinInterval:(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) { @@ -18961,19 +18641,19 @@ - (void)subscribeAttributeActiveBatChargeFaultsWithMinInterval:(NSNumber * _Nonn subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeActiveBatChargeFaultsWithParams: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); - }]; + [self subscribeAttributeSupportsConcurrentConnectionWithParams: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)readAttributeActiveBatChargeFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSupportsConcurrentConnectionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeActiveBatChargeFaultsWithClusterStateCache: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); - }]; + [self readAttributeSupportsConcurrentConnectionWithClusterStateCache: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 @@ -19160,12 +18840,16 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device @end -@implementation MTRBaseClusterGeneralCommissioning +@implementation MTRBaseClusterNetworkCommissioning -- (void)armFailSafeWithParams:(MTRGeneralCommissioningClusterArmFailSafeParams *)params completion:(void (^)(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)scanNetworksWithCompletion:(void (^)(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + [self scanNetworksWithParams:nil completion:completion]; +} +- (void)scanNetworksWithParams:(MTRNetworkCommissioningClusterScanNetworksParams * _Nullable)params completion:(void (^)(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRGeneralCommissioningClusterArmFailSafeParams + params = [[MTRNetworkCommissioningClusterScanNetworksParams alloc] init]; } @@ -19175,21 +18859,21 @@ - (void)armFailSafeWithParams:(MTRGeneralCommissioningClusterArmFailSafeParams * auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = GeneralCommissioning::Commands::ArmFailSafe::Type; + using RequestType = NetworkCommissioning::Commands::ScanNetworks::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRGeneralCommissioningClusterArmFailSafeResponseParams.class + responseClass:MTRNetworkCommissioningClusterScanNetworksResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)setRegulatoryConfigWithParams:(MTRGeneralCommissioningClusterSetRegulatoryConfigParams *)params completion:(void (^)(MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)addOrUpdateWiFiNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams *)params completion:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRGeneralCommissioningClusterSetRegulatoryConfigParams + params = [[MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams alloc] init]; } @@ -19199,49 +18883,285 @@ - (void)setRegulatoryConfigWithParams:(MTRGeneralCommissioningClusterSetRegulato auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = GeneralCommissioning::Commands::SetRegulatoryConfig::Type; + using RequestType = NetworkCommissioning::Commands::AddOrUpdateWiFiNetwork::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams.class + responseClass:MTRNetworkCommissioningClusterNetworkConfigResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)addOrUpdateThreadNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams *)params completion:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = NetworkCommissioning::Commands::AddOrUpdateThreadNetwork::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRNetworkCommissioningClusterNetworkConfigResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)removeNetworkWithParams:(MTRNetworkCommissioningClusterRemoveNetworkParams *)params completion:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRNetworkCommissioningClusterRemoveNetworkParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = NetworkCommissioning::Commands::RemoveNetwork::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRNetworkCommissioningClusterNetworkConfigResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)connectNetworkWithParams:(MTRNetworkCommissioningClusterConnectNetworkParams *)params completion:(void (^)(MTRNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRNetworkCommissioningClusterConnectNetworkParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = NetworkCommissioning::Commands::ConnectNetwork::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRNetworkCommissioningClusterConnectNetworkResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkParams *)params completion:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRNetworkCommissioningClusterReorderNetworkParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = NetworkCommissioning::Commands::ReorderNetwork::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRNetworkCommissioningClusterNetworkConfigResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)queryIdentityWithParams:(MTRNetworkCommissioningClusterQueryIdentityParams *)params completion:(void (^)(MTRNetworkCommissioningClusterQueryIdentityResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRNetworkCommissioningClusterQueryIdentityParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = NetworkCommissioning::Commands::QueryIdentity::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRNetworkCommissioningClusterQueryIdentityResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)commissioningCompleteWithCompletion:(void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, NSError * _Nullable error))completion + +- (void)readAttributeMaxNetworksWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = NetworkCommissioning::Attributes::MaxNetworks::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeMaxNetworksWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = NetworkCommissioning::Attributes::MaxNetworks::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeMaxNetworksWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = NetworkCommissioning::Attributes::MaxNetworks::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeNetworksWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = NetworkCommissioning::Attributes::Networks::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeNetworksWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = NetworkCommissioning::Attributes::Networks::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeNetworksWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = NetworkCommissioning::Attributes::Networks::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeScanMaxTimeSecondsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = NetworkCommissioning::Attributes::ScanMaxTimeSeconds::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeScanMaxTimeSecondsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = NetworkCommissioning::Attributes::ScanMaxTimeSeconds::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeScanMaxTimeSecondsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self commissioningCompleteWithParams:nil completion:completion]; + using TypeInfo = NetworkCommissioning::Attributes::ScanMaxTimeSeconds::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)commissioningCompleteWithParams:(MTRGeneralCommissioningClusterCommissioningCompleteParams * _Nullable)params completion:(void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRGeneralCommissioningClusterCommissioningCompleteParams - alloc] init]; - } - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; +- (void)readAttributeConnectMaxTimeSecondsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; +- (void)subscribeAttributeConnectMaxTimeSecondsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} - using RequestType = GeneralCommissioning::Commands::CommissioningComplete::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRGeneralCommissioningClusterCommissioningCompleteResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; ++ (void)readAttributeConnectMaxTimeSecondsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeBreadcrumbWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeInterfaceEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; + using TypeInfo = NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19250,11 +19170,11 @@ - (void)readAttributeBreadcrumbWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -19269,20 +19189,20 @@ - (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value params:(MTR } ListFreer listFreer; - using TypeInfo = GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; + using TypeInfo = NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedLongLongValue; + cppValue = value.boolValue; chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeBreadcrumbWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeInterfaceEnabledWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; + using TypeInfo = NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19292,9 +19212,9 @@ - (void)subscribeAttributeBreadcrumbWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeBreadcrumbWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeInterfaceEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralCommissioning::Attributes::Breadcrumb::TypeInfo; + using TypeInfo = NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -19303,9 +19223,9 @@ + (void)readAttributeBreadcrumbWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeBasicCommissioningInfoWithCompletion:(void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLastNetworkingStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralCommissioning::Attributes::BasicCommissioningInfo::TypeInfo; + using TypeInfo = NetworkCommissioning::Attributes::LastNetworkingStatus::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19314,11 +19234,11 @@ - (void)readAttributeBasicCommissioningInfoWithCompletion:(void (^)(MTRGeneralCo completion:completion]; } -- (void)subscribeAttributeBasicCommissioningInfoWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLastNetworkingStatusWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GeneralCommissioning::Attributes::BasicCommissioningInfo::TypeInfo; + using TypeInfo = NetworkCommissioning::Attributes::LastNetworkingStatus::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19328,9 +19248,9 @@ - (void)subscribeAttributeBasicCommissioningInfoWithParams:(MTRSubscribeParams * subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeBasicCommissioningInfoWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLastNetworkingStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralCommissioning::Attributes::BasicCommissioningInfo::TypeInfo; + using TypeInfo = NetworkCommissioning::Attributes::LastNetworkingStatus::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -19339,9 +19259,9 @@ + (void)readAttributeBasicCommissioningInfoWithClusterStateCache:(MTRClusterStat completion:completion]; } -- (void)readAttributeRegulatoryConfigWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLastNetworkIDWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralCommissioning::Attributes::RegulatoryConfig::TypeInfo; + using TypeInfo = NetworkCommissioning::Attributes::LastNetworkID::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19350,11 +19270,11 @@ - (void)readAttributeRegulatoryConfigWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)subscribeAttributeRegulatoryConfigWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLastNetworkIDWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GeneralCommissioning::Attributes::RegulatoryConfig::TypeInfo; + using TypeInfo = NetworkCommissioning::Attributes::LastNetworkID::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19364,9 +19284,9 @@ - (void)subscribeAttributeRegulatoryConfigWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRegulatoryConfigWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLastNetworkIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralCommissioning::Attributes::RegulatoryConfig::TypeInfo; + using TypeInfo = NetworkCommissioning::Attributes::LastNetworkID::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -19375,9 +19295,9 @@ + (void)readAttributeRegulatoryConfigWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeLocationCapabilityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLastConnectErrorValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralCommissioning::Attributes::LocationCapability::TypeInfo; + using TypeInfo = NetworkCommissioning::Attributes::LastConnectErrorValue::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19386,11 +19306,47 @@ - (void)readAttributeLocationCapabilityWithCompletion:(void (^)(NSNumber * _Null completion:completion]; } -- (void)subscribeAttributeLocationCapabilityWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeLastConnectErrorValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = NetworkCommissioning::Attributes::LastConnectErrorValue::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeLastConnectErrorValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = NetworkCommissioning::Attributes::LastConnectErrorValue::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeSupportedWiFiBandsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = NetworkCommissioning::Attributes::SupportedWiFiBands::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeSupportedWiFiBandsWithParams:(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 = GeneralCommissioning::Attributes::LocationCapability::TypeInfo; + using TypeInfo = NetworkCommissioning::Attributes::SupportedWiFiBands::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19400,9 +19356,9 @@ - (void)subscribeAttributeLocationCapabilityWithParams:(MTRSubscribeParams * _No subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLocationCapabilityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSupportedWiFiBandsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralCommissioning::Attributes::LocationCapability::TypeInfo; + using TypeInfo = NetworkCommissioning::Attributes::SupportedWiFiBands::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -19411,9 +19367,9 @@ + (void)readAttributeLocationCapabilityWithClusterStateCache:(MTRClusterStateCac completion:completion]; } -- (void)readAttributeSupportsConcurrentConnectionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSupportedThreadFeaturesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralCommissioning::Attributes::SupportsConcurrentConnection::TypeInfo; + using TypeInfo = NetworkCommissioning::Attributes::SupportedThreadFeatures::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19422,11 +19378,11 @@ - (void)readAttributeSupportsConcurrentConnectionWithCompletion:(void (^)(NSNumb completion:completion]; } -- (void)subscribeAttributeSupportsConcurrentConnectionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSupportedThreadFeaturesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GeneralCommissioning::Attributes::SupportsConcurrentConnection::TypeInfo; + using TypeInfo = NetworkCommissioning::Attributes::SupportedThreadFeatures::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19436,9 +19392,45 @@ - (void)subscribeAttributeSupportsConcurrentConnectionWithParams:(MTRSubscribePa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSupportsConcurrentConnectionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSupportedThreadFeaturesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralCommissioning::Attributes::SupportsConcurrentConnection::TypeInfo; + using TypeInfo = NetworkCommissioning::Attributes::SupportedThreadFeatures::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeThreadVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = NetworkCommissioning::Attributes::ThreadVersion::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeThreadVersionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = NetworkCommissioning::Attributes::ThreadVersion::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeThreadVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = NetworkCommissioning::Attributes::ThreadVersion::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -19449,7 +19441,7 @@ + (void)readAttributeSupportsConcurrentConnectionWithClusterStateCache:(MTRClust - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralCommissioning::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = NetworkCommissioning::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19462,7 +19454,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GeneralCommissioning::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = NetworkCommissioning::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19474,7 +19466,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 = GeneralCommissioning::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = NetworkCommissioning::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -19485,7 +19477,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralCommissioning::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = NetworkCommissioning::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19498,7 +19490,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GeneralCommissioning::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = NetworkCommissioning::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19510,7 +19502,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 = GeneralCommissioning::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = NetworkCommissioning::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -19521,7 +19513,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralCommissioning::Attributes::EventList::TypeInfo; + using TypeInfo = NetworkCommissioning::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19534,7 +19526,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GeneralCommissioning::Attributes::EventList::TypeInfo; + using TypeInfo = NetworkCommissioning::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19546,7 +19538,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 = GeneralCommissioning::Attributes::EventList::TypeInfo; + using TypeInfo = NetworkCommissioning::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -19557,7 +19549,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralCommissioning::Attributes::AttributeList::TypeInfo; + using TypeInfo = NetworkCommissioning::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19570,7 +19562,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GeneralCommissioning::Attributes::AttributeList::TypeInfo; + using TypeInfo = NetworkCommissioning::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19582,7 +19574,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 = GeneralCommissioning::Attributes::AttributeList::TypeInfo; + using TypeInfo = NetworkCommissioning::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -19593,7 +19585,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralCommissioning::Attributes::FeatureMap::TypeInfo; + using TypeInfo = NetworkCommissioning::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19606,7 +19598,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GeneralCommissioning::Attributes::FeatureMap::TypeInfo; + using TypeInfo = NetworkCommissioning::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19618,7 +19610,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 = GeneralCommissioning::Attributes::FeatureMap::TypeInfo; + using TypeInfo = NetworkCommissioning::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -19629,7 +19621,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralCommissioning::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = NetworkCommissioning::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19642,7 +19634,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GeneralCommissioning::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = NetworkCommissioning::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -19654,7 +19646,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 = GeneralCommissioning::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = NetworkCommissioning::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -19665,57 +19657,104 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterGeneralCommissioning (Deprecated) +@implementation MTRBaseClusterNetworkCommissioning (Deprecated) -- (void)armFailSafeWithParams:(MTRGeneralCommissioningClusterArmFailSafeParams *)params completionHandler:(void (^)(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)scanNetworksWithParams:(MTRNetworkCommissioningClusterScanNetworksParams * _Nullable)params completionHandler:(void (^)(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - [self armFailSafeWithParams:params completion: - ^(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + [self scanNetworksWithParams:params completion: + ^(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } -- (void)setRegulatoryConfigWithParams:(MTRGeneralCommissioningClusterSetRegulatoryConfigParams *)params completionHandler:(void (^)(MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)addOrUpdateWiFiNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams *)params completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - [self setRegulatoryConfigWithParams:params completion: - ^(MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + [self addOrUpdateWiFiNetworkWithParams:params completion: + ^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } -- (void)commissioningCompleteWithParams:(MTRGeneralCommissioningClusterCommissioningCompleteParams * _Nullable)params completionHandler:(void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)addOrUpdateThreadNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams *)params completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - [self commissioningCompleteWithParams:params completion: - ^(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + [self addOrUpdateThreadNetworkWithParams:params completion: + ^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } -- (void)commissioningCompleteWithCompletionHandler:(void (^)(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +- (void)removeNetworkWithParams:(MTRNetworkCommissioningClusterRemoveNetworkParams *)params completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - [self commissioningCompleteWithParams:nil completionHandler:completionHandler]; + [self removeNetworkWithParams:params completion: + ^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; +} +- (void)connectNetworkWithParams:(MTRNetworkCommissioningClusterConnectNetworkParams *)params completionHandler:(void (^)(MTRNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self connectNetworkWithParams:params completion: + ^(MTRNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; +} +- (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkParams *)params completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self reorderNetworkWithParams:params completion: + ^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } -- (void)readAttributeBreadcrumbWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMaxNetworksWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeBreadcrumbWithCompletion: + [self readAttributeMaxNetworksWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +- (void)subscribeAttributeMaxNetworksWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeBreadcrumbWithValue:value params:nil completion:completionHandler]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeMaxNetworksWithParams: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)writeAttributeBreadcrumbWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler ++ (void)readAttributeMaxNetworksWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self writeAttributeBreadcrumbWithValue:value params:params completion:completionHandler]; + [self readAttributeMaxNetworksWithClusterStateCache: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)subscribeAttributeBreadcrumbWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeNetworksWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeNetworksWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeNetworksWithMinInterval:(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) { @@ -19724,33 +19763,33 @@ - (void)subscribeAttributeBreadcrumbWithMinInterval:(NSNumber * _Nonnull)minInte subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeBreadcrumbWithParams: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); - }]; + [self subscribeAttributeNetworksWithParams: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)readAttributeBreadcrumbWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeNetworksWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeBreadcrumbWithClusterStateCache: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); - }]; + [self readAttributeNetworksWithClusterStateCache: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)readAttributeBasicCommissioningInfoWithCompletionHandler:(void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeScanMaxTimeSecondsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeBasicCommissioningInfoWithCompletion: - ^(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error) { + [self readAttributeScanMaxTimeSecondsWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeBasicCommissioningInfoWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeScanMaxTimeSecondsWithMinInterval:(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) { @@ -19759,30 +19798,73 @@ - (void)subscribeAttributeBasicCommissioningInfoWithMinInterval:(NSNumber * _Non subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeBasicCommissioningInfoWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeScanMaxTimeSecondsWithParams: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)readAttributeBasicCommissioningInfoWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeScanMaxTimeSecondsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeBasicCommissioningInfoWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeScanMaxTimeSecondsWithClusterStateCache: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)readAttributeRegulatoryConfigWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeConnectMaxTimeSecondsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRegulatoryConfigWithCompletion: + [self readAttributeConnectMaxTimeSecondsWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeRegulatoryConfigWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)subscribeAttributeConnectMaxTimeSecondsWithMinInterval:(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 subscribeAttributeConnectMaxTimeSecondsWithParams: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)readAttributeConnectMaxTimeSecondsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeConnectMaxTimeSecondsWithClusterStateCache: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)readAttributeInterfaceEnabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeInterfaceEnabledWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeInterfaceEnabledWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeInterfaceEnabledWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeInterfaceEnabledWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -19794,33 +19876,68 @@ - (void)subscribeAttributeRegulatoryConfigWithMinInterval:(NSNumber * _Nonnull)m subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeRegulatoryConfigWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + [self subscribeAttributeInterfaceEnabledWithParams: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)readAttributeRegulatoryConfigWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeInterfaceEnabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRegulatoryConfigWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + [self readAttributeInterfaceEnabledWithClusterStateCache: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)readAttributeLocationCapabilityWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeLastNetworkingStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLastNetworkingStatusWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeLastNetworkingStatusWithMinInterval:(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 subscribeAttributeLastNetworkingStatusWithParams: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)readAttributeLastNetworkingStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLastNetworkingStatusWithClusterStateCache: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)readAttributeLastNetworkIDWithCompletionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeLocationCapabilityWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeLastNetworkIDWithCompletion: + ^(NSData * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeLocationCapabilityWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLastNetworkIDWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -19829,33 +19946,33 @@ - (void)subscribeAttributeLocationCapabilityWithMinInterval:(NSNumber * _Nonnull subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeLocationCapabilityWithParams: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); - }]; + [self subscribeAttributeLastNetworkIDWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSData * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeLocationCapabilityWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeLastNetworkIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeLocationCapabilityWithClusterStateCache: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); - }]; + [self readAttributeLastNetworkIDWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSData * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeSupportsConcurrentConnectionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeLastConnectErrorValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeSupportsConcurrentConnectionWithCompletion: + [self readAttributeLastConnectErrorValueWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeSupportsConcurrentConnectionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLastConnectErrorValueWithMinInterval:(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) { @@ -19864,19 +19981,19 @@ - (void)subscribeAttributeSupportsConcurrentConnectionWithMinInterval:(NSNumber subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeSupportsConcurrentConnectionWithParams: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); - }]; + [self subscribeAttributeLastConnectErrorValueWithParams: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)readAttributeSupportsConcurrentConnectionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeLastConnectErrorValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeSupportsConcurrentConnectionWithClusterStateCache: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); - }]; + [self readAttributeLastConnectErrorValueWithClusterStateCache: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 @@ -20063,16 +20180,12 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device @end -@implementation MTRBaseClusterNetworkCommissioning +@implementation MTRBaseClusterDiagnosticLogs -- (void)scanNetworksWithCompletion:(void (^)(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self scanNetworksWithParams:nil completion:completion]; -} -- (void)scanNetworksWithParams:(MTRNetworkCommissioningClusterScanNetworksParams * _Nullable)params completion:(void (^)(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsRequestParams *)params completion:(void (^)(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRNetworkCommissioningClusterScanNetworksParams + params = [[MTRDiagnosticLogsClusterRetrieveLogsRequestParams alloc] init]; } @@ -20082,165 +20195,57 @@ - (void)scanNetworksWithParams:(MTRNetworkCommissioningClusterScanNetworksParams auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = NetworkCommissioning::Commands::ScanNetworks::Type; + using RequestType = DiagnosticLogs::Commands::RetrieveLogsRequest::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRNetworkCommissioningClusterScanNetworksResponseParams.class + responseClass:MTRDiagnosticLogsClusterRetrieveLogsResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)addOrUpdateWiFiNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams *)params completion:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = NetworkCommissioning::Commands::AddOrUpdateWiFiNetwork::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRNetworkCommissioningClusterNetworkConfigResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)addOrUpdateThreadNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams *)params completion:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - if (params == nil) { - params = [[MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = NetworkCommissioning::Commands::AddOrUpdateThreadNetwork::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRNetworkCommissioningClusterNetworkConfigResponseParams.class + using TypeInfo = DiagnosticLogs::Attributes::GeneratedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil queue:self.callbackQueue - completion:responseHandler]; + completion:completion]; } -- (void)removeNetworkWithParams:(MTRNetworkCommissioningClusterRemoveNetworkParams *)params completion:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRNetworkCommissioningClusterRemoveNetworkParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = NetworkCommissioning::Commands::RemoveNetwork::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRNetworkCommissioningClusterNetworkConfigResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)connectNetworkWithParams:(MTRNetworkCommissioningClusterConnectNetworkParams *)params completion:(void (^)(MTRNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - if (params == nil) { - params = [[MTRNetworkCommissioningClusterConnectNetworkParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = NetworkCommissioning::Commands::ConnectNetwork::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRNetworkCommissioningClusterConnectNetworkResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; + using TypeInfo = DiagnosticLogs::Attributes::GeneratedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkParams *)params completion:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRNetworkCommissioningClusterReorderNetworkParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = NetworkCommissioning::Commands::ReorderNetwork::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRNetworkCommissioningClusterNetworkConfigResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)queryIdentityWithParams:(MTRNetworkCommissioningClusterQueryIdentityParams *)params completion:(void (^)(MTRNetworkCommissioningClusterQueryIdentityResponseParams * _Nullable data, 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 { - if (params == nil) { - params = [[MTRNetworkCommissioningClusterQueryIdentityParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = NetworkCommissioning::Commands::QueryIdentity::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRNetworkCommissioningClusterQueryIdentityResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; + using TypeInfo = DiagnosticLogs::Attributes::GeneratedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeMaxNetworksWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::MaxNetworks::TypeInfo; + using TypeInfo = DiagnosticLogs::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -20249,11 +20254,11 @@ - (void)readAttributeMaxNetworksWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)subscribeAttributeMaxNetworksWithParams:(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 = NetworkCommissioning::Attributes::MaxNetworks::TypeInfo; + using TypeInfo = DiagnosticLogs::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -20263,9 +20268,9 @@ - (void)subscribeAttributeMaxNetworksWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMaxNetworksWithClusterStateCache:(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 = NetworkCommissioning::Attributes::MaxNetworks::TypeInfo; + using TypeInfo = DiagnosticLogs::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -20274,9 +20279,9 @@ + (void)readAttributeMaxNetworksWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeNetworksWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::Networks::TypeInfo; + using TypeInfo = DiagnosticLogs::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -20285,11 +20290,11 @@ - (void)readAttributeNetworksWithCompletion:(void (^)(NSArray * _Nullable value, completion:completion]; } -- (void)subscribeAttributeNetworksWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = NetworkCommissioning::Attributes::Networks::TypeInfo; + using TypeInfo = DiagnosticLogs::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -20299,9 +20304,9 @@ - (void)subscribeAttributeNetworksWithParams:(MTRSubscribeParams * _Nonnull)para subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeNetworksWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _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 = NetworkCommissioning::Attributes::Networks::TypeInfo; + using TypeInfo = DiagnosticLogs::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -20310,9 +20315,9 @@ + (void)readAttributeNetworksWithClusterStateCache:(MTRClusterStateCacheContaine completion:completion]; } -- (void)readAttributeScanMaxTimeSecondsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::ScanMaxTimeSeconds::TypeInfo; + using TypeInfo = DiagnosticLogs::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -20321,11 +20326,11 @@ - (void)readAttributeScanMaxTimeSecondsWithCompletion:(void (^)(NSNumber * _Null completion:completion]; } -- (void)subscribeAttributeScanMaxTimeSecondsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _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 = NetworkCommissioning::Attributes::ScanMaxTimeSeconds::TypeInfo; + using TypeInfo = DiagnosticLogs::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -20335,9 +20340,9 @@ - (void)subscribeAttributeScanMaxTimeSecondsWithParams:(MTRSubscribeParams * _No subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeScanMaxTimeSecondsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _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 = NetworkCommissioning::Attributes::ScanMaxTimeSeconds::TypeInfo; + using TypeInfo = DiagnosticLogs::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -20346,9 +20351,9 @@ + (void)readAttributeScanMaxTimeSecondsWithClusterStateCache:(MTRClusterStateCac completion:completion]; } -- (void)readAttributeConnectMaxTimeSecondsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::TypeInfo; + using TypeInfo = DiagnosticLogs::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -20357,11 +20362,11 @@ - (void)readAttributeConnectMaxTimeSecondsWithCompletion:(void (^)(NSNumber * _N completion:completion]; } -- (void)subscribeAttributeConnectMaxTimeSecondsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _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 = NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::TypeInfo; + using TypeInfo = DiagnosticLogs::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -20371,9 +20376,9 @@ - (void)subscribeAttributeConnectMaxTimeSecondsWithParams:(MTRSubscribeParams * subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeConnectMaxTimeSecondsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _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 = NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::TypeInfo; + using TypeInfo = DiagnosticLogs::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -20382,9 +20387,9 @@ + (void)readAttributeConnectMaxTimeSecondsWithClusterStateCache:(MTRClusterState completion:completion]; } -- (void)readAttributeInterfaceEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; + using TypeInfo = DiagnosticLogs::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -20393,134 +20398,286 @@ - (void)readAttributeInterfaceEnabledWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + using TypeInfo = DiagnosticLogs::Attributes::ClusterRevision::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion + ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; + using TypeInfo = DiagnosticLogs::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } +@end - ListFreer listFreer; - using TypeInfo = NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.boolValue; +@implementation MTRBaseClusterDiagnosticLogs (Deprecated) - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); +- (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsRequestParams *)params completionHandler:(void (^)(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self retrieveLogsRequestWithParams:params completion: + ^(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; } -- (void)subscribeAttributeInterfaceEnabledWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [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)readAttributeInterfaceEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (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 { - using TypeInfo = NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [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)readAttributeLastNetworkingStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = NetworkCommissioning::Attributes::LastNetworkingStatus::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeClusterRevisionWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeLastNetworkingStatusWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (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 { - using TypeInfo = NetworkCommissioning::Attributes::LastNetworkingStatus::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + 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); + }]; } -+ (void)readAttributeLastNetworkingStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue { - using TypeInfo = NetworkCommissioning::Attributes::LastNetworkingStatus::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -- (void)readAttributeLastNetworkIDWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterGeneralDiagnostics + +- (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTriggerParams *)params completion:(MTRStatusCompletion)completion { - using TypeInfo = NetworkCommissioning::Attributes::LastNetworkID::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil + if (params == nil) { + params = [[MTRGeneralDiagnosticsClusterTestEventTriggerParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = GeneralDiagnostics::Commands::TestEventTrigger::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:completion]; + completion:responseHandler]; } - -- (void)subscribeAttributeLastNetworkIDWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler +- (void)timeSnapshotWithCompletion:(void (^)(MTRGeneralDiagnosticsClusterTimeSnapshotResponseParams * _Nullable data, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::LastNetworkID::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self timeSnapshotWithParams:nil completion:completion]; } - -+ (void)readAttributeLastNetworkIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion +- (void)timeSnapshotWithParams:(MTRGeneralDiagnosticsClusterTimeSnapshotParams * _Nullable)params completion:(void (^)(MTRGeneralDiagnosticsClusterTimeSnapshotResponseParams * _Nullable data, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::LastNetworkID::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + if (params == nil) { + params = [[MTRGeneralDiagnosticsClusterTimeSnapshotParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = GeneralDiagnostics::Commands::TimeSnapshot::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRGeneralDiagnosticsClusterTimeSnapshotResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -- (void)readAttributeLastConnectErrorValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNetworkInterfacesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::LastConnectErrorValue::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::NetworkInterfaces::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -20529,11 +20686,11 @@ - (void)readAttributeLastConnectErrorValueWithCompletion:(void (^)(NSNumber * _N completion:completion]; } -- (void)subscribeAttributeLastConnectErrorValueWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNetworkInterfacesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = NetworkCommissioning::Attributes::LastConnectErrorValue::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::NetworkInterfaces::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -20543,9 +20700,9 @@ - (void)subscribeAttributeLastConnectErrorValueWithParams:(MTRSubscribeParams * subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLastConnectErrorValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNetworkInterfacesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::LastConnectErrorValue::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::NetworkInterfaces::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -20554,9 +20711,9 @@ + (void)readAttributeLastConnectErrorValueWithClusterStateCache:(MTRClusterState completion:completion]; } -- (void)readAttributeSupportedWiFiBandsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRebootCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::SupportedWiFiBands::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::RebootCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -20565,11 +20722,11 @@ - (void)readAttributeSupportedWiFiBandsWithCompletion:(void (^)(NSArray * _Nulla completion:completion]; } -- (void)subscribeAttributeSupportedWiFiBandsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRebootCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = NetworkCommissioning::Attributes::SupportedWiFiBands::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::RebootCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -20579,9 +20736,9 @@ - (void)subscribeAttributeSupportedWiFiBandsWithParams:(MTRSubscribeParams * _No subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSupportedWiFiBandsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRebootCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::SupportedWiFiBands::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::RebootCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -20590,9 +20747,9 @@ + (void)readAttributeSupportedWiFiBandsWithClusterStateCache:(MTRClusterStateCac completion:completion]; } -- (void)readAttributeSupportedThreadFeaturesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUpTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::SupportedThreadFeatures::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::UpTime::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -20601,11 +20758,11 @@ - (void)readAttributeSupportedThreadFeaturesWithCompletion:(void (^)(NSNumber * completion:completion]; } -- (void)subscribeAttributeSupportedThreadFeaturesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUpTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = NetworkCommissioning::Attributes::SupportedThreadFeatures::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::UpTime::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -20615,9 +20772,9 @@ - (void)subscribeAttributeSupportedThreadFeaturesWithParams:(MTRSubscribeParams subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSupportedThreadFeaturesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeUpTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::SupportedThreadFeatures::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::UpTime::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -20626,9 +20783,9 @@ + (void)readAttributeSupportedThreadFeaturesWithClusterStateCache:(MTRClusterSta completion:completion]; } -- (void)readAttributeThreadVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTotalOperationalHoursWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::ThreadVersion::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::TotalOperationalHours::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -20637,11 +20794,11 @@ - (void)readAttributeThreadVersionWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeThreadVersionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTotalOperationalHoursWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = NetworkCommissioning::Attributes::ThreadVersion::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::TotalOperationalHours::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -20651,9 +20808,9 @@ - (void)subscribeAttributeThreadVersionWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeThreadVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTotalOperationalHoursWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::ThreadVersion::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::TotalOperationalHours::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -20662,9 +20819,9 @@ + (void)readAttributeThreadVersionWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBootReasonWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::BootReason::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -20673,11 +20830,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)subscribeAttributeBootReasonWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = NetworkCommissioning::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::BootReason::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -20687,9 +20844,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)readAttributeBootReasonWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::BootReason::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -20698,9 +20855,9 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActiveHardwareFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::ActiveHardwareFaults::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -20709,11 +20866,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)subscribeAttributeActiveHardwareFaultsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = NetworkCommissioning::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::ActiveHardwareFaults::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -20723,9 +20880,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)readAttributeActiveHardwareFaultsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::ActiveHardwareFaults::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -20734,9 +20891,9 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActiveRadioFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::EventList::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::ActiveRadioFaults::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -20745,11 +20902,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)subscribeAttributeActiveRadioFaultsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = NetworkCommissioning::Attributes::EventList::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::ActiveRadioFaults::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -20759,9 +20916,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)readAttributeActiveRadioFaultsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::EventList::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::ActiveRadioFaults::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -20770,9 +20927,9 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActiveNetworkFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::AttributeList::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::ActiveNetworkFaults::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -20781,11 +20938,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)subscribeAttributeActiveNetworkFaultsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = NetworkCommissioning::Attributes::AttributeList::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::ActiveNetworkFaults::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -20795,9 +20952,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)readAttributeActiveNetworkFaultsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::AttributeList::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::ActiveNetworkFaults::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -20806,9 +20963,9 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTestEventTriggersEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::FeatureMap::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::TestEventTriggersEnabled::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -20817,11 +20974,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)subscribeAttributeTestEventTriggersEnabledWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = NetworkCommissioning::Attributes::FeatureMap::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::TestEventTriggersEnabled::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -20831,9 +20988,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)readAttributeTestEventTriggersEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::FeatureMap::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::TestEventTriggersEnabled::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -20842,9 +20999,9 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = NetworkCommissioning::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -20853,419 +21010,233 @@ - (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)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = NetworkCommissioning::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = GeneralDiagnostics::Attributes::GeneratedCommandList::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 = NetworkCommissioning::Attributes::ClusterRevision::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -@end - -@implementation MTRBaseClusterNetworkCommissioning (Deprecated) - -- (void)scanNetworksWithParams:(MTRNetworkCommissioningClusterScanNetworksParams * _Nullable)params completionHandler:(void (^)(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self scanNetworksWithParams:params completion: - ^(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} -- (void)addOrUpdateWiFiNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams *)params completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self addOrUpdateWiFiNetworkWithParams:params completion: - ^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} -- (void)addOrUpdateThreadNetworkWithParams:(MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams *)params completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self addOrUpdateThreadNetworkWithParams:params completion: - ^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} -- (void)removeNetworkWithParams:(MTRNetworkCommissioningClusterRemoveNetworkParams *)params completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self removeNetworkWithParams:params completion: - ^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} -- (void)connectNetworkWithParams:(MTRNetworkCommissioningClusterConnectNetworkParams *)params completionHandler:(void (^)(MTRNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self connectNetworkWithParams:params completion: - ^(MTRNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} -- (void)reorderNetworkWithParams:(MTRNetworkCommissioningClusterReorderNetworkParams *)params completionHandler:(void (^)(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self reorderNetworkWithParams:params completion: - ^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} - -- (void)readAttributeMaxNetworksWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxNetworksWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeMaxNetworksWithMinInterval:(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 subscribeAttributeMaxNetworksWithParams: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)readAttributeMaxNetworksWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeMaxNetworksWithClusterStateCache: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)readAttributeNetworksWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeNetworksWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeNetworksWithMinInterval:(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 subscribeAttributeNetworksWithParams: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)readAttributeNetworksWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeNetworksWithClusterStateCache: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)readAttributeScanMaxTimeSecondsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeScanMaxTimeSecondsWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeScanMaxTimeSecondsWithMinInterval:(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 subscribeAttributeScanMaxTimeSecondsWithParams: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)readAttributeScanMaxTimeSecondsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeScanMaxTimeSecondsWithClusterStateCache: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)readAttributeConnectMaxTimeSecondsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeConnectMaxTimeSecondsWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeConnectMaxTimeSecondsWithMinInterval:(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 subscribeAttributeConnectMaxTimeSecondsWithParams: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)readAttributeConnectMaxTimeSecondsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeConnectMaxTimeSecondsWithClusterStateCache: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); - }]; + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeInterfaceEnabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeInterfaceEnabledWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = GeneralDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self writeAttributeInterfaceEnabledWithValue:value params:nil completion:completionHandler]; + using TypeInfo = GeneralDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)writeAttributeInterfaceEnabledWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler + +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeInterfaceEnabledWithValue:value params:params completion:completionHandler]; + using TypeInfo = GeneralDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeInterfaceEnabledWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeInterfaceEnabledWithParams: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); - }]; + using TypeInfo = GeneralDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeInterfaceEnabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeInterfaceEnabledWithClusterStateCache: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); - }]; + using TypeInfo = GeneralDiagnostics::Attributes::EventList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeLastNetworkingStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeLastNetworkingStatusWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = GeneralDiagnostics::Attributes::EventList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeLastNetworkingStatusWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeLastNetworkingStatusWithParams: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); - }]; + using TypeInfo = GeneralDiagnostics::Attributes::EventList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeLastNetworkingStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeLastNetworkingStatusWithClusterStateCache: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); - }]; + using TypeInfo = GeneralDiagnostics::Attributes::AttributeList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeLastNetworkIDWithCompletionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeLastNetworkIDWithCompletion: - ^(NSData * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = GeneralDiagnostics::Attributes::AttributeList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeLastNetworkIDWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeLastNetworkIDWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSData * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = GeneralDiagnostics::Attributes::AttributeList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeLastNetworkIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeLastNetworkIDWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSData * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = GeneralDiagnostics::Attributes::FeatureMap::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeLastConnectErrorValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeLastConnectErrorValueWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = GeneralDiagnostics::Attributes::FeatureMap::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeLastConnectErrorValueWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeLastConnectErrorValueWithParams: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); - }]; + using TypeInfo = GeneralDiagnostics::Attributes::FeatureMap::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeLastConnectErrorValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeLastConnectErrorValueWithClusterStateCache: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); - }]; + using TypeInfo = GeneralDiagnostics::Attributes::ClusterRevision::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeGeneratedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = GeneralDiagnostics::Attributes::ClusterRevision::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (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 + ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - 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); - }]; + using TypeInfo = GeneralDiagnostics::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + +@end + +@implementation MTRBaseClusterGeneralDiagnostics (Deprecated) + +- (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTriggerParams *)params completionHandler:(MTRStatusCompletion)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); - }]; + [self testEventTriggerWithParams:params completion: + completionHandler]; } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNetworkInterfacesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAcceptedCommandListWithCompletion: + [self readAttributeNetworkInterfacesWithCompletion: ^(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 +- (void)subscribeAttributeNetworkInterfacesWithMinInterval:(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) { @@ -21274,33 +21245,33 @@ - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnul 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); - }]; + [self subscribeAttributeNetworkInterfacesWithParams: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 ++ (void)readAttributeNetworkInterfacesWithAttributeCache:(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); - }]; + [self readAttributeNetworkInterfacesWithClusterStateCache: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 +- (void)readAttributeRebootCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAttributeListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { + [self readAttributeRebootCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + 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 +- (void)subscribeAttributeRebootCountWithMinInterval:(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) { @@ -21309,33 +21280,33 @@ - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minI 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); - }]; + [self subscribeAttributeRebootCountWithParams: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)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRebootCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _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); - }]; + [self readAttributeRebootCountWithClusterStateCache: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)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeUpTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeFeatureMapWithCompletion: + [self readAttributeUpTimeWithCompletion: ^(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 +- (void)subscribeAttributeUpTimeWithMinInterval:(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) { @@ -21344,33 +21315,33 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte 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); - }]; + [self subscribeAttributeUpTimeWithParams: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 ++ (void)readAttributeUpTimeWithAttributeCache:(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); - }]; + [self readAttributeUpTimeWithClusterStateCache: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 +- (void)readAttributeTotalOperationalHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeClusterRevisionWithCompletion: + [self readAttributeTotalOperationalHoursWithCompletion: ^(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 +- (void)subscribeAttributeTotalOperationalHoursWithMinInterval:(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) { @@ -21379,284 +21350,194 @@ - (void)subscribeAttributeClusterRevisionWithMinInterval:(NSNumber * _Nonnull)mi 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 MTRBaseClusterDiagnosticLogs - -- (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsRequestParams *)params completion:(void (^)(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRDiagnosticLogsClusterRetrieveLogsRequestParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = DiagnosticLogs::Commands::RetrieveLogsRequest::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRDiagnosticLogsClusterRetrieveLogsResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} - -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = DiagnosticLogs::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 = DiagnosticLogs::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 = DiagnosticLogs::Attributes::GeneratedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self subscribeAttributeTotalOperationalHoursWithParams: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)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTotalOperationalHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = DiagnosticLogs::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeTotalOperationalHoursWithClusterStateCache: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)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeBootReasonsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = DiagnosticLogs::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeBootReasonWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeBootReasonsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DiagnosticLogs::Attributes::AcceptedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeBootReasonWithParams: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)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBootReasonsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = DiagnosticLogs::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeBootReasonWithClusterStateCache: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)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeActiveHardwareFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = DiagnosticLogs::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeActiveHardwareFaultsWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeActiveHardwareFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DiagnosticLogs::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeActiveHardwareFaultsWithParams: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)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActiveHardwareFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = DiagnosticLogs::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeActiveHardwareFaultsWithClusterStateCache: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)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeActiveRadioFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = DiagnosticLogs::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeActiveRadioFaultsWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeActiveRadioFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DiagnosticLogs::Attributes::AttributeList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeActiveRadioFaultsWithParams: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)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActiveRadioFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = DiagnosticLogs::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeActiveRadioFaultsWithClusterStateCache: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)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeActiveNetworkFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = DiagnosticLogs::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeActiveNetworkFaultsWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeActiveNetworkFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DiagnosticLogs::Attributes::FeatureMap::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeActiveNetworkFaultsWithParams: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)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActiveNetworkFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = DiagnosticLogs::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeActiveNetworkFaultsWithClusterStateCache: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)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeTestEventTriggersEnabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = DiagnosticLogs::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeTestEventTriggersEnabledWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeTestEventTriggersEnabledWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DiagnosticLogs::Attributes::ClusterRevision::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeTestEventTriggersEnabledWithParams: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); + }]; } - -@end - -@implementation MTRBaseClusterDiagnosticLogs (Deprecated) - -- (void)retrieveLogsRequestWithParams:(MTRDiagnosticLogsClusterRetrieveLogsRequestParams *)params completionHandler:(void (^)(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable data, NSError * _Nullable error))completionHandler ++ (void)readAttributeTestEventTriggersEnabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self retrieveLogsRequestWithParams:params completion: - ^(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; + [self readAttributeTestEventTriggersEnabledWithClusterStateCache: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 @@ -21790,297 +21671,93 @@ - (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInte 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 MTRBaseClusterGeneralDiagnostics - -- (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTriggerParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRGeneralDiagnosticsClusterTestEventTriggerParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = GeneralDiagnostics::Commands::TestEventTrigger::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)timeSnapshotWithCompletion:(void (^)(MTRGeneralDiagnosticsClusterTimeSnapshotResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self timeSnapshotWithParams:nil completion:completion]; -} -- (void)timeSnapshotWithParams:(MTRGeneralDiagnosticsClusterTimeSnapshotParams * _Nullable)params completion:(void (^)(MTRGeneralDiagnosticsClusterTimeSnapshotResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRGeneralDiagnosticsClusterTimeSnapshotParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = GeneralDiagnostics::Commands::TimeSnapshot::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRGeneralDiagnosticsClusterTimeSnapshotResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} - -- (void)readAttributeNetworkInterfacesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = GeneralDiagnostics::Attributes::NetworkInterfaces::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeNetworkInterfacesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = GeneralDiagnostics::Attributes::NetworkInterfaces::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeNetworkInterfacesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = GeneralDiagnostics::Attributes::NetworkInterfaces::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeRebootCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = GeneralDiagnostics::Attributes::RebootCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeRebootCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = GeneralDiagnostics::Attributes::RebootCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeRebootCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = GeneralDiagnostics::Attributes::RebootCount::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeUpTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = GeneralDiagnostics::Attributes::UpTime::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeUpTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = GeneralDiagnostics::Attributes::UpTime::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeUpTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = GeneralDiagnostics::Attributes::UpTime::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [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)readAttributeTotalOperationalHoursWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = GeneralDiagnostics::Attributes::TotalOperationalHours::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeClusterRevisionWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeTotalOperationalHoursWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { - using TypeInfo = GeneralDiagnostics::Attributes::TotalOperationalHours::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + 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)readAttributeTotalOperationalHoursWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = GeneralDiagnostics::Attributes::TotalOperationalHours::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [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); + }]; } -- (void)readAttributeBootReasonWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue { - using TypeInfo = GeneralDiagnostics::Attributes::BootReason::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -- (void)subscribeAttributeBootReasonWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +@end + +@implementation MTRBaseClusterSoftwareDiagnostics + +- (void)resetWatermarksWithCompletion:(MTRStatusCompletion)completion { - using TypeInfo = GeneralDiagnostics::Attributes::BootReason::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self resetWatermarksWithParams:nil completion:completion]; } - -+ (void)readAttributeBootReasonWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksParams * _Nullable)params completion:(MTRStatusCompletion)completion { - using TypeInfo = GeneralDiagnostics::Attributes::BootReason::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + if (params == nil) { + params = [[MTRSoftwareDiagnosticsClusterResetWatermarksParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = SoftwareDiagnostics::Commands::ResetWatermarks::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)readAttributeActiveHardwareFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeThreadMetricsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralDiagnostics::Attributes::ActiveHardwareFaults::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::ThreadMetrics::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -22089,11 +21766,11 @@ - (void)readAttributeActiveHardwareFaultsWithCompletion:(void (^)(NSArray * _Nul completion:completion]; } -- (void)subscribeAttributeActiveHardwareFaultsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeThreadMetricsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GeneralDiagnostics::Attributes::ActiveHardwareFaults::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::ThreadMetrics::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -22103,9 +21780,9 @@ - (void)subscribeAttributeActiveHardwareFaultsWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeActiveHardwareFaultsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeThreadMetricsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralDiagnostics::Attributes::ActiveHardwareFaults::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::ThreadMetrics::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -22114,9 +21791,9 @@ + (void)readAttributeActiveHardwareFaultsWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeActiveRadioFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentHeapFreeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralDiagnostics::Attributes::ActiveRadioFaults::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapFree::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -22125,11 +21802,11 @@ - (void)readAttributeActiveRadioFaultsWithCompletion:(void (^)(NSArray * _Nullab completion:completion]; } -- (void)subscribeAttributeActiveRadioFaultsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentHeapFreeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GeneralDiagnostics::Attributes::ActiveRadioFaults::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapFree::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -22139,9 +21816,9 @@ - (void)subscribeAttributeActiveRadioFaultsWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeActiveRadioFaultsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentHeapFreeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralDiagnostics::Attributes::ActiveRadioFaults::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapFree::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -22150,9 +21827,9 @@ + (void)readAttributeActiveRadioFaultsWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributeActiveNetworkFaultsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentHeapUsedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralDiagnostics::Attributes::ActiveNetworkFaults::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapUsed::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -22161,11 +21838,11 @@ - (void)readAttributeActiveNetworkFaultsWithCompletion:(void (^)(NSArray * _Null completion:completion]; } -- (void)subscribeAttributeActiveNetworkFaultsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentHeapUsedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GeneralDiagnostics::Attributes::ActiveNetworkFaults::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapUsed::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -22175,9 +21852,9 @@ - (void)subscribeAttributeActiveNetworkFaultsWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeActiveNetworkFaultsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentHeapUsedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralDiagnostics::Attributes::ActiveNetworkFaults::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapUsed::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -22186,9 +21863,9 @@ + (void)readAttributeActiveNetworkFaultsWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeTestEventTriggersEnabledWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentHeapHighWatermarkWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralDiagnostics::Attributes::TestEventTriggersEnabled::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -22197,11 +21874,11 @@ - (void)readAttributeTestEventTriggersEnabledWithCompletion:(void (^)(NSNumber * completion:completion]; } -- (void)subscribeAttributeTestEventTriggersEnabledWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeCurrentHeapHighWatermarkWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GeneralDiagnostics::Attributes::TestEventTriggersEnabled::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -22211,9 +21888,9 @@ - (void)subscribeAttributeTestEventTriggersEnabledWithParams:(MTRSubscribeParams subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTestEventTriggersEnabledWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentHeapHighWatermarkWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralDiagnostics::Attributes::TestEventTriggersEnabled::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -22224,7 +21901,7 @@ + (void)readAttributeTestEventTriggersEnabledWithClusterStateCache:(MTRClusterSt - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -22237,7 +21914,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GeneralDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -22249,7 +21926,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 = GeneralDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -22260,7 +21937,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -22273,7 +21950,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GeneralDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -22285,7 +21962,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 = GeneralDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -22296,7 +21973,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralDiagnostics::Attributes::EventList::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -22309,7 +21986,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GeneralDiagnostics::Attributes::EventList::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -22321,7 +21998,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 = GeneralDiagnostics::Attributes::EventList::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -22332,7 +22009,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralDiagnostics::Attributes::AttributeList::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -22345,7 +22022,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GeneralDiagnostics::Attributes::AttributeList::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -22357,7 +22034,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 = GeneralDiagnostics::Attributes::AttributeList::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -22368,7 +22045,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralDiagnostics::Attributes::FeatureMap::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -22381,7 +22058,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GeneralDiagnostics::Attributes::FeatureMap::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -22393,7 +22070,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 = GeneralDiagnostics::Attributes::FeatureMap::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -22404,7 +22081,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GeneralDiagnostics::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -22417,7 +22094,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GeneralDiagnostics::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -22429,7 +22106,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 = GeneralDiagnostics::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = SoftwareDiagnostics::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -22440,96 +22117,30 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterGeneralDiagnostics (Deprecated) - -- (void)testEventTriggerWithParams:(MTRGeneralDiagnosticsClusterTestEventTriggerParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self testEventTriggerWithParams:params completion: - completionHandler]; -} - -- (void)readAttributeNetworkInterfacesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeNetworkInterfacesWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeNetworkInterfacesWithMinInterval:(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 subscribeAttributeNetworkInterfacesWithParams: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)readAttributeNetworkInterfacesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeNetworkInterfacesWithClusterStateCache: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); - }]; -} +@implementation MTRBaseClusterSoftwareDiagnostics (Deprecated) -- (void)readAttributeRebootCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeRebootCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeRebootCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRebootCountWithParams: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); - }]; + [self resetWatermarksWithParams:params completion: + completionHandler]; } -+ (void)readAttributeRebootCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)resetWatermarksWithCompletionHandler:(MTRStatusCompletion)completionHandler { - [self readAttributeRebootCountWithClusterStateCache: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); - }]; + [self resetWatermarksWithParams:nil completionHandler:completionHandler]; } -- (void)readAttributeUpTimeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeThreadMetricsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeUpTimeWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeThreadMetricsWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeUpTimeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeThreadMetricsWithMinInterval:(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) { @@ -22538,33 +22149,33 @@ - (void)subscribeAttributeUpTimeWithMinInterval:(NSNumber * _Nonnull)minInterval subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeUpTimeWithParams: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); - }]; + [self subscribeAttributeThreadMetricsWithParams: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)readAttributeUpTimeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeThreadMetricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeUpTimeWithClusterStateCache: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); - }]; + [self readAttributeThreadMetricsWithClusterStateCache: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)readAttributeTotalOperationalHoursWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeCurrentHeapFreeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeTotalOperationalHoursWithCompletion: + [self readAttributeCurrentHeapFreeWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeTotalOperationalHoursWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentHeapFreeWithMinInterval:(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) { @@ -22573,138 +22184,33 @@ - (void)subscribeAttributeTotalOperationalHoursWithMinInterval:(NSNumber * _Nonn subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeTotalOperationalHoursWithParams: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); - }]; + [self subscribeAttributeCurrentHeapFreeWithParams: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)readAttributeTotalOperationalHoursWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCurrentHeapFreeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeTotalOperationalHoursWithClusterStateCache: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); - }]; + [self readAttributeCurrentHeapFreeWithClusterStateCache: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)readAttributeBootReasonsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeCurrentHeapUsedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeBootReasonWithCompletion: + [self readAttributeCurrentHeapUsedWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeBootReasonsWithMinInterval:(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 subscribeAttributeBootReasonWithParams: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)readAttributeBootReasonsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeBootReasonWithClusterStateCache: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)readAttributeActiveHardwareFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeActiveHardwareFaultsWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeActiveHardwareFaultsWithMinInterval:(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 subscribeAttributeActiveHardwareFaultsWithParams: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)readAttributeActiveHardwareFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeActiveHardwareFaultsWithClusterStateCache: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)readAttributeActiveRadioFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeActiveRadioFaultsWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeActiveRadioFaultsWithMinInterval:(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 subscribeAttributeActiveRadioFaultsWithParams: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)readAttributeActiveRadioFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeActiveRadioFaultsWithClusterStateCache: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)readAttributeActiveNetworkFaultsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeActiveNetworkFaultsWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeActiveNetworkFaultsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentHeapUsedWithMinInterval:(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) { @@ -22713,30 +22219,30 @@ - (void)subscribeAttributeActiveNetworkFaultsWithMinInterval:(NSNumber * _Nonnul subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeActiveNetworkFaultsWithParams: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); - }]; + [self subscribeAttributeCurrentHeapUsedWithParams: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)readAttributeActiveNetworkFaultsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCurrentHeapUsedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeActiveNetworkFaultsWithClusterStateCache: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); - }]; + [self readAttributeCurrentHeapUsedWithClusterStateCache: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)readAttributeTestEventTriggersEnabledWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeCurrentHeapHighWatermarkWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeTestEventTriggersEnabledWithCompletion: + [self readAttributeCurrentHeapHighWatermarkWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeTestEventTriggersEnabledWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)subscribeAttributeCurrentHeapHighWatermarkWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -22748,15 +22254,15 @@ - (void)subscribeAttributeTestEventTriggersEnabledWithMinInterval:(NSNumber * _N subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeTestEventTriggersEnabledWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + [self subscribeAttributeCurrentHeapHighWatermarkWithParams: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)readAttributeTestEventTriggersEnabledWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCurrentHeapHighWatermarkWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeTestEventTriggersEnabledWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + [self readAttributeCurrentHeapHighWatermarkWithClusterStateCache: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); @@ -22947,16 +22453,16 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device @end -@implementation MTRBaseClusterSoftwareDiagnostics +@implementation MTRBaseClusterThreadNetworkDiagnostics -- (void)resetWatermarksWithCompletion:(MTRStatusCompletion)completion +- (void)resetCountsWithCompletion:(MTRStatusCompletion)completion { - [self resetWatermarksWithParams:nil completion:completion]; + [self resetCountsWithParams:nil completion:completion]; } -- (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsParams * _Nullable)params completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRSoftwareDiagnosticsClusterResetWatermarksParams + params = [[MTRThreadNetworkDiagnosticsClusterResetCountsParams alloc] init]; } @@ -22966,7 +22472,7 @@ - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksP auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = SoftwareDiagnostics::Commands::ResetWatermarks::Type; + using RequestType = ThreadNetworkDiagnostics::Commands::ResetCounts::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -22978,9 +22484,9 @@ - (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksP completion:responseHandler]; } -- (void)readAttributeThreadMetricsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeChannelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SoftwareDiagnostics::Attributes::ThreadMetrics::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::Channel::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -22989,11 +22495,11 @@ - (void)readAttributeThreadMetricsWithCompletion:(void (^)(NSArray * _Nullable v completion:completion]; } -- (void)subscribeAttributeThreadMetricsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeChannelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SoftwareDiagnostics::Attributes::ThreadMetrics::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::Channel::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -23003,9 +22509,9 @@ - (void)subscribeAttributeThreadMetricsWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeThreadMetricsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeChannelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SoftwareDiagnostics::Attributes::ThreadMetrics::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::Channel::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -23014,9 +22520,9 @@ + (void)readAttributeThreadMetricsWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeCurrentHeapFreeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRoutingRoleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapFree::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RoutingRole::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -23025,11 +22531,11 @@ - (void)readAttributeCurrentHeapFreeWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeCurrentHeapFreeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRoutingRoleWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapFree::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RoutingRole::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -23039,9 +22545,9 @@ - (void)subscribeAttributeCurrentHeapFreeWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCurrentHeapFreeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRoutingRoleWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapFree::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RoutingRole::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -23050,9 +22556,9 @@ + (void)readAttributeCurrentHeapFreeWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -- (void)readAttributeCurrentHeapUsedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNetworkNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapUsed::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::NetworkName::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -23061,11 +22567,11 @@ - (void)readAttributeCurrentHeapUsedWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeCurrentHeapUsedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNetworkNameWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapUsed::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::NetworkName::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -23075,9 +22581,9 @@ - (void)subscribeAttributeCurrentHeapUsedWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCurrentHeapUsedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNetworkNameWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapUsed::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::NetworkName::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -23086,9 +22592,9 @@ + (void)readAttributeCurrentHeapUsedWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -- (void)readAttributeCurrentHeapHighWatermarkWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePanIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PanId::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -23097,11 +22603,11 @@ - (void)readAttributeCurrentHeapHighWatermarkWithCompletion:(void (^)(NSNumber * completion:completion]; } -- (void)subscribeAttributeCurrentHeapHighWatermarkWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePanIdWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PanId::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -23111,9 +22617,9 @@ - (void)subscribeAttributeCurrentHeapHighWatermarkWithParams:(MTRSubscribeParams subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCurrentHeapHighWatermarkWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePanIdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PanId::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -23122,9 +22628,9 @@ + (void)readAttributeCurrentHeapHighWatermarkWithClusterStateCache:(MTRClusterSt completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeExtendedPanIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SoftwareDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ExtendedPanId::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -23133,11 +22639,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)subscribeAttributeExtendedPanIdWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SoftwareDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ExtendedPanId::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -23147,9 +22653,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)readAttributeExtendedPanIdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SoftwareDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ExtendedPanId::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -23158,9 +22664,9 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMeshLocalPrefixWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SoftwareDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -23169,11 +22675,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)subscribeAttributeMeshLocalPrefixWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SoftwareDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -23183,9 +22689,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)readAttributeMeshLocalPrefixWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SoftwareDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -23194,9 +22700,9 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOverrunCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SoftwareDiagnostics::Attributes::EventList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -23205,11 +22711,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)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SoftwareDiagnostics::Attributes::EventList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -23219,9 +22725,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)readAttributeOverrunCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SoftwareDiagnostics::Attributes::EventList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -23230,9 +22736,9 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNeighborTableWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SoftwareDiagnostics::Attributes::AttributeList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::NeighborTable::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -23241,11 +22747,11 @@ - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable v completion:completion]; } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeNeighborTableWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SoftwareDiagnostics::Attributes::AttributeList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::NeighborTable::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -23255,9 +22761,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)readAttributeNeighborTableWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SoftwareDiagnostics::Attributes::AttributeList::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::NeighborTable::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -23266,9 +22772,9 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRouteTableWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SoftwareDiagnostics::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouteTable::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -23277,11 +22783,11 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeRouteTableWithParams:(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 = SoftwareDiagnostics::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouteTable::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -23291,9 +22797,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)readAttributeRouteTableWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SoftwareDiagnostics::Attributes::FeatureMap::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouteTable::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -23302,9 +22808,9 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePartitionIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SoftwareDiagnostics::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionId::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -23313,11 +22819,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)subscribeAttributePartitionIdWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SoftwareDiagnostics::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionId::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -23327,9 +22833,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)readAttributePartitionIdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SoftwareDiagnostics::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionId::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -23338,378 +22844,477 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -@end +- (void)readAttributeWeightingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ThreadNetworkDiagnostics::Attributes::Weighting::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} -@implementation MTRBaseClusterSoftwareDiagnostics (Deprecated) +- (void)subscribeAttributeWeightingWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ThreadNetworkDiagnostics::Attributes::Weighting::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} -- (void)resetWatermarksWithParams:(MTRSoftwareDiagnosticsClusterResetWatermarksParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler ++ (void)readAttributeWeightingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self resetWatermarksWithParams:params completion: - completionHandler]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::Weighting::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)resetWatermarksWithCompletionHandler:(MTRStatusCompletion)completionHandler + +- (void)readAttributeDataVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self resetWatermarksWithParams:nil completionHandler:completionHandler]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::DataVersion::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeThreadMetricsWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeDataVersionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeThreadMetricsWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::DataVersion::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeThreadMetricsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeDataVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeThreadMetricsWithParams: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); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::DataVersion::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeThreadMetricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeStableDataVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeThreadMetricsWithClusterStateCache: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); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::StableDataVersion::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeCurrentHeapFreeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeStableDataVersionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeCurrentHeapFreeWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::StableDataVersion::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeCurrentHeapFreeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeStableDataVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeCurrentHeapFreeWithParams: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); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::StableDataVersion::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeCurrentHeapFreeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeLeaderRouterIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeCurrentHeapFreeWithClusterStateCache: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); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRouterId::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeCurrentHeapUsedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeLeaderRouterIdWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeCurrentHeapUsedWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRouterId::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeCurrentHeapUsedWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeLeaderRouterIdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeCurrentHeapUsedWithParams: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); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRouterId::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeCurrentHeapUsedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeDetachedRoleCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeCurrentHeapUsedWithClusterStateCache: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); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeCurrentHeapHighWatermarkWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeDetachedRoleCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeCurrentHeapHighWatermarkWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)subscribeAttributeCurrentHeapHighWatermarkWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + ++ (void)readAttributeDetachedRoleCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeCurrentHeapHighWatermarkWithParams: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); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeCurrentHeapHighWatermarkWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeChildRoleCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeCurrentHeapHighWatermarkWithClusterStateCache: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); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChildRoleCount::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeChildRoleCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeGeneratedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChildRoleCount::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (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 + ++ (void)readAttributeChildRoleCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - 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); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChildRoleCount::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeRouterRoleCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [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); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouterRoleCount::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeRouterRoleCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeAcceptedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouterRoleCount::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (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 + ++ (void)readAttributeRouterRoleCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - 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); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouterRoleCount::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeLeaderRoleCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [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); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeLeaderRoleCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeAttributeListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (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 + ++ (void)readAttributeLeaderRoleCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - 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); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeAttachAttemptCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [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); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeAttachAttemptCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeFeatureMapWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (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 + ++ (void)readAttributeAttachAttemptCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - 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); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributePartitionIdChangeCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [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); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributePartitionIdChangeCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeClusterRevisionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (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 + ++ (void)readAttributePartitionIdChangeCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - 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); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeBetterPartitionAttachAttemptCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [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); - }]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue +- (void)subscribeAttributeBetterPartitionAttachAttemptCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -@end ++ (void)readAttributeBetterPartitionAttachAttemptCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} -@implementation MTRBaseClusterThreadNetworkDiagnostics +- (void)readAttributeParentChangeCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ParentChangeCount::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} -- (void)resetCountsWithCompletion:(MTRStatusCompletion)completion +- (void)subscribeAttributeParentChangeCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self resetCountsWithParams:nil completion:completion]; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ParentChangeCount::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsParams * _Nullable)params completion:(MTRStatusCompletion)completion + ++ (void)readAttributeParentChangeCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - if (params == nil) { - params = [[MTRThreadNetworkDiagnosticsClusterResetCountsParams - alloc] init]; - } + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ParentChangeCount::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; +- (void)readAttributeTxTotalCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxTotalCount::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; +- (void)subscribeAttributeTxTotalCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxTotalCount::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} - using RequestType = ThreadNetworkDiagnostics::Commands::ResetCounts::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)readAttributeTxTotalCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxTotalCount::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeChannelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxUnicastCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::Channel::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxUnicastCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -23718,11 +23323,11 @@ - (void)readAttributeChannelWithCompletion:(void (^)(NSNumber * _Nullable value, completion:completion]; } -- (void)subscribeAttributeChannelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxUnicastCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::Channel::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxUnicastCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -23732,9 +23337,9 @@ - (void)subscribeAttributeChannelWithParams:(MTRSubscribeParams * _Nonnull)param subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeChannelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxUnicastCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::Channel::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxUnicastCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -23743,9 +23348,9 @@ + (void)readAttributeChannelWithClusterStateCache:(MTRClusterStateCacheContainer completion:completion]; } -- (void)readAttributeRoutingRoleWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxBroadcastCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RoutingRole::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -23754,11 +23359,11 @@ - (void)readAttributeRoutingRoleWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)subscribeAttributeRoutingRoleWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxBroadcastCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RoutingRole::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -23768,9 +23373,9 @@ - (void)subscribeAttributeRoutingRoleWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRoutingRoleWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxBroadcastCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RoutingRole::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -23779,9 +23384,9 @@ + (void)readAttributeRoutingRoleWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeNetworkNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxAckRequestedCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::NetworkName::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -23790,11 +23395,11 @@ - (void)readAttributeNetworkNameWithCompletion:(void (^)(NSString * _Nullable va completion:completion]; } -- (void)subscribeAttributeNetworkNameWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxAckRequestedCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::NetworkName::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -23804,9 +23409,9 @@ - (void)subscribeAttributeNetworkNameWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeNetworkNameWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxAckRequestedCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::NetworkName::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -23815,9 +23420,9 @@ + (void)readAttributeNetworkNameWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributePanIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxAckedCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PanId::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckedCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -23826,11 +23431,11 @@ - (void)readAttributePanIdWithCompletion:(void (^)(NSNumber * _Nullable value, N completion:completion]; } -- (void)subscribeAttributePanIdWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxAckedCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PanId::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckedCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -23840,9 +23445,9 @@ - (void)subscribeAttributePanIdWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePanIdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxAckedCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PanId::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckedCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -23851,9 +23456,9 @@ + (void)readAttributePanIdWithClusterStateCache:(MTRClusterStateCacheContainer * completion:completion]; } -- (void)readAttributeExtendedPanIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxNoAckRequestedCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ExtendedPanId::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -23862,11 +23467,11 @@ - (void)readAttributeExtendedPanIdWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeExtendedPanIdWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxNoAckRequestedCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ExtendedPanId::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -23876,9 +23481,9 @@ - (void)subscribeAttributeExtendedPanIdWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeExtendedPanIdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxNoAckRequestedCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ExtendedPanId::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -23887,9 +23492,9 @@ + (void)readAttributeExtendedPanIdWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeMeshLocalPrefixWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxDataCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -23898,11 +23503,11 @@ - (void)readAttributeMeshLocalPrefixWithCompletion:(void (^)(NSData * _Nullable completion:completion]; } -- (void)subscribeAttributeMeshLocalPrefixWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxDataCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -23912,9 +23517,9 @@ - (void)subscribeAttributeMeshLocalPrefixWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMeshLocalPrefixWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxDataCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -23923,9 +23528,9 @@ + (void)readAttributeMeshLocalPrefixWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -- (void)readAttributeOverrunCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxDataPollCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataPollCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -23934,11 +23539,11 @@ - (void)readAttributeOverrunCountWithCompletion:(void (^)(NSNumber * _Nullable v completion:completion]; } -- (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxDataPollCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataPollCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -23948,9 +23553,9 @@ - (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOverrunCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxDataPollCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataPollCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -23959,9 +23564,9 @@ + (void)readAttributeOverrunCountWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } -- (void)readAttributeNeighborTableWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxBeaconCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::NeighborTable::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -23970,11 +23575,11 @@ - (void)readAttributeNeighborTableWithCompletion:(void (^)(NSArray * _Nullable v completion:completion]; } -- (void)subscribeAttributeNeighborTableWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeTxBeaconCountWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::NeighborTable::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -23984,9 +23589,9 @@ - (void)subscribeAttributeNeighborTableWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeNeighborTableWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxBeaconCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::NeighborTable::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -23995,9 +23600,9 @@ + (void)readAttributeNeighborTableWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeRouteTableWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxBeaconRequestCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouteTable::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24006,11 +23611,11 @@ - (void)readAttributeRouteTableWithCompletion:(void (^)(NSArray * _Nullable valu completion:completion]; } -- (void)subscribeAttributeRouteTableWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxBeaconRequestCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouteTable::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24020,9 +23625,9 @@ - (void)subscribeAttributeRouteTableWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRouteTableWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxBeaconRequestCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouteTable::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -24031,9 +23636,9 @@ + (void)readAttributeRouteTableWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributePartitionIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxOtherCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionId::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxOtherCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24042,11 +23647,11 @@ - (void)readAttributePartitionIdWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)subscribeAttributePartitionIdWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxOtherCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionId::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxOtherCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24056,9 +23661,9 @@ - (void)subscribeAttributePartitionIdWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePartitionIdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxOtherCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionId::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxOtherCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -24067,9 +23672,9 @@ + (void)readAttributePartitionIdWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeWeightingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxRetryCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::Weighting::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxRetryCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24078,11 +23683,11 @@ - (void)readAttributeWeightingWithCompletion:(void (^)(NSNumber * _Nullable valu completion:completion]; } -- (void)subscribeAttributeWeightingWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxRetryCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::Weighting::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxRetryCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24092,9 +23697,9 @@ - (void)subscribeAttributeWeightingWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeWeightingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxRetryCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::Weighting::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxRetryCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -24103,9 +23708,9 @@ + (void)readAttributeWeightingWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeDataVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxDirectMaxRetryExpiryCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::DataVersion::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24114,11 +23719,11 @@ - (void)readAttributeDataVersionWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)subscribeAttributeDataVersionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxDirectMaxRetryExpiryCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::DataVersion::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24128,9 +23733,9 @@ - (void)subscribeAttributeDataVersionWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeDataVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxDirectMaxRetryExpiryCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::DataVersion::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -24139,9 +23744,9 @@ + (void)readAttributeDataVersionWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeStableDataVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxIndirectMaxRetryExpiryCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::StableDataVersion::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24150,11 +23755,11 @@ - (void)readAttributeStableDataVersionWithCompletion:(void (^)(NSNumber * _Nulla completion:completion]; } -- (void)subscribeAttributeStableDataVersionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxIndirectMaxRetryExpiryCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::StableDataVersion::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24164,9 +23769,9 @@ - (void)subscribeAttributeStableDataVersionWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeStableDataVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxIndirectMaxRetryExpiryCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::StableDataVersion::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -24175,9 +23780,9 @@ + (void)readAttributeStableDataVersionWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributeLeaderRouterIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxErrCcaCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRouterId::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24186,11 +23791,11 @@ - (void)readAttributeLeaderRouterIdWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeLeaderRouterIdWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxErrCcaCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRouterId::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24200,9 +23805,9 @@ - (void)subscribeAttributeLeaderRouterIdWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLeaderRouterIdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxErrCcaCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRouterId::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -24211,9 +23816,9 @@ + (void)readAttributeLeaderRouterIdWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } -- (void)readAttributeDetachedRoleCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxErrAbortCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24222,11 +23827,11 @@ - (void)readAttributeDetachedRoleCountWithCompletion:(void (^)(NSNumber * _Nulla completion:completion]; } -- (void)subscribeAttributeDetachedRoleCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxErrAbortCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24236,9 +23841,9 @@ - (void)subscribeAttributeDetachedRoleCountWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeDetachedRoleCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxErrAbortCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -24247,9 +23852,9 @@ + (void)readAttributeDetachedRoleCountWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributeChildRoleCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxErrBusyChannelCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChildRoleCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24258,11 +23863,11 @@ - (void)readAttributeChildRoleCountWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeChildRoleCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxErrBusyChannelCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChildRoleCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24272,9 +23877,9 @@ - (void)subscribeAttributeChildRoleCountWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeChildRoleCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxErrBusyChannelCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChildRoleCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -24283,9 +23888,9 @@ + (void)readAttributeChildRoleCountWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } -- (void)readAttributeRouterRoleCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxTotalCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouterRoleCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxTotalCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24294,11 +23899,11 @@ - (void)readAttributeRouterRoleCountWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeRouterRoleCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxTotalCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouterRoleCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxTotalCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24308,9 +23913,9 @@ - (void)subscribeAttributeRouterRoleCountWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRouterRoleCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxTotalCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RouterRoleCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxTotalCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -24319,9 +23924,9 @@ + (void)readAttributeRouterRoleCountWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -- (void)readAttributeLeaderRoleCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxUnicastCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxUnicastCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24330,11 +23935,11 @@ - (void)readAttributeLeaderRoleCountWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeLeaderRoleCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxUnicastCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxUnicastCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24344,9 +23949,9 @@ - (void)subscribeAttributeLeaderRoleCountWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLeaderRoleCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxUnicastCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxUnicastCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -24355,9 +23960,9 @@ + (void)readAttributeLeaderRoleCountWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -- (void)readAttributeAttachAttemptCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxBroadcastCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24366,11 +23971,11 @@ - (void)readAttributeAttachAttemptCountWithCompletion:(void (^)(NSNumber * _Null completion:completion]; } -- (void)subscribeAttributeAttachAttemptCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxBroadcastCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24380,9 +23985,9 @@ - (void)subscribeAttributeAttachAttemptCountWithParams:(MTRSubscribeParams * _No subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAttachAttemptCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxBroadcastCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -24391,9 +23996,9 @@ + (void)readAttributeAttachAttemptCountWithClusterStateCache:(MTRClusterStateCac completion:completion]; } -- (void)readAttributePartitionIdChangeCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxDataCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24402,11 +24007,11 @@ - (void)readAttributePartitionIdChangeCountWithCompletion:(void (^)(NSNumber * _ completion:completion]; } -- (void)subscribeAttributePartitionIdChangeCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxDataCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24416,9 +24021,9 @@ - (void)subscribeAttributePartitionIdChangeCountWithParams:(MTRSubscribeParams * subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePartitionIdChangeCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxDataCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -24427,9 +24032,9 @@ + (void)readAttributePartitionIdChangeCountWithClusterStateCache:(MTRClusterStat completion:completion]; } -- (void)readAttributeBetterPartitionAttachAttemptCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxDataPollCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataPollCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24438,11 +24043,11 @@ - (void)readAttributeBetterPartitionAttachAttemptCountWithCompletion:(void (^)(N completion:completion]; } -- (void)subscribeAttributeBetterPartitionAttachAttemptCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxDataPollCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataPollCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24452,9 +24057,9 @@ - (void)subscribeAttributeBetterPartitionAttachAttemptCountWithParams:(MTRSubscr subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeBetterPartitionAttachAttemptCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxDataPollCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataPollCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -24463,9 +24068,9 @@ + (void)readAttributeBetterPartitionAttachAttemptCountWithClusterStateCache:(MTR completion:completion]; } -- (void)readAttributeParentChangeCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxBeaconCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ParentChangeCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24474,11 +24079,11 @@ - (void)readAttributeParentChangeCountWithCompletion:(void (^)(NSNumber * _Nulla completion:completion]; } -- (void)subscribeAttributeParentChangeCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxBeaconCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ParentChangeCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24488,9 +24093,9 @@ - (void)subscribeAttributeParentChangeCountWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeParentChangeCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxBeaconCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ParentChangeCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -24499,9 +24104,9 @@ + (void)readAttributeParentChangeCountWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributeTxTotalCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxBeaconRequestCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxTotalCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24510,11 +24115,11 @@ - (void)readAttributeTxTotalCountWithCompletion:(void (^)(NSNumber * _Nullable v completion:completion]; } -- (void)subscribeAttributeTxTotalCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxBeaconRequestCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxTotalCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24524,9 +24129,9 @@ - (void)subscribeAttributeTxTotalCountWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTxTotalCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxBeaconRequestCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxTotalCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -24535,9 +24140,9 @@ + (void)readAttributeTxTotalCountWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } -- (void)readAttributeTxUnicastCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxOtherCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxUnicastCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxOtherCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24546,11 +24151,11 @@ - (void)readAttributeTxUnicastCountWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeTxUnicastCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxOtherCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxUnicastCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxOtherCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24560,9 +24165,9 @@ - (void)subscribeAttributeTxUnicastCountWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTxUnicastCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxOtherCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxUnicastCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxOtherCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -24571,9 +24176,9 @@ + (void)readAttributeTxUnicastCountWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } -- (void)readAttributeTxBroadcastCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxAddressFilteredCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24582,11 +24187,11 @@ - (void)readAttributeTxBroadcastCountWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)subscribeAttributeTxBroadcastCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxAddressFilteredCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24596,9 +24201,9 @@ - (void)subscribeAttributeTxBroadcastCountWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTxBroadcastCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxAddressFilteredCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -24607,9 +24212,9 @@ + (void)readAttributeTxBroadcastCountWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeTxAckRequestedCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxDestAddrFilteredCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24618,11 +24223,11 @@ - (void)readAttributeTxAckRequestedCountWithCompletion:(void (^)(NSNumber * _Nul completion:completion]; } -- (void)subscribeAttributeTxAckRequestedCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxDestAddrFilteredCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24632,9 +24237,9 @@ - (void)subscribeAttributeTxAckRequestedCountWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTxAckRequestedCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxDestAddrFilteredCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -24643,9 +24248,9 @@ + (void)readAttributeTxAckRequestedCountWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeTxAckedCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxDuplicatedCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckedCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24654,11 +24259,11 @@ - (void)readAttributeTxAckedCountWithCompletion:(void (^)(NSNumber * _Nullable v completion:completion]; } -- (void)subscribeAttributeTxAckedCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxDuplicatedCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckedCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24668,9 +24273,9 @@ - (void)subscribeAttributeTxAckedCountWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTxAckedCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxDuplicatedCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxAckedCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -24679,9 +24284,9 @@ + (void)readAttributeTxAckedCountWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } -- (void)readAttributeTxNoAckRequestedCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxErrNoFrameCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24690,11 +24295,11 @@ - (void)readAttributeTxNoAckRequestedCountWithCompletion:(void (^)(NSNumber * _N completion:completion]; } -- (void)subscribeAttributeTxNoAckRequestedCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxErrNoFrameCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24704,9 +24309,9 @@ - (void)subscribeAttributeTxNoAckRequestedCountWithParams:(MTRSubscribeParams * subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTxNoAckRequestedCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxErrNoFrameCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -24715,9 +24320,9 @@ + (void)readAttributeTxNoAckRequestedCountWithClusterStateCache:(MTRClusterState completion:completion]; } -- (void)readAttributeTxDataCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxErrUnknownNeighborCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24726,11 +24331,11 @@ - (void)readAttributeTxDataCountWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)subscribeAttributeTxDataCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxErrUnknownNeighborCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24740,9 +24345,9 @@ - (void)subscribeAttributeTxDataCountWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTxDataCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxErrUnknownNeighborCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -24751,9 +24356,9 @@ + (void)readAttributeTxDataCountWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeTxDataPollCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxErrInvalidSrcAddrCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataPollCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24762,11 +24367,11 @@ - (void)readAttributeTxDataPollCountWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeTxDataPollCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxErrInvalidSrcAddrCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataPollCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24776,9 +24381,9 @@ - (void)subscribeAttributeTxDataPollCountWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTxDataPollCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxErrInvalidSrcAddrCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDataPollCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -24787,9 +24392,9 @@ + (void)readAttributeTxDataPollCountWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -- (void)readAttributeTxBeaconCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxErrSecCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrSecCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24798,11 +24403,11 @@ - (void)readAttributeTxBeaconCountWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeTxBeaconCountWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeRxErrSecCountWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrSecCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24812,9 +24417,9 @@ - (void)subscribeAttributeTxBeaconCountWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTxBeaconCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxErrSecCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrSecCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -24823,9 +24428,9 @@ + (void)readAttributeTxBeaconCountWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeTxBeaconRequestCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxErrFcsCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24834,11 +24439,11 @@ - (void)readAttributeTxBeaconRequestCountWithCompletion:(void (^)(NSNumber * _Nu completion:completion]; } -- (void)subscribeAttributeTxBeaconRequestCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxErrFcsCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24848,9 +24453,9 @@ - (void)subscribeAttributeTxBeaconRequestCountWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTxBeaconRequestCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxErrFcsCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -24859,9 +24464,9 @@ + (void)readAttributeTxBeaconRequestCountWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeTxOtherCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRxErrOtherCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxOtherCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24870,11 +24475,11 @@ - (void)readAttributeTxOtherCountWithCompletion:(void (^)(NSNumber * _Nullable v completion:completion]; } -- (void)subscribeAttributeTxOtherCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxErrOtherCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxOtherCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24884,9 +24489,9 @@ - (void)subscribeAttributeTxOtherCountWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTxOtherCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRxErrOtherCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxOtherCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -24895,9 +24500,9 @@ + (void)readAttributeTxOtherCountWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } -- (void)readAttributeTxRetryCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActiveTimestampWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxRetryCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24906,11 +24511,11 @@ - (void)readAttributeTxRetryCountWithCompletion:(void (^)(NSNumber * _Nullable v completion:completion]; } -- (void)subscribeAttributeTxRetryCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActiveTimestampWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxRetryCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24920,9 +24525,9 @@ - (void)subscribeAttributeTxRetryCountWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTxRetryCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActiveTimestampWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxRetryCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -24931,9 +24536,9 @@ + (void)readAttributeTxRetryCountWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } -- (void)readAttributeTxDirectMaxRetryExpiryCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePendingTimestampWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PendingTimestamp::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24942,11 +24547,11 @@ - (void)readAttributeTxDirectMaxRetryExpiryCountWithCompletion:(void (^)(NSNumbe completion:completion]; } -- (void)subscribeAttributeTxDirectMaxRetryExpiryCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePendingTimestampWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PendingTimestamp::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24956,9 +24561,9 @@ - (void)subscribeAttributeTxDirectMaxRetryExpiryCountWithParams:(MTRSubscribePar subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTxDirectMaxRetryExpiryCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePendingTimestampWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::PendingTimestamp::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -24967,9 +24572,9 @@ + (void)readAttributeTxDirectMaxRetryExpiryCountWithClusterStateCache:(MTRCluste completion:completion]; } -- (void)readAttributeTxIndirectMaxRetryExpiryCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDelayWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::Delay::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24978,11 +24583,11 @@ - (void)readAttributeTxIndirectMaxRetryExpiryCountWithCompletion:(void (^)(NSNum completion:completion]; } -- (void)subscribeAttributeTxIndirectMaxRetryExpiryCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDelayWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::Delay::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -24992,9 +24597,9 @@ - (void)subscribeAttributeTxIndirectMaxRetryExpiryCountWithParams:(MTRSubscribeP subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTxIndirectMaxRetryExpiryCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDelayWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::Delay::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -25003,9 +24608,9 @@ + (void)readAttributeTxIndirectMaxRetryExpiryCountWithClusterStateCache:(MTRClus completion:completion]; } -- (void)readAttributeTxErrCcaCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSecurityPolicyWithCompletion:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::SecurityPolicy::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -25014,11 +24619,11 @@ - (void)readAttributeTxErrCcaCountWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeTxErrCcaCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSecurityPolicyWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::SecurityPolicy::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -25028,9 +24633,9 @@ - (void)subscribeAttributeTxErrCcaCountWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTxErrCcaCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSecurityPolicyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::SecurityPolicy::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -25039,9 +24644,9 @@ + (void)readAttributeTxErrCcaCountWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeTxErrAbortCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeChannelPage0MaskWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChannelPage0Mask::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -25050,11 +24655,11 @@ - (void)readAttributeTxErrAbortCountWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeTxErrAbortCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeChannelPage0MaskWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChannelPage0Mask::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -25064,9 +24669,9 @@ - (void)subscribeAttributeTxErrAbortCountWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTxErrAbortCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeChannelPage0MaskWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChannelPage0Mask::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -25075,9 +24680,9 @@ + (void)readAttributeTxErrAbortCountWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -- (void)readAttributeTxErrBusyChannelCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOperationalDatasetComponentsWithCompletion:(void (^)(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -25086,11 +24691,11 @@ - (void)readAttributeTxErrBusyChannelCountWithCompletion:(void (^)(NSNumber * _N completion:completion]; } -- (void)subscribeAttributeTxErrBusyChannelCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOperationalDatasetComponentsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -25100,9 +24705,9 @@ - (void)subscribeAttributeTxErrBusyChannelCountWithParams:(MTRSubscribeParams * subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTxErrBusyChannelCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOperationalDatasetComponentsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -25111,9 +24716,9 @@ + (void)readAttributeTxErrBusyChannelCountWithClusterStateCache:(MTRClusterState completion:completion]; } -- (void)readAttributeRxTotalCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActiveNetworkFaultsListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxTotalCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -25122,11 +24727,11 @@ - (void)readAttributeRxTotalCountWithCompletion:(void (^)(NSNumber * _Nullable v completion:completion]; } -- (void)subscribeAttributeRxTotalCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActiveNetworkFaultsListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxTotalCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -25136,9 +24741,9 @@ - (void)subscribeAttributeRxTotalCountWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRxTotalCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActiveNetworkFaultsListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxTotalCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -25147,9 +24752,9 @@ + (void)readAttributeRxTotalCountWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } -- (void)readAttributeRxUnicastCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxUnicastCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -25158,11 +24763,11 @@ - (void)readAttributeRxUnicastCountWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeRxUnicastCountWithParams:(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 = ThreadNetworkDiagnostics::Attributes::RxUnicastCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -25172,9 +24777,9 @@ - (void)subscribeAttributeRxUnicastCountWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRxUnicastCountWithClusterStateCache:(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 = ThreadNetworkDiagnostics::Attributes::RxUnicastCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -25183,9 +24788,9 @@ + (void)readAttributeRxUnicastCountWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } -- (void)readAttributeRxBroadcastCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -25194,11 +24799,11 @@ - (void)readAttributeRxBroadcastCountWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)subscribeAttributeRxBroadcastCountWithParams:(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 = ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -25208,9 +24813,9 @@ - (void)subscribeAttributeRxBroadcastCountWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRxBroadcastCountWithClusterStateCache:(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 = ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -25219,9 +24824,9 @@ + (void)readAttributeRxBroadcastCountWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeRxDataCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -25230,11 +24835,11 @@ - (void)readAttributeRxDataCountWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)subscribeAttributeRxDataCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -25244,9 +24849,9 @@ - (void)subscribeAttributeRxDataCountWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRxDataCountWithClusterStateCache:(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 = ThreadNetworkDiagnostics::Attributes::RxDataCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -25255,9 +24860,9 @@ + (void)readAttributeRxDataCountWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeRxDataPollCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDataPollCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -25266,11 +24871,11 @@ - (void)readAttributeRxDataPollCountWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeRxDataPollCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _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 = ThreadNetworkDiagnostics::Attributes::RxDataPollCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -25280,9 +24885,9 @@ - (void)subscribeAttributeRxDataPollCountWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRxDataPollCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _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 = ThreadNetworkDiagnostics::Attributes::RxDataPollCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -25291,9 +24896,9 @@ + (void)readAttributeRxDataPollCountWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -- (void)readAttributeRxBeaconCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -25302,11 +24907,11 @@ - (void)readAttributeRxBeaconCountWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeRxBeaconCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _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 = ThreadNetworkDiagnostics::Attributes::RxBeaconCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -25316,9 +24921,9 @@ - (void)subscribeAttributeRxBeaconCountWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRxBeaconCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _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 = ThreadNetworkDiagnostics::Attributes::RxBeaconCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -25327,9 +24932,9 @@ + (void)readAttributeRxBeaconCountWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeRxBeaconRequestCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -25338,11 +24943,11 @@ - (void)readAttributeRxBeaconRequestCountWithCompletion:(void (^)(NSNumber * _Nu completion:completion]; } -- (void)subscribeAttributeRxBeaconRequestCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _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 = ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -25352,9 +24957,9 @@ - (void)subscribeAttributeRxBeaconRequestCountWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRxBeaconRequestCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _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 = ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::TypeInfo; + using TypeInfo = ThreadNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -25363,860 +24968,1327 @@ + (void)readAttributeRxBeaconRequestCountWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeRxOtherCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterThreadNetworkDiagnostics (Deprecated) + +- (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self resetCountsWithParams:params completion: + completionHandler]; +} +- (void)resetCountsWithCompletionHandler:(MTRStatusCompletion)completionHandler +{ + [self resetCountsWithParams:nil completionHandler:completionHandler]; +} + +- (void)readAttributeChannelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeChannelWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeChannelWithMinInterval:(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 subscribeAttributeChannelWithParams: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)readAttributeChannelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeChannelWithClusterStateCache: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)readAttributeRoutingRoleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRoutingRoleWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeRoutingRoleWithMinInterval:(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 subscribeAttributeRoutingRoleWithParams: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)readAttributeRoutingRoleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRoutingRoleWithClusterStateCache: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)readAttributeNetworkNameWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeNetworkNameWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeNetworkNameWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _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 subscribeAttributeNetworkNameWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeNetworkNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeNetworkNameWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributePanIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePanIdWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributePanIdWithMinInterval:(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 subscribeAttributePanIdWithParams: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)readAttributePanIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePanIdWithClusterStateCache: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)readAttributeExtendedPanIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeExtendedPanIdWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeExtendedPanIdWithMinInterval:(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 subscribeAttributeExtendedPanIdWithParams: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)readAttributeExtendedPanIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeExtendedPanIdWithClusterStateCache: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)readAttributeMeshLocalPrefixWithCompletionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMeshLocalPrefixWithCompletion: + ^(NSData * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeMeshLocalPrefixWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSData * _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 subscribeAttributeMeshLocalPrefixWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSData * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeMeshLocalPrefixWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMeshLocalPrefixWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSData * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeOverrunCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOverrunCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeOverrunCountWithMinInterval:(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 subscribeAttributeOverrunCountWithParams: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)readAttributeOverrunCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOverrunCountWithClusterStateCache: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)readAttributeNeighborTableListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeNeighborTableWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeNeighborTableListWithMinInterval:(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 subscribeAttributeNeighborTableWithParams: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)readAttributeNeighborTableListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeNeighborTableWithClusterStateCache: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)readAttributeRouteTableListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRouteTableWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeRouteTableListWithMinInterval:(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 subscribeAttributeRouteTableWithParams: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)readAttributeRouteTableListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRouteTableWithClusterStateCache: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)readAttributePartitionIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePartitionIdWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributePartitionIdWithMinInterval:(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 subscribeAttributePartitionIdWithParams: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)readAttributePartitionIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePartitionIdWithClusterStateCache: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)readAttributeWeightingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeWeightingWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeWeightingWithMinInterval:(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 subscribeAttributeWeightingWithParams: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)readAttributeWeightingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeWeightingWithClusterStateCache: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)readAttributeDataVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDataVersionWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeDataVersionWithMinInterval:(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 subscribeAttributeDataVersionWithParams: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)readAttributeDataVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDataVersionWithClusterStateCache: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)readAttributeStableDataVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeStableDataVersionWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeStableDataVersionWithMinInterval:(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 subscribeAttributeStableDataVersionWithParams: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)readAttributeStableDataVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeStableDataVersionWithClusterStateCache: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)readAttributeLeaderRouterIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxOtherCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeLeaderRouterIdWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeRxOtherCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLeaderRouterIdWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxOtherCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeLeaderRouterIdWithParams: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)readAttributeRxOtherCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLeaderRouterIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxOtherCount::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeLeaderRouterIdWithClusterStateCache: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)readAttributeRxAddressFilteredCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDetachedRoleCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeDetachedRoleCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeRxAddressFilteredCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished +- (void)subscribeAttributeDetachedRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeDetachedRoleCountWithParams: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)readAttributeRxAddressFilteredCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDetachedRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeDetachedRoleCountWithClusterStateCache: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)readAttributeRxDestAddrFilteredCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeChildRoleCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeChildRoleCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeRxDestAddrFilteredCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeChildRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeChildRoleCountWithParams: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)readAttributeRxDestAddrFilteredCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeChildRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeChildRoleCountWithClusterStateCache: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)readAttributeRxDuplicatedCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRouterRoleCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeRouterRoleCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeRxDuplicatedCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRouterRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeRouterRoleCountWithParams: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)readAttributeRxDuplicatedCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRouterRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeRouterRoleCountWithClusterStateCache: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)readAttributeRxErrNoFrameCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLeaderRoleCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeLeaderRoleCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeRxErrNoFrameCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLeaderRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeLeaderRoleCountWithParams: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)readAttributeRxErrNoFrameCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLeaderRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeLeaderRoleCountWithClusterStateCache: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)readAttributeRxErrUnknownNeighborCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttachAttemptCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeAttachAttemptCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeRxErrUnknownNeighborCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAttachAttemptCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeAttachAttemptCountWithParams: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)readAttributeRxErrUnknownNeighborCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttachAttemptCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeAttachAttemptCountWithClusterStateCache: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)readAttributeRxErrInvalidSrcAddrCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePartitionIdChangeCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributePartitionIdChangeCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeRxErrInvalidSrcAddrCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePartitionIdChangeCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributePartitionIdChangeCountWithParams: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)readAttributeRxErrInvalidSrcAddrCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePartitionIdChangeCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributePartitionIdChangeCountWithClusterStateCache: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)readAttributeRxErrSecCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBetterPartitionAttachAttemptCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrSecCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeBetterPartitionAttachAttemptCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeRxErrSecCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBetterPartitionAttachAttemptCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrSecCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeBetterPartitionAttachAttemptCountWithParams: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)readAttributeRxErrSecCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeBetterPartitionAttachAttemptCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrSecCount::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeBetterPartitionAttachAttemptCountWithClusterStateCache: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)readAttributeRxErrFcsCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeParentChangeCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeParentChangeCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeRxErrFcsCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeParentChangeCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeParentChangeCountWithParams: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)readAttributeRxErrFcsCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeParentChangeCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeParentChangeCountWithClusterStateCache: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)readAttributeRxErrOtherCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxTotalCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeTxTotalCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeRxErrOtherCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxTotalCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeTxTotalCountWithParams: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)readAttributeRxErrOtherCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxTotalCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeTxTotalCountWithClusterStateCache: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)readAttributeActiveTimestampWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxUnicastCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeTxUnicastCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeActiveTimestampWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxUnicastCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeTxUnicastCountWithParams: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)readAttributeActiveTimestampWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxUnicastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeTxUnicastCountWithClusterStateCache: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)readAttributePendingTimestampWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxBroadcastCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PendingTimestamp::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeTxBroadcastCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributePendingTimestampWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxBroadcastCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PendingTimestamp::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeTxBroadcastCountWithParams: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)readAttributePendingTimestampWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxBroadcastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::PendingTimestamp::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeTxBroadcastCountWithClusterStateCache: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)readAttributeDelayWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxAckRequestedCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::Delay::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeTxAckRequestedCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeDelayWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxAckRequestedCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::Delay::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeTxAckRequestedCountWithParams: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)readAttributeDelayWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxAckRequestedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::Delay::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeTxAckRequestedCountWithClusterStateCache: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)readAttributeSecurityPolicyWithCompletion:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxAckedCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::SecurityPolicy::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeTxAckedCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeSecurityPolicyWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxAckedCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::SecurityPolicy::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeTxAckedCountWithParams: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)readAttributeSecurityPolicyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxAckedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::SecurityPolicy::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeTxAckedCountWithClusterStateCache: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)readAttributeChannelPage0MaskWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxNoAckRequestedCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChannelPage0Mask::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeTxNoAckRequestedCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeChannelPage0MaskWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxNoAckRequestedCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChannelPage0Mask::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeTxNoAckRequestedCountWithParams: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)readAttributeChannelPage0MaskWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxNoAckRequestedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ChannelPage0Mask::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeTxNoAckRequestedCountWithClusterStateCache: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)readAttributeOperationalDatasetComponentsWithCompletion:(void (^)(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxDataCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeTxDataCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeOperationalDatasetComponentsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxDataCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeTxDataCountWithParams: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)readAttributeOperationalDatasetComponentsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxDataCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeTxDataCountWithClusterStateCache: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)readAttributeActiveNetworkFaultsListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxDataPollCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeTxDataPollCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeActiveNetworkFaultsListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxDataPollCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeTxDataPollCountWithParams: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)readAttributeActiveNetworkFaultsListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxDataPollCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeTxDataPollCountWithClusterStateCache: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)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxBeaconCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeTxBeaconCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxBeaconCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeTxBeaconCountWithParams: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)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxBeaconCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeTxBeaconCountWithClusterStateCache: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)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxBeaconRequestCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeTxBeaconRequestCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxBeaconRequestCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeTxBeaconRequestCountWithParams: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)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxBeaconRequestCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeTxBeaconRequestCountWithClusterStateCache: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)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxOtherCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeTxOtherCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxOtherCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeTxOtherCountWithParams: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)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxOtherCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeTxOtherCountWithClusterStateCache: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)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxRetryCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeTxRetryCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxRetryCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeTxRetryCountWithParams: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)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxRetryCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::AttributeList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeTxRetryCountWithClusterStateCache: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)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxDirectMaxRetryExpiryCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeTxDirectMaxRetryExpiryCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxDirectMaxRetryExpiryCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeTxDirectMaxRetryExpiryCountWithParams: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)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxDirectMaxRetryExpiryCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeTxDirectMaxRetryExpiryCountWithClusterStateCache: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)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxIndirectMaxRetryExpiryCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeTxIndirectMaxRetryExpiryCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxIndirectMaxRetryExpiryCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeTxIndirectMaxRetryExpiryCountWithParams: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)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxIndirectMaxRetryExpiryCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = ThreadNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeTxIndirectMaxRetryExpiryCountWithClusterStateCache: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); + }]; } -@end - -@implementation MTRBaseClusterThreadNetworkDiagnostics (Deprecated) - -- (void)resetCountsWithParams:(MTRThreadNetworkDiagnosticsClusterResetCountsParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +- (void)readAttributeTxErrCcaCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self resetCountsWithParams:params completion: - completionHandler]; + [self readAttributeTxErrCcaCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)resetCountsWithCompletionHandler:(MTRStatusCompletion)completionHandler +- (void)subscribeAttributeTxErrCcaCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self resetCountsWithParams:nil completionHandler:completionHandler]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeTxErrCcaCountWithParams: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)readAttributeTxErrCcaCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeTxErrCcaCountWithClusterStateCache: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)readAttributeChannelWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeTxErrAbortCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeChannelWithCompletion: + [self readAttributeTxErrAbortCountWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeChannelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxErrAbortCountWithMinInterval:(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) { @@ -26225,33 +26297,33 @@ - (void)subscribeAttributeChannelWithMinInterval:(NSNumber * _Nonnull)minInterva subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeChannelWithParams: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); - }]; + [self subscribeAttributeTxErrAbortCountWithParams: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)readAttributeChannelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeTxErrAbortCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeChannelWithClusterStateCache: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); - }]; + [self readAttributeTxErrAbortCountWithClusterStateCache: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)readAttributeRoutingRoleWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeTxErrBusyChannelCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRoutingRoleWithCompletion: + [self readAttributeTxErrBusyChannelCountWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeRoutingRoleWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxErrBusyChannelCountWithMinInterval:(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) { @@ -26260,33 +26332,33 @@ - (void)subscribeAttributeRoutingRoleWithMinInterval:(NSNumber * _Nonnull)minInt subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeRoutingRoleWithParams: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); - }]; + [self subscribeAttributeTxErrBusyChannelCountWithParams: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)readAttributeRoutingRoleWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeTxErrBusyChannelCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRoutingRoleWithClusterStateCache: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); - }]; + [self readAttributeTxErrBusyChannelCountWithClusterStateCache: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)readAttributeNetworkNameWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRxTotalCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeNetworkNameWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { + [self readAttributeRxTotalCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeNetworkNameWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxTotalCountWithMinInterval:(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) { @@ -26295,33 +26367,33 @@ - (void)subscribeAttributeNetworkNameWithMinInterval:(NSNumber * _Nonnull)minInt subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeNetworkNameWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeRxTotalCountWithParams: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)readAttributeNetworkNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRxTotalCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeNetworkNameWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeRxTotalCountWithClusterStateCache: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)readAttributePanIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRxUnicastCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePanIdWithCompletion: + [self readAttributeRxUnicastCountWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributePanIdWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxUnicastCountWithMinInterval:(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) { @@ -26330,33 +26402,33 @@ - (void)subscribeAttributePanIdWithMinInterval:(NSNumber * _Nonnull)minInterval subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePanIdWithParams: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); - }]; + [self subscribeAttributeRxUnicastCountWithParams: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)readAttributePanIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRxUnicastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePanIdWithClusterStateCache: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); - }]; + [self readAttributeRxUnicastCountWithClusterStateCache: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)readAttributeExtendedPanIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRxBroadcastCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeExtendedPanIdWithCompletion: + [self readAttributeRxBroadcastCountWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeExtendedPanIdWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxBroadcastCountWithMinInterval:(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) { @@ -26365,33 +26437,33 @@ - (void)subscribeAttributeExtendedPanIdWithMinInterval:(NSNumber * _Nonnull)minI subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeExtendedPanIdWithParams: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)readAttributeExtendedPanIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeExtendedPanIdWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + [self subscribeAttributeRxBroadcastCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + reportHandler(static_cast(value), error); }]; } ++ (void)readAttributeRxBroadcastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRxBroadcastCountWithClusterStateCache: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)readAttributeMeshLocalPrefixWithCompletionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRxDataCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMeshLocalPrefixWithCompletion: - ^(NSData * _Nullable value, NSError * _Nullable error) { + [self readAttributeRxDataCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeMeshLocalPrefixWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxDataCountWithMinInterval:(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) { @@ -26400,33 +26472,33 @@ - (void)subscribeAttributeMeshLocalPrefixWithMinInterval:(NSNumber * _Nonnull)mi subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeMeshLocalPrefixWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSData * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeRxDataCountWithParams: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)readAttributeMeshLocalPrefixWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRxDataCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMeshLocalPrefixWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSData * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeRxDataCountWithClusterStateCache: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)readAttributeOverrunCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRxDataPollCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeOverrunCountWithCompletion: + [self readAttributeRxDataPollCountWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeOverrunCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxDataPollCountWithMinInterval:(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) { @@ -26435,33 +26507,33 @@ - (void)subscribeAttributeOverrunCountWithMinInterval:(NSNumber * _Nonnull)minIn subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeOverrunCountWithParams: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)readAttributeOverrunCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeOverrunCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + [self subscribeAttributeRxDataPollCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + reportHandler(static_cast(value), error); }]; } ++ (void)readAttributeRxDataPollCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeRxDataPollCountWithClusterStateCache: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)readAttributeNeighborTableListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRxBeaconCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeNeighborTableWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { + [self readAttributeRxBeaconCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeNeighborTableListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxBeaconCountWithMinInterval:(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) { @@ -26470,33 +26542,33 @@ - (void)subscribeAttributeNeighborTableListWithMinInterval:(NSNumber * _Nonnull) subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeNeighborTableWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSArray * _Nullable value, NSError * _Nullable error) { + [self subscribeAttributeRxBeaconCountWithParams: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); + reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeNeighborTableListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRxBeaconCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeNeighborTableWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { + [self readAttributeRxBeaconCountWithClusterStateCache: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); + completionHandler(static_cast(value), error); }]; } -- (void)readAttributeRouteTableListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRxBeaconRequestCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRouteTableWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { + [self readAttributeRxBeaconRequestCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeRouteTableListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxBeaconRequestCountWithMinInterval:(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) { @@ -26505,33 +26577,33 @@ - (void)subscribeAttributeRouteTableListWithMinInterval:(NSNumber * _Nonnull)min subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeRouteTableWithParams: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); - }]; + [self subscribeAttributeRxBeaconRequestCountWithParams: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)readAttributeRouteTableListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRxBeaconRequestCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRouteTableWithClusterStateCache: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); - }]; + [self readAttributeRxBeaconRequestCountWithClusterStateCache: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)readAttributePartitionIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRxOtherCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePartitionIdWithCompletion: + [self readAttributeRxOtherCountWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributePartitionIdWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxOtherCountWithMinInterval:(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) { @@ -26540,33 +26612,33 @@ - (void)subscribeAttributePartitionIdWithMinInterval:(NSNumber * _Nonnull)minInt subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePartitionIdWithParams: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); - }]; + [self subscribeAttributeRxOtherCountWithParams: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)readAttributePartitionIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRxOtherCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePartitionIdWithClusterStateCache: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); - }]; + [self readAttributeRxOtherCountWithClusterStateCache: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)readAttributeWeightingWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRxAddressFilteredCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeWeightingWithCompletion: + [self readAttributeRxAddressFilteredCountWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeWeightingWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxAddressFilteredCountWithMinInterval:(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) { @@ -26575,33 +26647,33 @@ - (void)subscribeAttributeWeightingWithMinInterval:(NSNumber * _Nonnull)minInter subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeWeightingWithParams: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); - }]; + [self subscribeAttributeRxAddressFilteredCountWithParams: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)readAttributeWeightingWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRxAddressFilteredCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeWeightingWithClusterStateCache: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); - }]; + [self readAttributeRxAddressFilteredCountWithClusterStateCache: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)readAttributeDataVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRxDestAddrFilteredCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeDataVersionWithCompletion: + [self readAttributeRxDestAddrFilteredCountWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeDataVersionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxDestAddrFilteredCountWithMinInterval:(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) { @@ -26610,30 +26682,30 @@ - (void)subscribeAttributeDataVersionWithMinInterval:(NSNumber * _Nonnull)minInt subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeDataVersionWithParams: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); - }]; + [self subscribeAttributeRxDestAddrFilteredCountWithParams: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)readAttributeDataVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRxDestAddrFilteredCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeDataVersionWithClusterStateCache: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); - }]; + [self readAttributeRxDestAddrFilteredCountWithClusterStateCache: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)readAttributeStableDataVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRxDuplicatedCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeStableDataVersionWithCompletion: + [self readAttributeRxDuplicatedCountWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeStableDataVersionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)subscribeAttributeRxDuplicatedCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -26645,65 +26717,30 @@ - (void)subscribeAttributeStableDataVersionWithMinInterval:(NSNumber * _Nonnull) subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeStableDataVersionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + [self subscribeAttributeRxDuplicatedCountWithParams: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)readAttributeStableDataVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRxDuplicatedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeStableDataVersionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + [self readAttributeRxDuplicatedCountWithClusterStateCache: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)readAttributeLeaderRouterIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeLeaderRouterIdWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeLeaderRouterIdWithMinInterval:(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 subscribeAttributeLeaderRouterIdWithParams: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)readAttributeLeaderRouterIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeLeaderRouterIdWithClusterStateCache: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)readAttributeDetachedRoleCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRxErrNoFrameCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeDetachedRoleCountWithCompletion: + [self readAttributeRxErrNoFrameCountWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeDetachedRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)subscribeAttributeRxErrNoFrameCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -26715,33 +26752,33 @@ - (void)subscribeAttributeDetachedRoleCountWithMinInterval:(NSNumber * _Nonnull) subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeDetachedRoleCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + [self subscribeAttributeRxErrNoFrameCountWithParams: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)readAttributeDetachedRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRxErrNoFrameCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeDetachedRoleCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + [self readAttributeRxErrNoFrameCountWithClusterStateCache: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)readAttributeChildRoleCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRxErrUnknownNeighborCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeChildRoleCountWithCompletion: + [self readAttributeRxErrUnknownNeighborCountWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeChildRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxErrUnknownNeighborCountWithMinInterval:(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) { @@ -26750,33 +26787,33 @@ - (void)subscribeAttributeChildRoleCountWithMinInterval:(NSNumber * _Nonnull)min subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeChildRoleCountWithParams: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); - }]; + [self subscribeAttributeRxErrUnknownNeighborCountWithParams: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)readAttributeChildRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRxErrUnknownNeighborCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeChildRoleCountWithClusterStateCache: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); - }]; + [self readAttributeRxErrUnknownNeighborCountWithClusterStateCache: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)readAttributeRouterRoleCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRxErrInvalidSrcAddrCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRouterRoleCountWithCompletion: + [self readAttributeRxErrInvalidSrcAddrCountWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeRouterRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxErrInvalidSrcAddrCountWithMinInterval:(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) { @@ -26785,33 +26822,33 @@ - (void)subscribeAttributeRouterRoleCountWithMinInterval:(NSNumber * _Nonnull)mi subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeRouterRoleCountWithParams: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); - }]; + [self subscribeAttributeRxErrInvalidSrcAddrCountWithParams: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)readAttributeRouterRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRxErrInvalidSrcAddrCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRouterRoleCountWithClusterStateCache: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); - }]; + [self readAttributeRxErrInvalidSrcAddrCountWithClusterStateCache: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)readAttributeLeaderRoleCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRxErrSecCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeLeaderRoleCountWithCompletion: + [self readAttributeRxErrSecCountWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeLeaderRoleCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxErrSecCountWithMinInterval:(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) { @@ -26820,33 +26857,33 @@ - (void)subscribeAttributeLeaderRoleCountWithMinInterval:(NSNumber * _Nonnull)mi subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeLeaderRoleCountWithParams: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); - }]; + [self subscribeAttributeRxErrSecCountWithParams: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)readAttributeLeaderRoleCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRxErrSecCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeLeaderRoleCountWithClusterStateCache: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); - }]; + [self readAttributeRxErrSecCountWithClusterStateCache: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)readAttributeAttachAttemptCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRxErrFcsCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAttachAttemptCountWithCompletion: + [self readAttributeRxErrFcsCountWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeAttachAttemptCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxErrFcsCountWithMinInterval:(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) { @@ -26855,33 +26892,33 @@ - (void)subscribeAttributeAttachAttemptCountWithMinInterval:(NSNumber * _Nonnull subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeAttachAttemptCountWithParams: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); - }]; + [self subscribeAttributeRxErrFcsCountWithParams: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)readAttributeAttachAttemptCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRxErrFcsCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAttachAttemptCountWithClusterStateCache: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); - }]; + [self readAttributeRxErrFcsCountWithClusterStateCache: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)readAttributePartitionIdChangeCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRxErrOtherCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePartitionIdChangeCountWithCompletion: + [self readAttributeRxErrOtherCountWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributePartitionIdChangeCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRxErrOtherCountWithMinInterval:(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) { @@ -26890,33 +26927,33 @@ - (void)subscribeAttributePartitionIdChangeCountWithMinInterval:(NSNumber * _Non subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePartitionIdChangeCountWithParams: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); - }]; + [self subscribeAttributeRxErrOtherCountWithParams: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)readAttributePartitionIdChangeCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRxErrOtherCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePartitionIdChangeCountWithClusterStateCache: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); - }]; + [self readAttributeRxErrOtherCountWithClusterStateCache: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)readAttributeBetterPartitionAttachAttemptCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeActiveTimestampWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeBetterPartitionAttachAttemptCountWithCompletion: + [self readAttributeActiveTimestampWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeBetterPartitionAttachAttemptCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActiveTimestampWithMinInterval:(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) { @@ -26925,33 +26962,33 @@ - (void)subscribeAttributeBetterPartitionAttachAttemptCountWithMinInterval:(NSNu subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeBetterPartitionAttachAttemptCountWithParams: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); - }]; + [self subscribeAttributeActiveTimestampWithParams: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)readAttributeBetterPartitionAttachAttemptCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeActiveTimestampWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeBetterPartitionAttachAttemptCountWithClusterStateCache: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); - }]; + [self readAttributeActiveTimestampWithClusterStateCache: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)readAttributeParentChangeCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePendingTimestampWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeParentChangeCountWithCompletion: + [self readAttributePendingTimestampWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeParentChangeCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePendingTimestampWithMinInterval:(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) { @@ -26960,33 +26997,33 @@ - (void)subscribeAttributeParentChangeCountWithMinInterval:(NSNumber * _Nonnull) subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeParentChangeCountWithParams: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); - }]; + [self subscribeAttributePendingTimestampWithParams: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)readAttributeParentChangeCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePendingTimestampWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeParentChangeCountWithClusterStateCache: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); - }]; + [self readAttributePendingTimestampWithClusterStateCache: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)readAttributeTxTotalCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeTxTotalCountWithCompletion: + [self readAttributeDelayWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeTxTotalCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDelayWithMinInterval:(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) { @@ -26995,33 +27032,33 @@ - (void)subscribeAttributeTxTotalCountWithMinInterval:(NSNumber * _Nonnull)minIn subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeTxTotalCountWithParams: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); - }]; + [self subscribeAttributeDelayWithParams: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)readAttributeTxTotalCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeTxTotalCountWithClusterStateCache: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); - }]; + [self readAttributeDelayWithClusterStateCache: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)readAttributeTxUnicastCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeSecurityPolicyWithCompletionHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeTxUnicastCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeSecurityPolicyWithCompletion: + ^(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeTxUnicastCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)subscribeAttributeSecurityPolicyWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -27030,33 +27067,33 @@ - (void)subscribeAttributeTxUnicastCountWithMinInterval:(NSNumber * _Nonnull)min subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeTxUnicastCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self subscribeAttributeSecurityPolicyWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); + reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeTxUnicastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSecurityPolicyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeTxUnicastCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeSecurityPolicyWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)readAttributeTxBroadcastCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeChannelPage0MaskWithCompletionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeTxBroadcastCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeChannelPage0MaskWithCompletion: + ^(NSData * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeTxBroadcastCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)subscribeAttributeChannelPage0MaskWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -27065,33 +27102,33 @@ - (void)subscribeAttributeTxBroadcastCountWithMinInterval:(NSNumber * _Nonnull)m subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeTxBroadcastCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self subscribeAttributeChannelPage0MaskWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSData * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); + reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeTxBroadcastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeChannelPage0MaskWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeTxBroadcastCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeChannelPage0MaskWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSData * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)readAttributeTxAckRequestedCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeOperationalDatasetComponentsWithCompletionHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeTxAckRequestedCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeOperationalDatasetComponentsWithCompletion: + ^(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeTxAckRequestedCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOperationalDatasetComponentsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -27100,33 +27137,33 @@ - (void)subscribeAttributeTxAckRequestedCountWithMinInterval:(NSNumber * _Nonnul subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeTxAckRequestedCountWithParams: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); - }]; + [self subscribeAttributeOperationalDatasetComponentsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeTxAckRequestedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOperationalDatasetComponentsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeTxAckRequestedCountWithClusterStateCache: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); - }]; + [self readAttributeOperationalDatasetComponentsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeTxAckedCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeActiveNetworkFaultsListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeTxAckedCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeActiveNetworkFaultsListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeTxAckedCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActiveNetworkFaultsListWithMinInterval:(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) { @@ -27135,33 +27172,33 @@ - (void)subscribeAttributeTxAckedCountWithMinInterval:(NSNumber * _Nonnull)minIn subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeTxAckedCountWithParams: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); - }]; + [self subscribeAttributeActiveNetworkFaultsListWithParams: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)readAttributeTxAckedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeActiveNetworkFaultsListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeTxAckedCountWithClusterStateCache: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); - }]; + [self readAttributeActiveNetworkFaultsListWithClusterStateCache: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)readAttributeTxNoAckRequestedCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeTxNoAckRequestedCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeGeneratedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeTxNoAckRequestedCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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) { @@ -27170,33 +27207,33 @@ - (void)subscribeAttributeTxNoAckRequestedCountWithMinInterval:(NSNumber * _Nonn subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeTxNoAckRequestedCountWithParams: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); - }]; + [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)readAttributeTxNoAckRequestedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeTxNoAckRequestedCountWithClusterStateCache: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); - }]; + [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)readAttributeTxDataCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeTxDataCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeAcceptedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeTxDataCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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) { @@ -27205,33 +27242,33 @@ - (void)subscribeAttributeTxDataCountWithMinInterval:(NSNumber * _Nonnull)minInt subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeTxDataCountWithParams: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); - }]; + [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)readAttributeTxDataCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeTxDataCountWithClusterStateCache: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); - }]; + [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)readAttributeTxDataPollCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeTxDataPollCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeAttributeListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeTxDataPollCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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) { @@ -27240,33 +27277,33 @@ - (void)subscribeAttributeTxDataPollCountWithMinInterval:(NSNumber * _Nonnull)mi subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeTxDataPollCountWithParams: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); - }]; + [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)readAttributeTxDataPollCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeTxDataPollCountWithClusterStateCache: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); - }]; + [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)readAttributeTxBeaconCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeTxBeaconCountWithCompletion: + [self readAttributeFeatureMapWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeTxBeaconCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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) { @@ -27275,33 +27312,33 @@ - (void)subscribeAttributeTxBeaconCountWithMinInterval:(NSNumber * _Nonnull)minI subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeTxBeaconCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + [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. - reportHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -+ (void)readAttributeTxBeaconCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeTxBeaconCountWithClusterStateCache: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)readAttributeTxBeaconRequestCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeTxBeaconRequestCountWithCompletion: + [self readAttributeClusterRevisionWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeTxBeaconRequestCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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) { @@ -27310,663 +27347,771 @@ - (void)subscribeAttributeTxBeaconRequestCountWithMinInterval:(NSNumber * _Nonnu subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeTxBeaconRequestCountWithParams: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); - }]; + [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)readAttributeTxBeaconRequestCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeTxBeaconRequestCountWithClusterStateCache: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); - }]; + [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); + }]; } -- (void)readAttributeTxOtherCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue { - [self readAttributeTxOtherCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -- (void)subscribeAttributeTxOtherCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +@end + +@implementation MTRBaseClusterWiFiNetworkDiagnostics + +- (void)resetCountsWithCompletion:(MTRStatusCompletion)completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; + [self resetCountsWithParams:nil completion:completion]; +} +- (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRWiFiNetworkDiagnosticsClusterResetCountsParams + alloc] init]; } - [self subscribeAttributeTxOtherCountWithParams: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); - }]; + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = WiFiNetworkDiagnostics::Commands::ResetCounts::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)readAttributeTxOtherCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeBSSIDWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeTxOtherCountWithClusterStateCache: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); - }]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::Bssid::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeTxRetryCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeBSSIDWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = WiFiNetworkDiagnostics::Attributes::Bssid::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeBSSIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = WiFiNetworkDiagnostics::Attributes::Bssid::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeSecurityTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = WiFiNetworkDiagnostics::Attributes::SecurityType::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeSecurityTypeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = WiFiNetworkDiagnostics::Attributes::SecurityType::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeSecurityTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = WiFiNetworkDiagnostics::Attributes::SecurityType::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeWiFiVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = WiFiNetworkDiagnostics::Attributes::WiFiVersion::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeWiFiVersionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = WiFiNetworkDiagnostics::Attributes::WiFiVersion::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeWiFiVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeTxRetryCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::WiFiVersion::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeTxRetryCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeChannelNumberWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeTxRetryCountWithParams: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); - }]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::ChannelNumber::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeTxRetryCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeChannelNumberWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeTxRetryCountWithClusterStateCache: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); - }]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::ChannelNumber::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeTxDirectMaxRetryExpiryCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeChannelNumberWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeTxDirectMaxRetryExpiryCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::ChannelNumber::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeTxDirectMaxRetryExpiryCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeRSSIWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeTxDirectMaxRetryExpiryCountWithParams: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); - }]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::Rssi::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeTxDirectMaxRetryExpiryCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeRSSIWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeTxDirectMaxRetryExpiryCountWithClusterStateCache: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); - }]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::Rssi::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeTxIndirectMaxRetryExpiryCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRSSIWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeTxIndirectMaxRetryExpiryCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::Rssi::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeTxIndirectMaxRetryExpiryCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeBeaconLostCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeTxIndirectMaxRetryExpiryCountWithParams: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); - }]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconLostCount::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeTxIndirectMaxRetryExpiryCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeBeaconLostCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeTxIndirectMaxRetryExpiryCountWithClusterStateCache: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); - }]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconLostCount::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeTxErrCcaCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBeaconLostCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeTxErrCcaCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconLostCount::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeTxErrCcaCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeBeaconRxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeTxErrCcaCountWithParams: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); - }]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconRxCount::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeTxErrCcaCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeBeaconRxCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeTxErrCcaCountWithClusterStateCache: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); - }]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconRxCount::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeTxErrAbortCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBeaconRxCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeTxErrAbortCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconRxCount::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeTxErrAbortCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributePacketMulticastRxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeTxErrAbortCountWithParams: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); - }]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeTxErrAbortCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributePacketMulticastRxCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeTxErrAbortCountWithClusterStateCache: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); - }]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeTxErrBusyChannelCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePacketMulticastRxCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeTxErrBusyChannelCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeTxErrBusyChannelCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributePacketMulticastTxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeTxErrBusyChannelCountWithParams: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); - }]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeTxErrBusyChannelCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributePacketMulticastTxCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeTxErrBusyChannelCountWithClusterStateCache: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); - }]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeRxTotalCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePacketMulticastTxCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeRxTotalCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeRxTotalCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributePacketUnicastRxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRxTotalCountWithParams: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); - }]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeRxTotalCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributePacketUnicastRxCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeRxTotalCountWithClusterStateCache: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); - }]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeRxUnicastCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePacketUnicastRxCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeRxUnicastCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeRxUnicastCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributePacketUnicastTxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRxUnicastCountWithParams: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); - }]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeRxUnicastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributePacketUnicastTxCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeRxUnicastCountWithClusterStateCache: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); - }]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeRxBroadcastCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePacketUnicastTxCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeRxBroadcastCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeRxBroadcastCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeCurrentMaxRateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRxBroadcastCountWithParams: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); - }]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeRxBroadcastCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeCurrentMaxRateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeRxBroadcastCountWithClusterStateCache: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); - }]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeRxDataCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCurrentMaxRateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeRxDataCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeRxDataCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeOverrunCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRxDataCountWithParams: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); - }]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeRxDataCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeRxDataCountWithClusterStateCache: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); - }]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeRxDataPollCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOverrunCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeRxDataPollCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeRxDataPollCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRxDataPollCountWithParams: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); - }]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeRxDataPollCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeRxDataPollCountWithClusterStateCache: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); - }]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeRxBeaconCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeRxBeaconCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeRxBeaconCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRxBeaconCountWithParams: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); - }]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeRxBeaconCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeRxBeaconCountWithClusterStateCache: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); - }]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeRxBeaconRequestCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeRxBeaconRequestCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeRxBeaconRequestCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRxBeaconRequestCountWithParams: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); - }]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::EventList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeRxBeaconRequestCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeRxBeaconRequestCountWithClusterStateCache: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); - }]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::EventList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeRxOtherCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeRxOtherCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::EventList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeRxOtherCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRxOtherCountWithParams: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); - }]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeRxOtherCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeRxOtherCountWithClusterStateCache: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); - }]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeRxAddressFilteredCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeRxAddressFilteredCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeRxAddressFilteredCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRxAddressFilteredCountWithParams: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); - }]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeRxAddressFilteredCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeRxAddressFilteredCountWithClusterStateCache: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); - }]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeRxDestAddrFilteredCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeRxDestAddrFilteredCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeRxDestAddrFilteredCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRxDestAddrFilteredCountWithParams: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); - }]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeRxDestAddrFilteredCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeRxDestAddrFilteredCountWithClusterStateCache: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); - }]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeRxDuplicatedCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeRxDuplicatedCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = WiFiNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeRxDuplicatedCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +@end + +@implementation MTRBaseClusterWiFiNetworkDiagnostics (Deprecated) + +- (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeRxDuplicatedCountWithParams: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); - }]; + [self resetCountsWithParams:params completion: + completionHandler]; } -+ (void)readAttributeRxDuplicatedCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)resetCountsWithCompletionHandler:(MTRStatusCompletion)completionHandler { - [self readAttributeRxDuplicatedCountWithClusterStateCache: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); - }]; + [self resetCountsWithParams:nil completionHandler:completionHandler]; } -- (void)readAttributeRxErrNoFrameCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeBssidWithCompletionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRxErrNoFrameCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeBSSIDWithCompletion: + ^(NSData * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeRxErrNoFrameCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBssidWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -27975,33 +28120,33 @@ - (void)subscribeAttributeRxErrNoFrameCountWithMinInterval:(NSNumber * _Nonnull) subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeRxErrNoFrameCountWithParams: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); - }]; + [self subscribeAttributeBSSIDWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSData * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } -+ (void)readAttributeRxErrNoFrameCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBssidWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRxErrNoFrameCountWithClusterStateCache: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); - }]; + [self readAttributeBSSIDWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSData * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)readAttributeRxErrUnknownNeighborCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeSecurityTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRxErrUnknownNeighborCountWithCompletion: + [self readAttributeSecurityTypeWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeRxErrUnknownNeighborCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSecurityTypeWithMinInterval:(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) { @@ -28010,33 +28155,33 @@ - (void)subscribeAttributeRxErrUnknownNeighborCountWithMinInterval:(NSNumber * _ subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeRxErrUnknownNeighborCountWithParams: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)readAttributeRxErrUnknownNeighborCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeRxErrUnknownNeighborCountWithClusterStateCache: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); - }]; + [self subscribeAttributeSecurityTypeWithParams: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)readAttributeSecurityTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSecurityTypeWithClusterStateCache: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)readAttributeRxErrInvalidSrcAddrCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeWiFiVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRxErrInvalidSrcAddrCountWithCompletion: + [self readAttributeWiFiVersionWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeRxErrInvalidSrcAddrCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeWiFiVersionWithMinInterval:(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) { @@ -28045,30 +28190,30 @@ - (void)subscribeAttributeRxErrInvalidSrcAddrCountWithMinInterval:(NSNumber * _N subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeRxErrInvalidSrcAddrCountWithParams: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); - }]; + [self subscribeAttributeWiFiVersionWithParams: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)readAttributeRxErrInvalidSrcAddrCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeWiFiVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRxErrInvalidSrcAddrCountWithClusterStateCache: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); - }]; + [self readAttributeWiFiVersionWithClusterStateCache: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)readAttributeRxErrSecCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeChannelNumberWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRxErrSecCountWithCompletion: + [self readAttributeChannelNumberWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeRxErrSecCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)subscribeAttributeChannelNumberWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -28080,33 +28225,33 @@ - (void)subscribeAttributeRxErrSecCountWithMinInterval:(NSNumber * _Nonnull)minI subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeRxErrSecCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + [self subscribeAttributeChannelNumberWithParams: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)readAttributeRxErrSecCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeChannelNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRxErrSecCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + [self readAttributeChannelNumberWithClusterStateCache: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)readAttributeRxErrFcsCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeRssiWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRxErrFcsCountWithCompletion: + [self readAttributeRSSIWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeRxErrFcsCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeRssiWithMinInterval:(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) { @@ -28115,30 +28260,30 @@ - (void)subscribeAttributeRxErrFcsCountWithMinInterval:(NSNumber * _Nonnull)minI subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeRxErrFcsCountWithParams: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); - }]; + [self subscribeAttributeRSSIWithParams: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)readAttributeRxErrFcsCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeRssiWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRxErrFcsCountWithClusterStateCache: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); - }]; + [self readAttributeRSSIWithClusterStateCache: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)readAttributeRxErrOtherCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeBeaconLostCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRxErrOtherCountWithCompletion: + [self readAttributeBeaconLostCountWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeRxErrOtherCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)subscribeAttributeBeaconLostCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -28150,33 +28295,33 @@ - (void)subscribeAttributeRxErrOtherCountWithMinInterval:(NSNumber * _Nonnull)mi subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeRxErrOtherCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + [self subscribeAttributeBeaconLostCountWithParams: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)readAttributeRxErrOtherCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBeaconLostCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeRxErrOtherCountWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + [self readAttributeBeaconLostCountWithClusterStateCache: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)readAttributeActiveTimestampWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeBeaconRxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeActiveTimestampWithCompletion: + [self readAttributeBeaconRxCountWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeActiveTimestampWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeBeaconRxCountWithMinInterval:(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) { @@ -28185,33 +28330,33 @@ - (void)subscribeAttributeActiveTimestampWithMinInterval:(NSNumber * _Nonnull)mi subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeActiveTimestampWithParams: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); - }]; + [self subscribeAttributeBeaconRxCountWithParams: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)readAttributeActiveTimestampWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeBeaconRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeActiveTimestampWithClusterStateCache: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); - }]; + [self readAttributeBeaconRxCountWithClusterStateCache: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)readAttributePendingTimestampWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePacketMulticastRxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePendingTimestampWithCompletion: + [self readAttributePacketMulticastRxCountWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributePendingTimestampWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePacketMulticastRxCountWithMinInterval:(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) { @@ -28220,33 +28365,33 @@ - (void)subscribeAttributePendingTimestampWithMinInterval:(NSNumber * _Nonnull)m subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePendingTimestampWithParams: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); - }]; + [self subscribeAttributePacketMulticastRxCountWithParams: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)readAttributePendingTimestampWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePacketMulticastRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePendingTimestampWithClusterStateCache: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); - }]; + [self readAttributePacketMulticastRxCountWithClusterStateCache: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)readAttributeDelayWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePacketMulticastTxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeDelayWithCompletion: + [self readAttributePacketMulticastTxCountWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeDelayWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePacketMulticastTxCountWithMinInterval:(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) { @@ -28255,33 +28400,33 @@ - (void)subscribeAttributeDelayWithMinInterval:(NSNumber * _Nonnull)minInterval subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeDelayWithParams: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); - }]; + [self subscribeAttributePacketMulticastTxCountWithParams: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)readAttributeDelayWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePacketMulticastTxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeDelayWithClusterStateCache: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); - }]; + [self readAttributePacketMulticastTxCountWithClusterStateCache: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)readAttributeSecurityPolicyWithCompletionHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePacketUnicastRxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeSecurityPolicyWithCompletion: - ^(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error) { + [self readAttributePacketUnicastRxCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeSecurityPolicyWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePacketUnicastRxCountWithMinInterval:(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) { @@ -28290,33 +28435,33 @@ - (void)subscribeAttributeSecurityPolicyWithMinInterval:(NSNumber * _Nonnull)min subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeSecurityPolicyWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributePacketUnicastRxCountWithParams: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)readAttributeSecurityPolicyWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePacketUnicastRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeSecurityPolicyWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributePacketUnicastRxCountWithClusterStateCache: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)readAttributeChannelPage0MaskWithCompletionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePacketUnicastTxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeChannelPage0MaskWithCompletion: - ^(NSData * _Nullable value, NSError * _Nullable error) { + [self readAttributePacketUnicastTxCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeChannelPage0MaskWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePacketUnicastTxCountWithMinInterval:(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) { @@ -28325,33 +28470,33 @@ - (void)subscribeAttributeChannelPage0MaskWithMinInterval:(NSNumber * _Nonnull)m subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeChannelPage0MaskWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSData * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributePacketUnicastTxCountWithParams: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)readAttributeChannelPage0MaskWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePacketUnicastTxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeChannelPage0MaskWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSData * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributePacketUnicastTxCountWithClusterStateCache: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)readAttributeOperationalDatasetComponentsWithCompletionHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeCurrentMaxRateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeOperationalDatasetComponentsWithCompletion: - ^(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error) { + [self readAttributeCurrentMaxRateWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeOperationalDatasetComponentsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentMaxRateWithMinInterval:(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) { @@ -28360,33 +28505,33 @@ - (void)subscribeAttributeOperationalDatasetComponentsWithMinInterval:(NSNumber subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeOperationalDatasetComponentsWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeCurrentMaxRateWithParams: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)readAttributeOperationalDatasetComponentsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCurrentMaxRateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeOperationalDatasetComponentsWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeCurrentMaxRateWithClusterStateCache: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)readAttributeActiveNetworkFaultsListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeOverrunCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeActiveNetworkFaultsListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { + [self readAttributeOverrunCountWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeActiveNetworkFaultsListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOverrunCountWithMinInterval:(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) { @@ -28395,19 +28540,19 @@ - (void)subscribeAttributeActiveNetworkFaultsListWithMinInterval:(NSNumber * _No subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeActiveNetworkFaultsListWithParams: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); - }]; + [self subscribeAttributeOverrunCountWithParams: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)readAttributeActiveNetworkFaultsListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeOverrunCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeActiveNetworkFaultsListWithClusterStateCache: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); - }]; + [self readAttributeOverrunCountWithClusterStateCache: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 @@ -28594,184 +28739,40 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device @end -@implementation MTRBaseClusterWiFiNetworkDiagnostics +@implementation MTRBaseClusterEthernetNetworkDiagnostics - (void)resetCountsWithCompletion:(MTRStatusCompletion)completion { [self resetCountsWithParams:nil completion:completion]; } -- (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsParams * _Nullable)params completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRWiFiNetworkDiagnosticsClusterResetCountsParams + params = [[MTREthernetNetworkDiagnosticsClusterResetCountsParams alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = WiFiNetworkDiagnostics::Commands::ResetCounts::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)readAttributeBSSIDWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WiFiNetworkDiagnostics::Attributes::Bssid::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeBSSIDWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = WiFiNetworkDiagnostics::Attributes::Bssid::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeBSSIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WiFiNetworkDiagnostics::Attributes::Bssid::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeSecurityTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WiFiNetworkDiagnostics::Attributes::SecurityType::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeSecurityTypeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = WiFiNetworkDiagnostics::Attributes::SecurityType::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeSecurityTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WiFiNetworkDiagnostics::Attributes::SecurityType::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeWiFiVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WiFiNetworkDiagnostics::Attributes::WiFiVersion::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeWiFiVersionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = WiFiNetworkDiagnostics::Attributes::WiFiVersion::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeWiFiVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WiFiNetworkDiagnostics::Attributes::WiFiVersion::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeChannelNumberWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WiFiNetworkDiagnostics::Attributes::ChannelNumber::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeChannelNumberWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = WiFiNetworkDiagnostics::Attributes::ChannelNumber::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} + } -+ (void)readAttributeChannelNumberWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = WiFiNetworkDiagnostics::Attributes::ChannelNumber::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = EthernetNetworkDiagnostics::Commands::ResetCounts::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)readAttributeRSSIWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePHYRateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::Rssi::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::PHYRate::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -28780,11 +28781,11 @@ - (void)readAttributeRSSIWithCompletion:(void (^)(NSNumber * _Nullable value, NS completion:completion]; } -- (void)subscribeAttributeRSSIWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePHYRateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::Rssi::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::PHYRate::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -28794,9 +28795,9 @@ - (void)subscribeAttributeRSSIWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRSSIWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePHYRateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::Rssi::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::PHYRate::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -28805,9 +28806,9 @@ + (void)readAttributeRSSIWithClusterStateCache:(MTRClusterStateCacheContainer *) completion:completion]; } -- (void)readAttributeBeaconLostCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFullDuplexWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconLostCount::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::FullDuplex::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -28816,11 +28817,11 @@ - (void)readAttributeBeaconLostCountWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeBeaconLostCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFullDuplexWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconLostCount::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::FullDuplex::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -28830,9 +28831,9 @@ - (void)subscribeAttributeBeaconLostCountWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeBeaconLostCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFullDuplexWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconLostCount::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::FullDuplex::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -28841,9 +28842,9 @@ + (void)readAttributeBeaconLostCountWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -- (void)readAttributeBeaconRxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePacketRxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconRxCount::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketRxCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -28852,11 +28853,11 @@ - (void)readAttributeBeaconRxCountWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeBeaconRxCountWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributePacketRxCountWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconRxCount::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketRxCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -28866,9 +28867,9 @@ - (void)subscribeAttributeBeaconRxCountWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeBeaconRxCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePacketRxCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::BeaconRxCount::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketRxCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -28877,9 +28878,9 @@ + (void)readAttributeBeaconRxCountWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributePacketMulticastRxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePacketTxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketTxCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -28888,11 +28889,11 @@ - (void)readAttributePacketMulticastRxCountWithCompletion:(void (^)(NSNumber * _ completion:completion]; } -- (void)subscribeAttributePacketMulticastRxCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePacketTxCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketTxCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -28902,9 +28903,9 @@ - (void)subscribeAttributePacketMulticastRxCountWithParams:(MTRSubscribeParams * subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePacketMulticastRxCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePacketTxCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketTxCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -28913,9 +28914,9 @@ + (void)readAttributePacketMulticastRxCountWithClusterStateCache:(MTRClusterStat completion:completion]; } -- (void)readAttributePacketMulticastTxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTxErrCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::TxErrCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -28924,11 +28925,11 @@ - (void)readAttributePacketMulticastTxCountWithCompletion:(void (^)(NSNumber * _ completion:completion]; } -- (void)subscribeAttributePacketMulticastTxCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxErrCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::TxErrCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -28938,9 +28939,9 @@ - (void)subscribeAttributePacketMulticastTxCountWithParams:(MTRSubscribeParams * subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePacketMulticastTxCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTxErrCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::TxErrCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -28949,9 +28950,9 @@ + (void)readAttributePacketMulticastTxCountWithClusterStateCache:(MTRClusterStat completion:completion]; } -- (void)readAttributePacketUnicastRxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCollisionCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::CollisionCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -28960,11 +28961,11 @@ - (void)readAttributePacketUnicastRxCountWithCompletion:(void (^)(NSNumber * _Nu completion:completion]; } -- (void)subscribeAttributePacketUnicastRxCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCollisionCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::CollisionCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -28974,9 +28975,9 @@ - (void)subscribeAttributePacketUnicastRxCountWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePacketUnicastRxCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCollisionCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::CollisionCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -28985,9 +28986,9 @@ + (void)readAttributePacketUnicastRxCountWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributePacketUnicastTxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOverrunCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -28996,11 +28997,11 @@ - (void)readAttributePacketUnicastTxCountWithCompletion:(void (^)(NSNumber * _Nu completion:completion]; } -- (void)subscribeAttributePacketUnicastTxCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -29010,9 +29011,9 @@ - (void)subscribeAttributePacketUnicastTxCountWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePacketUnicastTxCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOverrunCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -29021,9 +29022,9 @@ + (void)readAttributePacketUnicastTxCountWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeCurrentMaxRateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCarrierDetectWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::CarrierDetect::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -29032,11 +29033,11 @@ - (void)readAttributeCurrentMaxRateWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeCurrentMaxRateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCarrierDetectWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::CarrierDetect::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -29046,9 +29047,9 @@ - (void)subscribeAttributeCurrentMaxRateWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCurrentMaxRateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCarrierDetectWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::CarrierDetect::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -29057,9 +29058,9 @@ + (void)readAttributeCurrentMaxRateWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } -- (void)readAttributeOverrunCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTimeSinceResetWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::TimeSinceReset::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -29068,11 +29069,11 @@ - (void)readAttributeOverrunCountWithCompletion:(void (^)(NSNumber * _Nullable v completion:completion]; } -- (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTimeSinceResetWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::TimeSinceReset::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -29082,9 +29083,9 @@ - (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOverrunCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTimeSinceResetWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::TimeSinceReset::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -29095,7 +29096,7 @@ + (void)readAttributeOverrunCountWithClusterStateCache:(MTRClusterStateCacheCont - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -29108,7 +29109,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -29120,7 +29121,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 = WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -29131,7 +29132,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -29144,7 +29145,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -29156,7 +29157,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 = WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -29167,7 +29168,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::EventList::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -29180,7 +29181,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::EventList::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -29192,7 +29193,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 = WiFiNetworkDiagnostics::Attributes::EventList::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -29203,7 +29204,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -29216,7 +29217,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -29228,7 +29229,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 = WiFiNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -29239,7 +29240,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -29252,7 +29253,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -29264,7 +29265,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 = WiFiNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -29275,7 +29276,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -29288,7 +29289,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = WiFiNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -29300,7 +29301,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 = WiFiNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = EthernetNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -29311,9 +29312,9 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterWiFiNetworkDiagnostics (Deprecated) +@implementation MTRBaseClusterEthernetNetworkDiagnostics (Deprecated) -- (void)resetCountsWithParams:(MTRWiFiNetworkDiagnosticsClusterResetCountsParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +- (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { [self resetCountsWithParams:params completion: completionHandler]; @@ -29323,53 +29324,18 @@ - (void)resetCountsWithCompletionHandler:(MTRStatusCompletion)completionHandler [self resetCountsWithParams:nil completionHandler:completionHandler]; } -- (void)readAttributeBssidWithCompletionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeBSSIDWithCompletion: - ^(NSData * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeBssidWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSData * _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 subscribeAttributeBSSIDWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSData * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeBssidWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeBSSIDWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSData * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeSecurityTypeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePHYRateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeSecurityTypeWithCompletion: + [self readAttributePHYRateWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeSecurityTypeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePHYRateWithMinInterval:(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) { @@ -29378,33 +29344,33 @@ - (void)subscribeAttributeSecurityTypeWithMinInterval:(NSNumber * _Nonnull)minIn subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeSecurityTypeWithParams: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); - }]; + [self subscribeAttributePHYRateWithParams: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)readAttributeSecurityTypeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePHYRateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeSecurityTypeWithClusterStateCache: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); - }]; + [self readAttributePHYRateWithClusterStateCache: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)readAttributeWiFiVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeFullDuplexWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeWiFiVersionWithCompletion: + [self readAttributeFullDuplexWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeWiFiVersionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeFullDuplexWithMinInterval:(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) { @@ -29413,30 +29379,30 @@ - (void)subscribeAttributeWiFiVersionWithMinInterval:(NSNumber * _Nonnull)minInt subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeWiFiVersionWithParams: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); - }]; + [self subscribeAttributeFullDuplexWithParams: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)readAttributeWiFiVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFullDuplexWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeWiFiVersionWithClusterStateCache: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); - }]; + [self readAttributeFullDuplexWithClusterStateCache: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)readAttributeChannelNumberWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePacketRxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeChannelNumberWithCompletion: + [self readAttributePacketRxCountWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeChannelNumberWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)subscribeAttributePacketRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -29448,100 +29414,30 @@ - (void)subscribeAttributeChannelNumberWithMinInterval:(NSNumber * _Nonnull)minI subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeChannelNumberWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + [self subscribeAttributePacketRxCountWithParams: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)readAttributeChannelNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePacketRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeChannelNumberWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + [self readAttributePacketRxCountWithClusterStateCache: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)readAttributeRssiWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeRSSIWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeRssiWithMinInterval:(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 subscribeAttributeRSSIWithParams: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)readAttributeRssiWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeRSSIWithClusterStateCache: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)readAttributeBeaconLostCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeBeaconLostCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeBeaconLostCountWithMinInterval:(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 subscribeAttributeBeaconLostCountWithParams: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)readAttributeBeaconLostCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeBeaconLostCountWithClusterStateCache: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)readAttributeBeaconRxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributePacketTxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeBeaconRxCountWithCompletion: + [self readAttributePacketTxCountWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeBeaconRxCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)subscribeAttributePacketTxCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -29553,138 +29449,33 @@ - (void)subscribeAttributeBeaconRxCountWithMinInterval:(NSNumber * _Nonnull)minI subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeBeaconRxCountWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + [self subscribeAttributePacketTxCountWithParams: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)readAttributeBeaconRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeBeaconRxCountWithClusterStateCache: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)readAttributePacketMulticastRxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePacketMulticastRxCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributePacketMulticastRxCountWithMinInterval:(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 subscribeAttributePacketMulticastRxCountWithParams: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)readAttributePacketMulticastRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePacketMulticastRxCountWithClusterStateCache: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)readAttributePacketMulticastTxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePacketMulticastTxCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributePacketMulticastTxCountWithMinInterval:(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 subscribeAttributePacketMulticastTxCountWithParams: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)readAttributePacketMulticastTxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePacketMulticastTxCountWithClusterStateCache: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)readAttributePacketUnicastRxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePacketUnicastRxCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributePacketUnicastRxCountWithMinInterval:(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 subscribeAttributePacketUnicastRxCountWithParams: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)readAttributePacketUnicastRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePacketUnicastRxCountWithClusterStateCache: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)readAttributePacketTxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePacketTxCountWithClusterStateCache: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)readAttributePacketUnicastTxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeTxErrCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePacketUnicastTxCountWithCompletion: + [self readAttributeTxErrCountWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributePacketUnicastTxCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTxErrCountWithMinInterval:(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) { @@ -29693,30 +29484,30 @@ - (void)subscribeAttributePacketUnicastTxCountWithMinInterval:(NSNumber * _Nonnu subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributePacketUnicastTxCountWithParams: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); - }]; + [self subscribeAttributeTxErrCountWithParams: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)readAttributePacketUnicastTxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeTxErrCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributePacketUnicastTxCountWithClusterStateCache: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); - }]; + [self readAttributeTxErrCountWithClusterStateCache: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)readAttributeCurrentMaxRateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeCollisionCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeCurrentMaxRateWithCompletion: + [self readAttributeCollisionCountWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeCurrentMaxRateWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)subscribeAttributeCollisionCountWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler @@ -29728,15 +29519,15 @@ - (void)subscribeAttributeCurrentMaxRateWithMinInterval:(NSNumber * _Nonnull)min subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeCurrentMaxRateWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + [self subscribeAttributeCollisionCountWithParams: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)readAttributeCurrentMaxRateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCollisionCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeCurrentMaxRateWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + [self readAttributeCollisionCountWithClusterStateCache: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); @@ -29778,6 +29569,76 @@ + (void)readAttributeOverrunCountWithAttributeCache:(MTRAttributeCacheContainer }]; } +- (void)readAttributeCarrierDetectWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCarrierDetectWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeCarrierDetectWithMinInterval:(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 subscribeAttributeCarrierDetectWithParams: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)readAttributeCarrierDetectWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCarrierDetectWithClusterStateCache: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)readAttributeTimeSinceResetWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeTimeSinceResetWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeTimeSinceResetWithMinInterval:(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 subscribeAttributeTimeSinceResetWithParams: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)readAttributeTimeSinceResetWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeTimeSinceResetWithClusterStateCache: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: @@ -29962,16 +29823,36 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device @end -@implementation MTRBaseClusterEthernetNetworkDiagnostics +@implementation MTRBaseClusterTimeSynchronization -- (void)resetCountsWithCompletion:(MTRStatusCompletion)completion +- (void)setUTCTimeWithParams:(MTRTimeSynchronizationClusterSetUTCTimeParams *)params completion:(MTRStatusCompletion)completion { - [self resetCountsWithParams:nil completion:completion]; + if (params == nil) { + params = [[MTRTimeSynchronizationClusterSetUTCTimeParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = TimeSynchronization::Commands::SetUTCTime::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)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)setTrustedTimeSourceWithParams:(MTRTimeSynchronizationClusterSetTrustedTimeSourceParams *)params completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTREthernetNetworkDiagnosticsClusterResetCountsParams + params = [[MTRTimeSynchronizationClusterSetTrustedTimeSourceParams alloc] init]; } @@ -29981,7 +29862,7 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = EthernetNetworkDiagnostics::Commands::ResetCounts::Type; + using RequestType = TimeSynchronization::Commands::SetTrustedTimeSource::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -29992,10 +29873,82 @@ - (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsPa queue:self.callbackQueue completion:responseHandler]; } +- (void)setTimeZoneWithParams:(MTRTimeSynchronizationClusterSetTimeZoneParams *)params completion:(void (^)(MTRTimeSynchronizationClusterSetTimeZoneResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRTimeSynchronizationClusterSetTimeZoneParams + alloc] init]; + } -- (void)readAttributePHYRateWithCompletion:(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 = TimeSynchronization::Commands::SetTimeZone::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRTimeSynchronizationClusterSetTimeZoneResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)setDSTOffsetWithParams:(MTRTimeSynchronizationClusterSetDSTOffsetParams *)params completion:(MTRStatusCompletion)completion { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::PHYRate::TypeInfo; + if (params == nil) { + params = [[MTRTimeSynchronizationClusterSetDSTOffsetParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = TimeSynchronization::Commands::SetDSTOffset::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)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRTimeSynchronizationClusterSetDefaultNTPParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = TimeSynchronization::Commands::SetDefaultNTP::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)readAttributeUTCTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = TimeSynchronization::Attributes::UTCTime::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -30004,11 +29957,11 @@ - (void)readAttributePHYRateWithCompletion:(void (^)(NSNumber * _Nullable value, completion:completion]; } -- (void)subscribeAttributePHYRateWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeUTCTimeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::PHYRate::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::UTCTime::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -30018,9 +29971,9 @@ - (void)subscribeAttributePHYRateWithParams:(MTRSubscribeParams * _Nonnull)param subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePHYRateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeUTCTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::PHYRate::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::UTCTime::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -30029,9 +29982,9 @@ + (void)readAttributePHYRateWithClusterStateCache:(MTRClusterStateCacheContainer completion:completion]; } -- (void)readAttributeFullDuplexWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGranularityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::FullDuplex::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::Granularity::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -30040,11 +29993,47 @@ - (void)readAttributeFullDuplexWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeFullDuplexWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeGranularityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = TimeSynchronization::Attributes::Granularity::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeGranularityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = TimeSynchronization::Attributes::Granularity::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeTimeSourceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = TimeSynchronization::Attributes::TimeSource::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeTimeSourceWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::FullDuplex::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::TimeSource::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -30054,9 +30043,9 @@ - (void)subscribeAttributeFullDuplexWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFullDuplexWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTimeSourceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::FullDuplex::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::TimeSource::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -30065,9 +30054,9 @@ + (void)readAttributeFullDuplexWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributePacketRxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTrustedTimeSourceWithCompletion:(void (^)(MTRTimeSynchronizationClusterTrustedTimeSourceStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketRxCount::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::TrustedTimeSource::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -30076,11 +30065,11 @@ - (void)readAttributePacketRxCountWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributePacketRxCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTrustedTimeSourceWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRTimeSynchronizationClusterTrustedTimeSourceStruct * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketRxCount::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::TrustedTimeSource::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -30090,9 +30079,9 @@ - (void)subscribeAttributePacketRxCountWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePacketRxCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTrustedTimeSourceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRTimeSynchronizationClusterTrustedTimeSourceStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketRxCount::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::TrustedTimeSource::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -30101,9 +30090,9 @@ + (void)readAttributePacketRxCountWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributePacketTxCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDefaultNTPWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketTxCount::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::DefaultNTP::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -30112,11 +30101,11 @@ - (void)readAttributePacketTxCountWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributePacketTxCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDefaultNTPWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketTxCount::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::DefaultNTP::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -30126,9 +30115,9 @@ - (void)subscribeAttributePacketTxCountWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePacketTxCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDefaultNTPWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::PacketTxCount::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::DefaultNTP::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -30137,9 +30126,9 @@ + (void)readAttributePacketTxCountWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeTxErrCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTimeZoneWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::TxErrCount::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::TimeZone::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -30148,11 +30137,11 @@ - (void)readAttributeTxErrCountWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeTxErrCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTimeZoneWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::TxErrCount::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::TimeZone::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -30162,9 +30151,9 @@ - (void)subscribeAttributeTxErrCountWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTxErrCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTimeZoneWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::TxErrCount::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::TimeZone::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -30173,9 +30162,9 @@ + (void)readAttributeTxErrCountWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeCollisionCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDSTOffsetWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::CollisionCount::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::DSTOffset::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -30184,11 +30173,11 @@ - (void)readAttributeCollisionCountWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeCollisionCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeDSTOffsetWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::CollisionCount::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::DSTOffset::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -30198,9 +30187,9 @@ - (void)subscribeAttributeCollisionCountWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCollisionCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDSTOffsetWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::CollisionCount::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::DSTOffset::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -30209,9 +30198,9 @@ + (void)readAttributeCollisionCountWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } -- (void)readAttributeOverrunCountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLocalTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::LocalTime::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -30220,11 +30209,11 @@ - (void)readAttributeOverrunCountWithCompletion:(void (^)(NSNumber * _Nullable v completion:completion]; } -- (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLocalTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::LocalTime::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -30234,9 +30223,9 @@ - (void)subscribeAttributeOverrunCountWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOverrunCountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLocalTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::OverrunCount::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::LocalTime::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -30245,9 +30234,9 @@ + (void)readAttributeOverrunCountWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } -- (void)readAttributeCarrierDetectWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTimeZoneDatabaseWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::CarrierDetect::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::TimeZoneDatabase::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -30256,11 +30245,11 @@ - (void)readAttributeCarrierDetectWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeCarrierDetectWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTimeZoneDatabaseWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::CarrierDetect::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::TimeZoneDatabase::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -30270,9 +30259,9 @@ - (void)subscribeAttributeCarrierDetectWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCarrierDetectWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTimeZoneDatabaseWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::CarrierDetect::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::TimeZoneDatabase::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -30281,9 +30270,9 @@ + (void)readAttributeCarrierDetectWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeTimeSinceResetWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNTPServerAvailableWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::TimeSinceReset::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::NTPServerAvailable::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -30292,11 +30281,11 @@ - (void)readAttributeTimeSinceResetWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeTimeSinceResetWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNTPServerAvailableWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::TimeSinceReset::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::NTPServerAvailable::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -30306,9 +30295,117 @@ - (void)subscribeAttributeTimeSinceResetWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTimeSinceResetWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNTPServerAvailableWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::TimeSinceReset::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::NTPServerAvailable::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeTimeZoneListMaxSizeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = TimeSynchronization::Attributes::TimeZoneListMaxSize::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeTimeZoneListMaxSizeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = TimeSynchronization::Attributes::TimeZoneListMaxSize::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeTimeZoneListMaxSizeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = TimeSynchronization::Attributes::TimeZoneListMaxSize::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeDSTOffsetListMaxSizeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = TimeSynchronization::Attributes::DSTOffsetListMaxSize::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeDSTOffsetListMaxSizeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = TimeSynchronization::Attributes::DSTOffsetListMaxSize::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeDSTOffsetListMaxSizeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = TimeSynchronization::Attributes::DSTOffsetListMaxSize::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeSupportsDNSResolveWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = TimeSynchronization::Attributes::SupportsDNSResolve::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeSupportsDNSResolveWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = TimeSynchronization::Attributes::SupportsDNSResolve::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeSupportsDNSResolveWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = TimeSynchronization::Attributes::SupportsDNSResolve::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -30319,7 +30416,7 @@ + (void)readAttributeTimeSinceResetWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -30332,7 +30429,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -30344,7 +30441,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 = EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -30355,7 +30452,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -30368,7 +30465,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -30380,7 +30477,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 = EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -30391,7 +30488,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::EventList::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -30404,7 +30501,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::EventList::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -30416,7 +30513,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 = EthernetNetworkDiagnostics::Attributes::EventList::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -30427,7 +30524,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -30440,7 +30537,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -30452,7 +30549,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 = EthernetNetworkDiagnostics::Attributes::AttributeList::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -30463,7 +30560,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -30476,7 +30573,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -30488,7 +30585,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 = EthernetNetworkDiagnostics::Attributes::FeatureMap::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -30499,7 +30596,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -30512,7 +30609,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = EthernetNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -30524,7 +30621,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 = EthernetNetworkDiagnostics::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = TimeSynchronization::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -30535,643 +30632,363 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterEthernetNetworkDiagnostics (Deprecated) - -- (void)resetCountsWithParams:(MTREthernetNetworkDiagnosticsClusterResetCountsParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self resetCountsWithParams:params completion: - completionHandler]; -} -- (void)resetCountsWithCompletionHandler:(MTRStatusCompletion)completionHandler -{ - [self resetCountsWithParams:nil completionHandler:completionHandler]; -} - -- (void)readAttributePHYRateWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePHYRateWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributePHYRateWithMinInterval:(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 subscribeAttributePHYRateWithParams: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)readAttributePHYRateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePHYRateWithClusterStateCache: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)readAttributeFullDuplexWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFullDuplexWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeFullDuplexWithMinInterval:(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 subscribeAttributeFullDuplexWithParams: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)readAttributeFullDuplexWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFullDuplexWithClusterStateCache: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)readAttributePacketRxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePacketRxCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributePacketRxCountWithMinInterval:(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 subscribeAttributePacketRxCountWithParams: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)readAttributePacketRxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePacketRxCountWithClusterStateCache: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); - }]; -} +@implementation MTRBaseClusterBridgedDeviceBasicInformation -- (void)readAttributePacketTxCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePacketTxCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributePacketTxCountWithMinInterval:(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 subscribeAttributePacketTxCountWithParams: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)readAttributePacketTxCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeVendorNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - [self readAttributePacketTxCountWithClusterStateCache: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); - }]; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::VendorName::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeTxErrCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeTxErrCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeTxErrCountWithMinInterval:(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 subscribeAttributeTxErrCountWithParams: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)readAttributeTxErrCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeTxErrCountWithClusterStateCache: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); - }]; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::VendorName::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeCollisionCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCollisionCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeCollisionCountWithMinInterval:(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 subscribeAttributeCollisionCountWithParams: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)readAttributeCollisionCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeVendorNameWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeCollisionCountWithClusterStateCache: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); - }]; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::VendorName::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeOverrunCountWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeOverrunCountWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeOverrunCountWithMinInterval:(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 subscribeAttributeOverrunCountWithParams: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)readAttributeOverrunCountWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeVendorIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeOverrunCountWithClusterStateCache: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); - }]; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::VendorID::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeCarrierDetectWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCarrierDetectWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeCarrierDetectWithMinInterval:(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 subscribeAttributeCarrierDetectWithParams: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)readAttributeCarrierDetectWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeCarrierDetectWithClusterStateCache: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); - }]; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::VendorID::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeTimeSinceResetWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeTimeSinceResetWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeTimeSinceResetWithMinInterval:(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 subscribeAttributeTimeSinceResetWithParams: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)readAttributeTimeSinceResetWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeVendorIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeTimeSinceResetWithClusterStateCache: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); - }]; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::VendorID::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (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 +- (void)readAttributeProductNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - [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); - }]; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductName::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (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 +- (void)subscribeAttributeProductNameWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - [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); - }]; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductName::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (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 ++ (void)readAttributeProductNameWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - [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); - }]; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductName::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeNodeLabelWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeFeatureMapWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::NodeLabel::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (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 + +- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion { - 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); - }]; + [self writeAttributeNodeLabelWithValue:(NSString * _Nonnull) value params:nil completion:completion]; } -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - [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); - }]; + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::NodeLabel::TypeInfo; + TypeInfo::Type cppValue; + cppValue = AsCharSpan(value); + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeNodeLabelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeClusterRevisionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::NodeLabel::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (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 + ++ (void)readAttributeNodeLabelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - 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); - }]; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::NodeLabel::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeHardwareVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [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); - }]; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::HardwareVersion::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue +- (void)subscribeAttributeHardwareVersionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::HardwareVersion::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -@end - -@implementation MTRBaseClusterTimeSynchronization - -- (void)setUTCTimeWithParams:(MTRTimeSynchronizationClusterSetUTCTimeParams *)params completion:(MTRStatusCompletion)completion ++ (void)readAttributeHardwareVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - if (params == nil) { - params = [[MTRTimeSynchronizationClusterSetUTCTimeParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::HardwareVersion::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - using RequestType = TimeSynchronization::Commands::SetUTCTime::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil +- (void)readAttributeHardwareVersionStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BridgedDeviceBasicInformation::Attributes::HardwareVersionString::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil queue:self.callbackQueue - completion:responseHandler]; + completion:completion]; } -- (void)setTrustedTimeSourceWithParams:(MTRTimeSynchronizationClusterSetTrustedTimeSourceParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRTimeSynchronizationClusterSetTrustedTimeSourceParams - alloc] init]; - } - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; +- (void)subscribeAttributeHardwareVersionStringWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BridgedDeviceBasicInformation::Attributes::HardwareVersionString::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; ++ (void)readAttributeHardwareVersionStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BridgedDeviceBasicInformation::Attributes::HardwareVersionString::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - using RequestType = TimeSynchronization::Commands::SetTrustedTimeSource::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil +- (void)readAttributeSoftwareVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BridgedDeviceBasicInformation::Attributes::SoftwareVersion::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil queue:self.callbackQueue - completion:responseHandler]; + completion:completion]; } -- (void)setTimeZoneWithParams:(MTRTimeSynchronizationClusterSetTimeZoneParams *)params completion:(void (^)(MTRTimeSynchronizationClusterSetTimeZoneResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRTimeSynchronizationClusterSetTimeZoneParams - alloc] init]; - } - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; +- (void)subscribeAttributeSoftwareVersionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BridgedDeviceBasicInformation::Attributes::SoftwareVersion::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; ++ (void)readAttributeSoftwareVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BridgedDeviceBasicInformation::Attributes::SoftwareVersion::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - using RequestType = TimeSynchronization::Commands::SetTimeZone::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRTimeSynchronizationClusterSetTimeZoneResponseParams.class +- (void)readAttributeSoftwareVersionStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BridgedDeviceBasicInformation::Attributes::SoftwareVersionString::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil queue:self.callbackQueue - completion:responseHandler]; + completion:completion]; } -- (void)setDSTOffsetWithParams:(MTRTimeSynchronizationClusterSetDSTOffsetParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRTimeSynchronizationClusterSetDSTOffsetParams - alloc] init]; - } - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; +- (void)subscribeAttributeSoftwareVersionStringWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BridgedDeviceBasicInformation::Attributes::SoftwareVersionString::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; ++ (void)readAttributeSoftwareVersionStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BridgedDeviceBasicInformation::Attributes::SoftwareVersionString::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - using RequestType = TimeSynchronization::Commands::SetDSTOffset::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil +- (void)readAttributeManufacturingDateWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ManufacturingDate::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil queue:self.callbackQueue - completion:responseHandler]; + completion:completion]; } -- (void)setDefaultNTPWithParams:(MTRTimeSynchronizationClusterSetDefaultNTPParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRTimeSynchronizationClusterSetDefaultNTPParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; +- (void)subscribeAttributeManufacturingDateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ManufacturingDate::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} - using RequestType = TimeSynchronization::Commands::SetDefaultNTP::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)readAttributeManufacturingDateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ManufacturingDate::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeUTCTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePartNumberWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeSynchronization::Attributes::UTCTime::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::PartNumber::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -31180,11 +30997,11 @@ - (void)readAttributeUTCTimeWithCompletion:(void (^)(NSNumber * _Nullable value, completion:completion]; } -- (void)subscribeAttributeUTCTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePartNumberWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TimeSynchronization::Attributes::UTCTime::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::PartNumber::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -31194,9 +31011,9 @@ - (void)subscribeAttributeUTCTimeWithParams:(MTRSubscribeParams * _Nonnull)param subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeUTCTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePartNumberWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeSynchronization::Attributes::UTCTime::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::PartNumber::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -31205,9 +31022,9 @@ + (void)readAttributeUTCTimeWithClusterStateCache:(MTRClusterStateCacheContainer completion:completion]; } -- (void)readAttributeGranularityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeProductURLWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeSynchronization::Attributes::Granularity::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductURL::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -31216,11 +31033,11 @@ - (void)readAttributeGranularityWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)subscribeAttributeGranularityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeProductURLWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TimeSynchronization::Attributes::Granularity::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductURL::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -31230,9 +31047,9 @@ - (void)subscribeAttributeGranularityWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeGranularityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeProductURLWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeSynchronization::Attributes::Granularity::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductURL::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -31241,9 +31058,9 @@ + (void)readAttributeGranularityWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeTimeSourceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeProductLabelWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeSynchronization::Attributes::TimeSource::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductLabel::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -31252,11 +31069,11 @@ - (void)readAttributeTimeSourceWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeTimeSourceWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeProductLabelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TimeSynchronization::Attributes::TimeSource::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductLabel::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -31266,9 +31083,9 @@ - (void)subscribeAttributeTimeSourceWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTimeSourceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeProductLabelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeSynchronization::Attributes::TimeSource::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductLabel::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -31277,9 +31094,9 @@ + (void)readAttributeTimeSourceWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeTrustedTimeSourceWithCompletion:(void (^)(MTRTimeSynchronizationClusterTrustedTimeSourceStruct * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSerialNumberWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeSynchronization::Attributes::TrustedTimeSource::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::SerialNumber::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -31288,11 +31105,11 @@ - (void)readAttributeTrustedTimeSourceWithCompletion:(void (^)(MTRTimeSynchroniz completion:completion]; } -- (void)subscribeAttributeTrustedTimeSourceWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRTimeSynchronizationClusterTrustedTimeSourceStruct * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSerialNumberWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TimeSynchronization::Attributes::TrustedTimeSource::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::SerialNumber::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -31302,9 +31119,9 @@ - (void)subscribeAttributeTrustedTimeSourceWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTrustedTimeSourceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRTimeSynchronizationClusterTrustedTimeSourceStruct * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSerialNumberWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeSynchronization::Attributes::TrustedTimeSource::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::SerialNumber::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -31313,9 +31130,9 @@ + (void)readAttributeTrustedTimeSourceWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributeDefaultNTPWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeReachableWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeSynchronization::Attributes::DefaultNTP::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::Reachable::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -31324,11 +31141,11 @@ - (void)readAttributeDefaultNTPWithCompletion:(void (^)(NSString * _Nullable val completion:completion]; } -- (void)subscribeAttributeDefaultNTPWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeReachableWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TimeSynchronization::Attributes::DefaultNTP::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::Reachable::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -31338,9 +31155,9 @@ - (void)subscribeAttributeDefaultNTPWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeDefaultNTPWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeReachableWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeSynchronization::Attributes::DefaultNTP::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::Reachable::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -31349,9 +31166,9 @@ + (void)readAttributeDefaultNTPWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeTimeZoneWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUniqueIDWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeSynchronization::Attributes::TimeZone::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::UniqueID::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -31360,11 +31177,11 @@ - (void)readAttributeTimeZoneWithCompletion:(void (^)(NSArray * _Nullable value, completion:completion]; } -- (void)subscribeAttributeTimeZoneWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeUniqueIDWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TimeSynchronization::Attributes::TimeZone::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::UniqueID::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -31374,9 +31191,9 @@ - (void)subscribeAttributeTimeZoneWithParams:(MTRSubscribeParams * _Nonnull)para subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTimeZoneWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeUniqueIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeSynchronization::Attributes::TimeZone::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::UniqueID::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -31385,9 +31202,9 @@ + (void)readAttributeTimeZoneWithClusterStateCache:(MTRClusterStateCacheContaine completion:completion]; } -- (void)readAttributeDSTOffsetWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeProductAppearanceWithCompletion:(void (^)(MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeSynchronization::Attributes::DSTOffset::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductAppearance::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -31396,11 +31213,11 @@ - (void)readAttributeDSTOffsetWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)subscribeAttributeDSTOffsetWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeProductAppearanceWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TimeSynchronization::Attributes::DSTOffset::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductAppearance::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -31410,9 +31227,9 @@ - (void)subscribeAttributeDSTOffsetWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeDSTOffsetWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeProductAppearanceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeSynchronization::Attributes::DSTOffset::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductAppearance::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -31421,9 +31238,9 @@ + (void)readAttributeDSTOffsetWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeLocalTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeSynchronization::Attributes::LocalTime::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -31432,11 +31249,11 @@ - (void)readAttributeLocalTimeWithCompletion:(void (^)(NSNumber * _Nullable valu completion:completion]; } -- (void)subscribeAttributeLocalTimeWithParams:(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 = TimeSynchronization::Attributes::LocalTime::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -31446,9 +31263,9 @@ - (void)subscribeAttributeLocalTimeWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLocalTimeWithClusterStateCache:(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 = TimeSynchronization::Attributes::LocalTime::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -31457,9 +31274,9 @@ + (void)readAttributeLocalTimeWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeTimeZoneDatabaseWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeSynchronization::Attributes::TimeZoneDatabase::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -31468,11 +31285,11 @@ - (void)readAttributeTimeZoneDatabaseWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)subscribeAttributeTimeZoneDatabaseWithParams:(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 = TimeSynchronization::Attributes::TimeZoneDatabase::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -31482,9 +31299,9 @@ - (void)subscribeAttributeTimeZoneDatabaseWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTimeZoneDatabaseWithClusterStateCache:(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 = TimeSynchronization::Attributes::TimeZoneDatabase::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -31493,9 +31310,9 @@ + (void)readAttributeTimeZoneDatabaseWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeNTPServerAvailableWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeSynchronization::Attributes::NTPServerAvailable::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -31504,11 +31321,11 @@ - (void)readAttributeNTPServerAvailableWithCompletion:(void (^)(NSNumber * _Null completion:completion]; } -- (void)subscribeAttributeNTPServerAvailableWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TimeSynchronization::Attributes::NTPServerAvailable::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -31518,9 +31335,9 @@ - (void)subscribeAttributeNTPServerAvailableWithParams:(MTRSubscribeParams * _No subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeNTPServerAvailableWithClusterStateCache:(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 = TimeSynchronization::Attributes::NTPServerAvailable::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -31529,9 +31346,9 @@ + (void)readAttributeNTPServerAvailableWithClusterStateCache:(MTRClusterStateCac completion:completion]; } -- (void)readAttributeTimeZoneListMaxSizeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeSynchronization::Attributes::TimeZoneListMaxSize::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -31540,11 +31357,11 @@ - (void)readAttributeTimeZoneListMaxSizeWithCompletion:(void (^)(NSNumber * _Nul completion:completion]; } -- (void)subscribeAttributeTimeZoneListMaxSizeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _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 = TimeSynchronization::Attributes::TimeZoneListMaxSize::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -31554,9 +31371,9 @@ - (void)subscribeAttributeTimeZoneListMaxSizeWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTimeZoneListMaxSizeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _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 = TimeSynchronization::Attributes::TimeZoneListMaxSize::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -31565,9 +31382,9 @@ + (void)readAttributeTimeZoneListMaxSizeWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeDSTOffsetListMaxSizeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeSynchronization::Attributes::DSTOffsetListMaxSize::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -31576,11 +31393,11 @@ - (void)readAttributeDSTOffsetListMaxSizeWithCompletion:(void (^)(NSNumber * _Nu completion:completion]; } -- (void)subscribeAttributeDSTOffsetListMaxSizeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _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 = TimeSynchronization::Attributes::DSTOffsetListMaxSize::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -31590,9 +31407,9 @@ - (void)subscribeAttributeDSTOffsetListMaxSizeWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeDSTOffsetListMaxSizeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _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 = TimeSynchronization::Attributes::DSTOffsetListMaxSize::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -31601,9 +31418,9 @@ + (void)readAttributeDSTOffsetListMaxSizeWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeSupportsDNSResolveWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TimeSynchronization::Attributes::SupportsDNSResolve::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -31612,11 +31429,11 @@ - (void)readAttributeSupportsDNSResolveWithCompletion:(void (^)(NSNumber * _Null completion:completion]; } -- (void)subscribeAttributeSupportsDNSResolveWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _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 = TimeSynchronization::Attributes::SupportsDNSResolve::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -31626,9 +31443,9 @@ - (void)subscribeAttributeSupportsDNSResolveWithParams:(MTRSubscribeParams * _No subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSupportsDNSResolveWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _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 = TimeSynchronization::Attributes::SupportsDNSResolve::TypeInfo; + using TypeInfo = BridgedDeviceBasicInformation::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -31637,337 +31454,735 @@ + (void)readAttributeSupportsDNSResolveWithClusterStateCache:(MTRClusterStateCac completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterBridgedDeviceBasic +@end + +@implementation MTRBaseClusterBridgedDeviceBasic (Deprecated) + +- (void)readAttributeVendorNameWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = TimeSynchronization::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeVendorNameWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeVendorNameWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _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 subscribeAttributeVendorNameWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeVendorNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeVendorNameWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)readAttributeVendorIDWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = TimeSynchronization::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeVendorIDWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeVendorIDWithMinInterval:(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 subscribeAttributeVendorIDWithParams: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)readAttributeVendorIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeVendorIDWithClusterStateCache: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)readAttributeProductNameWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeProductNameWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeProductNameWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _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 subscribeAttributeProductNameWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeProductNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeProductNameWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeNodeLabelWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeNodeLabelWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeNodeLabelWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeNodeLabelWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeNodeLabelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _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 subscribeAttributeNodeLabelWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeNodeLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeNodeLabelWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeHardwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeHardwareVersionWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeHardwareVersionWithMinInterval:(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 subscribeAttributeHardwareVersionWithParams: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)readAttributeHardwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeHardwareVersionWithClusterStateCache: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)readAttributeHardwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeHardwareVersionStringWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeHardwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _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 subscribeAttributeHardwareVersionStringWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeHardwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeHardwareVersionStringWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeSoftwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSoftwareVersionWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeSoftwareVersionWithMinInterval:(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 subscribeAttributeSoftwareVersionWithParams: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)readAttributeSoftwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSoftwareVersionWithClusterStateCache: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)readAttributeSoftwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSoftwareVersionStringWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeSoftwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _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 subscribeAttributeSoftwareVersionStringWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeSoftwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSoftwareVersionStringWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeManufacturingDateWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeManufacturingDateWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeManufacturingDateWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _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 subscribeAttributeManufacturingDateWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeManufacturingDateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeManufacturingDateWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributePartNumberWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePartNumberWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributePartNumberWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _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 subscribeAttributePartNumberWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributePartNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePartNumberWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeProductURLWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeProductURLWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeProductURLWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _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 subscribeAttributeProductURLWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeProductURLWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeProductURLWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeProductLabelWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeProductLabelWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeProductLabelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _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 subscribeAttributeProductLabelWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeProductLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeProductLabelWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSerialNumberWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = TimeSynchronization::Attributes::GeneratedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeSerialNumberWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeSerialNumberWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TimeSynchronization::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeSerialNumberWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeSerialNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = TimeSynchronization::Attributes::AcceptedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeSerialNumberWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeReachableWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = TimeSynchronization::Attributes::AcceptedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeReachableWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeReachableWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TimeSynchronization::Attributes::EventList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeReachableWithParams: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)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeReachableWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = TimeSynchronization::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeReachableWithClusterStateCache: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)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUniqueIDWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = TimeSynchronization::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeUniqueIDWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeUniqueIDWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TimeSynchronization::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeUniqueIDWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeUniqueIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = TimeSynchronization::Attributes::AttributeList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self readAttributeUniqueIDWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -+ (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = TimeSynchronization::Attributes::AttributeList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeGeneratedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (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 { - using TypeInfo = TimeSynchronization::Attributes::FeatureMap::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + 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)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = TimeSynchronization::Attributes::FeatureMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [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)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = TimeSynchronization::Attributes::FeatureMap::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeAcceptedCommandListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (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 { - using TypeInfo = TimeSynchronization::Attributes::ClusterRevision::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + 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)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = TimeSynchronization::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [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)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = TimeSynchronization::Attributes::ClusterRevision::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeAttributeListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -@end - -@implementation MTRBaseClusterBridgedDeviceBasicInformation - -- (void)readAttributeVendorNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (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 { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::VendorName::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + 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)subscribeAttributeVendorNameWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::VendorName::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [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)readAttributeVendorNameWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::VendorName::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeFeatureMapWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeVendorIDWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (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 { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::VendorID::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + 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)subscribeAttributeVendorIDWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::VendorID::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [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)readAttributeVendorIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::VendorID::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeClusterRevisionWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)readAttributeProductNameWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (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 { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductName::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + 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)subscribeAttributeProductNameWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductName::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [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); + }]; } -+ (void)readAttributeProductNameWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductName::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -- (void)readAttributeNodeLabelWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterSwitch + +- (void)readAttributeNumberOfPositionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::NodeLabel::TypeInfo; + using TypeInfo = Switch::Attributes::NumberOfPositions::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -31975,40 +32190,12 @@ - (void)readAttributeNodeLabelWithCompletion:(void (^)(NSString * _Nullable valu queue:self.callbackQueue completion:completion]; } - -- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeNodeLabelWithValue:(NSString * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = BridgedDeviceBasicInformation::Attributes::NodeLabel::TypeInfo; - TypeInfo::Type cppValue; - cppValue = AsCharSpan(value); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeNodeLabelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeNumberOfPositionsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::NodeLabel::TypeInfo; + using TypeInfo = Switch::Attributes::NumberOfPositions::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -32018,9 +32205,9 @@ - (void)subscribeAttributeNodeLabelWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeNodeLabelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNumberOfPositionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::NodeLabel::TypeInfo; + using TypeInfo = Switch::Attributes::NumberOfPositions::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -32029,9 +32216,9 @@ + (void)readAttributeNodeLabelWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeHardwareVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentPositionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::HardwareVersion::TypeInfo; + using TypeInfo = Switch::Attributes::CurrentPosition::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -32040,11 +32227,11 @@ - (void)readAttributeHardwareVersionWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeHardwareVersionWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeCurrentPositionWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::HardwareVersion::TypeInfo; + using TypeInfo = Switch::Attributes::CurrentPosition::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -32054,9 +32241,9 @@ - (void)subscribeAttributeHardwareVersionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeHardwareVersionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentPositionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::HardwareVersion::TypeInfo; + using TypeInfo = Switch::Attributes::CurrentPosition::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -32065,9 +32252,9 @@ + (void)readAttributeHardwareVersionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -- (void)readAttributeHardwareVersionStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMultiPressMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::HardwareVersionString::TypeInfo; + using TypeInfo = Switch::Attributes::MultiPressMax::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -32076,11 +32263,11 @@ - (void)readAttributeHardwareVersionStringWithCompletion:(void (^)(NSString * _N completion:completion]; } -- (void)subscribeAttributeHardwareVersionStringWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMultiPressMaxWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::HardwareVersionString::TypeInfo; + using TypeInfo = Switch::Attributes::MultiPressMax::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -32090,9 +32277,9 @@ - (void)subscribeAttributeHardwareVersionStringWithParams:(MTRSubscribeParams * subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeHardwareVersionStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMultiPressMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::HardwareVersionString::TypeInfo; + using TypeInfo = Switch::Attributes::MultiPressMax::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -32101,9 +32288,9 @@ + (void)readAttributeHardwareVersionStringWithClusterStateCache:(MTRClusterState completion:completion]; } -- (void)readAttributeSoftwareVersionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::SoftwareVersion::TypeInfo; + using TypeInfo = Switch::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -32112,11 +32299,11 @@ - (void)readAttributeSoftwareVersionWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeSoftwareVersionWithParams:(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 = BridgedDeviceBasicInformation::Attributes::SoftwareVersion::TypeInfo; + using TypeInfo = Switch::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -32126,9 +32313,9 @@ - (void)subscribeAttributeSoftwareVersionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSoftwareVersionWithClusterStateCache:(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 = BridgedDeviceBasicInformation::Attributes::SoftwareVersion::TypeInfo; + using TypeInfo = Switch::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -32137,9 +32324,9 @@ + (void)readAttributeSoftwareVersionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -- (void)readAttributeSoftwareVersionStringWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::SoftwareVersionString::TypeInfo; + using TypeInfo = Switch::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -32148,11 +32335,11 @@ - (void)readAttributeSoftwareVersionStringWithCompletion:(void (^)(NSString * _N completion:completion]; } -- (void)subscribeAttributeSoftwareVersionStringWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _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 = BridgedDeviceBasicInformation::Attributes::SoftwareVersionString::TypeInfo; + using TypeInfo = Switch::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -32162,9 +32349,9 @@ - (void)subscribeAttributeSoftwareVersionStringWithParams:(MTRSubscribeParams * subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSoftwareVersionStringWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _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 = BridgedDeviceBasicInformation::Attributes::SoftwareVersionString::TypeInfo; + using TypeInfo = Switch::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -32173,9 +32360,9 @@ + (void)readAttributeSoftwareVersionStringWithClusterStateCache:(MTRClusterState completion:completion]; } -- (void)readAttributeManufacturingDateWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::ManufacturingDate::TypeInfo; + using TypeInfo = Switch::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -32184,11 +32371,11 @@ - (void)readAttributeManufacturingDateWithCompletion:(void (^)(NSString * _Nulla completion:completion]; } -- (void)subscribeAttributeManufacturingDateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::ManufacturingDate::TypeInfo; + using TypeInfo = Switch::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -32198,9 +32385,9 @@ - (void)subscribeAttributeManufacturingDateWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeManufacturingDateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _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 = BridgedDeviceBasicInformation::Attributes::ManufacturingDate::TypeInfo; + using TypeInfo = Switch::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -32209,9 +32396,9 @@ + (void)readAttributeManufacturingDateWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributePartNumberWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::PartNumber::TypeInfo; + using TypeInfo = Switch::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -32220,11 +32407,11 @@ - (void)readAttributePartNumberWithCompletion:(void (^)(NSString * _Nullable val completion:completion]; } -- (void)subscribeAttributePartNumberWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _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 = BridgedDeviceBasicInformation::Attributes::PartNumber::TypeInfo; + using TypeInfo = Switch::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -32234,9 +32421,9 @@ - (void)subscribeAttributePartNumberWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePartNumberWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _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 = BridgedDeviceBasicInformation::Attributes::PartNumber::TypeInfo; + using TypeInfo = Switch::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -32245,9 +32432,9 @@ + (void)readAttributePartNumberWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeProductURLWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductURL::TypeInfo; + using TypeInfo = Switch::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -32256,11 +32443,11 @@ - (void)readAttributeProductURLWithCompletion:(void (^)(NSString * _Nullable val completion:completion]; } -- (void)subscribeAttributeProductURLWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductURL::TypeInfo; + using TypeInfo = Switch::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -32270,9 +32457,9 @@ - (void)subscribeAttributeProductURLWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeProductURLWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _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 = BridgedDeviceBasicInformation::Attributes::ProductURL::TypeInfo; + using TypeInfo = Switch::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -32281,9 +32468,9 @@ + (void)readAttributeProductURLWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeProductLabelWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductLabel::TypeInfo; + using TypeInfo = Switch::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -32292,11 +32479,11 @@ - (void)readAttributeProductLabelWithCompletion:(void (^)(NSString * _Nullable v completion:completion]; } -- (void)subscribeAttributeProductLabelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _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 = BridgedDeviceBasicInformation::Attributes::ProductLabel::TypeInfo; + using TypeInfo = Switch::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -32306,9 +32493,9 @@ - (void)subscribeAttributeProductLabelWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeProductLabelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _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 = BridgedDeviceBasicInformation::Attributes::ProductLabel::TypeInfo; + using TypeInfo = Switch::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -32317,45 +32504,390 @@ + (void)readAttributeProductLabelWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } -- (void)readAttributeSerialNumberWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterSwitch (Deprecated) + +- (void)readAttributeNumberOfPositionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::SerialNumber::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil + [self readAttributeNumberOfPositionsWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeNumberOfPositionsWithMinInterval:(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 subscribeAttributeNumberOfPositionsWithParams: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)readAttributeNumberOfPositionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeNumberOfPositionsWithClusterStateCache: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)readAttributeCurrentPositionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentPositionWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeCurrentPositionWithMinInterval:(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 subscribeAttributeCurrentPositionWithParams: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)readAttributeCurrentPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentPositionWithClusterStateCache: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)readAttributeMultiPressMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMultiPressMaxWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeMultiPressMaxWithMinInterval:(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 subscribeAttributeMultiPressMaxWithParams: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)readAttributeMultiPressMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeMultiPressMaxWithClusterStateCache: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 MTRBaseClusterAdministratorCommissioning + +- (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenCommissioningWindowParams *)params 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 + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil queue:self.callbackQueue - completion:completion]; + completion:responseHandler]; } +- (void)openBasicCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams + alloc] init]; + } -- (void)subscribeAttributeSerialNumberWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + 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 + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)revokeCommissioningWithCompletion:(MTRStatusCompletion)completion { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::SerialNumber::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self revokeCommissioningWithParams:nil completion:completion]; } +- (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevokeCommissioningParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRAdministratorCommissioningClusterRevokeCommissioningParams + 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); + } -+ (void)readAttributeSerialNumberWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = BridgedDeviceBasicInformation::Attributes::SerialNumber::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + using RequestType = AdministratorCommissioning::Commands::RevokeCommissioning::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)readAttributeReachableWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWindowStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::Reachable::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::WindowStatus::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -32364,11 +32896,11 @@ - (void)readAttributeReachableWithCompletion:(void (^)(NSNumber * _Nullable valu completion:completion]; } -- (void)subscribeAttributeReachableWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeWindowStatusWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::Reachable::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::WindowStatus::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -32378,9 +32910,9 @@ - (void)subscribeAttributeReachableWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeReachableWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeWindowStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::Reachable::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::WindowStatus::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -32389,9 +32921,9 @@ + (void)readAttributeReachableWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeUniqueIDWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAdminFabricIndexWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::UniqueID::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::AdminFabricIndex::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -32400,11 +32932,11 @@ - (void)readAttributeUniqueIDWithCompletion:(void (^)(NSString * _Nullable value completion:completion]; } -- (void)subscribeAttributeUniqueIDWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAdminFabricIndexWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::UniqueID::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::AdminFabricIndex::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -32414,9 +32946,9 @@ - (void)subscribeAttributeUniqueIDWithParams:(MTRSubscribeParams * _Nonnull)para subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeUniqueIDWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAdminFabricIndexWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::UniqueID::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::AdminFabricIndex::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -32425,9 +32957,9 @@ + (void)readAttributeUniqueIDWithClusterStateCache:(MTRClusterStateCacheContaine completion:completion]; } -- (void)readAttributeProductAppearanceWithCompletion:(void (^)(MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAdminVendorIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductAppearance::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::AdminVendorId::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -32436,11 +32968,11 @@ - (void)readAttributeProductAppearanceWithCompletion:(void (^)(MTRBridgedDeviceB completion:completion]; } -- (void)subscribeAttributeProductAppearanceWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAdminVendorIdWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductAppearance::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::AdminVendorId::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -32450,9 +32982,9 @@ - (void)subscribeAttributeProductAppearanceWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeProductAppearanceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAdminVendorIdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::ProductAppearance::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::AdminVendorId::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -32463,7 +32995,7 @@ + (void)readAttributeProductAppearanceWithClusterStateCache:(MTRClusterStateCach - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -32476,7 +33008,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -32488,7 +33020,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 = BridgedDeviceBasicInformation::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -32499,7 +33031,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -32512,7 +33044,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -32524,7 +33056,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 = BridgedDeviceBasicInformation::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -32535,7 +33067,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::EventList::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -32548,7 +33080,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::EventList::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -32560,7 +33092,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 = BridgedDeviceBasicInformation::Attributes::EventList::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -32571,7 +33103,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::AttributeList::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -32584,7 +33116,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BridgedDeviceBasicInformation::Attributes::AttributeList::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -32596,7 +33128,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 = BridgedDeviceBasicInformation::Attributes::AttributeList::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -32607,523 +33139,112 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BridgedDeviceBasicInformation::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 = BridgedDeviceBasicInformation::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 = BridgedDeviceBasicInformation::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 = BridgedDeviceBasicInformation::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = AdministratorCommissioning::Attributes::FeatureMap::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 = BridgedDeviceBasicInformation::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 = BridgedDeviceBasicInformation::Attributes::ClusterRevision::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -@end - -@implementation MTRBaseClusterBridgedDeviceBasic -@end - -@implementation MTRBaseClusterBridgedDeviceBasic (Deprecated) - -- (void)readAttributeVendorNameWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeVendorNameWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeVendorNameWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _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 subscribeAttributeVendorNameWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeVendorNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeVendorNameWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeVendorIDWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeVendorIDWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeVendorIDWithMinInterval:(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 subscribeAttributeVendorIDWithParams: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)readAttributeVendorIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeVendorIDWithClusterStateCache: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)readAttributeProductNameWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeProductNameWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeProductNameWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _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 subscribeAttributeProductNameWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeProductNameWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeProductNameWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeNodeLabelWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeNodeLabelWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeNodeLabelWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeNodeLabelWithValue:(NSString * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeNodeLabelWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeNodeLabelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _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 subscribeAttributeNodeLabelWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeNodeLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeNodeLabelWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeHardwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeHardwareVersionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeHardwareVersionWithMinInterval:(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 subscribeAttributeHardwareVersionWithParams: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)readAttributeHardwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeHardwareVersionWithClusterStateCache: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)readAttributeHardwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeHardwareVersionStringWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeHardwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _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 subscribeAttributeHardwareVersionStringWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeHardwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeHardwareVersionStringWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeSoftwareVersionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSoftwareVersionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeSoftwareVersionWithMinInterval:(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 subscribeAttributeSoftwareVersionWithParams: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)readAttributeSoftwareVersionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSoftwareVersionWithClusterStateCache: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)readAttributeSoftwareVersionStringWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSoftwareVersionStringWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeSoftwareVersionStringWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _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 subscribeAttributeSoftwareVersionStringWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeSoftwareVersionStringWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSoftwareVersionStringWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeManufacturingDateWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeManufacturingDateWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeManufacturingDateWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _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 subscribeAttributeManufacturingDateWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeManufacturingDateWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeManufacturingDateWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributePartNumberWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributePartNumberWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributePartNumberWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _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 subscribeAttributePartNumberWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + completion:completion]; } -+ (void)readAttributePartNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributePartNumberWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = AdministratorCommissioning::Attributes::FeatureMap::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeProductURLWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeProductURLWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = AdministratorCommissioning::Attributes::FeatureMap::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeProductURLWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeProductURLWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + using TypeInfo = AdministratorCommissioning::Attributes::ClusterRevision::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeProductURLWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeProductURLWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = AdministratorCommissioning::Attributes::ClusterRevision::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeProductLabelWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeProductLabelWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = AdministratorCommissioning::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeProductLabelWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + +@end + +@implementation MTRBaseClusterAdministratorCommissioning (Deprecated) + +- (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenCommissioningWindowParams *)params completionHandler:(MTRStatusCompletion)completionHandler { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeProductLabelWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self openCommissioningWindowWithParams:params completion: + completionHandler]; } -+ (void)readAttributeProductLabelWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)openBasicCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams *)params completionHandler:(MTRStatusCompletion)completionHandler { - [self readAttributeProductLabelWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self openBasicCommissioningWindowWithParams:params completion: + completionHandler]; +} +- (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevokeCommissioningParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self revokeCommissioningWithParams:params completion: + completionHandler]; +} +- (void)revokeCommissioningWithCompletionHandler:(MTRStatusCompletion)completionHandler +{ + [self revokeCommissioningWithParams:nil completionHandler:completionHandler]; } -- (void)readAttributeSerialNumberWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeWindowStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeSerialNumberWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { + [self readAttributeWindowStatusWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeSerialNumberWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval +- (void)subscribeAttributeWindowStatusWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval params:(MTRSubscribeParams * _Nullable)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { MTRSubscribeParams * _Nullable subscribeParams = [params copy]; if (subscribeParams == nil) { @@ -33132,33 +33253,33 @@ - (void)subscribeAttributeSerialNumberWithMinInterval:(NSNumber * _Nonnull)minIn subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeSerialNumberWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { + [self subscribeAttributeWindowStatusWithParams: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); + reportHandler(static_cast(value), error); }]; } -+ (void)readAttributeSerialNumberWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeWindowStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeSerialNumberWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { + [self readAttributeWindowStatusWithClusterStateCache: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); + completionHandler(static_cast(value), error); }]; } -- (void)readAttributeReachableWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAdminFabricIndexWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeReachableWithCompletion: + [self readAttributeAdminFabricIndexWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeReachableWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAdminFabricIndexWithMinInterval:(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) { @@ -33167,33 +33288,33 @@ - (void)subscribeAttributeReachableWithMinInterval:(NSNumber * _Nonnull)minInter subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeReachableWithParams: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); - }]; + [self subscribeAttributeAdminFabricIndexWithParams: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)readAttributeReachableWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAdminFabricIndexWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeReachableWithClusterStateCache: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); - }]; + [self readAttributeAdminFabricIndexWithClusterStateCache: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)readAttributeUniqueIDWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAdminVendorIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeUniqueIDWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { + [self readAttributeAdminVendorIdWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeUniqueIDWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeAdminVendorIdWithMinInterval:(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) { @@ -33202,19 +33323,19 @@ - (void)subscribeAttributeUniqueIDWithMinInterval:(NSNumber * _Nonnull)minInterv subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeUniqueIDWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; + [self subscribeAttributeAdminVendorIdWithParams: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)readAttributeUniqueIDWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAdminVendorIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeUniqueIDWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeAdminVendorIdWithClusterStateCache: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 @@ -33313,99 +33434,400 @@ - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minI 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 ++ (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 MTRBaseClusterOperationalCredentials + +- (void)attestationRequestWithParams:(MTROperationalCredentialsClusterAttestationRequestParams *)params completion:(void (^)(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + 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 + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTROperationalCredentialsClusterAttestationResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)certificateChainRequestWithParams:(MTROperationalCredentialsClusterCertificateChainRequestParams *)params completion:(void (^)(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + 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 + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTROperationalCredentialsClusterCertificateChainResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)CSRRequestWithParams:(MTROperationalCredentialsClusterCSRRequestParams *)params completion:(void (^)(MTROperationalCredentialsClusterCSRResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + 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 + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTROperationalCredentialsClusterCSRResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)addNOCWithParams:(MTROperationalCredentialsClusterAddNOCParams *)params completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTROperationalCredentialsClusterAddNOCParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = OperationalCredentials::Commands::AddNOC::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTROperationalCredentialsClusterNOCResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)updateNOCWithParams:(MTROperationalCredentialsClusterUpdateNOCParams *)params completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTROperationalCredentialsClusterUpdateNOCParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = OperationalCredentials::Commands::UpdateNOC::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTROperationalCredentialsClusterNOCResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)updateFabricLabelWithParams:(MTROperationalCredentialsClusterUpdateFabricLabelParams *)params completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTROperationalCredentialsClusterUpdateFabricLabelParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = OperationalCredentials::Commands::UpdateFabricLabel::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTROperationalCredentialsClusterNOCResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)removeFabricWithParams:(MTROperationalCredentialsClusterRemoveFabricParams *)params completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTROperationalCredentialsClusterRemoveFabricParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = OperationalCredentials::Commands::RemoveFabric::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTROperationalCredentialsClusterNOCResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAddTrustedRootCertificateParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTROperationalCredentialsClusterAddTrustedRootCertificateParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = OperationalCredentials::Commands::AddTrustedRootCertificate::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)readAttributeNOCsWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [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); - }]; + using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeNOCsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeFeatureMapWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (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 + ++ (void)readAttributeNOCsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - 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); - }]; + using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeFabricsWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [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); - }]; + using TypeInfo = OperationalCredentials::Attributes::Fabrics::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeFabricsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeClusterRevisionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = OperationalCredentials::Attributes::Fabrics::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (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 + ++ (void)readAttributeFabricsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - 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); - }]; + using TypeInfo = OperationalCredentials::Attributes::Fabrics::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeSupportedFabricsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [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); - }]; + using TypeInfo = OperationalCredentials::Attributes::SupportedFabrics::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue +- (void)subscribeAttributeSupportedFabricsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + using TypeInfo = OperationalCredentials::Attributes::SupportedFabrics::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -@end - -@implementation MTRBaseClusterSwitch ++ (void)readAttributeSupportedFabricsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = OperationalCredentials::Attributes::SupportedFabrics::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} -- (void)readAttributeNumberOfPositionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCommissionedFabricsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Switch::Attributes::NumberOfPositions::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::CommissionedFabrics::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -33414,11 +33836,11 @@ - (void)readAttributeNumberOfPositionsWithCompletion:(void (^)(NSNumber * _Nulla completion:completion]; } -- (void)subscribeAttributeNumberOfPositionsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCommissionedFabricsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Switch::Attributes::NumberOfPositions::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::CommissionedFabrics::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -33428,9 +33850,9 @@ - (void)subscribeAttributeNumberOfPositionsWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeNumberOfPositionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCommissionedFabricsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Switch::Attributes::NumberOfPositions::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::CommissionedFabrics::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -33439,9 +33861,9 @@ + (void)readAttributeNumberOfPositionsWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributeCurrentPositionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTrustedRootCertificatesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Switch::Attributes::CurrentPosition::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -33450,11 +33872,11 @@ - (void)readAttributeCurrentPositionWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributeCurrentPositionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTrustedRootCertificatesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Switch::Attributes::CurrentPosition::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -33464,9 +33886,9 @@ - (void)subscribeAttributeCurrentPositionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCurrentPositionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTrustedRootCertificatesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Switch::Attributes::CurrentPosition::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -33475,9 +33897,9 @@ + (void)readAttributeCurrentPositionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -- (void)readAttributeMultiPressMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentFabricIndexWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Switch::Attributes::MultiPressMax::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -33486,11 +33908,11 @@ - (void)readAttributeMultiPressMaxWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeMultiPressMaxWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentFabricIndexWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Switch::Attributes::MultiPressMax::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -33500,9 +33922,9 @@ - (void)subscribeAttributeMultiPressMaxWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMultiPressMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentFabricIndexWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Switch::Attributes::MultiPressMax::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -33513,7 +33935,7 @@ + (void)readAttributeMultiPressMaxWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Switch::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -33526,7 +33948,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Switch::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -33538,7 +33960,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 = Switch::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -33549,7 +33971,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Switch::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -33562,7 +33984,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Switch::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -33574,7 +33996,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 = Switch::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -33585,7 +34007,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Switch::Attributes::EventList::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -33598,7 +34020,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Switch::Attributes::EventList::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -33610,7 +34032,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 = Switch::Attributes::EventList::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -33621,7 +34043,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Switch::Attributes::AttributeList::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -33634,7 +34056,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Switch::Attributes::AttributeList::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -33646,7 +34068,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 = Switch::Attributes::AttributeList::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -33657,7 +34079,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Switch::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -33670,7 +34092,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Switch::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -33682,7 +34104,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 = Switch::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -33693,7 +34115,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Switch::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -33706,7 +34128,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Switch::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -33718,7 +34140,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 = Switch::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OperationalCredentials::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -33729,20 +34151,152 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterSwitch (Deprecated) +@implementation MTRBaseClusterOperationalCredentials (Deprecated) -- (void)readAttributeNumberOfPositionsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)attestationRequestWithParams:(MTROperationalCredentialsClusterAttestationRequestParams *)params completionHandler:(void (^)(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable data, NSError * _Nullable error))completionHandler { - [self readAttributeNumberOfPositionsWithCompletion: + [self attestationRequestWithParams:params 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 completionHandler:(void (^)(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self certificateChainRequestWithParams:params completion: + ^(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; +} +- (void)CSRRequestWithParams:(MTROperationalCredentialsClusterCSRRequestParams *)params completionHandler:(void (^)(MTROperationalCredentialsClusterCSRResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self CSRRequestWithParams:params completion: + ^(MTROperationalCredentialsClusterCSRResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; +} +- (void)addNOCWithParams:(MTROperationalCredentialsClusterAddNOCParams *)params completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self addNOCWithParams:params 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 completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self updateNOCWithParams:params 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 completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self updateFabricLabelWithParams:params 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 completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self removeFabricWithParams:params 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 completionHandler:(MTRStatusCompletion)completionHandler +{ + [self addTrustedRootCertificateWithParams:params completion: + completionHandler]; +} + +- (void)readAttributeNOCsWithParams:(MTRReadParams * _Nullable)params completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeNOCsWithParams:params completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeNOCsWithMinInterval:(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 subscribeAttributeNOCsWithParams: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)readAttributeNOCsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeNOCsWithClusterStateCache: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)readAttributeFabricsWithParams:(MTRReadParams * _Nullable)params completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFabricsWithParams:params completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeFabricsWithMinInterval:(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 subscribeAttributeFabricsWithParams: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)readAttributeFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeFabricsWithClusterStateCache: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)readAttributeSupportedFabricsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSupportedFabricsWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeNumberOfPositionsWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSupportedFabricsWithMinInterval:(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) { @@ -33751,33 +34305,33 @@ - (void)subscribeAttributeNumberOfPositionsWithMinInterval:(NSNumber * _Nonnull) subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeNumberOfPositionsWithParams: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); - }]; + [self subscribeAttributeSupportedFabricsWithParams: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)readAttributeNumberOfPositionsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeSupportedFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeNumberOfPositionsWithClusterStateCache: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); - }]; + [self readAttributeSupportedFabricsWithClusterStateCache: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)readAttributeCurrentPositionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeCommissionedFabricsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeCurrentPositionWithCompletion: + [self readAttributeCommissionedFabricsWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeCurrentPositionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCommissionedFabricsWithMinInterval:(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) { @@ -33786,33 +34340,68 @@ - (void)subscribeAttributeCurrentPositionWithMinInterval:(NSNumber * _Nonnull)mi subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeCurrentPositionWithParams: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); - }]; + [self subscribeAttributeCommissionedFabricsWithParams: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)readAttributeCurrentPositionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCommissionedFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeCurrentPositionWithClusterStateCache: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); - }]; + [self readAttributeCommissionedFabricsWithClusterStateCache: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)readAttributeMultiPressMaxWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeTrustedRootCertificatesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMultiPressMaxWithCompletion: + [self readAttributeTrustedRootCertificatesWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeTrustedRootCertificatesWithMinInterval:(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 subscribeAttributeTrustedRootCertificatesWithParams: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)readAttributeTrustedRootCertificatesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeTrustedRootCertificatesWithClusterStateCache: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)readAttributeCurrentFabricIndexWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentFabricIndexWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeMultiPressMaxWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentFabricIndexWithMinInterval:(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) { @@ -33821,19 +34410,19 @@ - (void)subscribeAttributeMultiPressMaxWithMinInterval:(NSNumber * _Nonnull)minI subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeMultiPressMaxWithParams: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); - }]; + [self subscribeAttributeCurrentFabricIndexWithParams: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)readAttributeMultiPressMaxWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeCurrentFabricIndexWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMultiPressMaxWithClusterStateCache: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); - }]; + [self readAttributeCurrentFabricIndexWithClusterStateCache: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 @@ -34020,12 +34609,12 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device @end -@implementation MTRBaseClusterAdministratorCommissioning +@implementation MTRBaseClusterGroupKeyManagement -- (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenCommissioningWindowParams *)params completion:(MTRStatusCompletion)completion +- (void)keySetWriteWithParams:(MTRGroupKeyManagementClusterKeySetWriteParams *)params completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRAdministratorCommissioningClusterOpenCommissioningWindowParams + params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; } @@ -34034,11 +34623,8 @@ - (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterO }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - if (timedInvokeTimeoutMs == nil) { - timedInvokeTimeoutMs = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); - } - using RequestType = AdministratorCommissioning::Commands::OpenCommissioningWindow::Type; + using RequestType = GroupKeyManagement::Commands::KeySetWrite::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -34049,23 +34635,44 @@ - (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterO queue:self.callbackQueue completion:responseHandler]; } -- (void)openBasicCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams *)params completion:(MTRStatusCompletion)completion +- (void)keySetReadWithParams:(MTRGroupKeyManagementClusterKeySetReadParams *)params completion:(void (^)(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams + params = [[MTRGroupKeyManagementClusterKeySetReadParams 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 = GroupKeyManagement::Commands::KeySetRead::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRGroupKeyManagementClusterKeySetReadResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)keySetRemoveWithParams:(MTRGroupKeyManagementClusterKeySetRemoveParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRGroupKeyManagementClusterKeySetRemoveParams + alloc] init]; } - using RequestType = AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type; + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = GroupKeyManagement::Commands::KeySetRemove::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -34076,54 +34683,102 @@ - (void)openBasicCommissioningWindowWithParams:(MTRAdministratorCommissioningClu queue:self.callbackQueue completion:responseHandler]; } -- (void)revokeCommissioningWithCompletion:(MTRStatusCompletion)completion +- (void)keySetReadAllIndicesWithCompletion:(void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, NSError * _Nullable error))completion { - [self revokeCommissioningWithParams:nil completion:completion]; + [self keySetReadAllIndicesWithParams:nil completion:completion]; } -- (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevokeCommissioningParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAllIndicesParams * _Nullable)params completion:(void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRAdministratorCommissioningClusterRevokeCommissioningParams + params = [[MTRGroupKeyManagementClusterKeySetReadAllIndicesParams 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::RevokeCommissioning::Type; + using RequestType = GroupKeyManagement::Commands::KeySetReadAllIndices::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil + responseClass:MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)readAttributeWindowStatusWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGroupKeyMapWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AdministratorCommissioning::Attributes::WindowStatus::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) - params:nil + params:params queue:self.callbackQueue completion:completion]; } -- (void)subscribeAttributeWindowStatusWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = AdministratorCommissioning::Attributes::WindowStatus::TypeInfo; + [self writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; + TypeInfo::Type cppValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.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 < value.count; ++i_0) { + if ( ! [value[i_0] isKindOfClass: [MTRGroupKeyManagementClusterGroupKeyMapStruct class]] ) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (MTRGroupKeyManagementClusterGroupKeyMapStruct *)value[i_0]; + listHolder_0->mList[i_0].groupId = element_0.groupId.unsignedShortValue; + listHolder_0->mList[i_0].groupKeySetID = element_0.groupKeySetID.unsignedShortValue; + listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedCharValue; + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeGroupKeyMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -34133,9 +34788,9 @@ - (void)subscribeAttributeWindowStatusWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeWindowStatusWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeGroupKeyMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AdministratorCommissioning::Attributes::WindowStatus::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -34144,9 +34799,45 @@ + (void)readAttributeWindowStatusWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } -- (void)readAttributeAdminFabricIndexWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGroupTableWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AdministratorCommissioning::Attributes::AdminFabricIndex::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::GroupTable::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeGroupTableWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = GroupKeyManagement::Attributes::GroupTable::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeGroupTableWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = GroupKeyManagement::Attributes::GroupTable::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeMaxGroupsPerFabricWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = GroupKeyManagement::Attributes::MaxGroupsPerFabric::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -34155,11 +34846,11 @@ - (void)readAttributeAdminFabricIndexWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)subscribeAttributeAdminFabricIndexWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxGroupsPerFabricWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AdministratorCommissioning::Attributes::AdminFabricIndex::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::MaxGroupsPerFabric::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -34169,9 +34860,9 @@ - (void)subscribeAttributeAdminFabricIndexWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAdminFabricIndexWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxGroupsPerFabricWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AdministratorCommissioning::Attributes::AdminFabricIndex::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::MaxGroupsPerFabric::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -34180,9 +34871,9 @@ + (void)readAttributeAdminFabricIndexWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeAdminVendorIdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxGroupKeysPerFabricWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AdministratorCommissioning::Attributes::AdminVendorId::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -34191,11 +34882,11 @@ - (void)readAttributeAdminVendorIdWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeAdminVendorIdWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxGroupKeysPerFabricWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AdministratorCommissioning::Attributes::AdminVendorId::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -34205,9 +34896,9 @@ - (void)subscribeAttributeAdminVendorIdWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAdminVendorIdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxGroupKeysPerFabricWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AdministratorCommissioning::Attributes::AdminVendorId::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -34218,7 +34909,7 @@ + (void)readAttributeAdminVendorIdWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AdministratorCommissioning::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -34231,7 +34922,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AdministratorCommissioning::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -34243,7 +34934,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 = AdministratorCommissioning::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -34254,7 +34945,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AdministratorCommissioning::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -34267,7 +34958,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AdministratorCommissioning::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -34279,7 +34970,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 = AdministratorCommissioning::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -34290,7 +34981,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AdministratorCommissioning::Attributes::EventList::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -34303,7 +34994,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AdministratorCommissioning::Attributes::EventList::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -34315,7 +35006,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 = AdministratorCommissioning::Attributes::EventList::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -34326,7 +35017,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AdministratorCommissioning::Attributes::AttributeList::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -34339,7 +35030,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AdministratorCommissioning::Attributes::AttributeList::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -34351,7 +35042,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 = AdministratorCommissioning::Attributes::AttributeList::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -34362,7 +35053,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AdministratorCommissioning::Attributes::FeatureMap::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -34375,7 +35066,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AdministratorCommissioning::Attributes::FeatureMap::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -34387,7 +35078,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 = AdministratorCommissioning::Attributes::FeatureMap::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -34398,7 +35089,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AdministratorCommissioning::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -34411,7 +35102,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AdministratorCommissioning::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = GroupKeyManagement::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -34421,53 +35112,103 @@ - (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)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = GroupKeyManagement::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +@end + +@implementation MTRBaseClusterGroupKeyManagement (Deprecated) + +- (void)keySetWriteWithParams:(MTRGroupKeyManagementClusterKeySetWriteParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self keySetWriteWithParams:params completion: + completionHandler]; +} +- (void)keySetReadWithParams:(MTRGroupKeyManagementClusterKeySetReadParams *)params completionHandler:(void (^)(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self keySetReadWithParams:params 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 completionHandler:(MTRStatusCompletion)completionHandler +{ + [self keySetRemoveWithParams:params completion: + completionHandler]; +} +- (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAllIndicesParams * _Nullable)params completionHandler:(void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, NSError * _Nullable error))completionHandler +{ + [self keySetReadAllIndicesWithParams:params completion: + ^(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(data), error); + }]; +} + +- (void)readAttributeGroupKeyMapWithParams:(MTRReadParams * _Nullable)params completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = AdministratorCommissioning::Attributes::ClusterRevision::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self readAttributeGroupKeyMapWithParams:params completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -@end - -@implementation MTRBaseClusterAdministratorCommissioning (Deprecated) - -- (void)openCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenCommissioningWindowParams *)params completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler { - [self openCommissioningWindowWithParams:params completion: - completionHandler]; + [self writeAttributeGroupKeyMapWithValue:value params:nil completion:completionHandler]; } -- (void)openBasicCommissioningWindowWithParams:(MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams *)params completionHandler:(MTRStatusCompletion)completionHandler +- (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler { - [self openBasicCommissioningWindowWithParams:params completion: - completionHandler]; + [self writeAttributeGroupKeyMapWithValue:value params:params completion:completionHandler]; } -- (void)revokeCommissioningWithParams:(MTRAdministratorCommissioningClusterRevokeCommissioningParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +- (void)subscribeAttributeGroupKeyMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [self revokeCommissioningWithParams:params completion: - completionHandler]; + MTRSubscribeParams * _Nullable subscribeParams = [params copy]; + if (subscribeParams == nil) { + subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; + } else { + subscribeParams.minInterval = minInterval; + subscribeParams.maxInterval = maxInterval; + } + [self subscribeAttributeGroupKeyMapWithParams: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)revokeCommissioningWithCompletionHandler:(MTRStatusCompletion)completionHandler ++ (void)readAttributeGroupKeyMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self revokeCommissioningWithParams:nil completionHandler:completionHandler]; + [self readAttributeGroupKeyMapWithClusterStateCache: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)readAttributeWindowStatusWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeGroupTableWithParams:(MTRReadParams * _Nullable)params completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeWindowStatusWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + [self readAttributeGroupTableWithParams:params completion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } -- (void)subscribeAttributeWindowStatusWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeGroupTableWithMinInterval:(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) { @@ -34476,33 +35217,33 @@ - (void)subscribeAttributeWindowStatusWithMinInterval:(NSNumber * _Nonnull)minIn subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeWindowStatusWithParams: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); - }]; + [self subscribeAttributeGroupTableWithParams: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)readAttributeWindowStatusWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeGroupTableWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeWindowStatusWithClusterStateCache: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); - }]; + [self readAttributeGroupTableWithClusterStateCache: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)readAttributeAdminFabricIndexWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMaxGroupsPerFabricWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAdminFabricIndexWithCompletion: + [self readAttributeMaxGroupsPerFabricWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeAdminFabricIndexWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxGroupsPerFabricWithMinInterval:(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) { @@ -34511,33 +35252,33 @@ - (void)subscribeAttributeAdminFabricIndexWithMinInterval:(NSNumber * _Nonnull)m subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeAdminFabricIndexWithParams: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); - }]; + [self subscribeAttributeMaxGroupsPerFabricWithParams: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)readAttributeAdminFabricIndexWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxGroupsPerFabricWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAdminFabricIndexWithClusterStateCache: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); - }]; + [self readAttributeMaxGroupsPerFabricWithClusterStateCache: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)readAttributeAdminVendorIdWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeMaxGroupKeysPerFabricWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAdminVendorIdWithCompletion: + [self readAttributeMaxGroupKeysPerFabricWithCompletion: ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeAdminVendorIdWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaxGroupKeysPerFabricWithMinInterval:(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) { @@ -34546,19 +35287,19 @@ - (void)subscribeAttributeAdminVendorIdWithMinInterval:(NSNumber * _Nonnull)minI subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeAdminVendorIdWithParams: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); - }]; + [self subscribeAttributeMaxGroupKeysPerFabricWithParams: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)readAttributeAdminVendorIdWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeMaxGroupKeysPerFabricWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeAdminVendorIdWithClusterStateCache: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); - }]; + [self readAttributeMaxGroupKeysPerFabricWithClusterStateCache: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 @@ -34620,509 +35361,136 @@ - (void)subscribeAttributeAcceptedCommandListWithMinInterval:(NSNumber * _Nonnul ^(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 MTRBaseClusterOperationalCredentials - -- (void)attestationRequestWithParams:(MTROperationalCredentialsClusterAttestationRequestParams *)params completion:(void (^)(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - 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 - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROperationalCredentialsClusterAttestationResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)certificateChainRequestWithParams:(MTROperationalCredentialsClusterCertificateChainRequestParams *)params completion:(void (^)(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - 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 - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROperationalCredentialsClusterCertificateChainResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)CSRRequestWithParams:(MTROperationalCredentialsClusterCSRRequestParams *)params completion:(void (^)(MTROperationalCredentialsClusterCSRResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - 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 - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROperationalCredentialsClusterCSRResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)addNOCWithParams:(MTROperationalCredentialsClusterAddNOCParams *)params completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTROperationalCredentialsClusterAddNOCParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = OperationalCredentials::Commands::AddNOC::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROperationalCredentialsClusterNOCResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)updateNOCWithParams:(MTROperationalCredentialsClusterUpdateNOCParams *)params completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTROperationalCredentialsClusterUpdateNOCParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = OperationalCredentials::Commands::UpdateNOC::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROperationalCredentialsClusterNOCResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)updateFabricLabelWithParams:(MTROperationalCredentialsClusterUpdateFabricLabelParams *)params completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTROperationalCredentialsClusterUpdateFabricLabelParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = OperationalCredentials::Commands::UpdateFabricLabel::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROperationalCredentialsClusterNOCResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)removeFabricWithParams:(MTROperationalCredentialsClusterRemoveFabricParams *)params completion:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTROperationalCredentialsClusterRemoveFabricParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = OperationalCredentials::Commands::RemoveFabric::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROperationalCredentialsClusterNOCResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)addTrustedRootCertificateWithParams:(MTROperationalCredentialsClusterAddTrustedRootCertificateParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTROperationalCredentialsClusterAddTrustedRootCertificateParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = OperationalCredentials::Commands::AddTrustedRootCertificate::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)readAttributeNOCsWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeNOCsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + }]; } - -+ (void)readAttributeNOCsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = OperationalCredentials::Attributes::NOCs::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [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)readAttributeFabricsWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = OperationalCredentials::Attributes::Fabrics::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - completion:completion]; + [self readAttributeAttributeListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeFabricsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { - using TypeInfo = OperationalCredentials::Attributes::Fabrics::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + 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)readAttributeFabricsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = OperationalCredentials::Attributes::Fabrics::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [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)readAttributeSupportedFabricsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = OperationalCredentials::Attributes::SupportedFabrics::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeFeatureMapWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeSupportedFabricsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { - using TypeInfo = OperationalCredentials::Attributes::SupportedFabrics::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + 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)readAttributeSupportedFabricsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = OperationalCredentials::Attributes::SupportedFabrics::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [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)readAttributeCommissionedFabricsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = OperationalCredentials::Attributes::CommissionedFabrics::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + [self readAttributeClusterRevisionWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; } - -- (void)subscribeAttributeCommissionedFabricsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (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 { - using TypeInfo = OperationalCredentials::Attributes::CommissionedFabrics::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + 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)readAttributeCommissionedFabricsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - using TypeInfo = OperationalCredentials::Attributes::CommissionedFabrics::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [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); + }]; } -- (void)readAttributeTrustedRootCertificatesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device + endpoint:(uint16_t)endpoint + queue:(dispatch_queue_t)queue { - using TypeInfo = OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; } -- (void)subscribeAttributeTrustedRootCertificatesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} +@end -+ (void)readAttributeTrustedRootCertificatesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = OperationalCredentials::Attributes::TrustedRootCertificates::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} +@implementation MTRBaseClusterFixedLabel -- (void)readAttributeCurrentFabricIndexWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLabelListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo; + using TypeInfo = FixedLabel::Attributes::LabelList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -35131,11 +35499,11 @@ - (void)readAttributeCurrentFabricIndexWithCompletion:(void (^)(NSNumber * _Null completion:completion]; } -- (void)subscribeAttributeCurrentFabricIndexWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLabelListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo; + using TypeInfo = FixedLabel::Attributes::LabelList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -35145,9 +35513,9 @@ - (void)subscribeAttributeCurrentFabricIndexWithParams:(MTRSubscribeParams * _No subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCurrentFabricIndexWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLabelListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalCredentials::Attributes::CurrentFabricIndex::TypeInfo; + using TypeInfo = FixedLabel::Attributes::LabelList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -35158,7 +35526,7 @@ + (void)readAttributeCurrentFabricIndexWithClusterStateCache:(MTRClusterStateCac - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalCredentials::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = FixedLabel::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -35171,7 +35539,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OperationalCredentials::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = FixedLabel::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -35183,7 +35551,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 = OperationalCredentials::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = FixedLabel::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -35194,7 +35562,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalCredentials::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = FixedLabel::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -35207,7 +35575,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OperationalCredentials::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = FixedLabel::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -35219,7 +35587,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 = OperationalCredentials::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = FixedLabel::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -35230,7 +35598,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalCredentials::Attributes::EventList::TypeInfo; + using TypeInfo = FixedLabel::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -35243,7 +35611,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OperationalCredentials::Attributes::EventList::TypeInfo; + using TypeInfo = FixedLabel::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -35255,7 +35623,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 = OperationalCredentials::Attributes::EventList::TypeInfo; + using TypeInfo = FixedLabel::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -35266,7 +35634,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; + using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -35279,7 +35647,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OperationalCredentials::Attributes::AttributeList::TypeInfo; + using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -35291,7 +35659,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 = OperationalCredentials::Attributes::AttributeList::TypeInfo; + using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -35302,7 +35670,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalCredentials::Attributes::FeatureMap::TypeInfo; + using TypeInfo = FixedLabel::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -35315,7 +35683,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OperationalCredentials::Attributes::FeatureMap::TypeInfo; + using TypeInfo = FixedLabel::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -35327,7 +35695,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 = OperationalCredentials::Attributes::FeatureMap::TypeInfo; + using TypeInfo = FixedLabel::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -35338,7 +35706,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OperationalCredentials::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = FixedLabel::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -35346,285 +35714,48 @@ - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullabl 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 = OperationalCredentials::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 = OperationalCredentials::Attributes::ClusterRevision::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -@end - -@implementation MTRBaseClusterOperationalCredentials (Deprecated) - -- (void)attestationRequestWithParams:(MTROperationalCredentialsClusterAttestationRequestParams *)params completionHandler:(void (^)(MTROperationalCredentialsClusterAttestationResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self attestationRequestWithParams:params 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 completionHandler:(void (^)(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self certificateChainRequestWithParams:params completion: - ^(MTROperationalCredentialsClusterCertificateChainResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} -- (void)CSRRequestWithParams:(MTROperationalCredentialsClusterCSRRequestParams *)params completionHandler:(void (^)(MTROperationalCredentialsClusterCSRResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self CSRRequestWithParams:params completion: - ^(MTROperationalCredentialsClusterCSRResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} -- (void)addNOCWithParams:(MTROperationalCredentialsClusterAddNOCParams *)params completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self addNOCWithParams:params 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 completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self updateNOCWithParams:params 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 completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self updateFabricLabelWithParams:params 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 completionHandler:(void (^)(MTROperationalCredentialsClusterNOCResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self removeFabricWithParams:params 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 completionHandler:(MTRStatusCompletion)completionHandler -{ - [self addTrustedRootCertificateWithParams:params completion: - completionHandler]; -} - -- (void)readAttributeNOCsWithParams:(MTRReadParams * _Nullable)params completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeNOCsWithParams:params completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeNOCsWithMinInterval:(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 subscribeAttributeNOCsWithParams: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)readAttributeNOCsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeNOCsWithClusterStateCache: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)readAttributeFabricsWithParams:(MTRReadParams * _Nullable)params completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFabricsWithParams:params completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeFabricsWithMinInterval:(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 subscribeAttributeFabricsWithParams: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)readAttributeFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeFabricsWithClusterStateCache: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)readAttributeSupportedFabricsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSupportedFabricsWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeSupportedFabricsWithMinInterval:(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 subscribeAttributeSupportedFabricsWithParams: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)readAttributeSupportedFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSupportedFabricsWithClusterStateCache: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)readAttributeCommissionedFabricsWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCommissionedFabricsWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeCommissionedFabricsWithMinInterval:(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 subscribeAttributeCommissionedFabricsWithParams: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)readAttributeCommissionedFabricsWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCommissionedFabricsWithClusterStateCache: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)readAttributeTrustedRootCertificatesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeTrustedRootCertificatesWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeTrustedRootCertificatesWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - 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 { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeTrustedRootCertificatesWithParams: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); - }]; + using TypeInfo = FixedLabel::Attributes::ClusterRevision::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTrustedRootCertificatesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeTrustedRootCertificatesWithClusterStateCache: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); - }]; + using TypeInfo = FixedLabel::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeCurrentFabricIndexWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +@end + +@implementation MTRBaseClusterFixedLabel (Deprecated) + +- (void)readAttributeLabelListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeCurrentFabricIndexWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeLabelListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeCurrentFabricIndexWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLabelListWithMinInterval:(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) { @@ -35633,19 +35764,19 @@ - (void)subscribeAttributeCurrentFabricIndexWithMinInterval:(NSNumber * _Nonnull subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeCurrentFabricIndexWithParams: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); - }]; + [self subscribeAttributeLabelListWithParams: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)readAttributeCurrentFabricIndexWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeLabelListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeCurrentFabricIndexWithClusterStateCache: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); - }]; + [self readAttributeLabelListWithClusterStateCache: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)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler @@ -35832,125 +35963,24 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device @end -@implementation MTRBaseClusterGroupKeyManagement - -- (void)keySetWriteWithParams:(MTRGroupKeyManagementClusterKeySetWriteParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRGroupKeyManagementClusterKeySetWriteParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = GroupKeyManagement::Commands::KeySetWrite::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)keySetReadWithParams:(MTRGroupKeyManagementClusterKeySetReadParams *)params completion:(void (^)(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRGroupKeyManagementClusterKeySetReadParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = GroupKeyManagement::Commands::KeySetRead::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRGroupKeyManagementClusterKeySetReadResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)keySetRemoveWithParams:(MTRGroupKeyManagementClusterKeySetRemoveParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRGroupKeyManagementClusterKeySetRemoveParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = GroupKeyManagement::Commands::KeySetRemove::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)keySetReadAllIndicesWithCompletion:(void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self keySetReadAllIndicesWithParams:nil completion:completion]; -} -- (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAllIndicesParams * _Nullable)params completion:(void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRGroupKeyManagementClusterKeySetReadAllIndicesParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = GroupKeyManagement::Commands::KeySetReadAllIndices::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} +@implementation MTRBaseClusterUserLabel -- (void)readAttributeGroupKeyMapWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLabelListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; + using TypeInfo = UserLabel::Attributes::LabelList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) - params:params + params:nil queue:self.callbackQueue completion:completion]; } -- (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; + [self writeAttributeLabelListWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -35965,7 +35995,7 @@ - (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value params:(MTR } ListFreer listFreer; - using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; + using TypeInfo = UserLabel::Attributes::LabelList::TypeInfo; TypeInfo::Type cppValue; { using ListType_0 = std::remove_reference_t; @@ -35977,14 +36007,13 @@ - (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value params:(MTR } listFreer.add(listHolder_0); for (size_t i_0 = 0; i_0 < value.count; ++i_0) { - if ( ! [value[i_0] isKindOfClass: [MTRGroupKeyManagementClusterGroupKeyMapStruct class]] ) { + if ( ! [value[i_0] isKindOfClass: [MTRUserLabelClusterLabelStruct class]] ) { // Wrong kind of value. return CHIP_ERROR_INVALID_ARGUMENT; } - auto element_0 = (MTRGroupKeyManagementClusterGroupKeyMapStruct *)value[i_0]; - listHolder_0->mList[i_0].groupId = element_0.groupId.unsignedShortValue; - listHolder_0->mList[i_0].groupKeySetID = element_0.groupKeySetID.unsignedShortValue; - listHolder_0->mList[i_0].fabricIndex = element_0.fabricIndex.unsignedCharValue; + auto element_0 = (MTRUserLabelClusterLabelStruct *)value[i_0]; + listHolder_0->mList[i_0].label = AsCharSpan(element_0.label); + listHolder_0->mList[i_0].value = AsCharSpan(element_0.value); } cppValue = ListType_0(listHolder_0->mList, value.count); } else { @@ -35997,119 +36026,11 @@ - (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value params:(MTR std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeGroupKeyMapWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeGroupKeyMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = GroupKeyManagement::Attributes::GroupKeyMap::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeGroupTableWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = GroupKeyManagement::Attributes::GroupTable::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeGroupTableWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = GroupKeyManagement::Attributes::GroupTable::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeGroupTableWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = GroupKeyManagement::Attributes::GroupTable::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeMaxGroupsPerFabricWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = GroupKeyManagement::Attributes::MaxGroupsPerFabric::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeMaxGroupsPerFabricWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = GroupKeyManagement::Attributes::MaxGroupsPerFabric::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeMaxGroupsPerFabricWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = GroupKeyManagement::Attributes::MaxGroupsPerFabric::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeMaxGroupKeysPerFabricWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeMaxGroupKeysPerFabricWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLabelListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::TypeInfo; + using TypeInfo = UserLabel::Attributes::LabelList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -36119,9 +36040,9 @@ - (void)subscribeAttributeMaxGroupKeysPerFabricWithParams:(MTRSubscribeParams * subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMaxGroupKeysPerFabricWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLabelListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GroupKeyManagement::Attributes::MaxGroupKeysPerFabric::TypeInfo; + using TypeInfo = UserLabel::Attributes::LabelList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -36132,7 +36053,7 @@ + (void)readAttributeMaxGroupKeysPerFabricWithClusterStateCache:(MTRClusterState - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GroupKeyManagement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = UserLabel::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -36145,7 +36066,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GroupKeyManagement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = UserLabel::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -36157,7 +36078,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 = GroupKeyManagement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = UserLabel::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -36168,7 +36089,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GroupKeyManagement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = UserLabel::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -36181,7 +36102,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GroupKeyManagement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = UserLabel::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -36193,7 +36114,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 = GroupKeyManagement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = UserLabel::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -36204,7 +36125,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GroupKeyManagement::Attributes::EventList::TypeInfo; + using TypeInfo = UserLabel::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -36217,7 +36138,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GroupKeyManagement::Attributes::EventList::TypeInfo; + using TypeInfo = UserLabel::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -36229,7 +36150,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 = GroupKeyManagement::Attributes::EventList::TypeInfo; + using TypeInfo = UserLabel::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -36240,7 +36161,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GroupKeyManagement::Attributes::AttributeList::TypeInfo; + using TypeInfo = UserLabel::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -36253,7 +36174,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GroupKeyManagement::Attributes::AttributeList::TypeInfo; + using TypeInfo = UserLabel::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -36265,7 +36186,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 = GroupKeyManagement::Attributes::AttributeList::TypeInfo; + using TypeInfo = UserLabel::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -36276,7 +36197,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = GroupKeyManagement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = UserLabel::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -36289,7 +36210,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = GroupKeyManagement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = UserLabel::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -36301,207 +36222,75 @@ - (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 = GroupKeyManagement::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 = GroupKeyManagement::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 = GroupKeyManagement::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 = GroupKeyManagement::Attributes::ClusterRevision::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -@end - -@implementation MTRBaseClusterGroupKeyManagement (Deprecated) - -- (void)keySetWriteWithParams:(MTRGroupKeyManagementClusterKeySetWriteParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self keySetWriteWithParams:params completion: - completionHandler]; -} -- (void)keySetReadWithParams:(MTRGroupKeyManagementClusterKeySetReadParams *)params completionHandler:(void (^)(MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self keySetReadWithParams:params 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 completionHandler:(MTRStatusCompletion)completionHandler -{ - [self keySetRemoveWithParams:params completion: - completionHandler]; -} -- (void)keySetReadAllIndicesWithParams:(MTRGroupKeyManagementClusterKeySetReadAllIndicesParams * _Nullable)params completionHandler:(void (^)(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, NSError * _Nullable error))completionHandler -{ - [self keySetReadAllIndicesWithParams:params completion: - ^(MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams * _Nullable data, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(data), error); - }]; -} - -- (void)readAttributeGroupKeyMapWithParams:(MTRReadParams * _Nullable)params completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGroupKeyMapWithParams:params completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeGroupKeyMapWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeGroupKeyMapWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeGroupKeyMapWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeGroupKeyMapWithMinInterval:(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 subscribeAttributeGroupKeyMapWithParams: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)readAttributeGroupKeyMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGroupKeyMapWithClusterStateCache: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)readAttributeGroupTableWithParams:(MTRReadParams * _Nullable)params completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGroupTableWithParams:params completion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeGroupTableWithMinInterval:(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 subscribeAttributeGroupTableWithParams: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)readAttributeGroupTableWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeGroupTableWithClusterStateCache: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); - }]; + using TypeInfo = UserLabel::Attributes::FeatureMap::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeMaxGroupsPerFabricWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeMaxGroupsPerFabricWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = UserLabel::Attributes::ClusterRevision::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeMaxGroupsPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + 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 subscribeAttributeMaxGroupsPerFabricWithParams: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); - }]; + using TypeInfo = UserLabel::Attributes::ClusterRevision::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMaxGroupsPerFabricWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeMaxGroupsPerFabricWithClusterStateCache: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); - }]; + using TypeInfo = UserLabel::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeMaxGroupKeysPerFabricWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +@end + +@implementation MTRBaseClusterUserLabel (Deprecated) + +- (void)readAttributeLabelListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMaxGroupKeysPerFabricWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { + [self readAttributeLabelListWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeMaxGroupKeysPerFabricWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeLabelListWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeLabelListWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeLabelListWithMinInterval:(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) { @@ -36510,19 +36299,19 @@ - (void)subscribeAttributeMaxGroupKeysPerFabricWithMinInterval:(NSNumber * _Nonn subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeMaxGroupKeysPerFabricWithParams: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); - }]; + [self subscribeAttributeLabelListWithParams: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)readAttributeMaxGroupKeysPerFabricWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeLabelListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeMaxGroupKeysPerFabricWithClusterStateCache: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); - }]; + [self readAttributeLabelListWithClusterStateCache: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)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler @@ -36709,11 +36498,11 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device @end -@implementation MTRBaseClusterFixedLabel +@implementation MTRBaseClusterBooleanState -- (void)readAttributeLabelListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeStateValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = FixedLabel::Attributes::LabelList::TypeInfo; + using TypeInfo = BooleanState::Attributes::StateValue::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -36722,11 +36511,11 @@ - (void)readAttributeLabelListWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)subscribeAttributeLabelListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeStateValueWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FixedLabel::Attributes::LabelList::TypeInfo; + using TypeInfo = BooleanState::Attributes::StateValue::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -36736,9 +36525,9 @@ - (void)subscribeAttributeLabelListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLabelListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeStateValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = FixedLabel::Attributes::LabelList::TypeInfo; + using TypeInfo = BooleanState::Attributes::StateValue::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -36749,7 +36538,7 @@ + (void)readAttributeLabelListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = FixedLabel::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = BooleanState::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -36762,7 +36551,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FixedLabel::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = BooleanState::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -36774,7 +36563,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 = FixedLabel::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = BooleanState::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -36785,7 +36574,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = FixedLabel::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = BooleanState::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -36798,7 +36587,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FixedLabel::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = BooleanState::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -36810,7 +36599,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 = FixedLabel::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = BooleanState::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -36821,7 +36610,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = FixedLabel::Attributes::EventList::TypeInfo; + using TypeInfo = BooleanState::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -36834,7 +36623,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FixedLabel::Attributes::EventList::TypeInfo; + using TypeInfo = BooleanState::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -36846,7 +36635,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 = FixedLabel::Attributes::EventList::TypeInfo; + using TypeInfo = BooleanState::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -36857,7 +36646,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; + using TypeInfo = BooleanState::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -36870,7 +36659,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FixedLabel::Attributes::AttributeList::TypeInfo; + using TypeInfo = BooleanState::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -36882,7 +36671,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 = FixedLabel::Attributes::AttributeList::TypeInfo; + using TypeInfo = BooleanState::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -36893,7 +36682,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = FixedLabel::Attributes::FeatureMap::TypeInfo; + using TypeInfo = BooleanState::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -36906,7 +36695,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FixedLabel::Attributes::FeatureMap::TypeInfo; + using TypeInfo = BooleanState::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -36918,7 +36707,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 = FixedLabel::Attributes::FeatureMap::TypeInfo; + using TypeInfo = BooleanState::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -36929,7 +36718,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = FixedLabel::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = BooleanState::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -36942,7 +36731,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = FixedLabel::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = BooleanState::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -36954,7 +36743,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 = FixedLabel::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = BooleanState::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -36965,20 +36754,20 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterFixedLabel (Deprecated) +@implementation MTRBaseClusterBooleanState (Deprecated) -- (void)readAttributeLabelListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeStateValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeLabelListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { + [self readAttributeStateValueWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); + completionHandler(static_cast(value), error); }]; } -- (void)subscribeAttributeLabelListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeStateValueWithMinInterval:(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) { @@ -36987,19 +36776,19 @@ - (void)subscribeAttributeLabelListWithMinInterval:(NSNumber * _Nonnull)minInter subscribeParams.minInterval = minInterval; subscribeParams.maxInterval = maxInterval; } - [self subscribeAttributeLabelListWithParams: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); - }]; + [self subscribeAttributeStateValueWithParams: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)readAttributeLabelListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeStateValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler { - [self readAttributeLabelListWithClusterStateCache: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); - }]; + [self readAttributeStateValueWithClusterStateCache: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 @@ -37098,99 +36887,428 @@ - (void)subscribeAttributeAttributeListWithMinInterval:(NSNumber * _Nonnull)minI 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 ++ (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 MTRBaseClusterICDManagement + +- (void)registerClientWithParams:(MTRICDManagementClusterRegisterClientParams *)params completion:(void (^)(MTRICDManagementClusterRegisterClientResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRICDManagementClusterRegisterClientParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = IcdManagement::Commands::RegisterClient::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRICDManagementClusterRegisterClientResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)unregisterClientWithParams:(MTRICDManagementClusterUnregisterClientParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRICDManagementClusterUnregisterClientParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = IcdManagement::Commands::UnregisterClient::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)stayActiveRequestWithCompletion:(void (^)(MTRICDManagementClusterStayActiveResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + [self stayActiveRequestWithParams:nil completion:completion]; +} +- (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestParams * _Nullable)params completion:(void (^)(MTRICDManagementClusterStayActiveResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRICDManagementClusterStayActiveRequestParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = IcdManagement::Commands::StayActiveRequest::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRICDManagementClusterStayActiveResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeIdleModeDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = IcdManagement::Attributes::IdleModeDuration::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeIdleModeDurationWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = IcdManagement::Attributes::IdleModeDuration::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeIdleModeDurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = IcdManagement::Attributes::IdleModeDuration::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeActiveModeDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = IcdManagement::Attributes::ActiveModeDuration::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeActiveModeDurationWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = IcdManagement::Attributes::ActiveModeDuration::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeActiveModeDurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = IcdManagement::Attributes::ActiveModeDuration::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeActiveModeThresholdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = IcdManagement::Attributes::ActiveModeThreshold::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeActiveModeThresholdWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = IcdManagement::Attributes::ActiveModeThreshold::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeActiveModeThresholdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = IcdManagement::Attributes::ActiveModeThreshold::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeRegisteredClientsWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = IcdManagement::Attributes::RegisteredClients::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeRegisteredClientsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = IcdManagement::Attributes::RegisteredClients::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeRegisteredClientsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = IcdManagement::Attributes::RegisteredClients::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeICDCounterWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [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); - }]; + using TypeInfo = IcdManagement::Attributes::ICDCounter::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeICDCounterWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeFeatureMapWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = IcdManagement::Attributes::ICDCounter::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (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 + ++ (void)readAttributeICDCounterWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - 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); - }]; + using TypeInfo = IcdManagement::Attributes::ICDCounter::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeClientsSupportedPerFabricWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [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); - }]; + using TypeInfo = IcdManagement::Attributes::ClientsSupportedPerFabric::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeClientsSupportedPerFabricWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeClusterRevisionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = IcdManagement::Attributes::ClientsSupportedPerFabric::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (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 + ++ (void)readAttributeClientsSupportedPerFabricWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - 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); - }]; + using TypeInfo = IcdManagement::Attributes::ClientsSupportedPerFabric::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeUserActiveModeTriggerHintWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [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); - }]; + using TypeInfo = IcdManagement::Attributes::UserActiveModeTriggerHint::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue +- (void)subscribeAttributeUserActiveModeTriggerHintWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + using TypeInfo = IcdManagement::Attributes::UserActiveModeTriggerHint::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -@end - -@implementation MTRBaseClusterUserLabel ++ (void)readAttributeUserActiveModeTriggerHintWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = IcdManagement::Attributes::UserActiveModeTriggerHint::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} -- (void)readAttributeLabelListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUserActiveModeTriggerInstructionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = UserLabel::Attributes::LabelList::TypeInfo; + using TypeInfo = IcdManagement::Attributes::UserActiveModeTriggerInstruction::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37199,61 +37317,47 @@ - (void)readAttributeLabelListWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeUserActiveModeTriggerInstructionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeLabelListWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; + using TypeInfo = IcdManagement::Attributes::UserActiveModeTriggerInstruction::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - ListFreer listFreer; - using TypeInfo = UserLabel::Attributes::LabelList::TypeInfo; - TypeInfo::Type cppValue; - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (value.count != 0) { - auto * listHolder_0 = new ListHolder(value.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 < value.count; ++i_0) { - if ( ! [value[i_0] isKindOfClass: [MTRUserLabelClusterLabelStruct class]] ) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRUserLabelClusterLabelStruct *)value[i_0]; - listHolder_0->mList[i_0].label = AsCharSpan(element_0.label); - listHolder_0->mList[i_0].value = AsCharSpan(element_0.value); - } - cppValue = ListType_0(listHolder_0->mList, value.count); - } else { - cppValue = ListType_0(); - } - } ++ (void)readAttributeUserActiveModeTriggerInstructionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = IcdManagement::Attributes::UserActiveModeTriggerInstruction::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); +- (void)readAttributeOperatingModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = IcdManagement::Attributes::OperatingMode::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeLabelListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOperatingModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = UserLabel::Attributes::LabelList::TypeInfo; + using TypeInfo = IcdManagement::Attributes::OperatingMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37263,9 +37367,9 @@ - (void)subscribeAttributeLabelListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLabelListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOperatingModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = UserLabel::Attributes::LabelList::TypeInfo; + using TypeInfo = IcdManagement::Attributes::OperatingMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -37276,7 +37380,7 @@ + (void)readAttributeLabelListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = UserLabel::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = IcdManagement::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37289,7 +37393,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = UserLabel::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = IcdManagement::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37301,7 +37405,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 = UserLabel::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = IcdManagement::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -37312,7 +37416,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = UserLabel::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = IcdManagement::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37325,7 +37429,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = UserLabel::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = IcdManagement::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37337,7 +37441,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 = UserLabel::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = IcdManagement::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -37348,7 +37452,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = UserLabel::Attributes::EventList::TypeInfo; + using TypeInfo = IcdManagement::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37361,7 +37465,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = UserLabel::Attributes::EventList::TypeInfo; + using TypeInfo = IcdManagement::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37373,7 +37477,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 = UserLabel::Attributes::EventList::TypeInfo; + using TypeInfo = IcdManagement::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -37384,7 +37488,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = UserLabel::Attributes::AttributeList::TypeInfo; + using TypeInfo = IcdManagement::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37397,7 +37501,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = UserLabel::Attributes::AttributeList::TypeInfo; + using TypeInfo = IcdManagement::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37409,7 +37513,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 = UserLabel::Attributes::AttributeList::TypeInfo; + using TypeInfo = IcdManagement::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -37420,7 +37524,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = UserLabel::Attributes::FeatureMap::TypeInfo; + using TypeInfo = IcdManagement::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37433,7 +37537,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = UserLabel::Attributes::FeatureMap::TypeInfo; + using TypeInfo = IcdManagement::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37445,7 +37549,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 = UserLabel::Attributes::FeatureMap::TypeInfo; + using TypeInfo = IcdManagement::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -37456,7 +37560,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = UserLabel::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = IcdManagement::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37469,7 +37573,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = UserLabel::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = IcdManagement::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37481,7 +37585,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 = UserLabel::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = IcdManagement::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -37492,240 +37596,184 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterUserLabel (Deprecated) +@implementation MTRBaseClusterTimer -- (void)readAttributeLabelListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeLabelListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeLabelListWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeLabelListWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeLabelListWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeLabelListWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)setTimerWithParams:(MTRTimerClusterSetTimerParams *)params completion:(MTRStatusCompletion)completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; + if (params == nil) { + params = [[MTRTimerClusterSetTimerParams + alloc] init]; } - [self subscribeAttributeLabelListWithParams: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)readAttributeLabelListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeLabelListWithClusterStateCache: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)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); - }]; -} + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(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); - }]; -} + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; -- (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); - }]; + using RequestType = Timer::Commands::SetTimer::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)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 +- (void)resetTimerWithCompletion:(MTRStatusCompletion)completion { - 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); - }]; + [self resetTimerWithParams:nil completion:completion]; } -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +- (void)resetTimerWithParams:(MTRTimerClusterResetTimerParams * _Nullable)params completion:(MTRStatusCompletion)completion { - [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); - }]; -} + if (params == nil) { + params = [[MTRTimerClusterResetTimerParams + alloc] init]; + } -- (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); - }]; + 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 + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -- (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 +- (void)addTimeWithParams:(MTRTimerClusterAddTimeParams *)params completion:(MTRStatusCompletion)completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; + if (params == nil) { + params = [[MTRTimerClusterAddTimeParams + alloc] init]; } - [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); - }]; + + 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 + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)reduceTimeWithParams:(MTRTimerClusterReduceTimeParams *)params completion:(MTRStatusCompletion)completion { - [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); - }]; + 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 + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeSetTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeClusterRevisionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Timer::Attributes::SetTime::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (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 + +- (void)subscribeAttributeSetTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + 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); - }]; + using TypeInfo = Timer::Attributes::SetTime::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeSetTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [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); - }]; + using TypeInfo = Timer::Attributes::SetTime::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue +- (void)readAttributeTimeRemainingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + using TypeInfo = Timer::Attributes::TimeRemaining::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -@end +- (void)subscribeAttributeTimeRemainingWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Timer::Attributes::TimeRemaining::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} -@implementation MTRBaseClusterBooleanState ++ (void)readAttributeTimeRemainingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Timer::Attributes::TimeRemaining::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} -- (void)readAttributeStateValueWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTimerStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanState::Attributes::StateValue::TypeInfo; + using TypeInfo = Timer::Attributes::TimerState::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37734,11 +37782,11 @@ - (void)readAttributeStateValueWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeStateValueWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeTimerStateWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BooleanState::Attributes::StateValue::TypeInfo; + using TypeInfo = Timer::Attributes::TimerState::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37748,9 +37796,9 @@ - (void)subscribeAttributeStateValueWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeStateValueWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTimerStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanState::Attributes::StateValue::TypeInfo; + using TypeInfo = Timer::Attributes::TimerState::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -37761,7 +37809,7 @@ + (void)readAttributeStateValueWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanState::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = Timer::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37774,7 +37822,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BooleanState::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = Timer::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37786,7 +37834,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 = BooleanState::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = Timer::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -37797,7 +37845,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanState::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = Timer::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37810,7 +37858,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BooleanState::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = Timer::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37822,7 +37870,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 = BooleanState::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = Timer::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -37833,7 +37881,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanState::Attributes::EventList::TypeInfo; + using TypeInfo = Timer::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37846,7 +37894,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BooleanState::Attributes::EventList::TypeInfo; + using TypeInfo = Timer::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37858,7 +37906,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 = BooleanState::Attributes::EventList::TypeInfo; + using TypeInfo = Timer::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -37869,7 +37917,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanState::Attributes::AttributeList::TypeInfo; + using TypeInfo = Timer::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37882,7 +37930,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BooleanState::Attributes::AttributeList::TypeInfo; + using TypeInfo = Timer::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37894,7 +37942,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 = BooleanState::Attributes::AttributeList::TypeInfo; + using TypeInfo = Timer::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -37905,7 +37953,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanState::Attributes::FeatureMap::TypeInfo; + using TypeInfo = Timer::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37918,7 +37966,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BooleanState::Attributes::FeatureMap::TypeInfo; + using TypeInfo = Timer::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37930,7 +37978,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 = BooleanState::Attributes::FeatureMap::TypeInfo; + using TypeInfo = Timer::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -37941,7 +37989,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = BooleanState::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = Timer::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37954,7 +38002,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = BooleanState::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = Timer::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -37966,7 +38014,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 = BooleanState::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = Timer::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -37977,233 +38025,16 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterBooleanState (Deprecated) - -- (void)readAttributeStateValueWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeStateValueWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeStateValueWithMinInterval:(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 subscribeAttributeStateValueWithParams: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)readAttributeStateValueWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeStateValueWithClusterStateCache: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); - }]; -} +@implementation MTRBaseClusterOvenCavityOperationalState -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue +- (void)pauseWithCompletion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + [self pauseWithParams:nil completion:completion]; } - -@end - -@implementation MTRBaseClusterICDManagement - -- (void)registerClientWithParams:(MTRICDManagementClusterRegisterClientParams *)params completion:(void (^)(MTRICDManagementClusterRegisterClientResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)pauseWithParams:(MTROvenCavityOperationalStateClusterPauseParams * _Nullable)params completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRICDManagementClusterRegisterClientParams + params = [[MTROvenCavityOperationalStateClusterPauseParams alloc] init]; } @@ -38213,49 +38044,25 @@ - (void)registerClientWithParams:(MTRICDManagementClusterRegisterClientParams *) auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = IcdManagement::Commands::RegisterClient::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRICDManagementClusterRegisterClientResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)unregisterClientWithParams:(MTRICDManagementClusterUnregisterClientParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRICDManagementClusterUnregisterClientParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = IcdManagement::Commands::UnregisterClient::Type; + using RequestType = OvenCavityOperationalState::Commands::Pause::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil + responseClass:MTROvenCavityOperationalStateClusterOperationalCommandResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)stayActiveRequestWithCompletion:(void (^)(MTRICDManagementClusterStayActiveResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)stopWithCompletion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { - [self stayActiveRequestWithParams:nil completion:completion]; + [self stopWithParams:nil completion:completion]; } -- (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestParams * _Nullable)params completion:(void (^)(MTRICDManagementClusterStayActiveResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)stopWithParams:(MTROvenCavityOperationalStateClusterStopParams * _Nullable)params completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRICDManagementClusterStayActiveRequestParams + params = [[MTROvenCavityOperationalStateClusterStopParams alloc] init]; } @@ -38265,142 +38072,90 @@ - (void)stayActiveRequestWithParams:(MTRICDManagementClusterStayActiveRequestPar auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = IcdManagement::Commands::StayActiveRequest::Type; + using RequestType = OvenCavityOperationalState::Commands::Stop::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRICDManagementClusterStayActiveResponseParams.class + responseClass:MTROvenCavityOperationalStateClusterOperationalCommandResponseParams.class queue:self.callbackQueue completion:responseHandler]; } - -- (void)readAttributeIdleModeDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = IcdManagement::Attributes::IdleModeDuration::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeIdleModeDurationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = IcdManagement::Attributes::IdleModeDuration::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeIdleModeDurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = IcdManagement::Attributes::IdleModeDuration::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeActiveModeDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = IcdManagement::Attributes::ActiveModeDuration::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeActiveModeDurationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)startWithCompletion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { - using TypeInfo = IcdManagement::Attributes::ActiveModeDuration::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self startWithParams:nil completion:completion]; } - -+ (void)readAttributeActiveModeDurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)startWithParams:(MTROvenCavityOperationalStateClusterStartParams * _Nullable)params completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { - using TypeInfo = IcdManagement::Attributes::ActiveModeDuration::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + if (params == nil) { + params = [[MTROvenCavityOperationalStateClusterStartParams + alloc] init]; + } -- (void)readAttributeActiveModeThresholdWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = IcdManagement::Attributes::ActiveModeThreshold::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil + 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 + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTROvenCavityOperationalStateClusterOperationalCommandResponseParams.class queue:self.callbackQueue - completion:completion]; + completion:responseHandler]; } - -- (void)subscribeAttributeActiveModeThresholdWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)resumeWithCompletion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { - using TypeInfo = IcdManagement::Attributes::ActiveModeThreshold::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self resumeWithParams:nil completion:completion]; } - -+ (void)readAttributeActiveModeThresholdWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)resumeWithParams:(MTROvenCavityOperationalStateClusterResumeParams * _Nullable)params completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion { - using TypeInfo = IcdManagement::Attributes::ActiveModeThreshold::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + if (params == nil) { + params = [[MTROvenCavityOperationalStateClusterResumeParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = OvenCavityOperationalState::Commands::Resume::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTROvenCavityOperationalStateClusterOperationalCommandResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -- (void)readAttributeRegisteredClientsWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePhaseListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IcdManagement::Attributes::RegisteredClients::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::PhaseList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) - params:params + params:nil queue:self.callbackQueue completion:completion]; } -- (void)subscribeAttributeRegisteredClientsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _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 = IcdManagement::Attributes::RegisteredClients::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::PhaseList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38410,9 +38165,9 @@ - (void)subscribeAttributeRegisteredClientsWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRegisteredClientsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _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 = IcdManagement::Attributes::RegisteredClients::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::PhaseList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -38421,9 +38176,9 @@ + (void)readAttributeRegisteredClientsWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributeICDCounterWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentPhaseWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IcdManagement::Attributes::ICDCounter::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::CurrentPhase::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38432,11 +38187,11 @@ - (void)readAttributeICDCounterWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeICDCounterWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeCurrentPhaseWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = IcdManagement::Attributes::ICDCounter::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::CurrentPhase::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38446,9 +38201,9 @@ - (void)subscribeAttributeICDCounterWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeICDCounterWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeCurrentPhaseWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IcdManagement::Attributes::ICDCounter::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::CurrentPhase::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -38457,9 +38212,9 @@ + (void)readAttributeICDCounterWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClientsSupportedPerFabricWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCountdownTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IcdManagement::Attributes::ClientsSupportedPerFabric::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::CountdownTime::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38468,11 +38223,11 @@ - (void)readAttributeClientsSupportedPerFabricWithCompletion:(void (^)(NSNumber completion:completion]; } -- (void)subscribeAttributeClientsSupportedPerFabricWithParams:(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 = IcdManagement::Attributes::ClientsSupportedPerFabric::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::CountdownTime::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38482,9 +38237,9 @@ - (void)subscribeAttributeClientsSupportedPerFabricWithParams:(MTRSubscribeParam subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeClientsSupportedPerFabricWithClusterStateCache:(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 = IcdManagement::Attributes::ClientsSupportedPerFabric::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::CountdownTime::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -38493,9 +38248,9 @@ + (void)readAttributeClientsSupportedPerFabricWithClusterStateCache:(MTRClusterS completion:completion]; } -- (void)readAttributeUserActiveModeTriggerHintWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOperationalStateListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IcdManagement::Attributes::UserActiveModeTriggerHint::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::OperationalStateList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38504,11 +38259,11 @@ - (void)readAttributeUserActiveModeTriggerHintWithCompletion:(void (^)(NSNumber completion:completion]; } -- (void)subscribeAttributeUserActiveModeTriggerHintWithParams:(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 = IcdManagement::Attributes::UserActiveModeTriggerHint::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::OperationalStateList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38518,9 +38273,9 @@ - (void)subscribeAttributeUserActiveModeTriggerHintWithParams:(MTRSubscribeParam subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeUserActiveModeTriggerHintWithClusterStateCache:(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 = IcdManagement::Attributes::UserActiveModeTriggerHint::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::OperationalStateList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -38529,9 +38284,9 @@ + (void)readAttributeUserActiveModeTriggerHintWithClusterStateCache:(MTRClusterS completion:completion]; } -- (void)readAttributeUserActiveModeTriggerInstructionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOperationalStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IcdManagement::Attributes::UserActiveModeTriggerInstruction::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::OperationalState::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38540,11 +38295,11 @@ - (void)readAttributeUserActiveModeTriggerInstructionWithCompletion:(void (^)(NS completion:completion]; } -- (void)subscribeAttributeUserActiveModeTriggerInstructionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _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 = IcdManagement::Attributes::UserActiveModeTriggerInstruction::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::OperationalState::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38554,9 +38309,9 @@ - (void)subscribeAttributeUserActiveModeTriggerInstructionWithParams:(MTRSubscri subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeUserActiveModeTriggerInstructionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _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 = IcdManagement::Attributes::UserActiveModeTriggerInstruction::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::OperationalState::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -38565,9 +38320,9 @@ + (void)readAttributeUserActiveModeTriggerInstructionWithClusterStateCache:(MTRC completion:completion]; } -- (void)readAttributeOperatingModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOperationalErrorWithCompletion:(void (^)(MTROvenCavityOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IcdManagement::Attributes::OperatingMode::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::OperationalError::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38576,11 +38331,11 @@ - (void)readAttributeOperatingModeWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeOperatingModeWithParams:(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 (^)(MTROvenCavityOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = IcdManagement::Attributes::OperatingMode::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::OperationalError::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38590,9 +38345,9 @@ - (void)subscribeAttributeOperatingModeWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOperatingModeWithClusterStateCache:(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 (^)(MTROvenCavityOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IcdManagement::Attributes::OperatingMode::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::OperationalError::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -38603,7 +38358,7 @@ + (void)readAttributeOperatingModeWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IcdManagement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38616,7 +38371,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = IcdManagement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38628,7 +38383,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 = IcdManagement::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -38639,7 +38394,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IcdManagement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38652,7 +38407,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = IcdManagement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38664,7 +38419,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 = IcdManagement::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -38675,7 +38430,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IcdManagement::Attributes::EventList::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38688,7 +38443,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = IcdManagement::Attributes::EventList::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38700,7 +38455,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 = IcdManagement::Attributes::EventList::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -38711,7 +38466,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IcdManagement::Attributes::AttributeList::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38724,7 +38479,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = IcdManagement::Attributes::AttributeList::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38736,7 +38491,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 = IcdManagement::Attributes::AttributeList::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -38747,7 +38502,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IcdManagement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38760,7 +38515,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = IcdManagement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38772,7 +38527,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 = IcdManagement::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -38783,7 +38538,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = IcdManagement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38796,7 +38551,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = IcdManagement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38808,7 +38563,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 = IcdManagement::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OvenCavityOperationalState::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -38819,112 +38574,36 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterTimer - -- (void)setTimerWithParams:(MTRTimerClusterSetTimerParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRTimerClusterSetTimerParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = Timer::Commands::SetTimer::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)resetTimerWithCompletion:(MTRStatusCompletion)completion -{ - [self resetTimerWithParams:nil completion:completion]; -} -- (void)resetTimerWithParams:(MTRTimerClusterResetTimerParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - 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 - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)addTimeWithParams:(MTRTimerClusterAddTimeParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRTimerClusterAddTimeParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; +@implementation MTRBaseClusterOvenMode - using RequestType = Timer::Commands::AddTime::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)reduceTimeWithParams:(MTRTimerClusterReduceTimeParams *)params completion:(MTRStatusCompletion)completion +- (void)changeToModeWithParams:(MTROvenModeClusterChangeToModeParams *)params completion:(void (^)(MTROvenModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRTimerClusterReduceTimeParams + params = [[MTROvenModeClusterChangeToModeParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); + completion(response, error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = Timer::Commands::ReduceTime::Type; + using RequestType = OvenMode::Commands::ChangeToMode::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil + responseClass:MTROvenModeClusterChangeToModeResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)readAttributeSetTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Timer::Attributes::SetTime::TypeInfo; + using TypeInfo = OvenMode::Attributes::SupportedModes::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38933,11 +38612,11 @@ - (void)readAttributeSetTimeWithCompletion:(void (^)(NSNumber * _Nullable value, completion:completion]; } -- (void)subscribeAttributeSetTimeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Timer::Attributes::SetTime::TypeInfo; + using TypeInfo = OvenMode::Attributes::SupportedModes::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38947,9 +38626,9 @@ - (void)subscribeAttributeSetTimeWithParams:(MTRSubscribeParams * _Nonnull)param subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSetTimeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Timer::Attributes::SetTime::TypeInfo; + using TypeInfo = OvenMode::Attributes::SupportedModes::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -38958,9 +38637,9 @@ + (void)readAttributeSetTimeWithClusterStateCache:(MTRClusterStateCacheContainer completion:completion]; } -- (void)readAttributeTimeRemainingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Timer::Attributes::TimeRemaining::TypeInfo; + using TypeInfo = OvenMode::Attributes::CurrentMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38969,11 +38648,11 @@ - (void)readAttributeTimeRemainingWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeTimeRemainingWithParams:(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 = Timer::Attributes::TimeRemaining::TypeInfo; + using TypeInfo = OvenMode::Attributes::CurrentMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -38983,9 +38662,9 @@ - (void)subscribeAttributeTimeRemainingWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTimeRemainingWithClusterStateCache:(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 = Timer::Attributes::TimeRemaining::TypeInfo; + using TypeInfo = OvenMode::Attributes::CurrentMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -38994,9 +38673,9 @@ + (void)readAttributeTimeRemainingWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeTimerStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Timer::Attributes::TimerState::TypeInfo; + using TypeInfo = OvenMode::Attributes::StartUpMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39005,83 +38684,44 @@ - (void)readAttributeTimerStateWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeTimerStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Timer::Attributes::TimerState::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeTimerStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - using TypeInfo = Timer::Attributes::TimerState::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + [self writeAttributeStartUpModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } - -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - using TypeInfo = Timer::Attributes::GeneratedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; -- (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = Timer::Attributes::GeneratedCommandList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } -+ (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Timer::Attributes::GeneratedCommandList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + ListFreer listFreer; + using TypeInfo = OvenMode::Attributes::StartUpMode::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Timer::Attributes::AcceptedCommandList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Timer::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OvenMode::Attributes::StartUpMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39091,9 +38731,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)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Timer::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = OvenMode::Attributes::StartUpMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39102,9 +38742,9 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Timer::Attributes::EventList::TypeInfo; + using TypeInfo = OvenMode::Attributes::OnMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39113,47 +38753,44 @@ - (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)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - using TypeInfo = Timer::Attributes::EventList::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self writeAttributeOnModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } - -+ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - using TypeInfo = Timer::Attributes::EventList::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Timer::Attributes::AttributeList::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = OvenMode::Attributes::OnMode::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Timer::Attributes::AttributeList::TypeInfo; + using TypeInfo = OvenMode::Attributes::OnMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39163,9 +38800,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)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Timer::Attributes::AttributeList::TypeInfo; + using TypeInfo = OvenMode::Attributes::OnMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39174,9 +38811,9 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Timer::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OvenMode::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39185,11 +38822,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)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Timer::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OvenMode::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39199,9 +38836,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)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Timer::Attributes::FeatureMap::TypeInfo; + using TypeInfo = OvenMode::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39210,9 +38847,9 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Timer::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OvenMode::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39221,11 +38858,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)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Timer::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OvenMode::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39235,9 +38872,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)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Timer::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = OvenMode::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39246,126 +38883,9 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -@end - -@implementation MTRBaseClusterOvenCavityOperationalState - -- (void)pauseWithCompletion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self pauseWithParams:nil completion:completion]; -} -- (void)pauseWithParams:(MTROvenCavityOperationalStateClusterPauseParams * _Nullable)params 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 - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROvenCavityOperationalStateClusterOperationalCommandResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)stopWithCompletion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self stopWithParams:nil completion:completion]; -} -- (void)stopWithParams:(MTROvenCavityOperationalStateClusterStopParams * _Nullable)params 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 - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROvenCavityOperationalStateClusterOperationalCommandResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)startWithCompletion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self startWithParams:nil completion:completion]; -} -- (void)startWithParams:(MTROvenCavityOperationalStateClusterStartParams * _Nullable)params 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 - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROvenCavityOperationalStateClusterOperationalCommandResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} -- (void)resumeWithCompletion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - [self resumeWithParams:nil completion:completion]; -} -- (void)resumeWithParams:(MTROvenCavityOperationalStateClusterResumeParams * _Nullable)params completion:(void (^)(MTROvenCavityOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTROvenCavityOperationalStateClusterResumeParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = OvenCavityOperationalState::Commands::Resume::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROvenCavityOperationalStateClusterOperationalCommandResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} - -- (void)readAttributePhaseListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenCavityOperationalState::Attributes::PhaseList::TypeInfo; + using TypeInfo = OvenMode::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39374,11 +38894,11 @@ - (void)readAttributePhaseListWithCompletion:(void (^)(NSArray * _Nullable value completion:completion]; } -- (void)subscribeAttributePhaseListWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OvenCavityOperationalState::Attributes::PhaseList::TypeInfo; + using TypeInfo = OvenMode::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39388,9 +38908,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)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenCavityOperationalState::Attributes::PhaseList::TypeInfo; + using TypeInfo = OvenMode::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39399,9 +38919,9 @@ + (void)readAttributePhaseListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeCurrentPhaseWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenCavityOperationalState::Attributes::CurrentPhase::TypeInfo; + using TypeInfo = OvenMode::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39410,11 +38930,11 @@ - (void)readAttributeCurrentPhaseWithCompletion:(void (^)(NSNumber * _Nullable v completion:completion]; } -- (void)subscribeAttributeCurrentPhaseWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _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 = OvenCavityOperationalState::Attributes::CurrentPhase::TypeInfo; + using TypeInfo = OvenMode::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39424,9 +38944,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)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenCavityOperationalState::Attributes::CurrentPhase::TypeInfo; + using TypeInfo = OvenMode::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39435,9 +38955,9 @@ + (void)readAttributeCurrentPhaseWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } -- (void)readAttributeCountdownTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenCavityOperationalState::Attributes::CountdownTime::TypeInfo; + using TypeInfo = OvenMode::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39446,11 +38966,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)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OvenCavityOperationalState::Attributes::CountdownTime::TypeInfo; + using TypeInfo = OvenMode::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39460,9 +38980,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)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenCavityOperationalState::Attributes::CountdownTime::TypeInfo; + using TypeInfo = OvenMode::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39471,9 +38991,9 @@ + (void)readAttributeCountdownTimeWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeOperationalStateListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenCavityOperationalState::Attributes::OperationalStateList::TypeInfo; + using TypeInfo = OvenMode::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39482,11 +39002,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)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OvenCavityOperationalState::Attributes::OperationalStateList::TypeInfo; + using TypeInfo = OvenMode::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39496,9 +39016,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)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenCavityOperationalState::Attributes::OperationalStateList::TypeInfo; + using TypeInfo = OvenMode::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39507,9 +39027,13 @@ + (void)readAttributeOperationalStateListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeOperationalStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterLaundryDryerControls + +- (void)readAttributeSupportedDrynessLevelsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenCavityOperationalState::Attributes::OperationalState::TypeInfo; + using TypeInfo = LaundryDryerControls::Attributes::SupportedDrynessLevels::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39518,11 +39042,11 @@ - (void)readAttributeOperationalStateWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)subscribeAttributeOperationalStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSupportedDrynessLevelsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OvenCavityOperationalState::Attributes::OperationalState::TypeInfo; + using TypeInfo = LaundryDryerControls::Attributes::SupportedDrynessLevels::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39532,9 +39056,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)readAttributeSupportedDrynessLevelsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenCavityOperationalState::Attributes::OperationalState::TypeInfo; + using TypeInfo = LaundryDryerControls::Attributes::SupportedDrynessLevels::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39543,9 +39067,9 @@ + (void)readAttributeOperationalStateWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeOperationalErrorWithCompletion:(void (^)(MTROvenCavityOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSelectedDrynessLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenCavityOperationalState::Attributes::OperationalError::TypeInfo; + using TypeInfo = LaundryDryerControls::Attributes::SelectedDrynessLevel::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39554,11 +39078,44 @@ - (void)readAttributeOperationalErrorWithCompletion:(void (^)(MTROvenCavityOpera completion:completion]; } -- (void)subscribeAttributeOperationalErrorWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(MTROvenCavityOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeSelectedDrynessLevelWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - using TypeInfo = OvenCavityOperationalState::Attributes::OperationalError::TypeInfo; + [self writeAttributeSelectedDrynessLevelWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeSelectedDrynessLevelWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = LaundryDryerControls::Attributes::SelectedDrynessLevel::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = static_cast>(value.unsignedCharValue); + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeSelectedDrynessLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = LaundryDryerControls::Attributes::SelectedDrynessLevel::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39568,9 +39125,9 @@ - (void)subscribeAttributeOperationalErrorWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOperationalErrorWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTROvenCavityOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSelectedDrynessLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenCavityOperationalState::Attributes::OperationalError::TypeInfo; + using TypeInfo = LaundryDryerControls::Attributes::SelectedDrynessLevel::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39581,7 +39138,7 @@ + (void)readAttributeOperationalErrorWithClusterStateCache:(MTRClusterStateCache - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenCavityOperationalState::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = LaundryDryerControls::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39594,7 +39151,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OvenCavityOperationalState::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = LaundryDryerControls::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39606,7 +39163,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 = OvenCavityOperationalState::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = LaundryDryerControls::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39617,7 +39174,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenCavityOperationalState::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = LaundryDryerControls::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39630,7 +39187,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OvenCavityOperationalState::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = LaundryDryerControls::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39642,7 +39199,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 = OvenCavityOperationalState::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = LaundryDryerControls::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39653,7 +39210,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenCavityOperationalState::Attributes::EventList::TypeInfo; + using TypeInfo = LaundryDryerControls::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39666,7 +39223,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OvenCavityOperationalState::Attributes::EventList::TypeInfo; + using TypeInfo = LaundryDryerControls::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39678,7 +39235,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 = OvenCavityOperationalState::Attributes::EventList::TypeInfo; + using TypeInfo = LaundryDryerControls::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39689,7 +39246,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenCavityOperationalState::Attributes::AttributeList::TypeInfo; + using TypeInfo = LaundryDryerControls::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39702,7 +39259,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OvenCavityOperationalState::Attributes::AttributeList::TypeInfo; + using TypeInfo = LaundryDryerControls::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39714,7 +39271,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 = OvenCavityOperationalState::Attributes::AttributeList::TypeInfo; + using TypeInfo = LaundryDryerControls::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39725,7 +39282,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenCavityOperationalState::Attributes::FeatureMap::TypeInfo; + using TypeInfo = LaundryDryerControls::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39738,7 +39295,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OvenCavityOperationalState::Attributes::FeatureMap::TypeInfo; + using TypeInfo = LaundryDryerControls::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39750,7 +39307,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 = OvenCavityOperationalState::Attributes::FeatureMap::TypeInfo; + using TypeInfo = LaundryDryerControls::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39761,7 +39318,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenCavityOperationalState::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = LaundryDryerControls::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39774,7 +39331,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OvenCavityOperationalState::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = LaundryDryerControls::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39786,7 +39343,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 = OvenCavityOperationalState::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = LaundryDryerControls::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39797,36 +39354,108 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterOvenMode +@implementation MTRBaseClusterModeSelect -- (void)changeToModeWithParams:(MTROvenModeClusterChangeToModeParams *)params completion:(void (^)(MTROvenModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTROvenModeClusterChangeToModeParams + params = [[MTRModeSelectClusterChangeToModeParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); + completion(error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = OvenMode::Commands::ChangeToMode::Type; + using RequestType = ModeSelect::Commands::ChangeToMode::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROvenModeClusterChangeToModeResponseParams.class + responseClass:nil queue:self.callbackQueue completion:responseHandler]; } +- (void)readAttributeDescriptionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ModeSelect::Attributes::Description::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ModeSelect::Attributes::Description::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeDescriptionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ModeSelect::Attributes::Description::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeStandardNamespaceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ModeSelect::Attributes::StandardNamespace::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeStandardNamespaceWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ModeSelect::Attributes::StandardNamespace::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeStandardNamespaceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ModeSelect::Attributes::StandardNamespace::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + - (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = ModeSelect::Attributes::SupportedModes::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39839,7 +39468,7 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OvenMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = ModeSelect::Attributes::SupportedModes::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39851,7 +39480,7 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul + (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = ModeSelect::Attributes::SupportedModes::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39862,7 +39491,7 @@ + (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = ModeSelect::Attributes::CurrentMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39875,7 +39504,7 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OvenMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = ModeSelect::Attributes::CurrentMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39887,7 +39516,7 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = ModeSelect::Attributes::CurrentMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39898,7 +39527,7 @@ + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenMode::Attributes::StartUpMode::TypeInfo; + using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39926,7 +39555,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(M } ListFreer listFreer; - using TypeInfo = OvenMode::Attributes::StartUpMode::TypeInfo; + using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; TypeInfo::Type cppValue; if (value == nil) { cppValue.SetNull(); @@ -39944,7 +39573,7 @@ - (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OvenMode::Attributes::StartUpMode::TypeInfo; + using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39956,7 +39585,7 @@ - (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)p + (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenMode::Attributes::StartUpMode::TypeInfo; + using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -39967,7 +39596,7 @@ + (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenMode::Attributes::OnMode::TypeInfo; + using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -39995,7 +39624,7 @@ - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWri } ListFreer listFreer; - using TypeInfo = OvenMode::Attributes::OnMode::TypeInfo; + using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; TypeInfo::Type cppValue; if (value == nil) { cppValue.SetNull(); @@ -40009,11 +39638,119 @@ - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWri std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = ModeSelect::Attributes::OnMode::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 = ModeSelect::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 = ModeSelect::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 = ModeSelect::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 = ModeSelect::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 = ModeSelect::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 = ModeSelect::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 = ModeSelect::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 = OvenMode::Attributes::OnMode::TypeInfo; + using TypeInfo = ModeSelect::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40023,9 +39760,9 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOnModeWithClusterStateCache:(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 = OvenMode::Attributes::OnMode::TypeInfo; + using TypeInfo = ModeSelect::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -40034,9 +39771,9 @@ + (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40045,11 +39782,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 = OvenMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40059,9 +39796,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 = OvenMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -40070,9 +39807,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 = OvenMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ModeSelect::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40081,11 +39818,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 = OvenMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ModeSelect::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40095,9 +39832,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 = OvenMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = ModeSelect::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -40106,9 +39843,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 = OvenMode::Attributes::EventList::TypeInfo; + using TypeInfo = ModeSelect::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40117,11 +39854,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 = OvenMode::Attributes::EventList::TypeInfo; + using TypeInfo = ModeSelect::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40131,9 +39868,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 = OvenMode::Attributes::EventList::TypeInfo; + using TypeInfo = ModeSelect::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -40142,9 +39879,456 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterModeSelect (Deprecated) + +- (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self changeToModeWithParams:params completion: + completionHandler]; +} + +- (void)readAttributeDescriptionWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDescriptionWithCompletion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval + params:(MTRSubscribeParams * _Nullable)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + reportHandler:(void (^)(NSString * _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 subscribeAttributeDescriptionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + reportHandler(static_cast(value), error); + }]; +} ++ (void)readAttributeDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeDescriptionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: + ^(NSString * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} + +- (void)readAttributeStandardNamespaceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeStandardNamespaceWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeStandardNamespaceWithMinInterval:(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 subscribeAttributeStandardNamespaceWithParams: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)readAttributeStandardNamespaceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeStandardNamespaceWithClusterStateCache: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)readAttributeSupportedModesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSupportedModesWithCompletion: + ^(NSArray * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeSupportedModesWithMinInterval:(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 subscribeAttributeSupportedModesWithParams: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)readAttributeSupportedModesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeSupportedModesWithClusterStateCache: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)readAttributeCurrentModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentModeWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)subscribeAttributeCurrentModeWithMinInterval:(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 subscribeAttributeCurrentModeWithParams: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)readAttributeCurrentModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeCurrentModeWithClusterStateCache: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)readAttributeStartUpModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeStartUpModeWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeStartUpModeWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeStartUpModeWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeStartUpModeWithMinInterval:(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 subscribeAttributeStartUpModeWithParams: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)readAttributeStartUpModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeStartUpModeWithClusterStateCache: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)readAttributeOnModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOnModeWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOnModeWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOnModeWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeOnModeWithMinInterval:(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 subscribeAttributeOnModeWithParams: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)readAttributeOnModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOnModeWithClusterStateCache: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 MTRBaseClusterLaundryWasherMode + +- (void)changeToModeWithParams:(MTRLaundryWasherModeClusterChangeToModeParams *)params completion:(void (^)(MTRLaundryWasherModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRLaundryWasherModeClusterChangeToModeParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = LaundryWasherMode::Commands::ChangeToMode::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRLaundryWasherModeClusterChangeToModeResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::SupportedModes::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40153,11 +40337,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)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OvenMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::SupportedModes::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40167,9 +40351,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)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::SupportedModes::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -40178,9 +40362,9 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::CurrentMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40189,11 +40373,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)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = OvenMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::CurrentMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40203,9 +40387,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)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::CurrentMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -40214,9 +40398,9 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = OvenMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::StartUpMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40225,51 +40409,44 @@ - (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)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - using TypeInfo = OvenMode::Attributes::ClusterRevision::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self writeAttributeStartUpModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } - -+ (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - using TypeInfo = OvenMode::Attributes::ClusterRevision::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; -@end + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } -@implementation MTRBaseClusterLaundryDryerControls + ListFreer listFreer; + using TypeInfo = LaundryWasherMode::Attributes::StartUpMode::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } -- (void)readAttributeSupportedDrynessLevelsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = LaundryDryerControls::Attributes::SupportedDrynessLevels::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeSupportedDrynessLevelsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryDryerControls::Attributes::SupportedDrynessLevels::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::StartUpMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40279,9 +40456,9 @@ - (void)subscribeAttributeSupportedDrynessLevelsWithParams:(MTRSubscribeParams * subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSupportedDrynessLevelsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryDryerControls::Attributes::SupportedDrynessLevels::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::StartUpMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -40290,9 +40467,9 @@ + (void)readAttributeSupportedDrynessLevelsWithClusterStateCache:(MTRClusterStat completion:completion]; } -- (void)readAttributeSelectedDrynessLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryDryerControls::Attributes::SelectedDrynessLevel::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::OnMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40301,11 +40478,11 @@ - (void)readAttributeSelectedDrynessLevelWithCompletion:(void (^)(NSNumber * _Nu completion:completion]; } -- (void)writeAttributeSelectedDrynessLevelWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - [self writeAttributeSelectedDrynessLevelWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeOnModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } -- (void)writeAttributeSelectedDrynessLevelWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -40320,13 +40497,13 @@ - (void)writeAttributeSelectedDrynessLevelWithValue:(NSNumber * _Nullable)value } ListFreer listFreer; - using TypeInfo = LaundryDryerControls::Attributes::SelectedDrynessLevel::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::OnMode::TypeInfo; TypeInfo::Type cppValue; if (value == nil) { cppValue.SetNull(); } else { auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = static_cast>(value.unsignedCharValue); + nonNullValue_0 = value.unsignedCharValue; } chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); @@ -40334,11 +40511,11 @@ - (void)writeAttributeSelectedDrynessLevelWithValue:(NSNumber * _Nullable)value std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeSelectedDrynessLevelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryDryerControls::Attributes::SelectedDrynessLevel::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::OnMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40348,9 +40525,9 @@ - (void)subscribeAttributeSelectedDrynessLevelWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSelectedDrynessLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryDryerControls::Attributes::SelectedDrynessLevel::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::OnMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -40361,7 +40538,7 @@ + (void)readAttributeSelectedDrynessLevelWithClusterStateCache:(MTRClusterStateC - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryDryerControls::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40374,7 +40551,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryDryerControls::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40386,7 +40563,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 = LaundryDryerControls::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -40397,7 +40574,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryDryerControls::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40410,7 +40587,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryDryerControls::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40422,7 +40599,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 = LaundryDryerControls::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -40433,7 +40610,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryDryerControls::Attributes::EventList::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40446,7 +40623,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryDryerControls::Attributes::EventList::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40458,7 +40635,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 = LaundryDryerControls::Attributes::EventList::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -40469,7 +40646,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryDryerControls::Attributes::AttributeList::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40482,7 +40659,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryDryerControls::Attributes::AttributeList::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40494,7 +40671,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 = LaundryDryerControls::Attributes::AttributeList::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -40505,7 +40682,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryDryerControls::Attributes::FeatureMap::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40518,7 +40695,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryDryerControls::Attributes::FeatureMap::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40530,7 +40707,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 = LaundryDryerControls::Attributes::FeatureMap::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -40541,7 +40718,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryDryerControls::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40554,7 +40731,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryDryerControls::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40566,7 +40743,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 = LaundryDryerControls::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = LaundryWasherMode::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -40577,108 +40754,36 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterModeSelect +@implementation MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode -- (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params completion:(MTRStatusCompletion)completion +- (void)changeToModeWithParams:(MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams *)params completion:(void (^)(MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRModeSelectClusterChangeToModeParams + params = [[MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams 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 = RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToMode::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil + responseClass:MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)readAttributeDescriptionWithCompletion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ModeSelect::Attributes::Description::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeDescriptionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ModeSelect::Attributes::Description::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeDescriptionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ModeSelect::Attributes::Description::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeStandardNamespaceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ModeSelect::Attributes::StandardNamespace::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeStandardNamespaceWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ModeSelect::Attributes::StandardNamespace::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeStandardNamespaceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ModeSelect::Attributes::StandardNamespace::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::SupportedModes::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::SupportedModes::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40691,7 +40796,7 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ModeSelect::Attributes::SupportedModes::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::SupportedModes::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40703,7 +40808,7 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul + (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::SupportedModes::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::SupportedModes::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -40714,266 +40819,20 @@ + (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::CurrentMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ModeSelect::Attributes::CurrentMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ModeSelect::Attributes::CurrentMode::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeStartUpModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ModeSelect::Attributes::StartUpMode::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeOnModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = ModeSelect::Attributes::OnMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = ModeSelect::Attributes::OnMode::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 = ModeSelect::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 = ModeSelect::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 = ModeSelect::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 = ModeSelect::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 = ModeSelect::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 = ModeSelect::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 = ModeSelect::Attributes::EventList::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::CurrentMode::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 +} + +- (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ModeSelect::Attributes::EventList::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::CurrentMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -40983,9 +40842,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)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::EventList::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::CurrentMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -40994,9 +40853,9 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41005,11 +40864,44 @@ - (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)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; + [self writeAttributeStartUpModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41019,9 +40911,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)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::AttributeList::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41030,9 +40922,9 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::FeatureMap::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41041,11 +40933,44 @@ - (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)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - using TypeInfo = ModeSelect::Attributes::FeatureMap::TypeInfo; + [self writeAttributeOnModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; +} +- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41055,9 +40980,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)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::FeatureMap::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41066,9 +40991,9 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41077,11 +41002,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)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = ModeSelect::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41091,9 +41016,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)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = ModeSelect::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41102,456 +41027,153 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -@end - -@implementation MTRBaseClusterModeSelect (Deprecated) - -- (void)changeToModeWithParams:(MTRModeSelectClusterChangeToModeParams *)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self changeToModeWithParams:params completion: - completionHandler]; -} - -- (void)readAttributeDescriptionWithCompletionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeDescriptionWithCompletion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeDescriptionWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSString * _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 subscribeAttributeDescriptionWithParams:subscribeParams subscriptionEstablished:subscriptionEstablishedHandler reportHandler: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - reportHandler(static_cast(value), error); - }]; -} -+ (void)readAttributeDescriptionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSString * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeDescriptionWithClusterStateCache:attributeCacheContainer.realContainer endpoint:endpoint queue:queue completion: - ^(NSString * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} - -- (void)readAttributeStandardNamespaceWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeStandardNamespaceWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeStandardNamespaceWithMinInterval:(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 subscribeAttributeStandardNamespaceWithParams: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)readAttributeStandardNamespaceWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeStandardNamespaceWithClusterStateCache: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); - }]; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AcceptedCommandList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeSupportedModesWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSupportedModesWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeSupportedModesWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler +- (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished 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 subscribeAttributeSupportedModesWithParams: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)readAttributeSupportedModesWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeSupportedModesWithClusterStateCache: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)readAttributeCurrentModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCurrentModeWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)subscribeAttributeCurrentModeWithMinInterval:(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 subscribeAttributeCurrentModeWithParams: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)readAttributeCurrentModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeCurrentModeWithClusterStateCache: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)readAttributeStartUpModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeStartUpModeWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeStartUpModeWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeStartUpModeWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeStartUpModeWithMinInterval:(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 subscribeAttributeStartUpModeWithParams: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)readAttributeStartUpModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeStartUpModeWithClusterStateCache: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)readAttributeOnModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeOnModeWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; -} -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeOnModeWithValue:value params:nil completion:completionHandler]; -} -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler -{ - [self writeAttributeOnModeWithValue:value params:params completion:completionHandler]; -} -- (void)subscribeAttributeOnModeWithMinInterval:(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 subscribeAttributeOnModeWithParams: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)readAttributeOnModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler -{ - [self readAttributeOnModeWithClusterStateCache: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); - }]; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AcceptedCommandList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeClusterRevisionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AcceptedCommandList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (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 + +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - 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); - }]; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::EventList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - [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); - }]; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::EventList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue ++ (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::EventList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -@end +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AttributeList::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} -@implementation MTRBaseClusterLaundryWasherMode +- (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AttributeList::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} -- (void)changeToModeWithParams:(MTRLaundryWasherModeClusterChangeToModeParams *)params completion:(void (^)(MTRLaundryWasherModeClusterChangeToModeResponseParams * _Nullable data, 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 { - if (params == nil) { - params = [[MTRLaundryWasherModeClusterChangeToModeParams - alloc] init]; - } + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AttributeList::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::FeatureMap::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; +- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::FeatureMap::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} - using RequestType = LaundryWasherMode::Commands::ChangeToMode::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRLaundryWasherModeClusterChangeToModeResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; ++ (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::FeatureMap::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41560,11 +41182,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)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41574,9 +41196,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)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41585,9 +41207,13 @@ + (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } -- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterLaundryWasherControls + +- (void)readAttributeSpinSpeedsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::SpinSpeeds::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41596,11 +41222,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)subscribeAttributeSpinSpeedsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::SpinSpeeds::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41610,9 +41236,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)readAttributeSpinSpeedsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::SpinSpeeds::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41621,9 +41247,9 @@ + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSpinSpeedCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::StartUpMode::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::SpinSpeedCurrent::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41632,11 +41258,11 @@ - (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeSpinSpeedCurrentWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - [self writeAttributeStartUpModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeSpinSpeedCurrentWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeSpinSpeedCurrentWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -41651,7 +41277,7 @@ - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(M } ListFreer listFreer; - using TypeInfo = LaundryWasherMode::Attributes::StartUpMode::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::SpinSpeedCurrent::TypeInfo; TypeInfo::Type cppValue; if (value == nil) { cppValue.SetNull(); @@ -41665,11 +41291,11 @@ - (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(M std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSpinSpeedCurrentWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherMode::Attributes::StartUpMode::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::SpinSpeedCurrent::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41679,9 +41305,9 @@ - (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSpinSpeedCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::StartUpMode::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::SpinSpeedCurrent::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41690,9 +41316,9 @@ + (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNumberOfRinsesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::OnMode::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::NumberOfRinses::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41701,11 +41327,11 @@ - (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, completion:completion]; } -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeNumberOfRinsesWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeOnModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeNumberOfRinsesWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeNumberOfRinsesWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -41720,25 +41346,20 @@ - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWri } ListFreer listFreer; - using TypeInfo = LaundryWasherMode::Attributes::OnMode::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::NumberOfRinses::TypeInfo; TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfRinsesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherMode::Attributes::OnMode::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::NumberOfRinses::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41748,9 +41369,45 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNumberOfRinsesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::OnMode::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::NumberOfRinses::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeSupportedRinsesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = LaundryWasherControls::Attributes::SupportedRinses::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributeSupportedRinsesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = LaundryWasherControls::Attributes::SupportedRinses::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeSupportedRinsesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = LaundryWasherControls::Attributes::SupportedRinses::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41761,7 +41418,7 @@ + (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41774,7 +41431,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41786,7 +41443,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 = LaundryWasherMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41797,7 +41454,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41810,7 +41467,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41822,7 +41479,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 = LaundryWasherMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41833,7 +41490,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::EventList::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41846,7 +41503,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherMode::Attributes::EventList::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41858,7 +41515,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 = LaundryWasherMode::Attributes::EventList::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41869,7 +41526,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41882,7 +41539,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41894,7 +41551,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 = LaundryWasherMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41905,7 +41562,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41918,7 +41575,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41930,7 +41587,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 = LaundryWasherMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41941,7 +41598,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41954,7 +41611,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -41966,7 +41623,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 = LaundryWasherMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = LaundryWasherControls::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -41977,12 +41634,12 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode +@implementation MTRBaseClusterRVCRunMode -- (void)changeToModeWithParams:(MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams *)params completion:(void (^)(MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)changeToModeWithParams:(MTRRVCRunModeClusterChangeToModeParams *)params completion:(void (^)(MTRRVCRunModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams + params = [[MTRRVCRunModeClusterChangeToModeParams alloc] init]; } @@ -41992,21 +41649,21 @@ - (void)changeToModeWithParams:(MTRRefrigeratorAndTemperatureControlledCabinetMo auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToMode::Type; + using RequestType = RvcRunMode::Commands::ChangeToMode::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams.class + responseClass:MTRRVCRunModeClusterChangeToModeResponseParams.class queue:self.callbackQueue completion:responseHandler]; } - (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = RvcRunMode::Attributes::SupportedModes::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42019,7 +41676,7 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = RvcRunMode::Attributes::SupportedModes::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42031,7 +41688,7 @@ - (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnul + (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = RvcRunMode::Attributes::SupportedModes::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -42042,7 +41699,7 @@ + (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheCo - (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = RvcRunMode::Attributes::CurrentMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42055,7 +41712,7 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = RvcRunMode::Attributes::CurrentMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42067,76 +41724,7 @@ - (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)p + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::CurrentMode::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -- (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeStartUpModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::StartUpMode::TypeInfo; + using TypeInfo = RvcRunMode::Attributes::CurrentMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -42147,7 +41735,7 @@ + (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheConta - (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::TypeInfo; + using TypeInfo = RvcRunMode::Attributes::OnMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42175,7 +41763,7 @@ - (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWri } ListFreer listFreer; - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::TypeInfo; + using TypeInfo = RvcRunMode::Attributes::OnMode::TypeInfo; TypeInfo::Type cppValue; if (value == nil) { cppValue.SetNull(); @@ -42193,7 +41781,7 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::TypeInfo; + using TypeInfo = RvcRunMode::Attributes::OnMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42205,7 +41793,7 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params + (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::OnMode::TypeInfo; + using TypeInfo = RvcRunMode::Attributes::OnMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -42216,7 +41804,7 @@ + (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = RvcRunMode::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42229,7 +41817,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = RvcRunMode::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42241,7 +41829,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 = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = RvcRunMode::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -42252,7 +41840,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = RvcRunMode::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42265,7 +41853,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = RvcRunMode::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42277,7 +41865,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 = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = RvcRunMode::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -42288,7 +41876,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::EventList::TypeInfo; + using TypeInfo = RvcRunMode::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42301,7 +41889,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::EventList::TypeInfo; + using TypeInfo = RvcRunMode::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42313,7 +41901,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 = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::EventList::TypeInfo; + using TypeInfo = RvcRunMode::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -42324,7 +41912,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = RvcRunMode::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42337,7 +41925,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = RvcRunMode::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42349,7 +41937,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 = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = RvcRunMode::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -42360,7 +41948,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = RvcRunMode::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42373,7 +41961,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = RvcRunMode::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42385,7 +41973,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 = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = RvcRunMode::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -42396,7 +41984,72 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = RvcRunMode::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 = RvcRunMode::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 = RvcRunMode::Attributes::ClusterRevision::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +@end + +@implementation MTRBaseClusterRVCCleanMode + +- (void)changeToModeWithParams:(MTRRVCCleanModeClusterChangeToModeParams *)params 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 + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRRVCCleanModeClusterChangeToModeResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} + +- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = RvcCleanMode::Attributes::SupportedModes::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42405,11 +42058,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)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = RvcCleanMode::Attributes::SupportedModes::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42419,9 +42072,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)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAndTemperatureControlledCabinetMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = RvcCleanMode::Attributes::SupportedModes::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -42430,13 +42083,9 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -@end - -@implementation MTRBaseClusterLaundryWasherControls - -- (void)readAttributeSpinSpeedsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::SpinSpeeds::TypeInfo; + using TypeInfo = RvcCleanMode::Attributes::CurrentMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42445,11 +42094,11 @@ - (void)readAttributeSpinSpeedsWithCompletion:(void (^)(NSArray * _Nullable valu completion:completion]; } -- (void)subscribeAttributeSpinSpeedsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _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 = LaundryWasherControls::Attributes::SpinSpeeds::TypeInfo; + using TypeInfo = RvcCleanMode::Attributes::CurrentMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42459,9 +42108,9 @@ - (void)subscribeAttributeSpinSpeedsWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSpinSpeedsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _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 = LaundryWasherControls::Attributes::SpinSpeeds::TypeInfo; + using TypeInfo = RvcCleanMode::Attributes::CurrentMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -42470,9 +42119,9 @@ + (void)readAttributeSpinSpeedsWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeSpinSpeedCurrentWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::SpinSpeedCurrent::TypeInfo; + using TypeInfo = RvcCleanMode::Attributes::OnMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42481,11 +42130,11 @@ - (void)readAttributeSpinSpeedCurrentWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)writeAttributeSpinSpeedCurrentWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - [self writeAttributeSpinSpeedCurrentWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeOnModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } -- (void)writeAttributeSpinSpeedCurrentWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -42500,7 +42149,7 @@ - (void)writeAttributeSpinSpeedCurrentWithValue:(NSNumber * _Nullable)value para } ListFreer listFreer; - using TypeInfo = LaundryWasherControls::Attributes::SpinSpeedCurrent::TypeInfo; + using TypeInfo = RvcCleanMode::Attributes::OnMode::TypeInfo; TypeInfo::Type cppValue; if (value == nil) { cppValue.SetNull(); @@ -42514,11 +42163,11 @@ - (void)writeAttributeSpinSpeedCurrentWithValue:(NSNumber * _Nullable)value para std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeSpinSpeedCurrentWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherControls::Attributes::SpinSpeedCurrent::TypeInfo; + using TypeInfo = RvcCleanMode::Attributes::OnMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42528,9 +42177,9 @@ - (void)subscribeAttributeSpinSpeedCurrentWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSpinSpeedCurrentWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::SpinSpeedCurrent::TypeInfo; + using TypeInfo = RvcCleanMode::Attributes::OnMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -42539,9 +42188,9 @@ + (void)readAttributeSpinSpeedCurrentWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeNumberOfRinsesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::NumberOfRinses::TypeInfo; + using TypeInfo = RvcCleanMode::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42550,39 +42199,11 @@ - (void)readAttributeNumberOfRinsesWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)writeAttributeNumberOfRinsesWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeNumberOfRinsesWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeNumberOfRinsesWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = LaundryWasherControls::Attributes::NumberOfRinses::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeNumberOfRinsesWithParams:(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 = LaundryWasherControls::Attributes::NumberOfRinses::TypeInfo; + using TypeInfo = RvcCleanMode::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42592,9 +42213,9 @@ - (void)subscribeAttributeNumberOfRinsesWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeNumberOfRinsesWithClusterStateCache:(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 = LaundryWasherControls::Attributes::NumberOfRinses::TypeInfo; + using TypeInfo = RvcCleanMode::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -42603,9 +42224,9 @@ + (void)readAttributeNumberOfRinsesWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } -- (void)readAttributeSupportedRinsesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::SupportedRinses::TypeInfo; + using TypeInfo = RvcCleanMode::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42614,11 +42235,11 @@ - (void)readAttributeSupportedRinsesWithCompletion:(void (^)(NSArray * _Nullable completion:completion]; } -- (void)subscribeAttributeSupportedRinsesWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _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 = LaundryWasherControls::Attributes::SupportedRinses::TypeInfo; + using TypeInfo = RvcCleanMode::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42628,9 +42249,9 @@ - (void)subscribeAttributeSupportedRinsesWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSupportedRinsesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _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 = LaundryWasherControls::Attributes::SupportedRinses::TypeInfo; + using TypeInfo = RvcCleanMode::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -42639,9 +42260,9 @@ + (void)readAttributeSupportedRinsesWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = RvcCleanMode::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42650,11 +42271,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)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherControls::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = RvcCleanMode::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42664,9 +42285,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)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = RvcCleanMode::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -42675,9 +42296,9 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = RvcCleanMode::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42686,11 +42307,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)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherControls::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = RvcCleanMode::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42700,9 +42321,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)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = RvcCleanMode::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -42711,9 +42332,9 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::EventList::TypeInfo; + using TypeInfo = RvcCleanMode::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42722,11 +42343,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)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherControls::Attributes::EventList::TypeInfo; + using TypeInfo = RvcCleanMode::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42736,9 +42357,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)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::EventList::TypeInfo; + using TypeInfo = RvcCleanMode::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -42747,9 +42368,9 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::AttributeList::TypeInfo; + using TypeInfo = RvcCleanMode::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42758,11 +42379,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)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherControls::Attributes::AttributeList::TypeInfo; + using TypeInfo = RvcCleanMode::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42772,9 +42393,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)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::AttributeList::TypeInfo; + using TypeInfo = RvcCleanMode::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -42783,9 +42404,42 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterTemperatureControl + +- (void)setTemperatureWithCompletion:(MTRStatusCompletion)completion { - using TypeInfo = LaundryWasherControls::Attributes::FeatureMap::TypeInfo; + [self setTemperatureWithParams:nil completion:completion]; +} +- (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperatureParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRTemperatureControlClusterSetTemperatureParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = TemperatureControl::Commands::SetTemperature::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)readAttributeTemperatureSetpointWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = TemperatureControl::Attributes::TemperatureSetpoint::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42794,11 +42448,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)subscribeAttributeTemperatureSetpointWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherControls::Attributes::FeatureMap::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::TemperatureSetpoint::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42808,9 +42462,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)readAttributeTemperatureSetpointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::FeatureMap::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::TemperatureSetpoint::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -42819,9 +42473,9 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::MinTemperature::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42830,11 +42484,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)subscribeAttributeMinTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = LaundryWasherControls::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::MinTemperature::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42844,9 +42498,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)readAttributeMinTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = LaundryWasherControls::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::MinTemperature::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -42855,38 +42509,9 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -@end - -@implementation MTRBaseClusterRVCRunMode - -- (void)changeToModeWithParams:(MTRRVCRunModeClusterChangeToModeParams *)params completion:(void (^)(MTRRVCRunModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRRVCRunModeClusterChangeToModeParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = RvcRunMode::Commands::ChangeToMode::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRRVCRunModeClusterChangeToModeResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} - -- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcRunMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::MaxTemperature::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42895,11 +42520,11 @@ - (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable completion:completion]; } -- (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeMaxTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcRunMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::MaxTemperature::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42909,9 +42534,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)readAttributeMaxTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcRunMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::MaxTemperature::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -42920,9 +42545,9 @@ + (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } -- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeStepWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcRunMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::Step::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42931,11 +42556,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)subscribeAttributeStepWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcRunMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::Step::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42945,9 +42570,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)readAttributeStepWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcRunMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::Step::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -42956,9 +42581,9 @@ + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSelectedTemperatureLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcRunMode::Attributes::OnMode::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::SelectedTemperatureLevel::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -42967,44 +42592,47 @@ - (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, completion:completion]; } -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeSelectedTemperatureLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeOnModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + using TypeInfo = TemperatureControl::Attributes::SelectedTemperatureLevel::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - ListFreer listFreer; - using TypeInfo = RvcRunMode::Attributes::OnMode::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } ++ (void)readAttributeSelectedTemperatureLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = TemperatureControl::Attributes::SelectedTemperatureLevel::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); +- (void)readAttributeSupportedTemperatureLevelsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = TemperatureControl::Attributes::SupportedTemperatureLevels::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSupportedTemperatureLevelsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcRunMode::Attributes::OnMode::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::SupportedTemperatureLevels::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43014,9 +42642,9 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSupportedTemperatureLevelsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcRunMode::Attributes::OnMode::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::SupportedTemperatureLevels::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -43027,7 +42655,7 @@ + (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcRunMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43040,7 +42668,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcRunMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43052,7 +42680,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 = RvcRunMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -43063,7 +42691,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcRunMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43076,7 +42704,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcRunMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43088,7 +42716,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 = RvcRunMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -43099,7 +42727,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcRunMode::Attributes::EventList::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43112,7 +42740,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcRunMode::Attributes::EventList::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43124,7 +42752,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 = RvcRunMode::Attributes::EventList::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -43135,7 +42763,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcRunMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43148,7 +42776,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcRunMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43160,7 +42788,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 = RvcRunMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -43171,7 +42799,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcRunMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43184,7 +42812,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcRunMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43196,7 +42824,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 = RvcRunMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -43207,7 +42835,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcRunMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43220,7 +42848,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcRunMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43232,7 +42860,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 = RvcRunMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = TemperatureControl::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -43243,36 +42871,11 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterRVCCleanMode - -- (void)changeToModeWithParams:(MTRRVCCleanModeClusterChangeToModeParams *)params 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 - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRRVCCleanModeClusterChangeToModeResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} +@implementation MTRBaseClusterRefrigeratorAlarm -- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcCleanMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = RefrigeratorAlarm::Attributes::Mask::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43281,11 +42884,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)subscribeAttributeMaskWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcCleanMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = RefrigeratorAlarm::Attributes::Mask::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43295,9 +42898,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)readAttributeMaskWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcCleanMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = RefrigeratorAlarm::Attributes::Mask::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -43306,9 +42909,9 @@ + (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } -- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcCleanMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = RefrigeratorAlarm::Attributes::State::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43317,11 +42920,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)subscribeAttributeStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcCleanMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = RefrigeratorAlarm::Attributes::State::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43331,9 +42934,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)readAttributeStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcCleanMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = RefrigeratorAlarm::Attributes::State::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -43342,55 +42945,22 @@ + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcCleanMode::Attributes::OnMode::TypeInfo; + using TypeInfo = RefrigeratorAlarm::Attributes::Supported::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeOnModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = RvcCleanMode::Attributes::OnMode::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSupportedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcCleanMode::Attributes::OnMode::TypeInfo; + using TypeInfo = RefrigeratorAlarm::Attributes::Supported::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43400,9 +42970,9 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcCleanMode::Attributes::OnMode::TypeInfo; + using TypeInfo = RefrigeratorAlarm::Attributes::Supported::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -43413,7 +42983,7 @@ + (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcCleanMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = RefrigeratorAlarm::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43426,7 +42996,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcCleanMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = RefrigeratorAlarm::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43438,7 +43008,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 = RvcCleanMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = RefrigeratorAlarm::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -43449,7 +43019,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcCleanMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = RefrigeratorAlarm::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43462,7 +43032,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcCleanMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = RefrigeratorAlarm::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43474,7 +43044,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 = RvcCleanMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = RefrigeratorAlarm::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -43485,7 +43055,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcCleanMode::Attributes::EventList::TypeInfo; + using TypeInfo = RefrigeratorAlarm::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43498,7 +43068,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcCleanMode::Attributes::EventList::TypeInfo; + using TypeInfo = RefrigeratorAlarm::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43510,7 +43080,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 = RvcCleanMode::Attributes::EventList::TypeInfo; + using TypeInfo = RefrigeratorAlarm::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -43521,7 +43091,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcCleanMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = RefrigeratorAlarm::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43534,7 +43104,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcCleanMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = RefrigeratorAlarm::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43546,7 +43116,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 = RvcCleanMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = RefrigeratorAlarm::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -43557,7 +43127,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcCleanMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = RefrigeratorAlarm::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43570,7 +43140,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcCleanMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = RefrigeratorAlarm::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43582,7 +43152,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 = RvcCleanMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = RefrigeratorAlarm::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -43593,7 +43163,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RvcCleanMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = RefrigeratorAlarm::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43606,7 +43176,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RvcCleanMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = RefrigeratorAlarm::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43618,7 +43188,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 = RvcCleanMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = RefrigeratorAlarm::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -43629,40 +43199,36 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterTemperatureControl +@implementation MTRBaseClusterDishwasherMode -- (void)setTemperatureWithCompletion:(MTRStatusCompletion)completion -{ - [self setTemperatureWithParams:nil completion:completion]; -} -- (void)setTemperatureWithParams:(MTRTemperatureControlClusterSetTemperatureParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)changeToModeWithParams:(MTRDishwasherModeClusterChangeToModeParams *)params completion:(void (^)(MTRDishwasherModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { - params = [[MTRTemperatureControlClusterSetTemperatureParams + params = [[MTRDishwasherModeClusterChangeToModeParams alloc] init]; } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); + completion(response, error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = TemperatureControl::Commands::SetTemperature::Type; + using RequestType = DishwasherMode::Commands::ChangeToMode::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil + responseClass:MTRDishwasherModeClusterChangeToModeResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)readAttributeTemperatureSetpointWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TemperatureControl::Attributes::TemperatureSetpoint::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::SupportedModes::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43671,11 +43237,11 @@ - (void)readAttributeTemperatureSetpointWithCompletion:(void (^)(NSNumber * _Nul completion:completion]; } -- (void)subscribeAttributeTemperatureSetpointWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TemperatureControl::Attributes::TemperatureSetpoint::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::SupportedModes::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43685,9 +43251,9 @@ - (void)subscribeAttributeTemperatureSetpointWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTemperatureSetpointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TemperatureControl::Attributes::TemperatureSetpoint::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::SupportedModes::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -43696,9 +43262,9 @@ + (void)readAttributeTemperatureSetpointWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeMinTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TemperatureControl::Attributes::MinTemperature::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::CurrentMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43707,11 +43273,11 @@ - (void)readAttributeMinTemperatureWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeMinTemperatureWithParams:(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 = TemperatureControl::Attributes::MinTemperature::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::CurrentMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43721,9 +43287,9 @@ - (void)subscribeAttributeMinTemperatureWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMinTemperatureWithClusterStateCache:(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 = TemperatureControl::Attributes::MinTemperature::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::CurrentMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -43732,9 +43298,9 @@ + (void)readAttributeMinTemperatureWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } -- (void)readAttributeMaxTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TemperatureControl::Attributes::MaxTemperature::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::StartUpMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43743,47 +43309,44 @@ - (void)readAttributeMaxTemperatureWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeMaxTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - using TypeInfo = TemperatureControl::Attributes::MaxTemperature::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self writeAttributeStartUpModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } - -+ (void)readAttributeMaxTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - using TypeInfo = TemperatureControl::Attributes::MaxTemperature::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; -- (void)readAttributeStepWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = TemperatureControl::Attributes::Step::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = DishwasherMode::Attributes::StartUpMode::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeStepWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TemperatureControl::Attributes::Step::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::StartUpMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43793,9 +43356,9 @@ - (void)subscribeAttributeStepWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeStepWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TemperatureControl::Attributes::Step::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::StartUpMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -43804,9 +43367,9 @@ + (void)readAttributeStepWithClusterStateCache:(MTRClusterStateCacheContainer *) completion:completion]; } -- (void)readAttributeSelectedTemperatureLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TemperatureControl::Attributes::SelectedTemperatureLevel::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::OnMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43815,47 +43378,44 @@ - (void)readAttributeSelectedTemperatureLevelWithCompletion:(void (^)(NSNumber * completion:completion]; } -- (void)subscribeAttributeSelectedTemperatureLevelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - using TypeInfo = TemperatureControl::Attributes::SelectedTemperatureLevel::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self writeAttributeOnModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } - -+ (void)readAttributeSelectedTemperatureLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - using TypeInfo = TemperatureControl::Attributes::SelectedTemperatureLevel::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; -- (void)readAttributeSupportedTemperatureLevelsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = TemperatureControl::Attributes::SupportedTemperatureLevels::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = DishwasherMode::Attributes::OnMode::TypeInfo; + TypeInfo::Type cppValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeSupportedTemperatureLevelsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TemperatureControl::Attributes::SupportedTemperatureLevels::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::OnMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43865,9 +43425,9 @@ - (void)subscribeAttributeSupportedTemperatureLevelsWithParams:(MTRSubscribePara subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSupportedTemperatureLevelsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TemperatureControl::Attributes::SupportedTemperatureLevels::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::OnMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -43878,7 +43438,7 @@ + (void)readAttributeSupportedTemperatureLevelsWithClusterStateCache:(MTRCluster - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TemperatureControl::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43891,7 +43451,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TemperatureControl::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43903,7 +43463,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 = TemperatureControl::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -43914,7 +43474,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TemperatureControl::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43927,7 +43487,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TemperatureControl::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43939,7 +43499,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 = TemperatureControl::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -43950,7 +43510,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TemperatureControl::Attributes::EventList::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43963,7 +43523,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TemperatureControl::Attributes::EventList::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43975,7 +43535,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 = TemperatureControl::Attributes::EventList::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -43986,7 +43546,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TemperatureControl::Attributes::AttributeList::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -43999,7 +43559,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TemperatureControl::Attributes::AttributeList::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44011,7 +43571,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 = TemperatureControl::Attributes::AttributeList::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -44022,7 +43582,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TemperatureControl::Attributes::FeatureMap::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44035,7 +43595,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TemperatureControl::Attributes::FeatureMap::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44047,7 +43607,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 = TemperatureControl::Attributes::FeatureMap::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -44058,7 +43618,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = TemperatureControl::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44071,7 +43631,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = TemperatureControl::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44083,7 +43643,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 = TemperatureControl::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = DishwasherMode::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -44094,11 +43654,11 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterRefrigeratorAlarm +@implementation MTRBaseClusterAirQuality -- (void)readAttributeMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAirQualityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAlarm::Attributes::Mask::TypeInfo; + using TypeInfo = AirQuality::Attributes::AirQuality::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44107,11 +43667,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)subscribeAttributeAirQualityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAlarm::Attributes::Mask::TypeInfo; + using TypeInfo = AirQuality::Attributes::AirQuality::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44121,9 +43681,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)readAttributeAirQualityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAlarm::Attributes::Mask::TypeInfo; + using TypeInfo = AirQuality::Attributes::AirQuality::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -44132,9 +43692,9 @@ + (void)readAttributeMaskWithClusterStateCache:(MTRClusterStateCacheContainer *) completion:completion]; } -- (void)readAttributeStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAlarm::Attributes::State::TypeInfo; + using TypeInfo = AirQuality::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44143,11 +43703,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)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAlarm::Attributes::State::TypeInfo; + using TypeInfo = AirQuality::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44157,9 +43717,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)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAlarm::Attributes::State::TypeInfo; + using TypeInfo = AirQuality::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -44168,9 +43728,9 @@ + (void)readAttributeStateWithClusterStateCache:(MTRClusterStateCacheContainer * completion:completion]; } -- (void)readAttributeSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAlarm::Attributes::Supported::TypeInfo; + using TypeInfo = AirQuality::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44179,11 +43739,11 @@ - (void)readAttributeSupportedWithCompletion:(void (^)(NSNumber * _Nullable valu completion:completion]; } -- (void)subscribeAttributeSupportedWithParams:(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 = RefrigeratorAlarm::Attributes::Supported::TypeInfo; + using TypeInfo = AirQuality::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44193,9 +43753,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)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAlarm::Attributes::Supported::TypeInfo; + using TypeInfo = AirQuality::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -44204,9 +43764,9 @@ + (void)readAttributeSupportedWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAlarm::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = AirQuality::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44215,11 +43775,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)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAlarm::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = AirQuality::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44229,9 +43789,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)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAlarm::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = AirQuality::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -44240,9 +43800,9 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAlarm::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = AirQuality::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44251,11 +43811,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)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAlarm::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = AirQuality::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44265,9 +43825,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)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAlarm::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = AirQuality::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -44276,9 +43836,9 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAlarm::Attributes::EventList::TypeInfo; + using TypeInfo = AirQuality::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44287,11 +43847,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)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAlarm::Attributes::EventList::TypeInfo; + using TypeInfo = AirQuality::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44301,9 +43861,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)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAlarm::Attributes::EventList::TypeInfo; + using TypeInfo = AirQuality::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -44312,9 +43872,9 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAlarm::Attributes::AttributeList::TypeInfo; + using TypeInfo = AirQuality::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44323,11 +43883,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)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAlarm::Attributes::AttributeList::TypeInfo; + using TypeInfo = AirQuality::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44337,9 +43897,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)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAlarm::Attributes::AttributeList::TypeInfo; + using TypeInfo = AirQuality::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -44348,9 +43908,42 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterSmokeCOAlarm + +- (void)selfTestRequestWithCompletion:(MTRStatusCompletion)completion { - using TypeInfo = RefrigeratorAlarm::Attributes::FeatureMap::TypeInfo; + [self selfTestRequestWithParams:nil completion:completion]; +} +- (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRSmokeCOAlarmClusterSelfTestRequestParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = SmokeCoAlarm::Commands::SelfTestRequest::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)readAttributeExpressedStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = SmokeCoAlarm::Attributes::ExpressedState::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44359,11 +43952,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)subscribeAttributeExpressedStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAlarm::Attributes::FeatureMap::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::ExpressedState::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44373,9 +43966,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)readAttributeExpressedStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAlarm::Attributes::FeatureMap::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::ExpressedState::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -44384,9 +43977,9 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSmokeStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAlarm::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::SmokeState::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44395,11 +43988,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)subscribeAttributeSmokeStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = RefrigeratorAlarm::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::SmokeState::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44409,9 +44002,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)readAttributeSmokeStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = RefrigeratorAlarm::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::SmokeState::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -44420,38 +44013,9 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -@end - -@implementation MTRBaseClusterDishwasherMode - -- (void)changeToModeWithParams:(MTRDishwasherModeClusterChangeToModeParams *)params completion:(void (^)(MTRDishwasherModeClusterChangeToModeResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRDishwasherModeClusterChangeToModeParams - alloc] init]; - } - - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; - - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - - using RequestType = DishwasherMode::Commands::ChangeToMode::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRDishwasherModeClusterChangeToModeResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} - -- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCOStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::COState::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44460,11 +44024,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)subscribeAttributeCOStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DishwasherMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::COState::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44474,9 +44038,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)readAttributeCOStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherMode::Attributes::SupportedModes::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::COState::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -44485,9 +44049,9 @@ + (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } -- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeBatteryAlertWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::BatteryAlert::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44495,12 +44059,12 @@ - (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable va queue:self.callbackQueue completion:completion]; } - -- (void)subscribeAttributeCurrentModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)subscribeAttributeBatteryAlertWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DishwasherMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::BatteryAlert::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44510,9 +44074,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)readAttributeBatteryAlertWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherMode::Attributes::CurrentMode::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::BatteryAlert::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -44521,9 +44085,9 @@ + (void)readAttributeCurrentModeWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeDeviceMutedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherMode::Attributes::StartUpMode::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::DeviceMuted::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44532,44 +44096,11 @@ - (void)readAttributeStartUpModeWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeStartUpModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeStartUpModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DishwasherMode::Attributes::StartUpMode::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeDeviceMutedWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DishwasherMode::Attributes::StartUpMode::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::DeviceMuted::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44579,9 +44110,9 @@ - (void)subscribeAttributeStartUpModeWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeDeviceMutedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherMode::Attributes::StartUpMode::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::DeviceMuted::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -44590,9 +44121,9 @@ + (void)readAttributeStartUpModeWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTestInProgressWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherMode::Attributes::OnMode::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::TestInProgress::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44601,44 +44132,11 @@ - (void)readAttributeOnModeWithCompletion:(void (^)(NSNumber * _Nullable value, completion:completion]; } -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeOnModeWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeOnModeWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = DishwasherMode::Attributes::OnMode::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTestInProgressWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DishwasherMode::Attributes::OnMode::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::TestInProgress::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44648,9 +44146,9 @@ - (void)subscribeAttributeOnModeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTestInProgressWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherMode::Attributes::OnMode::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::TestInProgress::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -44659,9 +44157,9 @@ + (void)readAttributeOnModeWithClusterStateCache:(MTRClusterStateCacheContainer completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeHardwareFaultAlertWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::HardwareFaultAlert::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44670,11 +44168,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)subscribeAttributeHardwareFaultAlertWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DishwasherMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::HardwareFaultAlert::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44684,9 +44182,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)readAttributeHardwareFaultAlertWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherMode::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::HardwareFaultAlert::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -44695,9 +44193,9 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEndOfServiceAlertWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::EndOfServiceAlert::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44706,11 +44204,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)subscribeAttributeEndOfServiceAlertWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DishwasherMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::EndOfServiceAlert::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44720,9 +44218,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)readAttributeEndOfServiceAlertWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherMode::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::EndOfServiceAlert::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -44731,9 +44229,9 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeInterconnectSmokeAlarmWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherMode::Attributes::EventList::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::InterconnectSmokeAlarm::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44742,11 +44240,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)subscribeAttributeInterconnectSmokeAlarmWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DishwasherMode::Attributes::EventList::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::InterconnectSmokeAlarm::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44756,9 +44254,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)readAttributeInterconnectSmokeAlarmWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherMode::Attributes::EventList::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::InterconnectSmokeAlarm::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -44767,9 +44265,9 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeInterconnectCOAlarmWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::InterconnectCOAlarm::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44778,11 +44276,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)subscribeAttributeInterconnectCOAlarmWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DishwasherMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::InterconnectCOAlarm::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44792,9 +44290,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)readAttributeInterconnectCOAlarmWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherMode::Attributes::AttributeList::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::InterconnectCOAlarm::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -44803,9 +44301,9 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeContaminationStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::ContaminationState::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44814,11 +44312,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)subscribeAttributeContaminationStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DishwasherMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::ContaminationState::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44828,9 +44326,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)readAttributeContaminationStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherMode::Attributes::FeatureMap::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::ContaminationState::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -44839,9 +44337,9 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSmokeSensitivityLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::SmokeSensitivityLevel::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44850,11 +44348,39 @@ - (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)writeAttributeSmokeSensitivityLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = DishwasherMode::Attributes::ClusterRevision::TypeInfo; + [self writeAttributeSmokeSensitivityLevelWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeSmokeSensitivityLevelWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = SmokeCoAlarm::Attributes::SmokeSensitivityLevel::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeSmokeSensitivityLevelWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = SmokeCoAlarm::Attributes::SmokeSensitivityLevel::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44864,9 +44390,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)readAttributeSmokeSensitivityLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherMode::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::SmokeSensitivityLevel::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -44875,13 +44401,9 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -@end - -@implementation MTRBaseClusterAirQuality - -- (void)readAttributeAirQualityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeExpiryDateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AirQuality::Attributes::AirQuality::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::ExpiryDate::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44890,11 +44412,11 @@ - (void)readAttributeAirQualityWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeAirQualityWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeExpiryDateWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AirQuality::Attributes::AirQuality::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::ExpiryDate::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44904,9 +44426,9 @@ - (void)subscribeAttributeAirQualityWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAirQualityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeExpiryDateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AirQuality::Attributes::AirQuality::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::ExpiryDate::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -44917,7 +44439,7 @@ + (void)readAttributeAirQualityWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AirQuality::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44930,7 +44452,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AirQuality::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44942,7 +44464,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 = AirQuality::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -44953,7 +44475,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AirQuality::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44966,7 +44488,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AirQuality::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -44978,7 +44500,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 = AirQuality::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -44989,7 +44511,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AirQuality::Attributes::EventList::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45002,7 +44524,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AirQuality::Attributes::EventList::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45014,7 +44536,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 = AirQuality::Attributes::EventList::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -45025,7 +44547,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AirQuality::Attributes::AttributeList::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45038,7 +44560,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AirQuality::Attributes::AttributeList::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45050,7 +44572,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 = AirQuality::Attributes::AttributeList::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -45061,7 +44583,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AirQuality::Attributes::FeatureMap::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45074,7 +44596,7 @@ - (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AirQuality::Attributes::FeatureMap::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45086,7 +44608,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 = AirQuality::Attributes::FeatureMap::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -45097,7 +44619,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = AirQuality::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45110,7 +44632,7 @@ - (void)subscribeAttributeClusterRevisionWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = AirQuality::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45122,7 +44644,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 = AirQuality::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = SmokeCoAlarm::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -45133,16 +44655,12 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterSmokeCOAlarm +@implementation MTRBaseClusterDishwasherAlarm -- (void)selfTestRequestWithCompletion:(MTRStatusCompletion)completion -{ - [self selfTestRequestWithParams:nil completion:completion]; -} -- (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)resetWithParams:(MTRDishwasherAlarmClusterResetParams *)params completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRSmokeCOAlarmClusterSelfTestRequestParams + params = [[MTRDishwasherAlarmClusterResetParams alloc] init]; } @@ -45152,7 +44670,7 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = SmokeCoAlarm::Commands::SelfTestRequest::Type; + using RequestType = DishwasherAlarm::Commands::Reset::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -45163,46 +44681,34 @@ - (void)selfTestRequestWithParams:(MTRSmokeCOAlarmClusterSelfTestRequestParams * queue:self.callbackQueue completion:responseHandler]; } - -- (void)readAttributeExpressedStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAlarmsParams *)params completion:(MTRStatusCompletion)completion { - using TypeInfo = SmokeCoAlarm::Attributes::ExpressedState::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} + if (params == nil) { + params = [[MTRDishwasherAlarmClusterModifyEnabledAlarmsParams + alloc] init]; + } -- (void)subscribeAttributeExpressedStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = SmokeCoAlarm::Attributes::ExpressedState::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; -+ (void)readAttributeExpressedStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = SmokeCoAlarm::Attributes::ExpressedState::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; + 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)readAttributeSmokeStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::SmokeState::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::Mask::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45211,11 +44717,11 @@ - (void)readAttributeSmokeStateWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeSmokeStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeMaskWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SmokeCoAlarm::Attributes::SmokeState::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::Mask::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45225,9 +44731,9 @@ - (void)subscribeAttributeSmokeStateWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSmokeStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaskWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::SmokeState::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::Mask::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -45236,9 +44742,9 @@ + (void)readAttributeSmokeStateWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeCOStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeLatchWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::COState::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::Latch::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45247,11 +44753,11 @@ - (void)readAttributeCOStateWithCompletion:(void (^)(NSNumber * _Nullable value, completion:completion]; } -- (void)subscribeAttributeCOStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeLatchWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SmokeCoAlarm::Attributes::COState::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::Latch::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45261,9 +44767,9 @@ - (void)subscribeAttributeCOStateWithParams:(MTRSubscribeParams * _Nonnull)param subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeCOStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeLatchWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::COState::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::Latch::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -45272,9 +44778,9 @@ + (void)readAttributeCOStateWithClusterStateCache:(MTRClusterStateCacheContainer completion:completion]; } -- (void)readAttributeBatteryAlertWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::BatteryAlert::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::State::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45283,11 +44789,11 @@ - (void)readAttributeBatteryAlertWithCompletion:(void (^)(NSNumber * _Nullable v completion:completion]; } -- (void)subscribeAttributeBatteryAlertWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SmokeCoAlarm::Attributes::BatteryAlert::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::State::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45297,9 +44803,9 @@ - (void)subscribeAttributeBatteryAlertWithParams:(MTRSubscribeParams * _Nonnull) subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeBatteryAlertWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::BatteryAlert::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::State::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -45308,9 +44814,9 @@ + (void)readAttributeBatteryAlertWithClusterStateCache:(MTRClusterStateCacheCont completion:completion]; } -- (void)readAttributeDeviceMutedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::DeviceMuted::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::Supported::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45319,11 +44825,11 @@ - (void)readAttributeDeviceMutedWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)subscribeAttributeDeviceMutedWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSupportedWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SmokeCoAlarm::Attributes::DeviceMuted::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::Supported::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45333,9 +44839,9 @@ - (void)subscribeAttributeDeviceMutedWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeDeviceMutedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::DeviceMuted::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::Supported::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -45344,9 +44850,9 @@ + (void)readAttributeDeviceMutedWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeTestInProgressWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::TestInProgress::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45355,11 +44861,11 @@ - (void)readAttributeTestInProgressWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)subscribeAttributeTestInProgressWithParams:(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 = SmokeCoAlarm::Attributes::TestInProgress::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45369,9 +44875,9 @@ - (void)subscribeAttributeTestInProgressWithParams:(MTRSubscribeParams * _Nonnul subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTestInProgressWithClusterStateCache:(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 = SmokeCoAlarm::Attributes::TestInProgress::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -45380,9 +44886,9 @@ + (void)readAttributeTestInProgressWithClusterStateCache:(MTRClusterStateCacheCo completion:completion]; } -- (void)readAttributeHardwareFaultAlertWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::HardwareFaultAlert::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45391,11 +44897,11 @@ - (void)readAttributeHardwareFaultAlertWithCompletion:(void (^)(NSNumber * _Null completion:completion]; } -- (void)subscribeAttributeHardwareFaultAlertWithParams:(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 = SmokeCoAlarm::Attributes::HardwareFaultAlert::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45405,9 +44911,9 @@ - (void)subscribeAttributeHardwareFaultAlertWithParams:(MTRSubscribeParams * _No subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeHardwareFaultAlertWithClusterStateCache:(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 = SmokeCoAlarm::Attributes::HardwareFaultAlert::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -45416,9 +44922,9 @@ + (void)readAttributeHardwareFaultAlertWithClusterStateCache:(MTRClusterStateCac completion:completion]; } -- (void)readAttributeEndOfServiceAlertWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::EndOfServiceAlert::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45427,11 +44933,11 @@ - (void)readAttributeEndOfServiceAlertWithCompletion:(void (^)(NSNumber * _Nulla completion:completion]; } -- (void)subscribeAttributeEndOfServiceAlertWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SmokeCoAlarm::Attributes::EndOfServiceAlert::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45441,9 +44947,9 @@ - (void)subscribeAttributeEndOfServiceAlertWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEndOfServiceAlertWithClusterStateCache:(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 = SmokeCoAlarm::Attributes::EndOfServiceAlert::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -45452,9 +44958,9 @@ + (void)readAttributeEndOfServiceAlertWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributeInterconnectSmokeAlarmWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::InterconnectSmokeAlarm::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45463,11 +44969,11 @@ - (void)readAttributeInterconnectSmokeAlarmWithCompletion:(void (^)(NSNumber * _ completion:completion]; } -- (void)subscribeAttributeInterconnectSmokeAlarmWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _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 = SmokeCoAlarm::Attributes::InterconnectSmokeAlarm::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45477,9 +44983,9 @@ - (void)subscribeAttributeInterconnectSmokeAlarmWithParams:(MTRSubscribeParams * subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeInterconnectSmokeAlarmWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _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 = SmokeCoAlarm::Attributes::InterconnectSmokeAlarm::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -45488,9 +44994,9 @@ + (void)readAttributeInterconnectSmokeAlarmWithClusterStateCache:(MTRClusterStat completion:completion]; } -- (void)readAttributeInterconnectCOAlarmWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::InterconnectCOAlarm::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45499,11 +45005,11 @@ - (void)readAttributeInterconnectCOAlarmWithCompletion:(void (^)(NSNumber * _Nul completion:completion]; } -- (void)subscribeAttributeInterconnectCOAlarmWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _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 = SmokeCoAlarm::Attributes::InterconnectCOAlarm::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45513,9 +45019,9 @@ - (void)subscribeAttributeInterconnectCOAlarmWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeInterconnectCOAlarmWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _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 = SmokeCoAlarm::Attributes::InterconnectCOAlarm::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -45524,9 +45030,9 @@ + (void)readAttributeInterconnectCOAlarmWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeContaminationStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::ContaminationState::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45535,11 +45041,11 @@ - (void)readAttributeContaminationStateWithCompletion:(void (^)(NSNumber * _Null completion:completion]; } -- (void)subscribeAttributeContaminationStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _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 = SmokeCoAlarm::Attributes::ContaminationState::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45549,9 +45055,9 @@ - (void)subscribeAttributeContaminationStateWithParams:(MTRSubscribeParams * _No subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeContaminationStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _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 = SmokeCoAlarm::Attributes::ContaminationState::TypeInfo; + using TypeInfo = DishwasherAlarm::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -45560,9 +45066,13 @@ + (void)readAttributeContaminationStateWithClusterStateCache:(MTRClusterStateCac completion:completion]; } -- (void)readAttributeSmokeSensitivityLevelWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +@end + +@implementation MTRBaseClusterMicrowaveOvenMode + +- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::SmokeSensitivityLevel::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::SupportedModes::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45571,39 +45081,11 @@ - (void)readAttributeSmokeSensitivityLevelWithCompletion:(void (^)(NSNumber * _N completion:completion]; } -- (void)writeAttributeSmokeSensitivityLevelWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeSmokeSensitivityLevelWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeSmokeSensitivityLevelWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = SmokeCoAlarm::Attributes::SmokeSensitivityLevel::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeSmokeSensitivityLevelWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSupportedModesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SmokeCoAlarm::Attributes::SmokeSensitivityLevel::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::SupportedModes::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45613,9 +45095,9 @@ - (void)subscribeAttributeSmokeSensitivityLevelWithParams:(MTRSubscribeParams * subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSmokeSensitivityLevelWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSupportedModesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::SmokeSensitivityLevel::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::SupportedModes::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -45624,9 +45106,9 @@ + (void)readAttributeSmokeSensitivityLevelWithClusterStateCache:(MTRClusterState completion:completion]; } -- (void)readAttributeExpiryDateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::ExpiryDate::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::CurrentMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45635,11 +45117,11 @@ - (void)readAttributeExpiryDateWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeExpiryDateWithParams:(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 = SmokeCoAlarm::Attributes::ExpiryDate::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::CurrentMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45649,9 +45131,9 @@ - (void)subscribeAttributeExpiryDateWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeExpiryDateWithClusterStateCache:(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 = SmokeCoAlarm::Attributes::ExpiryDate::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::CurrentMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -45662,7 +45144,7 @@ + (void)readAttributeExpiryDateWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::GeneratedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45675,7 +45157,7 @@ - (void)subscribeAttributeGeneratedCommandListWithParams:(MTRSubscribeParams * _ subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SmokeCoAlarm::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::GeneratedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45687,7 +45169,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 = SmokeCoAlarm::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::GeneratedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -45698,7 +45180,7 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC - (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::AcceptedCommandList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45711,7 +45193,7 @@ - (void)subscribeAttributeAcceptedCommandListWithParams:(MTRSubscribeParams * _N subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SmokeCoAlarm::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::AcceptedCommandList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45723,7 +45205,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 = SmokeCoAlarm::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::AcceptedCommandList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -45734,7 +45216,7 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa - (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::EventList::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::EventList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45747,7 +45229,7 @@ - (void)subscribeAttributeEventListWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SmokeCoAlarm::Attributes::EventList::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::EventList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45759,7 +45241,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 = SmokeCoAlarm::Attributes::EventList::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::EventList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -45770,7 +45252,7 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain - (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::AttributeList::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::AttributeList::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45783,7 +45265,7 @@ - (void)subscribeAttributeAttributeListWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = SmokeCoAlarm::Attributes::AttributeList::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::AttributeList::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45795,7 +45277,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 = SmokeCoAlarm::Attributes::AttributeList::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::AttributeList::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -45806,7 +45288,7 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::FeatureMap::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::FeatureMap::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45819,7 +45301,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 = MicrowaveOvenMode::Attributes::FeatureMap::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45831,7 +45313,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 = MicrowaveOvenMode::Attributes::FeatureMap::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -45842,7 +45324,7 @@ + (void)readAttributeFeatureMapWithClusterStateCache:(MTRClusterStateCacheContai - (void)readAttributeClusterRevisionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = SmokeCoAlarm::Attributes::ClusterRevision::TypeInfo; + using TypeInfo = MicrowaveOvenMode::Attributes::ClusterRevision::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45855,7 +45337,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 = MicrowaveOvenMode::Attributes::ClusterRevision::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45867,7 +45349,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 = MicrowaveOvenMode::Attributes::ClusterRevision::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -45878,12 +45360,16 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @end -@implementation MTRBaseClusterDishwasherAlarm +@implementation MTRBaseClusterMicrowaveOvenControl -- (void)resetWithParams:(MTRDishwasherAlarmClusterResetParams *)params completion:(MTRStatusCompletion)completion +- (void)setCookingParametersWithCompletion:(MTRStatusCompletion)completion +{ + [self setCookingParametersWithParams:nil completion:completion]; +} +- (void)setCookingParametersWithParams:(MTRMicrowaveOvenControlClusterSetCookingParametersParams * _Nullable)params completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRDishwasherAlarmClusterResetParams + params = [[MTRMicrowaveOvenControlClusterSetCookingParametersParams alloc] init]; } @@ -45893,7 +45379,7 @@ - (void)resetWithParams:(MTRDishwasherAlarmClusterResetParams *)params completio auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = DishwasherAlarm::Commands::Reset::Type; + using RequestType = MicrowaveOvenControl::Commands::SetCookingParameters::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -45904,10 +45390,10 @@ - (void)resetWithParams:(MTRDishwasherAlarmClusterResetParams *)params completio queue:self.callbackQueue completion:responseHandler]; } -- (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAlarmsParams *)params completion:(MTRStatusCompletion)completion +- (void)addMoreTimeWithParams:(MTRMicrowaveOvenControlClusterAddMoreTimeParams *)params completion:(MTRStatusCompletion)completion { if (params == nil) { - params = [[MTRDishwasherAlarmClusterModifyEnabledAlarmsParams + params = [[MTRMicrowaveOvenControlClusterAddMoreTimeParams alloc] init]; } @@ -45917,7 +45403,7 @@ - (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAla auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; - using RequestType = DishwasherAlarm::Commands::ModifyEnabledAlarms::Type; + using RequestType = MicrowaveOvenControl::Commands::AddMoreTime::Type; [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) clusterID:@(RequestType::GetClusterId()) commandID:@(RequestType::GetCommandId()) @@ -45929,9 +45415,9 @@ - (void)modifyEnabledAlarmsWithParams:(MTRDishwasherAlarmClusterModifyEnabledAla completion:responseHandler]; } -- (void)readAttributeMaskWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeCookTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherAlarm::Attributes::Mask::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::CookTime::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45940,11 +45426,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)subscribeAttributeCookTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DishwasherAlarm::Attributes::Mask::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::CookTime::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45954,9 +45440,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)readAttributeCookTimeWithClusterStateCache:(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 = MicrowaveOvenControl::Attributes::CookTime::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -45965,9 +45451,9 @@ + (void)readAttributeMaskWithClusterStateCache:(MTRClusterStateCacheContainer *) completion:completion]; } -- (void)readAttributeLatchWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxCookTimeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherAlarm::Attributes::Latch::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::MaxCookTime::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45976,11 +45462,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)subscribeAttributeMaxCookTimeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DishwasherAlarm::Attributes::Latch::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::MaxCookTime::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -45990,9 +45476,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)readAttributeMaxCookTimeWithClusterStateCache:(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; + using TypeInfo = MicrowaveOvenControl::Attributes::MaxCookTime::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46001,9 +45487,9 @@ + (void)readAttributeLatchWithClusterStateCache:(MTRClusterStateCacheContainer * completion:completion]; } -- (void)readAttributeStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePowerSettingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherAlarm::Attributes::State::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::PowerSetting::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46012,11 +45498,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)subscribeAttributePowerSettingWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DishwasherAlarm::Attributes::State::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::PowerSetting::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46026,9 +45512,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)readAttributePowerSettingWithClusterStateCache:(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; + using TypeInfo = MicrowaveOvenControl::Attributes::PowerSetting::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46037,9 +45523,9 @@ + (void)readAttributeStateWithClusterStateCache:(MTRClusterStateCacheContainer * completion:completion]; } -- (void)readAttributeSupportedWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherAlarm::Attributes::Supported::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::MinPower::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46048,11 +45534,11 @@ - (void)readAttributeSupportedWithCompletion:(void (^)(NSNumber * _Nullable valu completion:completion]; } -- (void)subscribeAttributeSupportedWithParams:(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::Supported::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::MinPower::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46062,9 +45548,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)readAttributeMinPowerWithClusterStateCache:(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; + using TypeInfo = MicrowaveOvenControl::Attributes::MinPower::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46073,9 +45559,9 @@ + (void)readAttributeSupportedWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeGeneratedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxPowerWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherAlarm::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::MaxPower::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46084,11 +45570,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)subscribeAttributeMaxPowerWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DishwasherAlarm::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::MaxPower::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46098,9 +45584,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)readAttributeMaxPowerWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherAlarm::Attributes::GeneratedCommandList::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::MaxPower::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46109,9 +45595,9 @@ + (void)readAttributeGeneratedCommandListWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeAcceptedCommandListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePowerStepWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherAlarm::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::PowerStep::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46120,11 +45606,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)subscribeAttributePowerStepWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DishwasherAlarm::Attributes::AcceptedCommandList::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::PowerStep::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46134,9 +45620,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)readAttributePowerStepWithClusterStateCache:(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 = MicrowaveOvenControl::Attributes::PowerStep::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46145,9 +45631,9 @@ + (void)readAttributeAcceptedCommandListWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeEventListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSupportedWattsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherAlarm::Attributes::EventList::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::SupportedWatts::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46156,11 +45642,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)subscribeAttributeSupportedWattsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DishwasherAlarm::Attributes::EventList::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::SupportedWatts::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46170,9 +45656,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)readAttributeSupportedWattsWithClusterStateCache:(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; + using TypeInfo = MicrowaveOvenControl::Attributes::SupportedWatts::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46181,9 +45667,9 @@ + (void)readAttributeEventListWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeAttributeListWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSelectedWattIndexWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherAlarm::Attributes::AttributeList::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::SelectedWattIndex::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46192,11 +45678,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)subscribeAttributeSelectedWattIndexWithParams:(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::SelectedWattIndex::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46206,9 +45692,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)readAttributeSelectedWattIndexWithClusterStateCache:(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::SelectedWattIndex::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46217,9 +45703,9 @@ + (void)readAttributeAttributeListWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeWattRatingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = DishwasherAlarm::Attributes::FeatureMap::TypeInfo; + using TypeInfo = MicrowaveOvenControl::Attributes::WattRating::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46228,123 +45714,11 @@ - (void)readAttributeFeatureMapWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)subscribeAttributeFeatureMapWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeWattRatingWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = DishwasherAlarm::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 = DishwasherAlarm::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 = DishwasherAlarm::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 = DishwasherAlarm::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 = DishwasherAlarm::Attributes::ClusterRevision::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - -@end - -@implementation MTRBaseClusterMicrowaveOvenMode - -- (void)readAttributeSupportedModesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = MicrowaveOvenMode::Attributes::SupportedModes::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (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]; -} - -+ (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)readAttributeCurrentModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = MicrowaveOvenMode::Attributes::CurrentMode::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeCurrentModeWithParams:(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::WattRating::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -46354,9 +45728,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)readAttributeWattRatingWithClusterStateCache:(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::WattRating::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -46367,7 +45741,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 +45754,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 +45766,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 +45777,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 +45790,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 +45802,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 +45813,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 +45826,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 +45838,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 +45849,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 +45862,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 +45874,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 +45885,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 +45898,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 +45910,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 +45921,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 +45934,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 +45946,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 +45957,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 +46083,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 +46097,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 +46144,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 +46155,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 +46169,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 +46180,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 +46191,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 +46205,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 +46216,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 +46227,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 +46241,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 +46252,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 +46263,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 +46277,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 +46290,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 +46303,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 +46315,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 +46326,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 +46339,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 +46351,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 +46362,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 +46375,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 +46387,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 +46398,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 +46411,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 +46423,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 +46434,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 +46447,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 +46459,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 +46470,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 +46483,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 +46495,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 +46506,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 +46525,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 +46553,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 +46581,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 +46609,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 +46636,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 +46648,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 +46659,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 +46672,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 +46684,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 +46695,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 +46708,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 +46720,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 +46731,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 +46744,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 +46756,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 +46767,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 +46780,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 +46792,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 +46801,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 +46814,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 +46826,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 +46839,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 +46852,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 +46864,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 +46875,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 +46888,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 +46900,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 +46911,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 +46924,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 +46936,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 +46947,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 +46960,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 +46972,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 +46983,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 +46996,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 +47008,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 +47019,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 +47032,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 +47044,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 +47055,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 +47094,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 +47142,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 +47214,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 +47262,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 +47309,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 +47323,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 +47334,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 +47345,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 +47359,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 +47370,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 +47381,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 +47395,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 +47406,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 +47417,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 +47431,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 +47442,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 +47453,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 +47503,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 +47514,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 +47525,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 +47539,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 +47588,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 +47601,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 +47613,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 +47624,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 +47637,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 +47649,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 +47660,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 +47673,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 +47685,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 +47696,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 +47709,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 +47721,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 +47732,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 +47745,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 +47757,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 +47768,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 +47781,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 +47793,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() @@ -64152,434 +63822,1130 @@ - (void)subscribeAttributePowerWithMinInterval:(NSNumber * _Nonnull)minInterval reportHandler(static_cast(value), error); }]; } -+ (void)readAttributePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributePowerWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributePowerWithClusterStateCache: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)readAttributeLifetimeEnergyConsumedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLifetimeEnergyConsumedWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeLifetimeEnergyConsumedWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeLifetimeEnergyConsumedWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeLifetimeEnergyConsumedWithMinInterval:(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 subscribeAttributeLifetimeEnergyConsumedWithParams: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)readAttributeLifetimeEnergyConsumedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeLifetimeEnergyConsumedWithClusterStateCache: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)readAttributeOperationModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOperationModeWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOperationModeWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeOperationModeWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeOperationModeWithMinInterval:(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 subscribeAttributeOperationModeWithParams: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)readAttributeOperationModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeOperationModeWithClusterStateCache: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)readAttributeControlModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeControlModeWithCompletion: + ^(NSNumber * _Nullable value, NSError * _Nullable error) { + // Cast is safe because subclass does not add any selectors. + completionHandler(static_cast(value), error); + }]; +} +- (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeControlModeWithValue:value params:nil completion:completionHandler]; +} +- (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +{ + [self writeAttributeControlModeWithValue:value params:params completion:completionHandler]; +} +- (void)subscribeAttributeControlModeWithMinInterval:(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 subscribeAttributeControlModeWithParams: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)readAttributeControlModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +{ + [self readAttributeControlModeWithClusterStateCache: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 MTRBaseClusterThermostat + +- (void)setpointRaiseLowerWithParams:(MTRThermostatClusterSetpointRaiseLowerParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRThermostatClusterSetpointRaiseLowerParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Thermostat::Commands::SetpointRaiseLower::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)setWeeklyScheduleWithParams:(MTRThermostatClusterSetWeeklyScheduleParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRThermostatClusterSetWeeklyScheduleParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Thermostat::Commands::SetWeeklySchedule::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)getWeeklyScheduleWithParams:(MTRThermostatClusterGetWeeklyScheduleParams *)params completion:(void (^)(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable data, NSError * _Nullable error))completion +{ + if (params == nil) { + params = [[MTRThermostatClusterGetWeeklyScheduleParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Thermostat::Commands::GetWeeklySchedule::Type; + [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) + clusterID:@(RequestType::GetClusterId()) + commandID:@(RequestType::GetCommandId()) + commandPayload:params + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRThermostatClusterGetWeeklyScheduleResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} +- (void)clearWeeklyScheduleWithCompletion:(MTRStatusCompletion)completion +{ + [self clearWeeklyScheduleWithParams:nil completion:completion]; +} +- (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklyScheduleParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRThermostatClusterClearWeeklyScheduleParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Thermostat::Commands::ClearWeeklySchedule::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)setActiveScheduleRequestWithParams:(MTRThermostatClusterSetActiveScheduleRequestParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRThermostatClusterSetActiveScheduleRequestParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Thermostat::Commands::SetActiveScheduleRequest::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)setActivePresetRequestWithParams:(MTRThermostatClusterSetActivePresetRequestParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRThermostatClusterSetActivePresetRequestParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Thermostat::Commands::SetActivePresetRequest::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)startPresetsSchedulesEditRequestWithParams:(MTRThermostatClusterStartPresetsSchedulesEditRequestParams *)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRThermostatClusterStartPresetsSchedulesEditRequestParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Thermostat::Commands::StartPresetsSchedulesEditRequest::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)cancelPresetsSchedulesEditRequestWithCompletion:(MTRStatusCompletion)completion +{ + [self cancelPresetsSchedulesEditRequestWithParams:nil completion:completion]; +} +- (void)cancelPresetsSchedulesEditRequestWithParams:(MTRThermostatClusterCancelPresetsSchedulesEditRequestParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRThermostatClusterCancelPresetsSchedulesEditRequestParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Thermostat::Commands::CancelPresetsSchedulesEditRequest::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)commitPresetsSchedulesRequestWithCompletion:(MTRStatusCompletion)completion { - [self readAttributePowerWithClusterStateCache: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); - }]; + [self commitPresetsSchedulesRequestWithParams:nil completion:completion]; } - -- (void)readAttributeLifetimeEnergyConsumedWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)commitPresetsSchedulesRequestWithParams:(MTRThermostatClusterCommitPresetsSchedulesRequestParams * _Nullable)params completion:(MTRStatusCompletion)completion { - [self readAttributeLifetimeEnergyConsumedWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + if (params == nil) { + params = [[MTRThermostatClusterCommitPresetsSchedulesRequestParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Thermostat::Commands::CommitPresetsSchedulesRequest::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)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value completionHandler:(MTRStatusCompletion)completionHandler +- (void)cancelSetActivePresetRequestWithCompletion:(MTRStatusCompletion)completion { - [self writeAttributeLifetimeEnergyConsumedWithValue:value params:nil completion:completionHandler]; + [self cancelSetActivePresetRequestWithParams:nil completion:completion]; } -- (void)writeAttributeLifetimeEnergyConsumedWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler +- (void)cancelSetActivePresetRequestWithParams:(MTRThermostatClusterCancelSetActivePresetRequestParams * _Nullable)params completion:(MTRStatusCompletion)completion { - [self writeAttributeLifetimeEnergyConsumedWithValue:value params:params completion:completionHandler]; + if (params == nil) { + params = [[MTRThermostatClusterCancelSetActivePresetRequestParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Thermostat::Commands::CancelSetActivePresetRequest::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)subscribeAttributeLifetimeEnergyConsumedWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)setTemperatureSetpointHoldPolicyWithParams:(MTRThermostatClusterSetTemperatureSetpointHoldPolicyParams *)params completion:(MTRStatusCompletion)completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; + if (params == nil) { + params = [[MTRThermostatClusterSetTemperatureSetpointHoldPolicyParams + alloc] init]; } - [self subscribeAttributeLifetimeEnergyConsumedWithParams: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); - }]; + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Thermostat::Commands::SetTemperatureSetpointHoldPolicy::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)readAttributeLifetimeEnergyConsumedWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeLocalTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeLifetimeEnergyConsumedWithClusterStateCache: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); - }]; + using TypeInfo = Thermostat::Attributes::LocalTemperature::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeOperationModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributeLocalTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeOperationModeWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::LocalTemperature::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler + ++ (void)readAttributeLocalTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self writeAttributeOperationModeWithValue:value params:nil completion:completionHandler]; + using TypeInfo = Thermostat::Attributes::LocalTemperature::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)writeAttributeOperationModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler + +- (void)readAttributeOutdoorTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self writeAttributeOperationModeWithValue:value params:params completion:completionHandler]; + using TypeInfo = Thermostat::Attributes::OutdoorTemperature::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeOperationModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + +- (void)subscribeAttributeOutdoorTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished 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 subscribeAttributeOperationModeWithParams: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); - }]; + using TypeInfo = Thermostat::Attributes::OutdoorTemperature::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOperationModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributeOutdoorTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeOperationModeWithClusterStateCache: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); - }]; + using TypeInfo = Thermostat::Attributes::OutdoorTemperature::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)readAttributeControlModeWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)readAttributeOccupancyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeControlModeWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::Occupancy::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value completionHandler:(MTRStatusCompletion)completionHandler + +- (void)subscribeAttributeOccupancyWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeControlModeWithValue:value params:nil completion:completionHandler]; + using TypeInfo = Thermostat::Attributes::Occupancy::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)writeAttributeControlModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completionHandler:(MTRStatusCompletion)completionHandler + ++ (void)readAttributeOccupancyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self writeAttributeControlModeWithValue:value params:params completion:completionHandler]; + using TypeInfo = Thermostat::Attributes::Occupancy::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeControlModeWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler + +- (void)readAttributeAbsMinHeatSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - MTRSubscribeParams * _Nullable subscribeParams = [params copy]; - if (subscribeParams == nil) { - subscribeParams = [[MTRSubscribeParams alloc] initWithMinInterval:minInterval maxInterval:maxInterval]; - } else { - subscribeParams.minInterval = minInterval; - subscribeParams.maxInterval = maxInterval; - } - [self subscribeAttributeControlModeWithParams: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); - }]; + using TypeInfo = Thermostat::Attributes::AbsMinHeatSetpointLimit::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeControlModeWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeAbsMinHeatSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeControlModeWithClusterStateCache: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); - }]; + using TypeInfo = Thermostat::Attributes::AbsMinHeatSetpointLimit::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeGeneratedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAbsMinHeatSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeGeneratedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::AbsMinHeatSetpointLimit::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (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 + +- (void)readAttributeAbsMaxHeatSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - 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); - }]; + using TypeInfo = Thermostat::Attributes::AbsMaxHeatSetpointLimit::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeGeneratedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeAbsMaxHeatSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [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); - }]; + using TypeInfo = Thermostat::Attributes::AbsMaxHeatSetpointLimit::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeAcceptedCommandListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAbsMaxHeatSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAcceptedCommandListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::AbsMaxHeatSetpointLimit::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (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 + +- (void)readAttributeAbsMinCoolSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - 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); - }]; + using TypeInfo = Thermostat::Attributes::AbsMinCoolSetpointLimit::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeAcceptedCommandListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeAbsMinCoolSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [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); - }]; + using TypeInfo = Thermostat::Attributes::AbsMinCoolSetpointLimit::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeAttributeListWithCompletionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAbsMinCoolSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeAttributeListWithCompletion: - ^(NSArray * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::AbsMinCoolSetpointLimit::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (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 + +- (void)readAttributeAbsMaxCoolSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - 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); - }]; + using TypeInfo = Thermostat::Attributes::AbsMaxCoolSetpointLimit::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -+ (void)readAttributeAttributeListWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)subscribeAttributeAbsMaxCoolSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [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); - }]; + using TypeInfo = Thermostat::Attributes::AbsMaxCoolSetpointLimit::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)readAttributeFeatureMapWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler ++ (void)readAttributeAbsMaxCoolSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [self readAttributeFeatureMapWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::AbsMaxCoolSetpointLimit::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -- (void)subscribeAttributeFeatureMapWithMinInterval:(NSNumber * _Nonnull)minInterval maxInterval:(NSNumber * _Nonnull)maxInterval - params:(MTRSubscribeParams * _Nullable)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablishedHandler + +- (void)readAttributePICoolingDemandWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Thermostat::Attributes::PICoolingDemand::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)subscribeAttributePICoolingDemandWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished 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); - }]; + using TypeInfo = Thermostat::Attributes::PICoolingDemand::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeFeatureMapWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + ++ (void)readAttributePICoolingDemandWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [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); - }]; + using TypeInfo = Thermostat::Attributes::PICoolingDemand::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributePIHeatingDemandWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Thermostat::Attributes::PIHeatingDemand::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)readAttributeClusterRevisionWithCompletionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler +- (void)subscribeAttributePIHeatingDemandWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self readAttributeClusterRevisionWithCompletion: - ^(NSNumber * _Nullable value, NSError * _Nullable error) { - // Cast is safe because subclass does not add any selectors. - completionHandler(static_cast(value), error); - }]; + using TypeInfo = Thermostat::Attributes::PIHeatingDemand::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (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 + ++ (void)readAttributePIHeatingDemandWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - 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); - }]; + using TypeInfo = Thermostat::Attributes::PIHeatingDemand::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; } -+ (void)readAttributeClusterRevisionWithAttributeCache:(MTRAttributeCacheContainer *)attributeCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completionHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completionHandler + +- (void)readAttributeHVACSystemTypeConfigurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - [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); - }]; + using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (nullable instancetype)initWithDevice:(MTRBaseDevice *)device - endpoint:(uint16_t)endpoint - queue:(dispatch_queue_t)queue +- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - return [self initWithDevice:device endpointID:@(endpoint) queue:queue]; + [self writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } +- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; -@end + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } -@implementation MTRBaseClusterThermostat + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; -- (void)setpointRaiseLowerWithParams:(MTRThermostatClusterSetpointRaiseLowerParams *)params completion:(MTRStatusCompletion)completion -{ - if (params == nil) { - params = [[MTRThermostatClusterSetpointRaiseLowerParams - alloc] init]; - } + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; +- (void)subscribeAttributeHVACSystemTypeConfigurationWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; ++ (void)readAttributeHVACSystemTypeConfigurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - using RequestType = Thermostat::Commands::SetpointRaiseLower::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil +- (void)readAttributeLocalTemperatureCalibrationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil queue:self.callbackQueue - completion:responseHandler]; + completion:completion]; } -- (void)setWeeklyScheduleWithParams:(MTRThermostatClusterSetWeeklyScheduleParams *)params completion:(MTRStatusCompletion)completion + +- (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - if (params == nil) { - params = [[MTRThermostatClusterSetWeeklyScheduleParams - alloc] init]; - } + [self writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.charValue; - using RequestType = Thermostat::Commands::SetWeeklySchedule::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]; + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)getWeeklyScheduleWithParams:(MTRThermostatClusterGetWeeklyScheduleParams *)params completion:(void (^)(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable data, NSError * _Nullable error))completion -{ - if (params == nil) { - params = [[MTRThermostatClusterGetWeeklyScheduleParams - alloc] init]; - } - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(response, error); - }; +- (void)subscribeAttributeLocalTemperatureCalibrationWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; ++ (void)readAttributeLocalTemperatureCalibrationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - using RequestType = Thermostat::Commands::GetWeeklySchedule::Type; - [self.device _invokeKnownCommandWithEndpointID:@(self.endpoint) - clusterID:@(RequestType::GetClusterId()) - commandID:@(RequestType::GetCommandId()) - commandPayload:params - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRThermostatClusterGetWeeklyScheduleResponseParams.class +- (void)readAttributeOccupiedCoolingSetpointWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil queue:self.callbackQueue - completion:responseHandler]; + completion:completion]; } -- (void)clearWeeklyScheduleWithCompletion:(MTRStatusCompletion)completion + +- (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self clearWeeklyScheduleWithParams:nil completion:completion]; + [self writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklyScheduleParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - if (params == nil) { - params = [[MTRThermostatClusterClearWeeklyScheduleParams - alloc] init]; - } + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; - auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); - }; + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } - auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; - using RequestType = Thermostat::Commands::ClearWeeklySchedule::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]; + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)readAttributeLocalTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)subscribeAttributeOccupiedCoolingSetpointWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::LocalTemperature::TypeInfo; + using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeOccupiedCoolingSetpointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeOccupiedHeatingSetpointWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -64588,11 +64954,39 @@ - (void)readAttributeLocalTemperatureWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)subscribeAttributeLocalTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = Thermostat::Attributes::LocalTemperature::TypeInfo; + [self writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeOccupiedHeatingSetpointWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -64602,9 +64996,9 @@ - (void)subscribeAttributeLocalTemperatureWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLocalTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOccupiedHeatingSetpointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::LocalTemperature::TypeInfo; + using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -64613,9 +65007,9 @@ + (void)readAttributeLocalTemperatureWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeOutdoorTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUnoccupiedCoolingSetpointWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::OutdoorTemperature::TypeInfo; + using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -64624,11 +65018,39 @@ - (void)readAttributeOutdoorTemperatureWithCompletion:(void (^)(NSNumber * _Null completion:completion]; } -- (void)subscribeAttributeOutdoorTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = Thermostat::Attributes::OutdoorTemperature::TypeInfo; + [self writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeUnoccupiedCoolingSetpointWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -64638,9 +65060,9 @@ - (void)subscribeAttributeOutdoorTemperatureWithParams:(MTRSubscribeParams * _No subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOutdoorTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeUnoccupiedCoolingSetpointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::OutdoorTemperature::TypeInfo; + using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -64649,9 +65071,9 @@ + (void)readAttributeOutdoorTemperatureWithClusterStateCache:(MTRClusterStateCac completion:completion]; } -- (void)readAttributeOccupancyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUnoccupiedHeatingSetpointWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::Occupancy::TypeInfo; + using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -64660,11 +65082,39 @@ - (void)readAttributeOccupancyWithCompletion:(void (^)(NSNumber * _Nullable valu completion:completion]; } -- (void)subscribeAttributeOccupancyWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = Thermostat::Attributes::Occupancy::TypeInfo; + [self writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeUnoccupiedHeatingSetpointWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -64674,9 +65124,9 @@ - (void)subscribeAttributeOccupancyWithParams:(MTRSubscribeParams * _Nonnull)par subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOccupancyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeUnoccupiedHeatingSetpointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::Occupancy::TypeInfo; + using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -64685,9 +65135,9 @@ + (void)readAttributeOccupancyWithClusterStateCache:(MTRClusterStateCacheContain completion:completion]; } -- (void)readAttributeAbsMinHeatSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinHeatSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::AbsMinHeatSetpointLimit::TypeInfo; + using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -64696,11 +65146,39 @@ - (void)readAttributeAbsMinHeatSetpointLimitWithCompletion:(void (^)(NSNumber * completion:completion]; } -- (void)subscribeAttributeAbsMinHeatSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = Thermostat::Attributes::AbsMinHeatSetpointLimit::TypeInfo; + [self writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeMinHeatSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -64710,9 +65188,9 @@ - (void)subscribeAttributeAbsMinHeatSetpointLimitWithParams:(MTRSubscribeParams subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAbsMinHeatSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinHeatSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::AbsMinHeatSetpointLimit::TypeInfo; + using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -64721,9 +65199,9 @@ + (void)readAttributeAbsMinHeatSetpointLimitWithClusterStateCache:(MTRClusterSta completion:completion]; } -- (void)readAttributeAbsMaxHeatSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxHeatSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::AbsMaxHeatSetpointLimit::TypeInfo; + using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -64732,11 +65210,39 @@ - (void)readAttributeAbsMaxHeatSetpointLimitWithCompletion:(void (^)(NSNumber * completion:completion]; } -- (void)subscribeAttributeAbsMaxHeatSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeMaxHeatSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::AbsMaxHeatSetpointLimit::TypeInfo; + using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -64746,9 +65252,9 @@ - (void)subscribeAttributeAbsMaxHeatSetpointLimitWithParams:(MTRSubscribeParams subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAbsMaxHeatSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxHeatSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::AbsMaxHeatSetpointLimit::TypeInfo; + using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -64757,9 +65263,9 @@ + (void)readAttributeAbsMaxHeatSetpointLimitWithClusterStateCache:(MTRClusterSta completion:completion]; } -- (void)readAttributeAbsMinCoolSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinCoolSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::AbsMinCoolSetpointLimit::TypeInfo; + using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -64768,11 +65274,39 @@ - (void)readAttributeAbsMinCoolSetpointLimitWithCompletion:(void (^)(NSNumber * completion:completion]; } -- (void)subscribeAttributeAbsMinCoolSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = Thermostat::Attributes::AbsMinCoolSetpointLimit::TypeInfo; + [self writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeMinCoolSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -64782,9 +65316,9 @@ - (void)subscribeAttributeAbsMinCoolSetpointLimitWithParams:(MTRSubscribeParams subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAbsMinCoolSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinCoolSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::AbsMinCoolSetpointLimit::TypeInfo; + using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -64793,9 +65327,9 @@ + (void)readAttributeAbsMinCoolSetpointLimitWithClusterStateCache:(MTRClusterSta completion:completion]; } -- (void)readAttributeAbsMaxCoolSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMaxCoolSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::AbsMaxCoolSetpointLimit::TypeInfo; + using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -64804,11 +65338,39 @@ - (void)readAttributeAbsMaxCoolSetpointLimitWithCompletion:(void (^)(NSNumber * completion:completion]; } -- (void)subscribeAttributeAbsMaxCoolSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = Thermostat::Attributes::AbsMaxCoolSetpointLimit::TypeInfo; + [self writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.shortValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeMaxCoolSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -64818,9 +65380,9 @@ - (void)subscribeAttributeAbsMaxCoolSetpointLimitWithParams:(MTRSubscribeParams subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeAbsMaxCoolSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMaxCoolSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::AbsMaxCoolSetpointLimit::TypeInfo; + using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -64829,9 +65391,9 @@ + (void)readAttributeAbsMaxCoolSetpointLimitWithClusterStateCache:(MTRClusterSta completion:completion]; } -- (void)readAttributePICoolingDemandWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeMinSetpointDeadBandWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::PICoolingDemand::TypeInfo; + using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -64840,11 +65402,39 @@ - (void)readAttributePICoolingDemandWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributePICoolingDemandWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = Thermostat::Attributes::PICoolingDemand::TypeInfo; + [self writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.charValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeMinSetpointDeadBandWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -64854,9 +65444,9 @@ - (void)subscribeAttributePICoolingDemandWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePICoolingDemandWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeMinSetpointDeadBandWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::PICoolingDemand::TypeInfo; + using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -64865,9 +65455,9 @@ + (void)readAttributePICoolingDemandWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -- (void)readAttributePIHeatingDemandWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeRemoteSensingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::PIHeatingDemand::TypeInfo; + using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -64876,11 +65466,39 @@ - (void)readAttributePIHeatingDemandWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)subscribeAttributePIHeatingDemandWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = Thermostat::Attributes::PIHeatingDemand::TypeInfo; + [self writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeRemoteSensingWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -64890,9 +65508,9 @@ - (void)subscribeAttributePIHeatingDemandWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributePIHeatingDemandWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeRemoteSensingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::PIHeatingDemand::TypeInfo; + using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -64901,9 +65519,9 @@ + (void)readAttributePIHeatingDemandWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -- (void)readAttributeHVACSystemTypeConfigurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeControlSequenceOfOperationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; + using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -64912,11 +65530,11 @@ - (void)readAttributeHVACSystemTypeConfigurationWithCompletion:(void (^)(NSNumbe completion:completion]; } -- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -64931,20 +65549,20 @@ - (void)writeAttributeHVACSystemTypeConfigurationWithValue:(NSNumber * _Nonnull) } ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; + using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeHVACSystemTypeConfigurationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeControlSequenceOfOperationWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; + using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -64954,9 +65572,9 @@ - (void)subscribeAttributeHVACSystemTypeConfigurationWithParams:(MTRSubscribePar subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeHVACSystemTypeConfigurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeControlSequenceOfOperationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::HVACSystemTypeConfiguration::TypeInfo; + using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -64965,9 +65583,9 @@ + (void)readAttributeHVACSystemTypeConfigurationWithClusterStateCache:(MTRCluste completion:completion]; } -- (void)readAttributeLocalTemperatureCalibrationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSystemModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; + using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -64976,11 +65594,11 @@ - (void)readAttributeLocalTemperatureCalibrationWithCompletion:(void (^)(NSNumbe completion:completion]; } -- (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeSystemModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -64995,20 +65613,20 @@ - (void)writeAttributeLocalTemperatureCalibrationWithValue:(NSNumber * _Nonnull) } ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; + using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.charValue; + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeLocalTemperatureCalibrationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSystemModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; + using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -65018,9 +65636,9 @@ - (void)subscribeAttributeLocalTemperatureCalibrationWithParams:(MTRSubscribePar subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeLocalTemperatureCalibrationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSystemModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::LocalTemperatureCalibration::TypeInfo; + using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -65029,9 +65647,9 @@ + (void)readAttributeLocalTemperatureCalibrationWithClusterStateCache:(MTRCluste completion:completion]; } -- (void)readAttributeOccupiedCoolingSetpointWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeThermostatRunningModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; + using TypeInfo = Thermostat::Attributes::ThermostatRunningMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -65040,39 +65658,47 @@ - (void)readAttributeOccupiedCoolingSetpointWithCompletion:(void (^)(NSNumber * completion:completion]; } -- (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeThermostatRunningModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + using TypeInfo = Thermostat::Attributes::ThermostatRunningMode::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)writeAttributeOccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; ++ (void)readAttributeThermostatRunningModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Thermostat::Attributes::ThermostatRunningMode::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); +- (void)readAttributeStartOfWeekWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Thermostat::Attributes::StartOfWeek::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeOccupiedCoolingSetpointWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeStartOfWeekWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; + using TypeInfo = Thermostat::Attributes::StartOfWeek::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -65082,9 +65708,9 @@ - (void)subscribeAttributeOccupiedCoolingSetpointWithParams:(MTRSubscribeParams subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOccupiedCoolingSetpointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeStartOfWeekWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::OccupiedCoolingSetpoint::TypeInfo; + using TypeInfo = Thermostat::Attributes::StartOfWeek::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -65093,9 +65719,9 @@ + (void)readAttributeOccupiedCoolingSetpointWithClusterStateCache:(MTRClusterSta completion:completion]; } -- (void)readAttributeOccupiedHeatingSetpointWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNumberOfWeeklyTransitionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; + using TypeInfo = Thermostat::Attributes::NumberOfWeeklyTransitions::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -65104,39 +65730,47 @@ - (void)readAttributeOccupiedHeatingSetpointWithCompletion:(void (^)(NSNumber * completion:completion]; } -- (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeNumberOfWeeklyTransitionsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + using TypeInfo = Thermostat::Attributes::NumberOfWeeklyTransitions::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)writeAttributeOccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; ++ (void)readAttributeNumberOfWeeklyTransitionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Thermostat::Attributes::NumberOfWeeklyTransitions::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); +- (void)readAttributeNumberOfDailyTransitionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Thermostat::Attributes::NumberOfDailyTransitions::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeOccupiedHeatingSetpointWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfDailyTransitionsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; + using TypeInfo = Thermostat::Attributes::NumberOfDailyTransitions::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -65146,9 +65780,9 @@ - (void)subscribeAttributeOccupiedHeatingSetpointWithParams:(MTRSubscribeParams subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOccupiedHeatingSetpointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNumberOfDailyTransitionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::OccupiedHeatingSetpoint::TypeInfo; + using TypeInfo = Thermostat::Attributes::NumberOfDailyTransitions::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -65157,9 +65791,9 @@ + (void)readAttributeOccupiedHeatingSetpointWithClusterStateCache:(MTRClusterSta completion:completion]; } -- (void)readAttributeUnoccupiedCoolingSetpointWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTemperatureSetpointHoldWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; + using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -65168,11 +65802,11 @@ - (void)readAttributeUnoccupiedCoolingSetpointWithCompletion:(void (^)(NSNumber completion:completion]; } -- (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -65187,20 +65821,20 @@ - (void)writeAttributeUnoccupiedCoolingSetpointWithValue:(NSNumber * _Nonnull)va } ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; + using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.shortValue; + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeUnoccupiedCoolingSetpointWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTemperatureSetpointHoldWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; + using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -65210,9 +65844,9 @@ - (void)subscribeAttributeUnoccupiedCoolingSetpointWithParams:(MTRSubscribeParam subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeUnoccupiedCoolingSetpointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTemperatureSetpointHoldWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::UnoccupiedCoolingSetpoint::TypeInfo; + using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -65221,9 +65855,9 @@ + (void)readAttributeUnoccupiedCoolingSetpointWithClusterStateCache:(MTRClusterS completion:completion]; } -- (void)readAttributeUnoccupiedHeatingSetpointWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTemperatureSetpointHoldDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; + using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -65232,11 +65866,11 @@ - (void)readAttributeUnoccupiedHeatingSetpointWithCompletion:(void (^)(NSNumber completion:completion]; } -- (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - [self writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } -- (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -65251,20 +65885,25 @@ - (void)writeAttributeUnoccupiedHeatingSetpointWithValue:(NSNumber * _Nonnull)va } ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; + using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.shortValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedShortValue; + } chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeUnoccupiedHeatingSetpointWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTemperatureSetpointHoldDurationWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; + using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -65274,9 +65913,9 @@ - (void)subscribeAttributeUnoccupiedHeatingSetpointWithParams:(MTRSubscribeParam subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeUnoccupiedHeatingSetpointWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTemperatureSetpointHoldDurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::UnoccupiedHeatingSetpoint::TypeInfo; + using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -65285,9 +65924,9 @@ + (void)readAttributeUnoccupiedHeatingSetpointWithClusterStateCache:(MTRClusterS completion:completion]; } -- (void)readAttributeMinHeatSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeThermostatProgrammingOperationModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; + using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -65296,11 +65935,11 @@ - (void)readAttributeMinHeatSetpointLimitWithCompletion:(void (^)(NSNumber * _Nu completion:completion]; } -- (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -65315,20 +65954,20 @@ - (void)writeAttributeMinHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value p } ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; + using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.shortValue; + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeMinHeatSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeThermostatProgrammingOperationModeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; + using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -65338,9 +65977,9 @@ - (void)subscribeAttributeMinHeatSetpointLimitWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMinHeatSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeThermostatProgrammingOperationModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::MinHeatSetpointLimit::TypeInfo; + using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -65349,9 +65988,9 @@ + (void)readAttributeMinHeatSetpointLimitWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeMaxHeatSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeThermostatRunningStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; + using TypeInfo = Thermostat::Attributes::ThermostatRunningState::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -65360,39 +65999,47 @@ - (void)readAttributeMaxHeatSetpointLimitWithCompletion:(void (^)(NSNumber * _Nu completion:completion]; } -- (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)subscribeAttributeThermostatRunningStateWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - [self writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + using TypeInfo = Thermostat::Attributes::ThermostatRunningState::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; } -- (void)writeAttributeMaxHeatSetpointLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; ++ (void)readAttributeThermostatRunningStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Thermostat::Attributes::ThermostatRunningState::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); +- (void)readAttributeSetpointChangeSourceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = Thermostat::Attributes::SetpointChangeSource::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; } -- (void)subscribeAttributeMaxHeatSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeSetpointChangeSourceWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; + using TypeInfo = Thermostat::Attributes::SetpointChangeSource::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -65402,9 +66049,9 @@ - (void)subscribeAttributeMaxHeatSetpointLimitWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMaxHeatSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSetpointChangeSourceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::MaxHeatSetpointLimit::TypeInfo; + using TypeInfo = Thermostat::Attributes::SetpointChangeSource::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -65413,9 +66060,9 @@ + (void)readAttributeMaxHeatSetpointLimitWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeMinCoolSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSetpointChangeAmountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; + using TypeInfo = Thermostat::Attributes::SetpointChangeAmount::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -65424,39 +66071,11 @@ - (void)readAttributeMinCoolSetpointLimitWithCompletion:(void (^)(NSNumber * _Nu completion:completion]; } -- (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeMinCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeMinCoolSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params +- (void)subscribeAttributeSetpointChangeAmountWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; + using TypeInfo = Thermostat::Attributes::SetpointChangeAmount::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -65466,9 +66085,9 @@ - (void)subscribeAttributeMinCoolSetpointLimitWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMinCoolSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSetpointChangeAmountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::MinCoolSetpointLimit::TypeInfo; + using TypeInfo = Thermostat::Attributes::SetpointChangeAmount::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -65477,9 +66096,9 @@ + (void)readAttributeMinCoolSetpointLimitWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeMaxCoolSetpointLimitWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSetpointChangeSourceTimestampWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; + using TypeInfo = Thermostat::Attributes::SetpointChangeSourceTimestamp::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -65488,39 +66107,11 @@ - (void)readAttributeMaxCoolSetpointLimitWithCompletion:(void (^)(NSNumber * _Nu completion:completion]; } -- (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeMaxCoolSetpointLimitWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.shortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeMaxCoolSetpointLimitWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSetpointChangeSourceTimestampWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; + using TypeInfo = Thermostat::Attributes::SetpointChangeSourceTimestamp::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -65530,9 +66121,9 @@ - (void)subscribeAttributeMaxCoolSetpointLimitWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMaxCoolSetpointLimitWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSetpointChangeSourceTimestampWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::MaxCoolSetpointLimit::TypeInfo; + using TypeInfo = Thermostat::Attributes::SetpointChangeSourceTimestamp::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -65541,9 +66132,9 @@ + (void)readAttributeMaxCoolSetpointLimitWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeMinSetpointDeadBandWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOccupiedSetbackWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; + using TypeInfo = Thermostat::Attributes::OccupiedSetback::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -65552,11 +66143,11 @@ - (void)readAttributeMinSetpointDeadBandWithCompletion:(void (^)(NSNumber * _Nul completion:completion]; } -- (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - [self writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } -- (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -65571,20 +66162,25 @@ - (void)writeAttributeMinSetpointDeadBandWithValue:(NSNumber * _Nonnull)value pa } ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; + using TypeInfo = Thermostat::Attributes::OccupiedSetback::TypeInfo; TypeInfo::Type cppValue; - cppValue = value.charValue; + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeMinSetpointDeadBandWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOccupiedSetbackWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; + using TypeInfo = Thermostat::Attributes::OccupiedSetback::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -65594,9 +66190,9 @@ - (void)subscribeAttributeMinSetpointDeadBandWithParams:(MTRSubscribeParams * _N subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeMinSetpointDeadBandWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOccupiedSetbackWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::MinSetpointDeadBand::TypeInfo; + using TypeInfo = Thermostat::Attributes::OccupiedSetback::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -65605,9 +66201,9 @@ + (void)readAttributeMinSetpointDeadBandWithClusterStateCache:(MTRClusterStateCa completion:completion]; } -- (void)readAttributeRemoteSensingWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOccupiedSetbackMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; + using TypeInfo = Thermostat::Attributes::OccupiedSetbackMin::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -65616,39 +66212,11 @@ - (void)readAttributeRemoteSensingWithCompletion:(void (^)(NSNumber * _Nullable completion:completion]; } -- (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeRemoteSensingWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeRemoteSensingWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOccupiedSetbackMinWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; + using TypeInfo = Thermostat::Attributes::OccupiedSetbackMin::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -65658,9 +66226,9 @@ - (void)subscribeAttributeRemoteSensingWithParams:(MTRSubscribeParams * _Nonnull subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeRemoteSensingWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOccupiedSetbackMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::RemoteSensing::TypeInfo; + using TypeInfo = Thermostat::Attributes::OccupiedSetbackMin::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -65669,9 +66237,9 @@ + (void)readAttributeRemoteSensingWithClusterStateCache:(MTRClusterStateCacheCon completion:completion]; } -- (void)readAttributeControlSequenceOfOperationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeOccupiedSetbackMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; + using TypeInfo = Thermostat::Attributes::OccupiedSetbackMax::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -65680,39 +66248,11 @@ - (void)readAttributeControlSequenceOfOperationWithCompletion:(void (^)(NSNumber completion:completion]; } -- (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeControlSequenceOfOperationWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeControlSequenceOfOperationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeOccupiedSetbackMaxWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; + using TypeInfo = Thermostat::Attributes::OccupiedSetbackMax::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -65722,9 +66262,9 @@ - (void)subscribeAttributeControlSequenceOfOperationWithParams:(MTRSubscribePara subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeControlSequenceOfOperationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeOccupiedSetbackMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::ControlSequenceOfOperation::TypeInfo; + using TypeInfo = Thermostat::Attributes::OccupiedSetbackMax::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -65733,9 +66273,9 @@ + (void)readAttributeControlSequenceOfOperationWithClusterStateCache:(MTRCluster completion:completion]; } -- (void)readAttributeSystemModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUnoccupiedSetbackWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; + using TypeInfo = Thermostat::Attributes::UnoccupiedSetback::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -65744,11 +66284,11 @@ - (void)readAttributeSystemModeWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion { - [self writeAttributeSystemModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; } -- (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -65763,20 +66303,25 @@ - (void)writeAttributeSystemModeWithValue:(NSNumber * _Nonnull)value params:(MTR } ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; + using TypeInfo = Thermostat::Attributes::UnoccupiedSetback::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); + if (value == nil) { + cppValue.SetNull(); + } else { + auto & nonNullValue_0 = cppValue.SetNonNull(); + nonNullValue_0 = value.unsignedCharValue; + } chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeSystemModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUnoccupiedSetbackWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; + using TypeInfo = Thermostat::Attributes::UnoccupiedSetback::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -65786,9 +66331,9 @@ - (void)subscribeAttributeSystemModeWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSystemModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeUnoccupiedSetbackWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::SystemMode::TypeInfo; + using TypeInfo = Thermostat::Attributes::UnoccupiedSetback::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -65797,9 +66342,9 @@ + (void)readAttributeSystemModeWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeThermostatRunningModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUnoccupiedSetbackMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::ThermostatRunningMode::TypeInfo; + using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMin::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -65808,11 +66353,11 @@ - (void)readAttributeThermostatRunningModeWithCompletion:(void (^)(NSNumber * _N completion:completion]; } -- (void)subscribeAttributeThermostatRunningModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUnoccupiedSetbackMinWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::ThermostatRunningMode::TypeInfo; + using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMin::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -65822,9 +66367,9 @@ - (void)subscribeAttributeThermostatRunningModeWithParams:(MTRSubscribeParams * subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeThermostatRunningModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeUnoccupiedSetbackMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::ThermostatRunningMode::TypeInfo; + using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMin::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -65833,9 +66378,9 @@ + (void)readAttributeThermostatRunningModeWithClusterStateCache:(MTRClusterState completion:completion]; } -- (void)readAttributeStartOfWeekWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeUnoccupiedSetbackMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::StartOfWeek::TypeInfo; + using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMax::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -65844,11 +66389,11 @@ - (void)readAttributeStartOfWeekWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)subscribeAttributeStartOfWeekWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeUnoccupiedSetbackMaxWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::StartOfWeek::TypeInfo; + using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMax::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -65858,9 +66403,9 @@ - (void)subscribeAttributeStartOfWeekWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeStartOfWeekWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeUnoccupiedSetbackMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::StartOfWeek::TypeInfo; + using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMax::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -65869,9 +66414,9 @@ + (void)readAttributeStartOfWeekWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeNumberOfWeeklyTransitionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeEmergencyHeatDeltaWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::NumberOfWeeklyTransitions::TypeInfo; + using TypeInfo = Thermostat::Attributes::EmergencyHeatDelta::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -65880,47 +66425,39 @@ - (void)readAttributeNumberOfWeeklyTransitionsWithCompletion:(void (^)(NSNumber completion:completion]; } -- (void)subscribeAttributeNumberOfWeeklyTransitionsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = Thermostat::Attributes::NumberOfWeeklyTransitions::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; + [self writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } - -+ (void)readAttributeNumberOfWeeklyTransitionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { - using TypeInfo = Thermostat::Attributes::NumberOfWeeklyTransitions::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; -- (void)readAttributeNumberOfDailyTransitionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = Thermostat::Attributes::NumberOfDailyTransitions::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::EmergencyHeatDelta::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeNumberOfDailyTransitionsWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeEmergencyHeatDeltaWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::NumberOfDailyTransitions::TypeInfo; + using TypeInfo = Thermostat::Attributes::EmergencyHeatDelta::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -65930,9 +66467,9 @@ - (void)subscribeAttributeNumberOfDailyTransitionsWithParams:(MTRSubscribeParams subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeNumberOfDailyTransitionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeEmergencyHeatDeltaWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::NumberOfDailyTransitions::TypeInfo; + using TypeInfo = Thermostat::Attributes::EmergencyHeatDelta::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -65941,9 +66478,9 @@ + (void)readAttributeNumberOfDailyTransitionsWithClusterStateCache:(MTRClusterSt completion:completion]; } -- (void)readAttributeTemperatureSetpointHoldWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeACTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; + using TypeInfo = Thermostat::Attributes::ACType::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -65952,11 +66489,11 @@ - (void)readAttributeTemperatureSetpointHoldWithCompletion:(void (^)(NSNumber * completion:completion]; } -- (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeACTypeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -65971,7 +66508,7 @@ - (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)valu } ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; + using TypeInfo = Thermostat::Attributes::ACType::TypeInfo; TypeInfo::Type cppValue; cppValue = static_cast>(value.unsignedCharValue); @@ -65980,11 +66517,11 @@ - (void)writeAttributeTemperatureSetpointHoldWithValue:(NSNumber * _Nonnull)valu std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeTemperatureSetpointHoldWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeACTypeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; + using TypeInfo = Thermostat::Attributes::ACType::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -65994,9 +66531,9 @@ - (void)subscribeAttributeTemperatureSetpointHoldWithParams:(MTRSubscribeParams subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTemperatureSetpointHoldWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeACTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::TemperatureSetpointHold::TypeInfo; + using TypeInfo = Thermostat::Attributes::ACType::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -66005,9 +66542,9 @@ + (void)readAttributeTemperatureSetpointHoldWithClusterStateCache:(MTRClusterSta completion:completion]; } -- (void)readAttributeTemperatureSetpointHoldDurationWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeACCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; + using TypeInfo = Thermostat::Attributes::ACCapacity::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -66016,11 +66553,11 @@ - (void)readAttributeTemperatureSetpointHoldDurationWithCompletion:(void (^)(NSN completion:completion]; } -- (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeACCapacityWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -66035,25 +66572,20 @@ - (void)writeAttributeTemperatureSetpointHoldDurationWithValue:(NSNumber * _Null } ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; + using TypeInfo = Thermostat::Attributes::ACCapacity::TypeInfo; TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedShortValue; - } + cppValue = value.unsignedShortValue; chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeTemperatureSetpointHoldDurationWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeACCapacityWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; + using TypeInfo = Thermostat::Attributes::ACCapacity::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -66063,9 +66595,9 @@ - (void)subscribeAttributeTemperatureSetpointHoldDurationWithParams:(MTRSubscrib subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeTemperatureSetpointHoldDurationWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeACCapacityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldDuration::TypeInfo; + using TypeInfo = Thermostat::Attributes::ACCapacity::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -66074,9 +66606,9 @@ + (void)readAttributeTemperatureSetpointHoldDurationWithClusterStateCache:(MTRCl completion:completion]; } -- (void)readAttributeThermostatProgrammingOperationModeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeACRefrigerantTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; + using TypeInfo = Thermostat::Attributes::ACRefrigerantType::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -66085,11 +66617,11 @@ - (void)readAttributeThermostatProgrammingOperationModeWithCompletion:(void (^)( completion:completion]; } -- (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -66104,20 +66636,20 @@ - (void)writeAttributeThermostatProgrammingOperationModeWithValue:(NSNumber * _N } ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; + using TypeInfo = Thermostat::Attributes::ACRefrigerantType::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeThermostatProgrammingOperationModeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeACRefrigerantTypeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; + using TypeInfo = Thermostat::Attributes::ACRefrigerantType::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -66127,9 +66659,9 @@ - (void)subscribeAttributeThermostatProgrammingOperationModeWithParams:(MTRSubsc subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeThermostatProgrammingOperationModeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeACRefrigerantTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::ThermostatProgrammingOperationMode::TypeInfo; + using TypeInfo = Thermostat::Attributes::ACRefrigerantType::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -66138,9 +66670,9 @@ + (void)readAttributeThermostatProgrammingOperationModeWithClusterStateCache:(MT completion:completion]; } -- (void)readAttributeThermostatRunningStateWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeACCompressorTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::ThermostatRunningState::TypeInfo; + using TypeInfo = Thermostat::Attributes::ACCompressorType::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -66149,11 +66681,39 @@ - (void)readAttributeThermostatRunningStateWithCompletion:(void (^)(NSNumber * _ completion:completion]; } -- (void)subscribeAttributeThermostatRunningStateWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = Thermostat::Attributes::ThermostatRunningState::TypeInfo; + [self writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::ACCompressorType::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeACCompressorTypeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Thermostat::Attributes::ACCompressorType::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -66163,9 +66723,9 @@ - (void)subscribeAttributeThermostatRunningStateWithParams:(MTRSubscribeParams * subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeThermostatRunningStateWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeACCompressorTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::ThermostatRunningState::TypeInfo; + using TypeInfo = Thermostat::Attributes::ACCompressorType::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -66174,9 +66734,9 @@ + (void)readAttributeThermostatRunningStateWithClusterStateCache:(MTRClusterStat completion:completion]; } -- (void)readAttributeSetpointChangeSourceWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeACErrorCodeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::SetpointChangeSource::TypeInfo; + using TypeInfo = Thermostat::Attributes::ACErrorCode::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -66185,11 +66745,39 @@ - (void)readAttributeSetpointChangeSourceWithCompletion:(void (^)(NSNumber * _Nu completion:completion]; } -- (void)subscribeAttributeSetpointChangeSourceWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = Thermostat::Attributes::SetpointChangeSource::TypeInfo; + [self writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::ACErrorCode::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedIntValue); + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeACErrorCodeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Thermostat::Attributes::ACErrorCode::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -66199,9 +66787,9 @@ - (void)subscribeAttributeSetpointChangeSourceWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSetpointChangeSourceWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeACErrorCodeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::SetpointChangeSource::TypeInfo; + using TypeInfo = Thermostat::Attributes::ACErrorCode::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -66210,9 +66798,9 @@ + (void)readAttributeSetpointChangeSourceWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeSetpointChangeAmountWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeACLouverPositionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::SetpointChangeAmount::TypeInfo; + using TypeInfo = Thermostat::Attributes::ACLouverPosition::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -66221,11 +66809,39 @@ - (void)readAttributeSetpointChangeAmountWithCompletion:(void (^)(NSNumber * _Nu completion:completion]; } -- (void)subscribeAttributeSetpointChangeAmountWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - using TypeInfo = Thermostat::Attributes::SetpointChangeAmount::TypeInfo; + [self writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = Thermostat::Attributes::ACLouverPosition::TypeInfo; + TypeInfo::Type cppValue; + cppValue = static_cast>(value.unsignedCharValue); + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeACLouverPositionWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = Thermostat::Attributes::ACLouverPosition::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -66235,9 +66851,9 @@ - (void)subscribeAttributeSetpointChangeAmountWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSetpointChangeAmountWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeACLouverPositionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::SetpointChangeAmount::TypeInfo; + using TypeInfo = Thermostat::Attributes::ACLouverPosition::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -66246,9 +66862,9 @@ + (void)readAttributeSetpointChangeAmountWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeSetpointChangeSourceTimestampWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeACCoilTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::SetpointChangeSourceTimestamp::TypeInfo; + using TypeInfo = Thermostat::Attributes::ACCoilTemperature::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -66257,11 +66873,11 @@ - (void)readAttributeSetpointChangeSourceTimestampWithCompletion:(void (^)(NSNum completion:completion]; } -- (void)subscribeAttributeSetpointChangeSourceTimestampWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeACCoilTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::SetpointChangeSourceTimestamp::TypeInfo; + using TypeInfo = Thermostat::Attributes::ACCoilTemperature::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -66271,9 +66887,9 @@ - (void)subscribeAttributeSetpointChangeSourceTimestampWithParams:(MTRSubscribeP subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeSetpointChangeSourceTimestampWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeACCoilTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::SetpointChangeSourceTimestamp::TypeInfo; + using TypeInfo = Thermostat::Attributes::ACCoilTemperature::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -66282,9 +66898,9 @@ + (void)readAttributeSetpointChangeSourceTimestampWithClusterStateCache:(MTRClus completion:completion]; } -- (void)readAttributeOccupiedSetbackWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeACCapacityformatWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::OccupiedSetback::TypeInfo; + using TypeInfo = Thermostat::Attributes::ACCapacityformat::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -66293,11 +66909,11 @@ - (void)readAttributeOccupiedSetbackWithCompletion:(void (^)(NSNumber * _Nullabl completion:completion]; } -- (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; + [self writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -66312,25 +66928,20 @@ - (void)writeAttributeOccupiedSetbackWithValue:(NSNumber * _Nullable)value param } ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::OccupiedSetback::TypeInfo; + using TypeInfo = Thermostat::Attributes::ACCapacityformat::TypeInfo; TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } + cppValue = static_cast>(value.unsignedCharValue); chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeOccupiedSetbackWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeACCapacityformatWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::OccupiedSetback::TypeInfo; + using TypeInfo = Thermostat::Attributes::ACCapacityformat::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -66340,9 +66951,9 @@ - (void)subscribeAttributeOccupiedSetbackWithParams:(MTRSubscribeParams * _Nonnu subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOccupiedSetbackWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeACCapacityformatWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::OccupiedSetback::TypeInfo; + using TypeInfo = Thermostat::Attributes::ACCapacityformat::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -66351,9 +66962,9 @@ + (void)readAttributeOccupiedSetbackWithClusterStateCache:(MTRClusterStateCacheC completion:completion]; } -- (void)readAttributeOccupiedSetbackMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePresetTypesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::OccupiedSetbackMin::TypeInfo; + using TypeInfo = Thermostat::Attributes::PresetTypes::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -66362,11 +66973,11 @@ - (void)readAttributeOccupiedSetbackMinWithCompletion:(void (^)(NSNumber * _Null completion:completion]; } -- (void)subscribeAttributeOccupiedSetbackMinWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePresetTypesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::OccupiedSetbackMin::TypeInfo; + using TypeInfo = Thermostat::Attributes::PresetTypes::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -66376,9 +66987,9 @@ - (void)subscribeAttributeOccupiedSetbackMinWithParams:(MTRSubscribeParams * _No subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOccupiedSetbackMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePresetTypesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::OccupiedSetbackMin::TypeInfo; + using TypeInfo = Thermostat::Attributes::PresetTypes::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -66387,9 +66998,9 @@ + (void)readAttributeOccupiedSetbackMinWithClusterStateCache:(MTRClusterStateCac completion:completion]; } -- (void)readAttributeOccupiedSetbackMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeScheduleTypesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::OccupiedSetbackMax::TypeInfo; + using TypeInfo = Thermostat::Attributes::ScheduleTypes::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -66398,11 +67009,11 @@ - (void)readAttributeOccupiedSetbackMaxWithCompletion:(void (^)(NSNumber * _Null completion:completion]; } -- (void)subscribeAttributeOccupiedSetbackMaxWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeScheduleTypesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::OccupiedSetbackMax::TypeInfo; + using TypeInfo = Thermostat::Attributes::ScheduleTypes::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -66412,9 +67023,9 @@ - (void)subscribeAttributeOccupiedSetbackMaxWithParams:(MTRSubscribeParams * _No subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeOccupiedSetbackMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeScheduleTypesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::OccupiedSetbackMax::TypeInfo; + using TypeInfo = Thermostat::Attributes::ScheduleTypes::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -66423,9 +67034,9 @@ + (void)readAttributeOccupiedSetbackMaxWithClusterStateCache:(MTRClusterStateCac completion:completion]; } -- (void)readAttributeUnoccupiedSetbackWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNumberOfPresetsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::UnoccupiedSetback::TypeInfo; + using TypeInfo = Thermostat::Attributes::NumberOfPresets::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -66434,44 +67045,11 @@ - (void)readAttributeUnoccupiedSetbackWithCompletion:(void (^)(NSNumber * _Nulla completion:completion]; } -- (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable) value params:nil completion:completion]; -} -- (void)writeAttributeUnoccupiedSetbackWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::UnoccupiedSetback::TypeInfo; - TypeInfo::Type cppValue; - if (value == nil) { - cppValue.SetNull(); - } else { - auto & nonNullValue_0 = cppValue.SetNonNull(); - nonNullValue_0 = value.unsignedCharValue; - } - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeUnoccupiedSetbackWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfPresetsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::UnoccupiedSetback::TypeInfo; + using TypeInfo = Thermostat::Attributes::NumberOfPresets::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -66481,9 +67059,9 @@ - (void)subscribeAttributeUnoccupiedSetbackWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeUnoccupiedSetbackWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNumberOfPresetsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::UnoccupiedSetback::TypeInfo; + using TypeInfo = Thermostat::Attributes::NumberOfPresets::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -66492,9 +67070,9 @@ + (void)readAttributeUnoccupiedSetbackWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributeUnoccupiedSetbackMinWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNumberOfSchedulesWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMin::TypeInfo; + using TypeInfo = Thermostat::Attributes::NumberOfSchedules::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -66503,11 +67081,11 @@ - (void)readAttributeUnoccupiedSetbackMinWithCompletion:(void (^)(NSNumber * _Nu completion:completion]; } -- (void)subscribeAttributeUnoccupiedSetbackMinWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfSchedulesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMin::TypeInfo; + using TypeInfo = Thermostat::Attributes::NumberOfSchedules::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -66517,9 +67095,9 @@ - (void)subscribeAttributeUnoccupiedSetbackMinWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeUnoccupiedSetbackMinWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNumberOfSchedulesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMin::TypeInfo; + using TypeInfo = Thermostat::Attributes::NumberOfSchedules::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -66528,9 +67106,9 @@ + (void)readAttributeUnoccupiedSetbackMinWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeUnoccupiedSetbackMaxWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNumberOfScheduleTransitionsWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMax::TypeInfo; + using TypeInfo = Thermostat::Attributes::NumberOfScheduleTransitions::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -66539,11 +67117,11 @@ - (void)readAttributeUnoccupiedSetbackMaxWithCompletion:(void (^)(NSNumber * _Nu completion:completion]; } -- (void)subscribeAttributeUnoccupiedSetbackMaxWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfScheduleTransitionsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMax::TypeInfo; + using TypeInfo = Thermostat::Attributes::NumberOfScheduleTransitions::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -66553,9 +67131,9 @@ - (void)subscribeAttributeUnoccupiedSetbackMaxWithParams:(MTRSubscribeParams * _ subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeUnoccupiedSetbackMaxWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNumberOfScheduleTransitionsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::UnoccupiedSetbackMax::TypeInfo; + using TypeInfo = Thermostat::Attributes::NumberOfScheduleTransitions::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -66564,9 +67142,9 @@ + (void)readAttributeUnoccupiedSetbackMaxWithClusterStateCache:(MTRClusterStateC completion:completion]; } -- (void)readAttributeEmergencyHeatDeltaWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeNumberOfScheduleTransitionPerDayWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::EmergencyHeatDelta::TypeInfo; + using TypeInfo = Thermostat::Attributes::NumberOfScheduleTransitionPerDay::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -66575,39 +67153,11 @@ - (void)readAttributeEmergencyHeatDeltaWithCompletion:(void (^)(NSNumber * _Null completion:completion]; } -- (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeEmergencyHeatDeltaWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::EmergencyHeatDelta::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedCharValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeEmergencyHeatDeltaWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeNumberOfScheduleTransitionPerDayWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::EmergencyHeatDelta::TypeInfo; + using TypeInfo = Thermostat::Attributes::NumberOfScheduleTransitionPerDay::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -66617,9 +67167,9 @@ - (void)subscribeAttributeEmergencyHeatDeltaWithParams:(MTRSubscribeParams * _No subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeEmergencyHeatDeltaWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeNumberOfScheduleTransitionPerDayWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::EmergencyHeatDelta::TypeInfo; + using TypeInfo = Thermostat::Attributes::NumberOfScheduleTransitionPerDay::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -66628,9 +67178,9 @@ + (void)readAttributeEmergencyHeatDeltaWithClusterStateCache:(MTRClusterStateCac completion:completion]; } -- (void)readAttributeACTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActivePresetHandleWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::ACType::TypeInfo; + using TypeInfo = Thermostat::Attributes::ActivePresetHandle::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -66639,39 +67189,11 @@ - (void)readAttributeACTypeWithCompletion:(void (^)(NSNumber * _Nullable value, completion:completion]; } -- (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeACTypeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeACTypeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::ACType::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeACTypeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActivePresetHandleWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::ACType::TypeInfo; + using TypeInfo = Thermostat::Attributes::ActivePresetHandle::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -66681,9 +67203,9 @@ - (void)subscribeAttributeACTypeWithParams:(MTRSubscribeParams * _Nonnull)params subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeACTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActivePresetHandleWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::ACType::TypeInfo; + using TypeInfo = Thermostat::Attributes::ActivePresetHandle::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -66692,9 +67214,9 @@ + (void)readAttributeACTypeWithClusterStateCache:(MTRClusterStateCacheContainer completion:completion]; } -- (void)readAttributeACCapacityWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeActiveScheduleHandleWithCompletion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::ACCapacity::TypeInfo; + using TypeInfo = Thermostat::Attributes::ActiveScheduleHandle::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -66703,39 +67225,11 @@ - (void)readAttributeACCapacityWithCompletion:(void (^)(NSNumber * _Nullable val completion:completion]; } -- (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeACCapacityWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeACCapacityWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::ACCapacity::TypeInfo; - TypeInfo::Type cppValue; - cppValue = value.unsignedShortValue; - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeACCapacityWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeActiveScheduleHandleWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSData * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::ACCapacity::TypeInfo; + using TypeInfo = Thermostat::Attributes::ActiveScheduleHandle::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -66745,9 +67239,9 @@ - (void)subscribeAttributeACCapacityWithParams:(MTRSubscribeParams * _Nonnull)pa subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeACCapacityWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeActiveScheduleHandleWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSData * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::ACCapacity::TypeInfo; + using TypeInfo = Thermostat::Attributes::ActiveScheduleHandle::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -66756,9 +67250,9 @@ + (void)readAttributeACCapacityWithClusterStateCache:(MTRClusterStateCacheContai completion:completion]; } -- (void)readAttributeACRefrigerantTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePresetsWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::ACRefrigerantType::TypeInfo; + using TypeInfo = Thermostat::Attributes::Presets::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -66767,11 +67261,11 @@ - (void)readAttributeACRefrigerantTypeWithCompletion:(void (^)(NSNumber * _Nulla completion:completion]; } -- (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributePresetsWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributePresetsWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributePresetsWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -66786,20 +67280,70 @@ - (void)writeAttributeACRefrigerantTypeWithValue:(NSNumber * _Nonnull)value para } ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::ACRefrigerantType::TypeInfo; + using TypeInfo = Thermostat::Attributes::Presets::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.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 < value.count; ++i_0) { + if ( ! [value[i_0] isKindOfClass: [MTRThermostatClusterPresetStruct class]] ) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (MTRThermostatClusterPresetStruct *)value[i_0]; + if (element_0.presetHandle == nil) { + listHolder_0->mList[i_0].presetHandle.SetNull(); + } else { + auto & nonNullValue_2 = listHolder_0->mList[i_0].presetHandle.SetNonNull(); + nonNullValue_2 = AsByteSpan(element_0.presetHandle); + } + listHolder_0->mList[i_0].presetScenario = static_castmList[i_0].presetScenario)>>(element_0.presetScenario.unsignedCharValue); + if (element_0.name != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].name.Emplace(); + if (element_0.name == nil) { + definedValue_2.SetNull(); + } else { + auto & nonNullValue_3 = definedValue_2.SetNonNull(); + nonNullValue_3 = AsCharSpan(element_0.name); + } + } + if (element_0.coolingSetpoint != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].coolingSetpoint.Emplace(); + definedValue_2 = element_0.coolingSetpoint.shortValue; + } + if (element_0.heatingSetpoint != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].heatingSetpoint.Emplace(); + definedValue_2 = element_0.heatingSetpoint.shortValue; + } + if (element_0.builtIn == nil) { + listHolder_0->mList[i_0].builtIn.SetNull(); + } else { + auto & nonNullValue_2 = listHolder_0->mList[i_0].builtIn.SetNonNull(); + nonNullValue_2 = element_0.builtIn.boolValue; + } + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeACRefrigerantTypeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePresetsWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::ACRefrigerantType::TypeInfo; + using TypeInfo = Thermostat::Attributes::Presets::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -66809,9 +67353,9 @@ - (void)subscribeAttributeACRefrigerantTypeWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeACRefrigerantTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePresetsWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::ACRefrigerantType::TypeInfo; + using TypeInfo = Thermostat::Attributes::Presets::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -66820,9 +67364,9 @@ + (void)readAttributeACRefrigerantTypeWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributeACCompressorTypeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSchedulesWithCompletion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::ACCompressorType::TypeInfo; + using TypeInfo = Thermostat::Attributes::Schedules::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -66831,11 +67375,11 @@ - (void)readAttributeACCompressorTypeWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +- (void)writeAttributeSchedulesWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion { - [self writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; + [self writeAttributeSchedulesWithValue:(NSArray * _Nonnull) value params:nil completion:completion]; } -- (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +- (void)writeAttributeSchedulesWithValue:(NSArray * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion { // Make a copy of params before we go async. params = [params copy]; @@ -66850,20 +67394,103 @@ - (void)writeAttributeACCompressorTypeWithValue:(NSNumber * _Nonnull)value param } ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::ACCompressorType::TypeInfo; + using TypeInfo = Thermostat::Attributes::Schedules::TypeInfo; TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (value.count != 0) { + auto * listHolder_0 = new ListHolder(value.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 < value.count; ++i_0) { + if ( ! [value[i_0] isKindOfClass: [MTRThermostatClusterScheduleStruct class]] ) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (MTRThermostatClusterScheduleStruct *)value[i_0]; + if (element_0.scheduleHandle == nil) { + listHolder_0->mList[i_0].scheduleHandle.SetNull(); + } else { + auto & nonNullValue_2 = listHolder_0->mList[i_0].scheduleHandle.SetNonNull(); + nonNullValue_2 = AsByteSpan(element_0.scheduleHandle); + } + listHolder_0->mList[i_0].systemMode = static_castmList[i_0].systemMode)>>(element_0.systemMode.unsignedCharValue); + if (element_0.name != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].name.Emplace(); + definedValue_2 = AsCharSpan(element_0.name); + } + if (element_0.presetHandle != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].presetHandle.Emplace(); + definedValue_2 = AsByteSpan(element_0.presetHandle); + } + { + using ListType_2 = std::remove_reference_tmList[i_0].transitions)>; + using ListMemberType_2 = ListMemberTypeGetter::Type; + if (element_0.transitions.count != 0) { + auto * listHolder_2 = new ListHolder(element_0.transitions.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.transitions.count; ++i_2) { + if ( ! [element_0.transitions[i_2] isKindOfClass: [MTRThermostatClusterScheduleTransitionStruct class]] ) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_2 = (MTRThermostatClusterScheduleTransitionStruct *)element_0.transitions[i_2]; + listHolder_2->mList[i_2].dayOfWeek = static_castmList[i_2].dayOfWeek)>>(element_2.dayOfWeek.unsignedCharValue); + listHolder_2->mList[i_2].transitionTime = element_2.transitionTime.unsignedShortValue; + if (element_2.presetHandle != nil) { + auto & definedValue_4 = listHolder_2->mList[i_2].presetHandle.Emplace(); + definedValue_4 = AsByteSpan(element_2.presetHandle); + } + if (element_2.systemMode != nil) { + auto & definedValue_4 = listHolder_2->mList[i_2].systemMode.Emplace(); + definedValue_4 = static_cast>(element_2.systemMode.unsignedCharValue); + } + if (element_2.coolingSetpoint != nil) { + auto & definedValue_4 = listHolder_2->mList[i_2].coolingSetpoint.Emplace(); + definedValue_4 = element_2.coolingSetpoint.shortValue; + } + if (element_2.heatingSetpoint != nil) { + auto & definedValue_4 = listHolder_2->mList[i_2].heatingSetpoint.Emplace(); + definedValue_4 = element_2.heatingSetpoint.shortValue; + } + } + listHolder_0->mList[i_0].transitions = ListType_2(listHolder_2->mList, element_0.transitions.count); + } else { + listHolder_0->mList[i_0].transitions = ListType_2(); + } + } + if (element_0.builtIn != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].builtIn.Emplace(); + if (element_0.builtIn == nil) { + definedValue_2.SetNull(); + } else { + auto & nonNullValue_3 = definedValue_2.SetNonNull(); + nonNullValue_3 = element_0.builtIn.boolValue; + } + } + } + cppValue = ListType_0(listHolder_0->mList, value.count); + } else { + cppValue = ListType_0(); + } + } chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); std::move(*bridge).DispatchAction(self.device); } -- (void)subscribeAttributeACCompressorTypeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSchedulesWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::ACCompressorType::TypeInfo; + using TypeInfo = Thermostat::Attributes::Schedules::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -66873,9 +67500,9 @@ - (void)subscribeAttributeACCompressorTypeWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeACCompressorTypeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSchedulesWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::ACCompressorType::TypeInfo; + using TypeInfo = Thermostat::Attributes::Schedules::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -66884,9 +67511,9 @@ + (void)readAttributeACCompressorTypeWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeACErrorCodeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributePresetsSchedulesEditableWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::ACErrorCode::TypeInfo; + using TypeInfo = Thermostat::Attributes::PresetsSchedulesEditable::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -66895,39 +67522,11 @@ - (void)readAttributeACErrorCodeWithCompletion:(void (^)(NSNumber * _Nullable va completion:completion]; } -- (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeACErrorCodeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::ACErrorCode::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedIntValue); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeACErrorCodeWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributePresetsSchedulesEditableWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::ACErrorCode::TypeInfo; + using TypeInfo = Thermostat::Attributes::PresetsSchedulesEditable::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -66937,9 +67536,9 @@ - (void)subscribeAttributeACErrorCodeWithParams:(MTRSubscribeParams * _Nonnull)p subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeACErrorCodeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributePresetsSchedulesEditableWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::ACErrorCode::TypeInfo; + using TypeInfo = Thermostat::Attributes::PresetsSchedulesEditable::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -66948,9 +67547,9 @@ + (void)readAttributeACErrorCodeWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } -- (void)readAttributeACLouverPositionWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeTemperatureSetpointHoldPolicyWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::ACLouverPosition::TypeInfo; + using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldPolicy::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -66959,39 +67558,11 @@ - (void)readAttributeACLouverPositionWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeACLouverPositionWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::ACLouverPosition::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeACLouverPositionWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeTemperatureSetpointHoldPolicyWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::ACLouverPosition::TypeInfo; + using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldPolicy::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -67001,9 +67572,9 @@ - (void)subscribeAttributeACLouverPositionWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeACLouverPositionWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeTemperatureSetpointHoldPolicyWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::ACLouverPosition::TypeInfo; + using TypeInfo = Thermostat::Attributes::TemperatureSetpointHoldPolicy::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -67012,9 +67583,9 @@ + (void)readAttributeACLouverPositionWithClusterStateCache:(MTRClusterStateCache completion:completion]; } -- (void)readAttributeACCoilTemperatureWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeSetpointHoldExpiryTimestampWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::ACCoilTemperature::TypeInfo; + using TypeInfo = Thermostat::Attributes::SetpointHoldExpiryTimestamp::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -67023,11 +67594,11 @@ - (void)readAttributeACCoilTemperatureWithCompletion:(void (^)(NSNumber * _Nulla completion:completion]; } -- (void)subscribeAttributeACCoilTemperatureWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeSetpointHoldExpiryTimestampWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::ACCoilTemperature::TypeInfo; + using TypeInfo = Thermostat::Attributes::SetpointHoldExpiryTimestamp::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -67037,9 +67608,9 @@ - (void)subscribeAttributeACCoilTemperatureWithParams:(MTRSubscribeParams * _Non subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeACCoilTemperatureWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeSetpointHoldExpiryTimestampWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::ACCoilTemperature::TypeInfo; + using TypeInfo = Thermostat::Attributes::SetpointHoldExpiryTimestamp::TypeInfo; [clusterStateCacheContainer _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) clusterID:TypeInfo::GetClusterId() @@ -67048,9 +67619,9 @@ + (void)readAttributeACCoilTemperatureWithClusterStateCache:(MTRClusterStateCach completion:completion]; } -- (void)readAttributeACCapacityformatWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +- (void)readAttributeQueuedPresetWithCompletion:(void (^)(MTRThermostatClusterQueuedPresetStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::ACCapacityformat::TypeInfo; + using TypeInfo = Thermostat::Attributes::QueuedPreset::TypeInfo; [self.device _readKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -67059,39 +67630,11 @@ - (void)readAttributeACCapacityformatWithCompletion:(void (^)(NSNumber * _Nullab completion:completion]; } -- (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion -{ - [self writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; -} -- (void)writeAttributeACCapacityformatWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion -{ - // Make a copy of params before we go async. - params = [params copy]; - value = [value copy]; - - auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { - chip::Optional timedWriteTimeout; - if (params != nil) { - if (params.timedWriteTimeout != nil){ - timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); - } - } - - ListFreer listFreer; - using TypeInfo = Thermostat::Attributes::ACCapacityformat::TypeInfo; - TypeInfo::Type cppValue; - cppValue = static_cast>(value.unsignedCharValue); - - chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpoint); - return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); - std::move(*bridge).DispatchAction(self.device); -} - -- (void)subscribeAttributeACCapacityformatWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +- (void)subscribeAttributeQueuedPresetWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(MTRThermostatClusterQueuedPresetStruct * _Nullable value, NSError * _Nullable error))reportHandler { - using TypeInfo = Thermostat::Attributes::ACCapacityformat::TypeInfo; + using TypeInfo = Thermostat::Attributes::QueuedPreset::TypeInfo; [self.device _subscribeToKnownAttributeWithEndpointID:@(self.endpoint) clusterID:@(TypeInfo::GetClusterId()) attributeID:@(TypeInfo::GetAttributeId()) @@ -67101,9 +67644,9 @@ - (void)subscribeAttributeACCapacityformatWithParams:(MTRSubscribeParams * _Nonn subscriptionEstablished:subscriptionEstablished]; } -+ (void)readAttributeACCapacityformatWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion ++ (void)readAttributeQueuedPresetWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(MTRThermostatClusterQueuedPresetStruct * _Nullable value, NSError * _Nullable error))completion { - using TypeInfo = Thermostat::Attributes::ACCapacityformat::TypeInfo; + using TypeInfo = Thermostat::Attributes::QueuedPreset::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 7c46f6315692cb..77e169df653784 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)) @@ -2510,11 +2458,15 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterMicrowaveOvenModeAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, // Cluster MicrowaveOvenControl attributes - MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeCookTimeID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, + MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeCookTimeID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeMaxCookTimeID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, MTRAttributeIDTypeClusterMicrowaveOvenControlAttributePowerSettingID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeMinPowerID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeMaxPowerID MTR_PROVISIONALLY_AVAILABLE = 0x00000004, MTRAttributeIDTypeClusterMicrowaveOvenControlAttributePowerStepID MTR_PROVISIONALLY_AVAILABLE = 0x00000005, + MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeSupportedWattsID MTR_PROVISIONALLY_AVAILABLE = 0x00000006, + MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeSelectedWattIndexID MTR_PROVISIONALLY_AVAILABLE = 0x00000007, + MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeWattRatingID MTR_PROVISIONALLY_AVAILABLE = 0x00000008, MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, @@ -2550,6 +2502,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, @@ -3390,6 +3358,20 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterThermostatAttributeACLouverPositionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000045, MTRAttributeIDTypeClusterThermostatAttributeACCoilTemperatureID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000046, MTRAttributeIDTypeClusterThermostatAttributeACCapacityformatID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000047, + MTRAttributeIDTypeClusterThermostatAttributePresetTypesID MTR_PROVISIONALLY_AVAILABLE = 0x00000048, + MTRAttributeIDTypeClusterThermostatAttributeScheduleTypesID MTR_PROVISIONALLY_AVAILABLE = 0x00000049, + MTRAttributeIDTypeClusterThermostatAttributeNumberOfPresetsID MTR_PROVISIONALLY_AVAILABLE = 0x0000004A, + MTRAttributeIDTypeClusterThermostatAttributeNumberOfSchedulesID MTR_PROVISIONALLY_AVAILABLE = 0x0000004B, + MTRAttributeIDTypeClusterThermostatAttributeNumberOfScheduleTransitionsID MTR_PROVISIONALLY_AVAILABLE = 0x0000004C, + MTRAttributeIDTypeClusterThermostatAttributeNumberOfScheduleTransitionPerDayID MTR_PROVISIONALLY_AVAILABLE = 0x0000004D, + MTRAttributeIDTypeClusterThermostatAttributeActivePresetHandleID MTR_PROVISIONALLY_AVAILABLE = 0x0000004E, + MTRAttributeIDTypeClusterThermostatAttributeActiveScheduleHandleID MTR_PROVISIONALLY_AVAILABLE = 0x0000004F, + MTRAttributeIDTypeClusterThermostatAttributePresetsID MTR_PROVISIONALLY_AVAILABLE = 0x00000050, + MTRAttributeIDTypeClusterThermostatAttributeSchedulesID MTR_PROVISIONALLY_AVAILABLE = 0x00000051, + MTRAttributeIDTypeClusterThermostatAttributePresetsSchedulesEditableID MTR_PROVISIONALLY_AVAILABLE = 0x00000052, + MTRAttributeIDTypeClusterThermostatAttributeTemperatureSetpointHoldPolicyID MTR_PROVISIONALLY_AVAILABLE = 0x00000053, + MTRAttributeIDTypeClusterThermostatAttributeSetpointHoldExpiryTimestampID MTR_PROVISIONALLY_AVAILABLE = 0x00000054, + MTRAttributeIDTypeClusterThermostatAttributeQueuedPresetID MTR_PROVISIONALLY_AVAILABLE = 0x00000055, MTRAttributeIDTypeClusterThermostatAttributeGeneratedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterThermostatAttributeAcceptedCommandListID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, MTRAttributeIDTypeClusterThermostatAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, @@ -5716,86 +5698,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)) @@ -6269,6 +6171,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, @@ -6479,6 +6402,13 @@ typedef NS_ENUM(uint32_t, MTRCommandIDType) { MTRCommandIDTypeClusterThermostatCommandSetWeeklyScheduleID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000001, MTRCommandIDTypeClusterThermostatCommandGetWeeklyScheduleID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000002, MTRCommandIDTypeClusterThermostatCommandClearWeeklyScheduleID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000003, + MTRCommandIDTypeClusterThermostatCommandSetActiveScheduleRequestID MTR_PROVISIONALLY_AVAILABLE = 0x00000005, + MTRCommandIDTypeClusterThermostatCommandSetActivePresetRequestID MTR_PROVISIONALLY_AVAILABLE = 0x00000006, + MTRCommandIDTypeClusterThermostatCommandStartPresetsSchedulesEditRequestID MTR_PROVISIONALLY_AVAILABLE = 0x00000007, + MTRCommandIDTypeClusterThermostatCommandCancelPresetsSchedulesEditRequestID MTR_PROVISIONALLY_AVAILABLE = 0x00000008, + MTRCommandIDTypeClusterThermostatCommandCommitPresetsSchedulesRequestID MTR_PROVISIONALLY_AVAILABLE = 0x00000009, + MTRCommandIDTypeClusterThermostatCommandCancelSetActivePresetRequestID MTR_PROVISIONALLY_AVAILABLE = 0x0000000A, + MTRCommandIDTypeClusterThermostatCommandSetTemperatureSetpointHoldPolicyID MTR_PROVISIONALLY_AVAILABLE = 0x0000000B, // Cluster FanControl deprecated command id names diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index 605c522bb489c1..6fcea80c35673e 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. @@ -3051,6 +2988,8 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary * _Nullable)readAttributeCookTimeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeMaxCookTimeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary * _Nullable)readAttributePowerSettingWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeMinPowerWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -3059,6 +2998,12 @@ MTR_PROVISIONALLY_AVAILABLE - (NSDictionary * _Nullable)readAttributePowerStepWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (NSDictionary * _Nullable)readAttributeSupportedWattsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeSelectedWattIndexWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeWattRatingWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -3210,6 +3155,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 @@ -4236,6 +4244,19 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklyScheduleParams * _Nullable)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)clearWeeklyScheduleWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)setActiveScheduleRequestWithParams:(MTRThermostatClusterSetActiveScheduleRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)setActivePresetRequestWithParams:(MTRThermostatClusterSetActivePresetRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)startPresetsSchedulesEditRequestWithParams:(MTRThermostatClusterStartPresetsSchedulesEditRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)cancelPresetsSchedulesEditRequestWithParams:(MTRThermostatClusterCancelPresetsSchedulesEditRequestParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)cancelPresetsSchedulesEditRequestWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)commitPresetsSchedulesRequestWithParams:(MTRThermostatClusterCommitPresetsSchedulesRequestParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)commitPresetsSchedulesRequestWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)cancelSetActivePresetRequestWithParams:(MTRThermostatClusterCancelSetActivePresetRequestParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)cancelSetActivePresetRequestWithExpectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion + MTR_PROVISIONALLY_AVAILABLE; +- (void)setTemperatureSetpointHoldPolicyWithParams:(MTRThermostatClusterSetTemperatureSetpointHoldPolicyParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeLocalTemperatureWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -4389,6 +4410,38 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (void)writeAttributeACCapacityformatWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - (void)writeAttributeACCapacityformatWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +- (NSDictionary * _Nullable)readAttributePresetTypesWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeScheduleTypesWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeNumberOfPresetsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeNumberOfSchedulesWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeNumberOfScheduleTransitionsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeNumberOfScheduleTransitionPerDayWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeActivePresetHandleWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeActiveScheduleHandleWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributePresetsWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributePresetsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributePresetsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeSchedulesWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeSchedulesWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeSchedulesWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributePresetsSchedulesEditableWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeTemperatureSetpointHoldPolicyWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeSetpointHoldExpiryTimestampWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeQueuedPresetWithParams:(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)); @@ -7210,24 +7263,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 ae9159d82900a2..7f79d6452d3415 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -429,436 +429,6 @@ - (void)addGroupIfIdentifyingWithParams:(MTRGroupsClusterAddGroupIfIdentifyingPa } @end -@implementation MTRClusterScenes - -- (void)addSceneWithParams:(MTRScenesClusterAddSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs 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 - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRScenesClusterAddSceneResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} - -- (void)viewSceneWithParams:(MTRScenesClusterViewSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs 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 - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRScenesClusterViewSceneResponseParams.class - 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 -{ - 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]; -} - -- (void)removeAllScenesWithParams:(MTRScenesClusterRemoveAllScenesParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs 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 - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRScenesClusterRemoveAllScenesResponseParams.class - 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 -{ - 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]; -} - -- (void)recallSceneWithParams:(MTRScenesClusterRecallSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs 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 - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil - queue:self.callbackQueue - completion:responseHandler]; -} - -- (void)getSceneMembershipWithParams:(MTRScenesClusterGetSceneMembershipParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs 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 - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRScenesClusterGetSceneMembershipResponseParams.class - 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 -{ - 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]; -} - -- (void)enhancedViewSceneWithParams:(MTRScenesClusterEnhancedViewSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs 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 - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRScenesClusterEnhancedViewSceneResponseParams.class - 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 -{ - 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 - expectedValues:expectedValues - expectedValueInterval:expectedValueIntervalMs - timedInvokeTimeout:timedInvokeTimeoutMs - serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRScenesClusterCopySceneResponseParams.class - queue:self.callbackQueue - completion:responseHandler]; -} - -- (NSDictionary * _Nullable)readAttributeSceneCountWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeSceneCountID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeCurrentSceneWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeCurrentSceneID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeCurrentGroupWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeCurrentGroupID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeSceneValidWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeSceneValidID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeNameSupportWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeNameSupportID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeLastConfiguredByWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeLastConfiguredByID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeSceneTableSizeWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeSceneTableSizeID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeFabricSceneInfoWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeFabricSceneInfoID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeGeneratedCommandListID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeAcceptedCommandListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeAcceptedCommandListID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeEventListID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeAttributeListWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeAttributeListID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeFeatureMapID) params:params]; -} - -- (NSDictionary * _Nullable)readAttributeClusterRevisionWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesID) attributeID:@(MTRAttributeIDTypeClusterScenesAttributeClusterRevisionID) params:params]; -} - -@end - -@implementation MTRClusterScenes (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 -{ - [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); - }]; -} -- (void)viewSceneWithParams:(MTRScenesClusterViewSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRScenesClusterViewSceneResponseParams * _Nullable data, NSError * _Nullable error))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); - }]; -} -- (void)removeSceneWithParams:(MTRScenesClusterRemoveSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRScenesClusterRemoveSceneResponseParams * _Nullable data, NSError * _Nullable error))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); - }]; -} -- (void)removeAllScenesWithParams:(MTRScenesClusterRemoveAllScenesParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRScenesClusterRemoveAllScenesResponseParams * _Nullable data, NSError * _Nullable error))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); - }]; -} -- (void)storeSceneWithParams:(MTRScenesClusterStoreSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRScenesClusterStoreSceneResponseParams * _Nullable data, NSError * _Nullable error))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); - }]; -} -- (void)recallSceneWithParams:(MTRScenesClusterRecallSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(MTRStatusCompletion)completionHandler -{ - [self recallSceneWithParams:params expectedValues:expectedDataValueDictionaries expectedValueInterval:expectedValueIntervalMs completion: - completionHandler]; -} -- (void)getSceneMembershipWithParams:(MTRScenesClusterGetSceneMembershipParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRScenesClusterGetSceneMembershipResponseParams * _Nullable data, NSError * _Nullable error))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); - }]; -} -- (void)enhancedAddSceneWithParams:(MTRScenesClusterEnhancedAddSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRScenesClusterEnhancedAddSceneResponseParams * _Nullable data, NSError * _Nullable error))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); - }]; -} -- (void)enhancedViewSceneWithParams:(MTRScenesClusterEnhancedViewSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRScenesClusterEnhancedViewSceneResponseParams * _Nullable data, NSError * _Nullable error))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); - }]; -} -- (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completionHandler:(void (^)(MTRScenesClusterCopySceneResponseParams * _Nullable data, NSError * _Nullable error))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); - }]; -} -@end - @implementation MTRClusterOnOff - (void)offWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion @@ -8325,68 +7895,276 @@ - (void)addMoreTimeWithParams:(MTRMicrowaveOvenControlClusterAddMoreTimeParams * return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeCookTimeID) params:params]; } -- (NSDictionary * _Nullable)readAttributePowerSettingWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeMaxCookTimeWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeMaxCookTimeID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributePowerSettingWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributePowerSettingID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeMinPowerWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeMinPowerID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeMaxPowerWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeMaxPowerID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributePowerStepWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributePowerStepID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeSupportedWattsWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeSupportedWattsID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeSelectedWattIndexWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeSelectedWattIndexID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeWattRatingWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeWattRatingID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)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:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeAcceptedCommandListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeEventListWithParams:(MTRReadParams * _Nullable)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:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeAttributeListID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeFeatureMapWithParams:(MTRReadParams * _Nullable)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:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeClusterRevisionID) params:params]; +} + +@end + +@implementation MTRClusterOperationalState + +- (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 = [[MTROperationalStateClusterPauseParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = OperationalState::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:MTROperationalStateClusterOperationalCommandResponseParams.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 +{ + if (params == nil) { + params = [[MTROperationalStateClusterStopParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(response, error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = OperationalState::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:MTROperationalStateClusterOperationalCommandResponseParams.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 +{ + if (params == nil) { + params = [[MTROperationalStateClusterStartParams + alloc] init]; + } + + 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 + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTROperationalStateClusterOperationalCommandResponseParams.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 +{ + 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)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:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributePowerSettingID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeCountdownTimeID) params:params]; } -- (NSDictionary * _Nullable)readAttributeMinPowerWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeOperationalStateListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeMinPowerID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeOperationalStateListID) params:params]; } -- (NSDictionary * _Nullable)readAttributeMaxPowerWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeOperationalStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeMaxPowerID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeOperationalStateID) params:params]; } -- (NSDictionary * _Nullable)readAttributePowerStepWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeOperationalErrorWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributePowerStepID) 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:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeGeneratedCommandListID) 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:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeAcceptedCommandListID) 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:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeEventListID) 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:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeAttributeListID) 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:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeFeatureMapID) 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:@(MTRClusterIDTypeMicrowaveOvenControlID) attributeID:@(MTRAttributeIDTypeClusterMicrowaveOvenControlAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterOperationalState +@implementation MTRClusterRVCOperationalState -- (void)pauseWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (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:(MTROperationalStateClusterPauseParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))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 = [[MTROperationalStateClusterPauseParams + params = [[MTRRVCOperationalStateClusterPauseParams alloc] init]; } @@ -8396,7 +8174,7 @@ - (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()) @@ -8405,19 +8183,19 @@ - (void)pauseWithParams:(MTROperationalStateClusterPauseParams * _Nullable)param expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROperationalStateClusterOperationalCommandResponseParams.class + responseClass:MTRRVCOperationalStateClusterOperationalCommandResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)stopWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (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:(MTROperationalStateClusterStopParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))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 = [[MTROperationalStateClusterStopParams + params = [[MTRRVCOperationalStateClusterStopParams alloc] init]; } @@ -8427,7 +8205,7 @@ - (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()) @@ -8436,19 +8214,19 @@ - (void)stopWithParams:(MTROperationalStateClusterStopParams * _Nullable)params expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROperationalStateClusterOperationalCommandResponseParams.class + responseClass:MTRRVCOperationalStateClusterOperationalCommandResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)startWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (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:(MTROperationalStateClusterStartParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))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 = [[MTROperationalStateClusterStartParams + params = [[MTRRVCOperationalStateClusterStartParams alloc] init]; } @@ -8458,7 +8236,7 @@ - (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()) @@ -8467,19 +8245,19 @@ - (void)startWithParams:(MTROperationalStateClusterStartParams * _Nullable)param expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROperationalStateClusterOperationalCommandResponseParams.class + responseClass:MTRRVCOperationalStateClusterOperationalCommandResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)resumeWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))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:(MTROperationalStateClusterResumeParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTROperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))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 = [[MTROperationalStateClusterResumeParams + params = [[MTRRVCOperationalStateClusterResumeParams alloc] init]; } @@ -8489,7 +8267,7 @@ - (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()) @@ -8498,83 +8276,106 @@ - (void)resumeWithParams:(MTROperationalStateClusterResumeParams * _Nullable)par expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTROperationalStateClusterOperationalCommandResponseParams.class + responseClass:MTRRVCOperationalStateClusterOperationalCommandResponseParams.class queue:self.callbackQueue completion:responseHandler]; } - (NSDictionary * _Nullable)readAttributePhaseListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributePhaseListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributePhaseListID) params:params]; } - (NSDictionary * _Nullable)readAttributeCurrentPhaseWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeCurrentPhaseID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeCurrentPhaseID) params:params]; } - (NSDictionary * _Nullable)readAttributeCountdownTimeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeCountdownTimeID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeCountdownTimeID) params:params]; } - (NSDictionary * _Nullable)readAttributeOperationalStateListWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeOperationalStateListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeOperationalStateListID) params:params]; } - (NSDictionary * _Nullable)readAttributeOperationalStateWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeOperationalStateID) 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:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeOperationalErrorID) params: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:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeGeneratedCommandListID) 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:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeAcceptedCommandListID) 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:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeEventListID) 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:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeAttributeListID) 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:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeFeatureMapID) 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:@(MTRClusterIDTypeOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterOperationalStateAttributeClusterRevisionID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeClusterRevisionID) params:params]; } @end -@implementation MTRClusterRVCOperationalState +@implementation MTRClusterScenesManagement -- (void)pauseWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _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 { - [self pauseWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs 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 + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRScenesManagementClusterAddSceneResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -- (void)pauseWithParams:(MTRRVCOperationalStateClusterPauseParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _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 = [[MTRRVCOperationalStateClusterPauseParams + params = [[MTRScenesManagementClusterViewSceneParams alloc] init]; } @@ -8584,7 +8385,7 @@ - (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()) @@ -8593,19 +8394,42 @@ - (void)pauseWithParams:(MTRRVCOperationalStateClusterPauseParams * _Nullable)pa expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRRVCOperationalStateClusterOperationalCommandResponseParams.class + responseClass:MTRScenesManagementClusterViewSceneResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)stopWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _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 { - [self stopWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs 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 + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRScenesManagementClusterRemoveSceneResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -- (void)stopWithParams:(MTRRVCOperationalStateClusterStopParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _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 = [[MTRRVCOperationalStateClusterStopParams + params = [[MTRScenesManagementClusterRemoveAllScenesParams alloc] init]; } @@ -8615,7 +8439,7 @@ - (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()) @@ -8624,19 +8448,69 @@ - (void)stopWithParams:(MTRRVCOperationalStateClusterStopParams * _Nullable)para expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRRVCOperationalStateClusterOperationalCommandResponseParams.class + responseClass:MTRScenesManagementClusterRemoveAllScenesResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)startWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion +- (void)storeSceneWithParams:(MTRScenesManagementClusterStoreSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRScenesManagementClusterStoreSceneResponseParams * _Nullable data, NSError * _Nullable error))completion { - [self startWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs 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 + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRScenesManagementClusterStoreSceneResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -- (void)startWithParams:(MTRRVCOperationalStateClusterStartParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRRVCOperationalStateClusterOperationalCommandResponseParams * _Nullable data, NSError * _Nullable error))completion + +- (void)recallSceneWithParams:(MTRScenesManagementClusterRecallSceneParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs 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 + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:nil + queue:self.callbackQueue + completion:responseHandler]; +} + +- (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 = [[MTRScenesManagementClusterGetSceneMembershipParams alloc] init]; } @@ -8646,7 +8520,7 @@ - (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()) @@ -8655,19 +8529,42 @@ - (void)startWithParams:(MTRRVCOperationalStateClusterStartParams * _Nullable)pa expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRRVCOperationalStateClusterOperationalCommandResponseParams.class + responseClass:MTRScenesManagementClusterGetSceneMembershipResponseParams.class queue:self.callbackQueue completion:responseHandler]; } -- (void)resumeWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)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 { - [self resumeWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs 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 + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + responseClass:MTRScenesManagementClusterEnhancedAddSceneResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; } -- (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _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 = [[MTRRVCOperationalStateClusterResumeParams + params = [[MTRScenesManagementClusterEnhancedViewSceneParams alloc] init]; } @@ -8677,7 +8574,7 @@ - (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()) @@ -8686,69 +8583,106 @@ - (void)resumeWithParams:(MTRRVCOperationalStateClusterResumeParams * _Nullable) expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:MTRRVCOperationalStateClusterOperationalCommandResponseParams.class + responseClass:MTRScenesManagementClusterEnhancedViewSceneResponseParams.class + queue:self.callbackQueue + completion:responseHandler]; +} + +- (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 = [[MTRScenesManagementClusterCopySceneParams + alloc] init]; + } + + 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 + expectedValues:expectedValues + expectedValueInterval:expectedValueIntervalMs + timedInvokeTimeout:timedInvokeTimeoutMs + serverSideProcessingTimeout:params.serverSideProcessingTimeout + 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:@(MTRClusterIDTypeScenesManagementID) attributeID:@(MTRAttributeIDTypeClusterScenesManagementAttributeSceneCountID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeCurrentSceneWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesManagementID) attributeID:@(MTRAttributeIDTypeClusterScenesManagementAttributeCurrentSceneID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeCurrentGroupWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributePhaseListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesManagementID) attributeID:@(MTRAttributeIDTypeClusterScenesManagementAttributeCurrentGroupID) params:params]; } -- (NSDictionary * _Nullable)readAttributeCurrentPhaseWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeSceneValidWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeCurrentPhaseID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesManagementID) attributeID:@(MTRAttributeIDTypeClusterScenesManagementAttributeSceneValidID) params:params]; } -- (NSDictionary * _Nullable)readAttributeCountdownTimeWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeNameSupportWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeCountdownTimeID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesManagementID) attributeID:@(MTRAttributeIDTypeClusterScenesManagementAttributeNameSupportID) params:params]; } -- (NSDictionary * _Nullable)readAttributeOperationalStateListWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeLastConfiguredByWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeOperationalStateListID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesManagementID) attributeID:@(MTRAttributeIDTypeClusterScenesManagementAttributeLastConfiguredByID) params:params]; } -- (NSDictionary * _Nullable)readAttributeOperationalStateWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeSceneTableSizeWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeOperationalStateID) params:params]; + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeScenesManagementID) attributeID:@(MTRAttributeIDTypeClusterScenesManagementAttributeSceneTableSizeID) params:params]; } -- (NSDictionary * _Nullable)readAttributeOperationalErrorWithParams:(MTRReadParams * _Nullable)params +- (NSDictionary * _Nullable)readAttributeFabricSceneInfoWithParams:(MTRReadParams * _Nullable)params { - return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeRVCOperationalStateID) attributeID:@(MTRAttributeIDTypeClusterRVCOperationalStateAttributeOperationalErrorID) params: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 @@ -12478,6 +12412,207 @@ - (void)clearWeeklyScheduleWithParams:(MTRThermostatClusterClearWeeklySchedulePa completion:responseHandler]; } +- (void)setActiveScheduleRequestWithParams:(MTRThermostatClusterSetActiveScheduleRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRThermostatClusterSetActiveScheduleRequestParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Thermostat::Commands::SetActiveScheduleRequest::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)setActivePresetRequestWithParams:(MTRThermostatClusterSetActivePresetRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRThermostatClusterSetActivePresetRequestParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Thermostat::Commands::SetActivePresetRequest::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)startPresetsSchedulesEditRequestWithParams:(MTRThermostatClusterStartPresetsSchedulesEditRequestParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRThermostatClusterStartPresetsSchedulesEditRequestParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Thermostat::Commands::StartPresetsSchedulesEditRequest::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)cancelPresetsSchedulesEditRequestWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + [self cancelPresetsSchedulesEditRequestWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; +} +- (void)cancelPresetsSchedulesEditRequestWithParams:(MTRThermostatClusterCancelPresetsSchedulesEditRequestParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRThermostatClusterCancelPresetsSchedulesEditRequestParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Thermostat::Commands::CancelPresetsSchedulesEditRequest::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)commitPresetsSchedulesRequestWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + [self commitPresetsSchedulesRequestWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; +} +- (void)commitPresetsSchedulesRequestWithParams:(MTRThermostatClusterCommitPresetsSchedulesRequestParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRThermostatClusterCommitPresetsSchedulesRequestParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Thermostat::Commands::CommitPresetsSchedulesRequest::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)cancelSetActivePresetRequestWithExpectedValues:(NSArray *> *)expectedValues expectedValueInterval:(NSNumber *)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + [self cancelSetActivePresetRequestWithParams:nil expectedValues:expectedValues expectedValueInterval:expectedValueIntervalMs completion:completion]; +} +- (void)cancelSetActivePresetRequestWithParams:(MTRThermostatClusterCancelSetActivePresetRequestParams * _Nullable)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRThermostatClusterCancelSetActivePresetRequestParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Thermostat::Commands::CancelSetActivePresetRequest::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)setTemperatureSetpointHoldPolicyWithParams:(MTRThermostatClusterSetTemperatureSetpointHoldPolicyParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +{ + if (params == nil) { + params = [[MTRThermostatClusterSetTemperatureSetpointHoldPolicyParams + alloc] init]; + } + + auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { + completion(error); + }; + + auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; + + using RequestType = Thermostat::Commands::SetTemperatureSetpointHoldPolicy::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)readAttributeLocalTemperatureWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeLocalTemperatureID) params:params]; @@ -13020,6 +13155,98 @@ - (void)writeAttributeACCapacityformatWithValue:(NSDictionary *) [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeACCapacityformatID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } +- (NSDictionary * _Nullable)readAttributePresetTypesWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributePresetTypesID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeScheduleTypesWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeScheduleTypesID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeNumberOfPresetsWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeNumberOfPresetsID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeNumberOfSchedulesWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeNumberOfSchedulesID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeNumberOfScheduleTransitionsWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeNumberOfScheduleTransitionsID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeNumberOfScheduleTransitionPerDayWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeNumberOfScheduleTransitionPerDayID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeActivePresetHandleWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeActivePresetHandleID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeActiveScheduleHandleWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeActiveScheduleHandleID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributePresetsWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributePresetsID) params:params]; +} + +- (void)writeAttributePresetsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributePresetsWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributePresetsWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributePresetsID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeSchedulesWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeSchedulesID) params:params]; +} + +- (void)writeAttributeSchedulesWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeSchedulesWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeSchedulesWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeSchedulesID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributePresetsSchedulesEditableWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributePresetsSchedulesEditableID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeTemperatureSetpointHoldPolicyWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeTemperatureSetpointHoldPolicyID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeSetpointHoldExpiryTimestampWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeSetpointHoldExpiryTimestampID) params:params]; +} + +- (NSDictionary * _Nullable)readAttributeQueuedPresetWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeQueuedPresetID) params:params]; +} + - (NSDictionary * _Nullable)readAttributeGeneratedCommandListWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:@(self.endpoint) clusterID:@(MTRClusterIDTypeThermostatID) attributeID:@(MTRAttributeIDTypeClusterThermostatAttributeGeneratedCommandListID) params:params]; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h index 5f90f0d869be60..d5b65a7fbc4feb 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,178 +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 - -@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 * _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). - * - * 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_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)); - -@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). - * - * 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 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 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 * _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). - * - * 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 - -@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 +@interface MTRNetworkCommissioningClusterConnectNetworkParams : 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 networkID 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) 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). * @@ -2656,11 +2257,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 MTRGeneralCommissioningClusterArmFailSafeResponseParams : NSObject +@interface MTRNetworkCommissioningClusterConnectNetworkResponseParams : NSObject -@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 networkingStatus 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)); +@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 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). * @@ -2678,7 +2281,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 MTRGeneralCommissioningClusterArmFailSafeResponseParams with a response-value dictionary + * Initialize an MTRNetworkCommissioningClusterConnectNetworkResponseParams 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 @@ -2692,13 +2295,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 MTRGeneralCommissioningClusterSetRegulatoryConfigParams : NSObject +@interface MTRNetworkCommissioningClusterReorderNetworkParams : 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) NSData * _Nonnull networkID 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 networkIndex 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) 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). * @@ -2725,12 +2328,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 MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams : NSObject +MTR_PROVISIONALLY_AVAILABLE +@interface MTRNetworkCommissioningClusterQueryIdentityParams : 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 keyIdentifier MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSString * _Nonnull debugText 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). * @@ -2745,10 +2348,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 MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams 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 MTRNetworkCommissioningClusterQueryIdentityResponseParams : NSObject + +@property (nonatomic, copy) NSData * _Nonnull identity MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSData * _Nullable possessionSignature MTR_PROVISIONALLY_AVAILABLE; + +/** + * 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 @@ -2758,11 +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 MTRGeneralCommissioningClusterCommissioningCompleteParams : NSObject +@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)); + +@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). * @@ -2790,11 +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 MTRGeneralCommissioningClusterCommissioningCompleteResponseParams : NSObject +@interface MTRDiagnosticLogsClusterRetrieveLogsResponseParams : NSObject -@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 status 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)); +@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)); + +@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 @@ -3196,18 +2798,44 @@ MTR_PROVISIONALLY_AVAILABLE * 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; +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRTimeSynchronizationClusterSetDSTOffsetParams : NSObject + +@property (nonatomic, copy) NSArray * _Nonnull dstOffset 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_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 MTRTimeSynchronizationClusterSetDefaultNTPParams : NSObject -@property (nonatomic, copy) NSString * _Nullable transferFileDesignator MTR_AVAILABLE(ios(16.5), macos(13.4), watchos(9.5), tvos(16.5)); +@property (nonatomic, copy) NSString * _Nullable defaultNTP MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -3235,15 +2863,17 @@ 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 MTRDiagnosticLogsClusterRetrieveLogsResponseParams : NSObject +@interface MTRAdministratorCommissioningClusterOpenCommissioningWindowParams : 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 commissioningTimeout 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) NSData * _Nonnull pakePasscodeVerifier 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)); +@property (nonatomic, copy) NSNumber * _Nonnull discriminator 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)); +@property (nonatomic, copy) NSNumber * _Nonnull iterations 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). * @@ -3258,35 +2888,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 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) - -@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)); +@interface MTRAdministratorCommissioningClusterOpenCommissioningWindowParams (Deprecated) -@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)); +@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 MTRGeneralDiagnosticsClusterTestEventTriggerParams : NSObject - -@property (nonatomic, copy) NSData * _Nonnull enableKey MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@interface MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull eventTrigger MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@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). * @@ -3313,8 +2935,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 MTRGeneralDiagnosticsClusterTimeSnapshotParams : NSObject +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). * @@ -3341,29 +2963,10 @@ 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; - -/** - * 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 - * 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 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,29 +3236,14 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_PROVISIONALLY_AVAILABLE -@interface MTRTimeSynchronizationClusterSetTimeZoneResponseParams : NSObject - -@property (nonatomic, copy) NSNumber * _Nonnull dstOffsetRequired MTR_PROVISIONALLY_AVAILABLE; +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTROperationalCredentialsClusterNOCResponseParams : NSObject -/** - * 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 - * 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 * _Nonnull statusCode MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -MTR_PROVISIONALLY_AVAILABLE -@interface MTRTimeSynchronizationClusterSetDSTOffsetParams : NSObject +@property (nonatomic, copy) NSNumber * _Nullable fabricIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSArray * _Nonnull dstOffset MTR_PROVISIONALLY_AVAILABLE; +@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). * @@ -3639,22 +3258,26 @@ MTR_PROVISIONALLY_AVAILABLE * 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 MTROperationalCredentialsClusterNOCResponseParams 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 MTRTimeSynchronizationClusterSetDefaultNTPParams : NSObject +MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) +@interface MTROperationalCredentialsClusterUpdateFabricLabelParams : NSObject -@property (nonatomic, copy) NSString * _Nullable defaultNTP 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). * @@ -3682,17 +3305,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 MTROperationalCredentialsClusterRemoveFabricParams : NSObject -@property (nonatomic, copy) NSData * _Nonnull salt MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@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). * @@ -3719,15 +3334,10 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -@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 +@interface MTROperationalCredentialsClusterAddTrustedRootCertificateParams : 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 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). * @@ -3754,8 +3364,15 @@ 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 MTRAdministratorCommissioningClusterRevokeCommissioningParams : NSObject +@interface MTRGroupKeyManagementClusterKeySetWriteParams : NSObject + +@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). * @@ -3783,9 +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 MTROperationalCredentialsClusterAttestationRequestParams : NSObject +@interface MTRGroupKeyManagementClusterKeySetReadParams : NSObject -@property (nonatomic, copy) NSData * _Nonnull attestationNonce MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@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). * @@ -3813,11 +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 MTROperationalCredentialsClusterAttestationResponseParams : NSObject - -@property (nonatomic, copy) NSData * _Nonnull attestationElements MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@interface MTRGroupKeyManagementClusterKeySetReadResponseParams : NSObject -@property (nonatomic, copy) NSData * _Nonnull attestationSignature MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +@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). * @@ -3835,7 +3450,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 MTROperationalCredentialsClusterAttestationResponseParams with a response-value dictionary + * Initialize an MTRGroupKeyManagementClusterKeySetReadResponseParams 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 @@ -3848,15 +3463,10 @@ 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 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 MTROperationalCredentialsClusterCertificateChainRequestParams : NSObject +@interface MTRGroupKeyManagementClusterKeySetRemoveParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull certificateType MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@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). * @@ -3884,45 +3494,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 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). - * - * 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 MTROperationalCredentialsClusterCertificateChainResponseParams 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 MTROperationalCredentialsClusterCSRRequestParams : 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 * _Nullable isForUpdateNOC 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). * @@ -3950,11 +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 MTROperationalCredentialsClusterCSRResponseParams : NSObject - -@property (nonatomic, copy) NSData * _Nonnull nocsrElements MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@interface MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams : NSObject -@property (nonatomic, copy) NSData * _Nonnull attestationSignature 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). * @@ -3972,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 MTROperationalCredentialsClusterCSRResponseParams 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 @@ -3985,18 +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 MTROperationalCredentialsClusterAddNOCParams : NSObject - -@property (nonatomic, copy) NSData * _Nonnull nocValue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +MTR_PROVISIONALLY_AVAILABLE +@interface MTRICDManagementClusterRegisterClientParams : NSObject -@property (nonatomic, copy) NSData * _Nullable icacValue 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) NSData * _Nonnull ipkValue 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) NSNumber * _Nonnull caseAdminSubject MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSData * _Nonnull key 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 +3591,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 MTROperationalCredentialsClusterUpdateNOCParams : NSObject +MTR_PROVISIONALLY_AVAILABLE +@interface MTRICDManagementClusterRegisterClientResponseParams : NSObject -@property (nonatomic, copy) NSData * _Nonnull nocValue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull icdCounter MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSData * _Nullable icacValue MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +/** + * 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 + * 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 MTRICDManagementClusterUnregisterClientParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull checkInNodeID MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSData * _Nullable verificationKey MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4055,14 +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 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)); - -@property (nonatomic, copy) NSString * _Nullable debugText 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). * @@ -4077,10 +3658,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 MTROperationalCredentialsClusterNOCResponseParams 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 MTRICDManagementClusterStayActiveResponseParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull promisedActiveDuration MTR_PROVISIONALLY_AVAILABLE; + +/** + * 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,9 @@ 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). * @@ -4539,7 +4101,30 @@ MTR_PROVISIONALLY_AVAILABLE @end MTR_PROVISIONALLY_AVAILABLE -@interface MTRTimerClusterResetTimerParams : NSObject +@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). * @@ -4566,10 +4151,31 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end -MTR_PROVISIONALLY_AVAILABLE -@interface MTRTimerClusterAddTimeParams : NSObject +MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) +@interface MTRRVCRunModeClusterChangeToModeResponseParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull additionalTime MTR_PROVISIONALLY_AVAILABLE; +@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)); /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4596,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 MTRTimerClusterReduceTimeParams : NSObject +@interface MTRTemperatureControlClusterSetTemperatureParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull timeReduction 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). * @@ -4627,7 +4256,9 @@ MTR_PROVISIONALLY_AVAILABLE @end MTR_PROVISIONALLY_AVAILABLE -@interface MTROvenCavityOperationalStateClusterPauseParams : NSObject +@interface MTRDishwasherModeClusterChangeToModeParams : NSObject + +@property (nonatomic, copy, getter=getNewMode) NSNumber * _Nonnull newMode MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4655,7 +4286,28 @@ MTR_PROVISIONALLY_AVAILABLE @end MTR_PROVISIONALLY_AVAILABLE -@interface MTROvenCavityOperationalStateClusterStopParams : NSObject +@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. + */ +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@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,17 @@ MTR_PROVISIONALLY_AVAILABLE @end MTR_PROVISIONALLY_AVAILABLE -@interface MTROvenCavityOperationalStateClusterOperationalCommandResponseParams : NSObject +@interface MTRMicrowaveOvenControlClusterSetCookingParametersParams : NSObject -@property (nonatomic, copy) MTROvenCavityOperationalStateClusterErrorStateStruct * _Nonnull commandResponseState MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable cookMode MTR_PROVISIONALLY_AVAILABLE; -/** - * 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 cookTime MTR_PROVISIONALLY_AVAILABLE; -MTR_PROVISIONALLY_AVAILABLE -@interface MTROvenModeClusterChangeToModeParams : NSObject +@property (nonatomic, copy) NSNumber * _Nullable powerSetting MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy, getter=getNewMode) NSNumber * _Nonnull newMode MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable wattSettingIndex MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nullable startAfterSetting MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -4788,30 +4433,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 +4462,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 +4490,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 +4518,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). * @@ -4958,43 +4534,20 @@ MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) * 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_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)); +@property (nonatomic, copy, nullable) NSNumber * timedInvokeTimeoutMs; /** - * Initialize an MTRRVCRunModeClusterChangeToModeResponseParams 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.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 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 +4575,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 +4593,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 +4622,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). * @@ -5105,28 +4650,7 @@ MTR_PROVISIONALLY_AVAILABLE @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. - */ -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error MTR_PROVISIONALLY_AVAILABLE; -@end - -MTR_PROVISIONALLY_AVAILABLE -@interface MTRSmokeCOAlarmClusterSelfTestRequestParams : NSObject +@interface MTRRVCOperationalStateClusterStartParams : NSObject /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -5153,10 +4677,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 +4705,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 +4763,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 +4818,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 +4878,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 +4931,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 +4984,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 +5041,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 +5071,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,39 +5093,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 -/** - * 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_PROVISIONALLY_AVAILABLE +@interface MTRScenesManagementClusterEnhancedAddSceneParams : 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 groupID MTR_PROVISIONALLY_AVAILABLE; -MTR_PROVISIONALLY_AVAILABLE -@interface MTRRVCOperationalStateClusterStopParams : NSObject +@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). * @@ -5465,7 +5135,34 @@ MTR_PROVISIONALLY_AVAILABLE @end MTR_PROVISIONALLY_AVAILABLE -@interface MTRRVCOperationalStateClusterStartParams : NSObject +@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; + +/** + * Initialize an MTRScenesManagementClusterEnhancedAddSceneResponseParams 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 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 +5189,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 +5256,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 +5276,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 @@ -7702,6 +7442,212 @@ 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 MTRThermostatClusterSetActiveScheduleRequestParams : NSObject + +@property (nonatomic, copy) NSData * _Nonnull scheduleHandle 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 MTRThermostatClusterSetActivePresetRequestParams : NSObject + +@property (nonatomic, copy) NSData * _Nonnull presetHandle MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nullable delayMinutes 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 MTRThermostatClusterStartPresetsSchedulesEditRequestParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull timeoutSeconds 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 MTRThermostatClusterCancelPresetsSchedulesEditRequestParams : 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; + +/** + * 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 MTRThermostatClusterCommitPresetsSchedulesRequestParams : 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; + +/** + * 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 MTRThermostatClusterCancelSetActivePresetRequestParams : 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; + +/** + * 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 MTRThermostatClusterSetTemperatureSetpointHoldPolicyParams : NSObject + +@property (nonatomic, copy) NSNumber * _Nonnull temperatureSetpointHoldPolicy 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 MTRFanControlClusterStepParams : NSObject diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm index 4090cfe1b4ed09..b5472ad77833a3 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,165 +2239,122 @@ - (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 +- (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); } { - if (decodableStruct.capacity.IsNull()) { - self.capacity = nil; + encodableStruct.stepSize = self.stepSize.unsignedCharValue; + } + { + if (self.transitionTime == nil) { + encodableStruct.transitionTime.SetNull(); } else { - self.capacity = [NSNumber numberWithUnsignedChar:decodableStruct.capacity.Value()]; + auto & nonNullValue_0 = encodableStruct.transitionTime.SetNonNull(); + nonNullValue_0 = self.transitionTime.unsignedShortValue; } } { - self.groupID = [NSNumber numberWithUnsignedShort:decodableStruct.groupID]; + encodableStruct.optionsMask = static_cast>(self.optionsMask.unsignedCharValue); } { - 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; - } + 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; + } + + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); -@implementation MTRScenesClusterGetSceneMembershipResponseParams (Deprecated) + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); -- (void)setGroupId:(NSNumber * _Nonnull)groupId -{ - self.groupID = groupId; + 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 MTRScenesClusterEnhancedAddSceneParams + +@implementation MTRLevelControlClusterStopWithOnOffParams - (instancetype)init { if (self = [super init]) { - _groupID = @(0); - - _sceneID = @(0); - - _transitionTime = @(0); - - _sceneName = @""; + _optionsMask = @(0); - _extensionFieldSets = [NSArray array]; + _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -2731,13 +2363,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRScenesClusterEnhancedAddSceneParams alloc] init]; + auto other = [[MTRLevelControlClusterStopWithOnOffParams alloc] init]; - 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; @@ -2746,76 +2375,23 @@ - (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:@"<%@: optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _optionsMask, _optionsOverride]; return descriptionString; } @end -@implementation MTRScenesClusterEnhancedAddSceneParams (InternalMethods) +@implementation MTRLevelControlClusterStopWithOnOffParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::Scenes::Commands::EnhancedAddScene::Type encodableStruct; + chip::app::Clusters::LevelControl::Commands::StopWithOnOff::Type encodableStruct; ListFreer listFreer; { - encodableStruct.groupID = self.groupID.unsignedShortValue; - } - { - encodableStruct.sceneID = self.sceneID.unsignedCharValue; - } - { - encodableStruct.transitionTime = self.transitionTime.unsignedShortValue; - } - { - encodableStruct.sceneName = AsCharSpan(self.sceneName); + encodableStruct.optionsMask = static_cast>(self.optionsMask.unsignedCharValue); } { - { - 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(); - } - } + encodableStruct.optionsOverride = static_cast>(self.optionsOverride.unsignedCharValue); } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -2856,151 +2432,93 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @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 +@implementation MTRLevelControlClusterMoveToClosestFrequencyParams - (instancetype)init { if (self = [super init]) { - _status = @(0); - - _groupID = @(0); - - _sceneID = @(0); + _frequency = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRScenesClusterEnhancedAddSceneResponseParams alloc] init]; + auto other = [[MTRLevelControlClusterMoveToClosestFrequencyParams alloc] init]; - other.status = self.status; - other.groupID = self.groupID; - other.sceneID = self.sceneID; + other.frequency = self.frequency; 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:@"<%@: frequency:%@; >", NSStringFromClass([self class]), _frequency]; return descriptionString; } -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error +@end + +@implementation MTRLevelControlClusterMoveToClosestFrequencyParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - if (!(self = [super init])) { - return nil; + chip::app::Clusters::LevelControl::Commands::MoveToClosestFrequency::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.frequency = self.frequency.unsignedShortValue; } - using DecodableType = chip::app::Clusters::Scenes::Commands::EnhancedAddSceneResponse::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)); - 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 + ReturnErrorOnFailure(writer.Finalize(&buffer)); -@implementation MTRScenesClusterEnhancedAddSceneResponseParams (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::EnhancedAddSceneResponse::DecodableType &)decodableStruct +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error { - { - self.status = [NSNumber numberWithUnsignedChar:decodableStruct.status]; - } - { - self.groupID = [NSNumber numberWithUnsignedShort:decodableStruct.groupID]; + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; } - { - self.sceneID = [NSNumber numberWithUnsignedChar:decodableStruct.sceneID]; + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } } - return CHIP_NO_ERROR; + return decodedObj; } - @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 +@implementation MTRActionsClusterInstantActionParams - (instancetype)init { if (self = [super init]) { - _groupID = @(0); + _actionID = @(0); - _sceneID = @(0); + _invokeID = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -3009,10 +2527,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRScenesClusterEnhancedViewSceneParams alloc] init]; + auto other = [[MTRActionsClusterInstantActionParams alloc] init]; - other.groupID = self.groupID; - other.sceneID = self.sceneID; + other.actionID = self.actionID; + other.invokeID = self.invokeID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -3021,23 +2539,26 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupID:%@; sceneID:%@; >", NSStringFromClass([self class]), _groupID, _sceneID]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: actionID:%@; invokeID:%@; >", NSStringFromClass([self class]), _actionID, _invokeID]; return descriptionString; } @end -@implementation MTRScenesClusterEnhancedViewSceneParams (InternalMethods) +@implementation MTRActionsClusterInstantActionParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::Scenes::Commands::EnhancedViewScene::Type encodableStruct; + chip::app::Clusters::Actions::Commands::InstantAction::Type encodableStruct; ListFreer listFreer; { - encodableStruct.groupID = self.groupID.unsignedShortValue; + encodableStruct.actionID = self.actionID.unsignedShortValue; } { - encodableStruct.sceneID = self.sceneID.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); @@ -3078,223 +2599,108 @@ - (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 MTRActionsClusterInstantActionWithTransitionParams - (instancetype)init { if (self = [super init]) { - _status = @(0); - - _groupID = @(0); - - _sceneID = @(0); - - _transitionTime = nil; + _actionID = @(0); - _sceneName = nil; + _invokeID = nil; - _extensionFieldSets = nil; + _transitionTime = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRScenesClusterEnhancedViewSceneResponseParams alloc] init]; + auto other = [[MTRActionsClusterInstantActionWithTransitionParams alloc] init]; - other.status = self.status; - other.groupID = self.groupID; - other.sceneID = self.sceneID; + other.actionID = self.actionID; + other.invokeID = self.invokeID; 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:@"<%@: status:%@; groupID:%@; sceneID:%@; transitionTime:%@; sceneName:%@; extensionFieldSets:%@; >", NSStringFromClass([self class]), _status, _groupID, _sceneID, _transitionTime, _sceneName, _extensionFieldSets]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: actionID:%@; invokeID:%@; transitionTime:%@; >", NSStringFromClass([self class]), _actionID, _invokeID, _transitionTime]; 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 MTRActionsClusterInstantActionWithTransitionParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::Scenes::Commands::EnhancedViewSceneResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { + chip::app::Clusters::Actions::Commands::InstantActionWithTransition::Type encodableStruct; + ListFreer listFreer; { - self.status = [NSNumber numberWithUnsignedChar:decodableStruct.status]; - } - { - self.groupID = [NSNumber numberWithUnsignedShort:decodableStruct.groupID]; - } - { - self.sceneID = [NSNumber numberWithUnsignedChar:decodableStruct.sceneID]; + encodableStruct.actionID = self.actionID.unsignedShortValue; } { - if (decodableStruct.transitionTime.HasValue()) { - self.transitionTime = [NSNumber numberWithUnsignedShort:decodableStruct.transitionTime.Value()]; - } else { - self.transitionTime = nil; + if (self.invokeID != nil) { + auto & definedValue_0 = encodableStruct.invokeID.Emplace(); + definedValue_0 = self.invokeID.unsignedIntValue; } } { - 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.transitionTime = self.transitionTime.unsignedShortValue; } - { - 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 MTRActionsClusterStartActionParams - (instancetype)init { if (self = [super init]) { - _mode = @(0); + _actionID = @(0); - _groupIdentifierFrom = @(0); - - _sceneIdentifierFrom = @(0); - - _groupIdentifierTo = @(0); - - _sceneIdentifierTo = @(0); + _invokeID = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -3303,13 +2709,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRScenesClusterCopySceneParams alloc] init]; + auto other = [[MTRActionsClusterStartActionParams alloc] init]; - other.mode = self.mode; - other.groupIdentifierFrom = self.groupIdentifierFrom; - other.sceneIdentifierFrom = self.sceneIdentifierFrom; - other.groupIdentifierTo = self.groupIdentifierTo; - other.sceneIdentifierTo = self.sceneIdentifierTo; + other.actionID = self.actionID; + other.invokeID = self.invokeID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -3318,32 +2721,26 @@ - (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:@"<%@: actionID:%@; invokeID:%@; >", NSStringFromClass([self class]), _actionID, _invokeID]; return descriptionString; } @end -@implementation MTRScenesClusterCopySceneParams (InternalMethods) +@implementation MTRActionsClusterStartActionParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::Scenes::Commands::CopyScene::Type encodableStruct; + chip::app::Clusters::Actions::Commands::StartAction::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.actionID = self.actionID.unsignedShortValue; } { - encodableStruct.sceneIdentifierTo = self.sceneIdentifierTo.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); @@ -3384,167 +2781,108 @@ - (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 MTRActionsClusterStartActionWithDurationParams - (instancetype)init { if (self = [super init]) { - _status = @(0); + _actionID = @(0); - _groupIdentifierFrom = @(0); + _invokeID = nil; - _sceneIdentifierFrom = @(0); + _duration = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRScenesClusterCopySceneResponseParams alloc] init]; + auto other = [[MTRActionsClusterStartActionWithDurationParams alloc] init]; - other.status = self.status; - other.groupIdentifierFrom = self.groupIdentifierFrom; - other.sceneIdentifierFrom = self.sceneIdentifierFrom; + other.actionID = self.actionID; + other.invokeID = self.invokeID; + other.duration = self.duration; 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:%@; duration:%@; >", NSStringFromClass([self class]), _actionID, _invokeID, _duration]; 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 MTRActionsClusterStartActionWithDurationParams (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::StartActionWithDuration::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]; + encodableStruct.duration = self.duration.unsignedIntValue; } - 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 MTRScenesClusterCopySceneResponseParams (Deprecated) + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); -- (void)setGroupIdFrom:(NSNumber * _Nonnull)groupIdFrom -{ - self.groupIdentifierFrom = groupIdFrom; -} + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); -- (NSNumber * _Nonnull)groupIdFrom -{ - return self.groupIdentifierFrom; -} + ReturnErrorOnFailure(writer.Finalize(&buffer)); -- (void)setSceneIdFrom:(NSNumber * _Nonnull)sceneIdFrom -{ - self.sceneIdentifierFrom = sceneIdFrom; + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); } -- (NSNumber * _Nonnull)sceneIdFrom +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error { - return self.sceneIdentifierFrom; + 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 MTROnOffClusterOffParams + +@implementation MTRActionsClusterStopActionParams - (instancetype)init { if (self = [super init]) { + + _actionID = @(0); + + _invokeID = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -3553,8 +2891,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROnOffClusterOffParams alloc] init]; + auto other = [[MTRActionsClusterStopActionParams alloc] init]; + other.actionID = self.actionID; + other.invokeID = self.invokeID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -3563,18 +2903,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 MTROnOffClusterOffParams (InternalMethods) +@implementation MTRActionsClusterStopActionParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::OnOff::Commands::Off::Type encodableStruct; + chip::app::Clusters::Actions::Commands::StopAction::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()) { @@ -3614,10 +2963,14 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROnOffClusterOnParams +@implementation MTRActionsClusterPauseActionParams - (instancetype)init { if (self = [super init]) { + + _actionID = @(0); + + _invokeID = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -3626,8 +2979,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROnOffClusterOnParams alloc] init]; + auto other = [[MTRActionsClusterPauseActionParams alloc] init]; + other.actionID = self.actionID; + other.invokeID = self.invokeID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -3636,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 MTROnOffClusterOnParams (InternalMethods) +@implementation MTRActionsClusterPauseActionParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::OnOff::Commands::On::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()) { @@ -3687,10 +3051,16 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROnOffClusterToggleParams +@implementation MTRActionsClusterPauseActionWithDurationParams - (instancetype)init { if (self = [super init]) { + + _actionID = @(0); + + _invokeID = nil; + + _duration = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -3699,8 +3069,11 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROnOffClusterToggleParams alloc] init]; + auto other = [[MTRActionsClusterPauseActionWithDurationParams alloc] init]; + other.actionID = self.actionID; + other.invokeID = self.invokeID; + other.duration = self.duration; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -3709,18 +3082,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 MTRActionsClusterPauseActionWithDurationParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::OnOff::Commands::Toggle::Type encodableStruct; + chip::app::Clusters::Actions::Commands::PauseActionWithDuration::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 +3145,14 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROnOffClusterOffWithEffectParams +@implementation MTRActionsClusterResumeActionParams - (instancetype)init { if (self = [super init]) { - _effectIdentifier = @(0); + _actionID = @(0); - _effectVariant = @(0); + _invokeID = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -3776,10 +3161,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROnOffClusterOffWithEffectParams alloc] init]; + auto other = [[MTRActionsClusterResumeActionParams 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 +3173,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 MTRActionsClusterResumeActionParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::OnOff::Commands::OffWithEffect::Type encodableStruct; + chip::app::Clusters::Actions::Commands::ResumeAction::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 +3233,104 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROnOffClusterOffWithEffectParams (Deprecated) +@implementation MTRActionsClusterEnableActionParams +- (instancetype)init +{ + if (self = [super init]) { -- (void)setEffectId:(NSNumber * _Nonnull)effectId + _actionID = @(0); + + _invokeID = nil; + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; { - self.effectIdentifier = effectId; + auto other = [[MTRActionsClusterEnableActionParams alloc] init]; + + other.actionID = self.actionID; + other.invokeID = self.invokeID; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; } -- (NSNumber * _Nonnull)effectId +- (NSString *)description { - return self.effectIdentifier; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: actionID:%@; invokeID:%@; >", NSStringFromClass([self class]), _actionID, _invokeID]; + return descriptionString; } + @end -@implementation MTROnOffClusterOnWithRecallGlobalSceneParams + +@implementation MTRActionsClusterEnableActionParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::Actions::Commands::EnableAction::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()) { + 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 MTRActionsClusterEnableActionWithDurationParams - (instancetype)init { if (self = [super init]) { + + _actionID = @(0); + + _invokeID = nil; + + _duration = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -3869,8 +3339,11 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROnOffClusterOnWithRecallGlobalSceneParams alloc] init]; + auto other = [[MTRActionsClusterEnableActionWithDurationParams alloc] init]; + other.actionID = self.actionID; + other.invokeID = self.invokeID; + other.duration = self.duration; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -3879,18 +3352,683 @@ - (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 MTROnOffClusterOnWithRecallGlobalSceneParams (InternalMethods) +@implementation MTRActionsClusterEnableActionWithDurationParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + 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; + } + + 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 MTRActionsClusterDisableActionParams +- (instancetype)init +{ + if (self = [super init]) { + + _actionID = @(0); + + _invokeID = nil; + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRActionsClusterDisableActionParams alloc] init]; + + other.actionID = self.actionID; + other.invokeID = self.invokeID; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: actionID:%@; invokeID:%@; >", NSStringFromClass([self class]), _actionID, _invokeID]; + return descriptionString; +} + +@end + +@implementation MTRActionsClusterDisableActionParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::Actions::Commands::DisableAction::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()) { + 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 MTRActionsClusterDisableActionWithDurationParams +- (instancetype)init +{ + if (self = [super init]) { + + _actionID = @(0); + + _invokeID = nil; + + _duration = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRActionsClusterDisableActionWithDurationParams alloc] init]; + + other.actionID = self.actionID; + other.invokeID = self.invokeID; + other.duration = self.duration; + 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]; + return descriptionString; +} + +@end + +@implementation MTRActionsClusterDisableActionWithDurationParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::Actions::Commands::DisableActionWithDuration::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()) { + 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 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 +- (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; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTROTASoftwareUpdateProviderClusterQueryImageParams 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.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (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]]; + return descriptionString; +} + +@end + +@implementation MTROTASoftwareUpdateProviderClusterQueryImageParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImage::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; + } + } + { + 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); + 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 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]) { + + _status = @(0); + + _delayedActionTime = nil; + + _imageURI = nil; + + _softwareVersion = nil; + + _softwareVersionString = nil; + + _updateToken = nil; + + _userConsentNeeded = nil; + + _metadataForRequestor = nil; + _timedInvokeTimeoutMs = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTROTASoftwareUpdateProviderClusterQueryImageResponseParams 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.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + 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 * 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 MTROTASoftwareUpdateProviderClusterQueryImageResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImageResponse::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; + } + } + { + 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; + } + } + { + if (decodableStruct.updateToken.HasValue()) { + self.updateToken = AsData(decodableStruct.updateToken.Value()); + } else { + self.updateToken = nil; + } + } + { + if (decodableStruct.userConsentNeeded.HasValue()) { + self.userConsentNeeded = [NSNumber numberWithBool:decodableStruct.userConsentNeeded.Value()]; + } else { + self.userConsentNeeded = nil; + } + } + { + if (decodableStruct.metadataForRequestor.HasValue()) { + self.metadataForRequestor = AsData(decodableStruct.metadataForRequestor.Value()); + } else { + self.metadataForRequestor = nil; + } + } + return CHIP_NO_ERROR; +} + +@end + +@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]) { + + _updateToken = [NSData data]; + + _newVersion = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTROTASoftwareUpdateProviderClusterApplyUpdateRequestParams alloc] init]; + + other.updateToken = self.updateToken; + other.newVersion = self.newVersion; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: updateToken:%@; newVersion:%@; >", NSStringFromClass([self class]), [_updateToken base64EncodedStringWithOptions:0], _newVersion]; + return descriptionString; +} + +@end + +@implementation MTROTASoftwareUpdateProviderClusterApplyUpdateRequestParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::OnOff::Commands::OnWithRecallGlobalScene::Type encodableStruct; + chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::Type encodableStruct; ListFreer listFreer; + { + encodableStruct.updateToken = AsByteSpan(self.updateToken); + } + { + encodableStruct.newVersion = self.newVersion.unsignedIntValue; + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -3930,16 +4068,114 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROnOffClusterOnWithTimedOffParams +@implementation MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams +@dynamic updateToken; +@dynamic newVersion; + +@dynamic timedInvokeTimeoutMs; +@dynamic serverSideProcessingTimeout; +@end +@implementation MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams - (instancetype)init { if (self = [super init]) { - _onOffControl = @(0); + _action = @(0); - _onTime = @(0); + _delayedActionTime = @(0); + _timedInvokeTimeoutMs = nil; + } + return self; +} - _offWaitTime = @(0); +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams alloc] init]; + + other.action = self.action; + other.delayedActionTime = self.delayedActionTime; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: action:%@; delayedActionTime:%@; >", NSStringFromClass([self class]), _action, _delayedActionTime]; + return descriptionString; +} + +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error +{ + if (!(self = [super init])) { + return nil; + } + + 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 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 MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::DecodableType &)decodableStruct +{ + { + self.action = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.action)]; + } + { + self.delayedActionTime = [NSNumber numberWithUnsignedInt:decodableStruct.delayedActionTime]; + } + return CHIP_NO_ERROR; +} + +@end + +@implementation MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams +@dynamic action; +@dynamic delayedActionTime; + +@dynamic timedInvokeTimeoutMs; +@end +@implementation MTROTASoftwareUpdateProviderClusterNotifyUpdateAppliedParams +- (instancetype)init +{ + if (self = [super init]) { + + _updateToken = [NSData data]; + + _softwareVersion = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -3948,11 +4184,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROnOffClusterOnWithTimedOffParams alloc] init]; + auto other = [[MTROTASoftwareUpdateProviderClusterNotifyUpdateAppliedParams alloc] init]; - other.onOffControl = self.onOffControl; - other.onTime = self.onTime; - other.offWaitTime = self.offWaitTime; + other.updateToken = self.updateToken; + other.softwareVersion = self.softwareVersion; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -3961,26 +4196,23 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: onOffControl:%@; onTime:%@; offWaitTime:%@; >", NSStringFromClass([self class]), _onOffControl, _onTime, _offWaitTime]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: updateToken:%@; softwareVersion:%@; >", NSStringFromClass([self class]), [_updateToken base64EncodedStringWithOptions:0], _softwareVersion]; return descriptionString; } @end -@implementation MTROnOffClusterOnWithTimedOffParams (InternalMethods) +@implementation MTROTASoftwareUpdateProviderClusterNotifyUpdateAppliedParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::OnOff::Commands::OnWithTimedOff::Type encodableStruct; + chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::Type encodableStruct; ListFreer listFreer; { - encodableStruct.onOffControl = static_cast>(self.onOffControl.unsignedCharValue); - } - { - encodableStruct.onTime = self.onTime.unsignedShortValue; + encodableStruct.updateToken = AsByteSpan(self.updateToken); } { - encodableStruct.offWaitTime = self.offWaitTime.unsignedShortValue; + encodableStruct.softwareVersion = self.softwareVersion.unsignedIntValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -4021,18 +4253,27 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRLevelControlClusterMoveToLevelParams +@implementation MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams +@dynamic updateToken; +@dynamic softwareVersion; + +@dynamic timedInvokeTimeoutMs; +@dynamic serverSideProcessingTimeout; +@end +@implementation MTROTASoftwareUpdateRequestorClusterAnnounceOTAProviderParams - (instancetype)init { if (self = [super init]) { - _level = @(0); + _providerNodeID = @(0); - _transitionTime = nil; + _vendorID = @(0); - _optionsMask = @(0); + _announcementReason = @(0); - _optionsOverride = @(0); + _metadataForNode = nil; + + _endpoint = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -4041,12 +4282,13 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; + auto other = [[MTROTASoftwareUpdateRequestorClusterAnnounceOTAProviderParams alloc] init]; - other.level = self.level; - other.transitionTime = self.transitionTime; - other.optionsMask = self.optionsMask; - other.optionsOverride = self.optionsOverride; + 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; @@ -4055,34 +4297,35 @@ - (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:@"<%@: providerNodeID:%@; vendorID:%@; announcementReason:%@; metadataForNode:%@; endpoint:%@; >", NSStringFromClass([self class]), _providerNodeID, _vendorID, _announcementReason, [_metadataForNode base64EncodedStringWithOptions:0], _endpoint]; return descriptionString; } @end -@implementation MTRLevelControlClusterMoveToLevelParams (InternalMethods) +@implementation MTROTASoftwareUpdateRequestorClusterAnnounceOTAProviderParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type encodableStruct; + chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOTAProvider::Type encodableStruct; ListFreer listFreer; { - encodableStruct.level = self.level.unsignedCharValue; + encodableStruct.providerNodeID = self.providerNodeID.unsignedLongLongValue; } { - if (self.transitionTime == nil) { - encodableStruct.transitionTime.SetNull(); - } else { - auto & nonNullValue_0 = encodableStruct.transitionTime.SetNonNull(); - nonNullValue_0 = self.transitionTime.unsignedShortValue; - } + encodableStruct.vendorID = static_cast>(self.vendorID.unsignedShortValue); } { - encodableStruct.optionsMask = static_cast>(self.optionsMask.unsignedCharValue); + encodableStruct.announcementReason = static_cast>(self.announcementReason.unsignedCharValue); } { - encodableStruct.optionsOverride = static_cast>(self.optionsOverride.unsignedCharValue); + if (self.metadataForNode != nil) { + auto & definedValue_0 = encodableStruct.metadataForNode.Emplace(); + definedValue_0 = AsByteSpan(self.metadataForNode); + } + } + { + encodableStruct.endpoint = self.endpoint.unsignedShortValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -4123,18 +4366,45 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRLevelControlClusterMoveParams -- (instancetype)init +@implementation MTROtaSoftwareUpdateRequestorClusterAnnounceOtaProviderParams +@dynamic announcementReason; +@dynamic metadataForNode; +@dynamic endpoint; + +@dynamic timedInvokeTimeoutMs; +@dynamic serverSideProcessingTimeout; +@end + +@implementation MTROTASoftwareUpdateRequestorClusterAnnounceOTAProviderParams (Deprecated) + +- (void)setProviderNodeId:(NSNumber * _Nonnull)providerNodeId { - if (self = [super init]) { + self.providerNodeID = providerNodeId; +} - _moveMode = @(0); +- (NSNumber * _Nonnull)providerNodeId +{ + return self.providerNodeID; +} - _rate = nil; +- (void)setVendorId:(NSNumber * _Nonnull)vendorId +{ + self.vendorID = vendorId; +} - _optionsMask = @(0); +- (NSNumber * _Nonnull)vendorId +{ + return self.vendorID; +} +@end +@implementation MTRGeneralCommissioningClusterArmFailSafeParams +- (instancetype)init +{ + if (self = [super init]) { - _optionsOverride = @(0); + _expiryLengthSeconds = @(0); + + _breadcrumb = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -4143,12 +4413,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRLevelControlClusterMoveParams alloc] init]; + auto other = [[MTRGeneralCommissioningClusterArmFailSafeParams alloc] init]; - other.moveMode = self.moveMode; - other.rate = self.rate; - other.optionsMask = self.optionsMask; - other.optionsOverride = self.optionsOverride; + other.expiryLengthSeconds = self.expiryLengthSeconds; + other.breadcrumb = self.breadcrumb; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -4157,34 +4425,23 @@ - (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:@"<%@: expiryLengthSeconds:%@; breadcrumb:%@; >", NSStringFromClass([self class]), _expiryLengthSeconds, _breadcrumb]; return descriptionString; } @end -@implementation MTRLevelControlClusterMoveParams (InternalMethods) +@implementation MTRGeneralCommissioningClusterArmFailSafeParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::LevelControl::Commands::Move::Type encodableStruct; - ListFreer listFreer; - { - 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; - } - } + chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafe::Type encodableStruct; + ListFreer listFreer; { - encodableStruct.optionsMask = static_cast>(self.optionsMask.unsignedCharValue); + encodableStruct.expiryLengthSeconds = self.expiryLengthSeconds.unsignedShortValue; } { - encodableStruct.optionsOverride = static_cast>(self.optionsOverride.unsignedCharValue); + encodableStruct.breadcrumb = self.breadcrumb.unsignedLongLongValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -4225,122 +4482,107 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRLevelControlClusterStepParams +@implementation MTRGeneralCommissioningClusterArmFailSafeResponseParams - (instancetype)init { if (self = [super init]) { - _stepMode = @(0); - - _stepSize = @(0); - - _transitionTime = nil; - - _optionsMask = @(0); + _errorCode = @(0); - _optionsOverride = @(0); + _debugText = @""; _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRLevelControlClusterStepParams alloc] init]; + auto other = [[MTRGeneralCommissioningClusterArmFailSafeResponseParams alloc] init]; - other.stepMode = self.stepMode; - other.stepSize = self.stepSize; - other.transitionTime = self.transitionTime; - other.optionsMask = self.optionsMask; - other.optionsOverride = self.optionsOverride; + other.errorCode = self.errorCode; + other.debugText = self.debugText; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: stepMode:%@; stepSize:%@; transitionTime:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _stepMode, _stepSize, _transitionTime, _optionsMask, _optionsOverride]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: errorCode:%@; debugText:%@; >", NSStringFromClass([self class]), _errorCode, _debugText]; return descriptionString; } -@end - -@implementation MTRLevelControlClusterStepParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error { - chip::app::Clusters::LevelControl::Commands::Step::Type encodableStruct; - ListFreer listFreer; - { - encodableStruct.stepMode = static_cast>(self.stepMode.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); + 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 MTRLevelControlClusterStopParams +@implementation MTRGeneralCommissioningClusterSetRegulatoryConfigParams - (instancetype)init { if (self = [super init]) { - _optionsMask = @(0); + _newRegulatoryConfig = @(0); - _optionsOverride = @(0); + _countryCode = @""; + + _breadcrumb = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -4349,10 +4591,11 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRLevelControlClusterStopParams alloc] init]; + auto other = [[MTRGeneralCommissioningClusterSetRegulatoryConfigParams alloc] init]; - other.optionsMask = self.optionsMask; - other.optionsOverride = self.optionsOverride; + other.newRegulatoryConfig = self.newRegulatoryConfig; + other.countryCode = self.countryCode; + other.breadcrumb = self.breadcrumb; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -4361,23 +4604,26 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _optionsMask, _optionsOverride]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: newRegulatoryConfig:%@; countryCode:%@; breadcrumb:%@; >", NSStringFromClass([self class]), _newRegulatoryConfig, _countryCode, _breadcrumb]; return descriptionString; } @end -@implementation MTRLevelControlClusterStopParams (InternalMethods) +@implementation MTRGeneralCommissioningClusterSetRegulatoryConfigParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::LevelControl::Commands::Stop::Type encodableStruct; + chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfig::Type encodableStruct; ListFreer listFreer; { - encodableStruct.optionsMask = static_cast>(self.optionsMask.unsignedCharValue); + encodableStruct.newRegulatoryConfig = static_cast>(self.newRegulatoryConfig.unsignedCharValue); } { - encodableStruct.optionsOverride = static_cast>(self.optionsOverride.unsignedCharValue); + encodableStruct.countryCode = AsCharSpan(self.countryCode); + } + { + encodableStruct.breadcrumb = self.breadcrumb.unsignedLongLongValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -4418,120 +4664,101 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRLevelControlClusterMoveToLevelWithOnOffParams +@implementation MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams - (instancetype)init { if (self = [super init]) { - _level = @(0); - - _transitionTime = nil; - - _optionsMask = @(0); + _errorCode = @(0); - _optionsOverride = @(0); + _debugText = @""; _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRLevelControlClusterMoveToLevelWithOnOffParams alloc] init]; + auto other = [[MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams alloc] init]; - other.level = self.level; - other.transitionTime = self.transitionTime; - other.optionsMask = self.optionsMask; - other.optionsOverride = self.optionsOverride; + other.errorCode = self.errorCode; + other.debugText = self.debugText; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: level:%@; transitionTime:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _level, _transitionTime, _optionsMask, _optionsOverride]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: errorCode:%@; debugText:%@; >", NSStringFromClass([self class]), _errorCode, _debugText]; return descriptionString; } -@end - -@implementation MTRLevelControlClusterMoveToLevelWithOnOffParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error { - chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type encodableStruct; - ListFreer listFreer; - { - 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); + 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 -{ - 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 MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfigResponse::DecodableType &)decodableStruct +{ + { + self.errorCode = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.errorCode)]; + } + { + 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 MTRLevelControlClusterMoveWithOnOffParams +@implementation MTRGeneralCommissioningClusterCommissioningCompleteParams - (instancetype)init { if (self = [super init]) { - - _moveMode = @(0); - - _rate = nil; - - _optionsMask = @(0); - - _optionsOverride = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -4540,12 +4767,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRLevelControlClusterMoveWithOnOffParams alloc] init]; + auto other = [[MTRGeneralCommissioningClusterCommissioningCompleteParams alloc] init]; - other.moveMode = self.moveMode; - other.rate = self.rate; - other.optionsMask = self.optionsMask; - other.optionsOverride = self.optionsOverride; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -4554,35 +4777,18 @@ - (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:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } @end -@implementation MTRLevelControlClusterMoveWithOnOffParams (InternalMethods) +@implementation MTRGeneralCommissioningClusterCommissioningCompleteParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::LevelControl::Commands::MoveWithOnOff::Type encodableStruct; + chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type encodableStruct; ListFreer listFreer; - { - 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); if (buffer.IsNull()) { @@ -4622,122 +4828,105 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRLevelControlClusterStepWithOnOffParams +@implementation MTRGeneralCommissioningClusterCommissioningCompleteResponseParams - (instancetype)init { if (self = [super init]) { - _stepMode = @(0); - - _stepSize = @(0); - - _transitionTime = nil; - - _optionsMask = @(0); + _errorCode = @(0); - _optionsOverride = @(0); + _debugText = @""; _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRLevelControlClusterStepWithOnOffParams alloc] init]; + auto other = [[MTRGeneralCommissioningClusterCommissioningCompleteResponseParams alloc] init]; - other.stepMode = self.stepMode; - other.stepSize = self.stepSize; - other.transitionTime = self.transitionTime; - other.optionsMask = self.optionsMask; - other.optionsOverride = self.optionsOverride; + other.errorCode = self.errorCode; + other.debugText = self.debugText; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: stepMode:%@; stepSize:%@; transitionTime:%@; optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _stepMode, _stepSize, _transitionTime, _optionsMask, _optionsOverride]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: errorCode:%@; debugText:%@; >", NSStringFromClass([self class]), _errorCode, _debugText]; return descriptionString; } -@end - -@implementation MTRLevelControlClusterStepWithOnOffParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error { - chip::app::Clusters::LevelControl::Commands::StepWithOnOff::Type encodableStruct; - ListFreer listFreer; - { - encodableStruct.stepMode = static_cast>(self.stepMode.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); + 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 MTRLevelControlClusterStopWithOnOffParams +@implementation MTRNetworkCommissioningClusterScanNetworksParams - (instancetype)init { if (self = [super init]) { - _optionsMask = @(0); + _ssid = nil; - _optionsOverride = @(0); + _breadcrumb = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -4746,10 +4935,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRLevelControlClusterStopWithOnOffParams alloc] init]; + auto other = [[MTRNetworkCommissioningClusterScanNetworksParams alloc] init]; - other.optionsMask = self.optionsMask; - other.optionsOverride = self.optionsOverride; + other.ssid = self.ssid; + other.breadcrumb = self.breadcrumb; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -4758,23 +4947,34 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: optionsMask:%@; optionsOverride:%@; >", NSStringFromClass([self class]), _optionsMask, _optionsOverride]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: ssid:%@; breadcrumb:%@; >", NSStringFromClass([self class]), [_ssid base64EncodedStringWithOptions:0], _breadcrumb]; return descriptionString; } @end -@implementation MTRLevelControlClusterStopWithOnOffParams (InternalMethods) +@implementation MTRNetworkCommissioningClusterScanNetworksParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::LevelControl::Commands::StopWithOnOff::Type encodableStruct; + chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworks::Type encodableStruct; ListFreer listFreer; { - encodableStruct.optionsMask = static_cast>(self.optionsMask.unsignedCharValue); + 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); + } + } } { - encodableStruct.optionsOverride = static_cast>(self.optionsOverride.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); @@ -4815,93 +5015,183 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRLevelControlClusterMoveToClosestFrequencyParams +@implementation MTRNetworkCommissioningClusterScanNetworksResponseParams - (instancetype)init { if (self = [super init]) { - _frequency = @(0); + _networkingStatus = @(0); + + _debugText = nil; + + _wiFiScanResults = nil; + + _threadScanResults = nil; _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRLevelControlClusterMoveToClosestFrequencyParams alloc] init]; + auto other = [[MTRNetworkCommissioningClusterScanNetworksResponseParams alloc] init]; - other.frequency = self.frequency; + 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:@"<%@: frequency:%@; >", NSStringFromClass([self class]), _frequency]; - return descriptionString; +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: networkingStatus:%@; debugText:%@; wiFiScanResults:%@; threadScanResults:%@; >", NSStringFromClass([self class]), _networkingStatus, _debugText, _wiFiScanResults, _threadScanResults]; + return descriptionString; +} + +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error +{ + if (!(self = [super init])) { + return nil; + } + + 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 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 MTRLevelControlClusterMoveToClosestFrequencyParams (InternalMethods) +@implementation MTRNetworkCommissioningClusterScanNetworksResponseParams (InternalMethods) -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworksResponse::DecodableType &)decodableStruct { - chip::app::Clusters::LevelControl::Commands::MoveToClosestFrequency::Type encodableStruct; - ListFreer listFreer; { - encodableStruct.frequency = self.frequency.unsignedShortValue; + self.networkingStatus = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.networkingStatus)]; } - - auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); - if (buffer.IsNull()) { - return CHIP_ERROR_NO_MEMORY; + { + 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::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.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 nil; } - - auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); - if (decodedObj == nil) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + { + 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 decodedObj; + return CHIP_NO_ERROR; } + @end -@implementation MTRActionsClusterInstantActionParams +@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; } @@ -4910,10 +5200,14 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRActionsClusterInstantActionParams 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; @@ -4922,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 MTRActionsClusterInstantActionParams (InternalMethods) +@implementation MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::Actions::Commands::InstantAction::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); } } @@ -4982,16 +5297,14 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRActionsClusterInstantActionWithTransitionParams +@implementation MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams - (instancetype)init { if (self = [super init]) { - _actionID = @(0); - - _invokeID = nil; + _operationalDataset = [NSData data]; - _transitionTime = @(0); + _breadcrumb = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -5000,11 +5313,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRActionsClusterInstantActionWithTransitionParams alloc] init]; + auto other = [[MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams alloc] init]; - other.actionID = self.actionID; - other.invokeID = self.invokeID; - other.transitionTime = self.transitionTime; + other.operationalDataset = self.operationalDataset; + other.breadcrumb = self.breadcrumb; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -5013,30 +5325,27 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: actionID:%@; invokeID:%@; transitionTime:%@; >", NSStringFromClass([self class]), _actionID, _invokeID, _transitionTime]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: operationalDataset:%@; breadcrumb:%@; >", NSStringFromClass([self class]), [_operationalDataset base64EncodedStringWithOptions:0], _breadcrumb]; return descriptionString; } @end -@implementation MTRActionsClusterInstantActionWithTransitionParams (InternalMethods) +@implementation MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::Actions::Commands::InstantActionWithTransition::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.transitionTime = self.transitionTime.unsignedShortValue; - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -5076,14 +5385,14 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRActionsClusterStartActionParams +@implementation MTRNetworkCommissioningClusterRemoveNetworkParams - (instancetype)init { if (self = [super init]) { - _actionID = @(0); + _networkID = [NSData data]; - _invokeID = nil; + _breadcrumb = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -5092,10 +5401,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRActionsClusterStartActionParams alloc] init]; + auto other = [[MTRNetworkCommissioningClusterRemoveNetworkParams alloc] init]; - other.actionID = self.actionID; - other.invokeID = self.invokeID; + other.networkID = self.networkID; + other.breadcrumb = self.breadcrumb; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -5104,25 +5413,25 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: actionID:%@; invokeID:%@; >", NSStringFromClass([self class]), _actionID, _invokeID]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: networkID:%@; breadcrumb:%@; >", NSStringFromClass([self class]), [_networkID base64EncodedStringWithOptions:0], _breadcrumb]; return descriptionString; } @end -@implementation MTRActionsClusterStartActionParams (InternalMethods) +@implementation MTRNetworkCommissioningClusterRemoveNetworkParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::Actions::Commands::StartAction::Type encodableStruct; + chip::app::Clusters::NetworkCommissioning::Commands::RemoveNetwork::Type encodableStruct; ListFreer listFreer; { - encodableStruct.actionID = self.actionID.unsignedShortValue; + encodableStruct.networkID = AsByteSpan(self.networkID); } { - 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; } } @@ -5164,108 +5473,139 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRActionsClusterStartActionWithDurationParams +@implementation MTRNetworkCommissioningClusterNetworkConfigResponseParams - (instancetype)init { if (self = [super init]) { - _actionID = @(0); + _networkingStatus = @(0); - _invokeID = nil; + _debugText = nil; - _duration = @(0); + _networkIndex = nil; + + _clientIdentity = nil; + + _possessionSignature = nil; _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRActionsClusterStartActionWithDurationParams alloc] init]; + auto other = [[MTRNetworkCommissioningClusterNetworkConfigResponseParams alloc] init]; - other.actionID = self.actionID; - other.invokeID = self.invokeID; - other.duration = self.duration; + 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.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:%@; networkIndex:%@; clientIdentity:%@; possessionSignature:%@; >", NSStringFromClass([self class]), _networkingStatus, _debugText, _networkIndex, [_clientIdentity base64EncodedStringWithOptions:0], [_possessionSignature base64EncodedStringWithOptions:0]]; 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::NetworkCommissioning::Commands::NetworkConfigResponse::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 MTRNetworkCommissioningClusterNetworkConfigResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::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.networkIndex.HasValue()) { + self.networkIndex = [NSNumber numberWithUnsignedChar:decodableStruct.networkIndex.Value()]; + } else { + self.networkIndex = nil; } } - return decodedObj; + { + if (decodableStruct.clientIdentity.HasValue()) { + self.clientIdentity = AsData(decodableStruct.clientIdentity.Value()); + } else { + self.clientIdentity = nil; + } + } + { + if (decodableStruct.possessionSignature.HasValue()) { + self.possessionSignature = AsData(decodableStruct.possessionSignature.Value()); + } else { + self.possessionSignature = nil; + } + } + return CHIP_NO_ERROR; } + @end -@implementation MTRActionsClusterStopActionParams +@implementation MTRNetworkCommissioningClusterConnectNetworkParams - (instancetype)init { if (self = [super init]) { - _actionID = @(0); + _networkID = [NSData data]; - _invokeID = nil; + _breadcrumb = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -5274,10 +5614,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRActionsClusterStopActionParams alloc] init]; + auto other = [[MTRNetworkCommissioningClusterConnectNetworkParams alloc] init]; - other.actionID = self.actionID; - other.invokeID = self.invokeID; + other.networkID = self.networkID; + other.breadcrumb = self.breadcrumb; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -5286,25 +5626,25 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: actionID:%@; invokeID:%@; >", NSStringFromClass([self class]), _actionID, _invokeID]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: networkID:%@; breadcrumb:%@; >", NSStringFromClass([self class]), [_networkID base64EncodedStringWithOptions:0], _breadcrumb]; return descriptionString; } @end -@implementation MTRActionsClusterStopActionParams (InternalMethods) +@implementation MTRNetworkCommissioningClusterConnectNetworkParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::Actions::Commands::StopAction::Type encodableStruct; + chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetwork::Type encodableStruct; ListFreer listFreer; { - encodableStruct.actionID = self.actionID.unsignedShortValue; + encodableStruct.networkID = AsByteSpan(self.networkID); } { - 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; } } @@ -5346,104 +5686,121 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRActionsClusterPauseActionParams +@implementation MTRNetworkCommissioningClusterConnectNetworkResponseParams - (instancetype)init { if (self = [super init]) { - _actionID = @(0); + _networkingStatus = @(0); - _invokeID = nil; + _debugText = nil; + + _errorValue = nil; _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRActionsClusterPauseActionParams alloc] init]; + auto other = [[MTRNetworkCommissioningClusterConnectNetworkResponseParams alloc] init]; - other.actionID = self.actionID; - other.invokeID = self.invokeID; + other.networkingStatus = self.networkingStatus; + other.debugText = self.debugText; + other.errorValue = self.errorValue; 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:@"<%@: networkingStatus:%@; debugText:%@; errorValue:%@; >", NSStringFromClass([self class]), _networkingStatus, _debugText, _errorValue]; 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::NetworkCommissioning::Commands::ConnectNetworkResponse::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 MTRNetworkCommissioningClusterConnectNetworkResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetworkResponse::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.errorValue.IsNull()) { + self.errorValue = nil; + } else { + self.errorValue = [NSNumber numberWithInt:decodableStruct.errorValue.Value()]; } } - return decodedObj; + return CHIP_NO_ERROR; } + @end -@implementation MTRActionsClusterPauseActionWithDurationParams +@implementation MTRNetworkCommissioningClusterReorderNetworkParams - (instancetype)init { if (self = [super init]) { - _actionID = @(0); + _networkID = [NSData data]; - _invokeID = nil; + _networkIndex = @(0); - _duration = @(0); + _breadcrumb = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -5452,11 +5809,11 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRActionsClusterPauseActionWithDurationParams alloc] init]; + auto other = [[MTRNetworkCommissioningClusterReorderNetworkParams alloc] init]; - other.actionID = self.actionID; - other.invokeID = self.invokeID; - other.duration = self.duration; + other.networkID = self.networkID; + other.networkIndex = self.networkIndex; + other.breadcrumb = self.breadcrumb; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -5465,29 +5822,29 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: actionID:%@; invokeID:%@; duration:%@; >", NSStringFromClass([self class]), _actionID, _invokeID, _duration]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: networkID:%@; networkIndex:%@; breadcrumb:%@; >", NSStringFromClass([self class]), [_networkID base64EncodedStringWithOptions:0], _networkIndex, _breadcrumb]; return descriptionString; } @end -@implementation MTRActionsClusterPauseActionWithDurationParams (InternalMethods) +@implementation MTRNetworkCommissioningClusterReorderNetworkParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::Actions::Commands::PauseActionWithDuration::Type encodableStruct; + chip::app::Clusters::NetworkCommissioning::Commands::ReorderNetwork::Type encodableStruct; ListFreer listFreer; { - encodableStruct.actionID = self.actionID.unsignedShortValue; + encodableStruct.networkID = AsByteSpan(self.networkID); } { - if (self.invokeID != nil) { - auto & definedValue_0 = encodableStruct.invokeID.Emplace(); - definedValue_0 = self.invokeID.unsignedIntValue; - } + encodableStruct.networkIndex = self.networkIndex.unsignedCharValue; } { - encodableStruct.duration = self.duration.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); @@ -5528,14 +5885,14 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRActionsClusterResumeActionParams +@implementation MTRNetworkCommissioningClusterQueryIdentityParams - (instancetype)init { if (self = [super init]) { - _actionID = @(0); + _keyIdentifier = [NSData data]; - _invokeID = nil; + _possessionNonce = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -5544,10 +5901,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRActionsClusterResumeActionParams alloc] init]; + auto other = [[MTRNetworkCommissioningClusterQueryIdentityParams alloc] init]; - other.actionID = self.actionID; - other.invokeID = self.invokeID; + other.keyIdentifier = self.keyIdentifier; + other.possessionNonce = self.possessionNonce; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -5556,25 +5913,25 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: actionID:%@; invokeID:%@; >", NSStringFromClass([self class]), _actionID, _invokeID]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: keyIdentifier:%@; possessionNonce:%@; >", NSStringFromClass([self class]), [_keyIdentifier base64EncodedStringWithOptions:0], [_possessionNonce base64EncodedStringWithOptions:0]]; return descriptionString; } @end -@implementation MTRActionsClusterResumeActionParams (InternalMethods) +@implementation MTRNetworkCommissioningClusterQueryIdentityParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::Actions::Commands::ResumeAction::Type encodableStruct; + chip::app::Clusters::NetworkCommissioning::Commands::QueryIdentity::Type encodableStruct; ListFreer listFreer; { - encodableStruct.actionID = self.actionID.unsignedShortValue; + encodableStruct.keyIdentifier = AsByteSpan(self.keyIdentifier); } { - if (self.invokeID != nil) { - auto & definedValue_0 = encodableStruct.invokeID.Emplace(); - definedValue_0 = self.invokeID.unsignedIntValue; + if (self.possessionNonce != nil) { + auto & definedValue_0 = encodableStruct.possessionNonce.Emplace(); + definedValue_0 = AsByteSpan(self.possessionNonce); } } @@ -5616,104 +5973,105 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRActionsClusterEnableActionParams +@implementation MTRNetworkCommissioningClusterQueryIdentityResponseParams - (instancetype)init { if (self = [super init]) { - _actionID = @(0); + _identity = [NSData data]; - _invokeID = nil; - _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; + _possessionSignature = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRActionsClusterEnableActionParams alloc] init]; + auto other = [[MTRNetworkCommissioningClusterQueryIdentityResponseParams alloc] init]; - other.actionID = self.actionID; - other.invokeID = self.invokeID; - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + other.identity = self.identity; + other.possessionSignature = self.possessionSignature; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: actionID:%@; invokeID:%@; >", NSStringFromClass([self class]), _actionID, _invokeID]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: identity:%@; possessionSignature:%@; >", NSStringFromClass([self class]), [_identity base64EncodedStringWithOptions:0], [_possessionSignature base64EncodedStringWithOptions:0]]; return descriptionString; } -@end - -@implementation MTRActionsClusterEnableActionParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error { - chip::app::Clusters::Actions::Commands::EnableAction::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::NetworkCommissioning::Commands::QueryIdentityResponse::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 MTRNetworkCommissioningClusterQueryIdentityResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::NetworkCommissioning::Commands::QueryIdentityResponse::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.identity = AsData(decodableStruct.identity); } - - auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); - if (decodedObj == nil) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + { + if (decodableStruct.possessionSignature.HasValue()) { + self.possessionSignature = AsData(decodableStruct.possessionSignature.Value()); + } else { + self.possessionSignature = nil; } } - return decodedObj; + return CHIP_NO_ERROR; } + @end -@implementation MTRActionsClusterEnableActionWithDurationParams +@implementation MTRDiagnosticLogsClusterRetrieveLogsRequestParams - (instancetype)init { if (self = [super init]) { - _actionID = @(0); + _intent = @(0); - _invokeID = nil; + _requestedProtocol = @(0); - _duration = @(0); + _transferFileDesignator = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -5722,11 +6080,11 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRActionsClusterEnableActionWithDurationParams alloc] init]; + auto other = [[MTRDiagnosticLogsClusterRetrieveLogsRequestParams alloc] init]; - other.actionID = self.actionID; - other.invokeID = self.invokeID; - other.duration = self.duration; + other.intent = self.intent; + other.requestedProtocol = self.requestedProtocol; + other.transferFileDesignator = self.transferFileDesignator; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -5735,29 +6093,29 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: actionID:%@; invokeID:%@; duration:%@; >", NSStringFromClass([self class]), _actionID, _invokeID, _duration]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: intent:%@; requestedProtocol:%@; transferFileDesignator:%@; >", NSStringFromClass([self class]), _intent, _requestedProtocol, _transferFileDesignator]; return descriptionString; } @end -@implementation MTRActionsClusterEnableActionWithDurationParams (InternalMethods) +@implementation MTRDiagnosticLogsClusterRetrieveLogsRequestParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::Actions::Commands::EnableActionWithDuration::Type encodableStruct; + chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsRequest::Type encodableStruct; ListFreer listFreer; { - encodableStruct.actionID = self.actionID.unsignedShortValue; + encodableStruct.intent = static_cast>(self.intent.unsignedCharValue); } { - if (self.invokeID != nil) { - auto & definedValue_0 = encodableStruct.invokeID.Emplace(); - definedValue_0 = self.invokeID.unsignedIntValue; - } + encodableStruct.requestedProtocol = static_cast>(self.requestedProtocol.unsignedCharValue); } { - encodableStruct.duration = self.duration.unsignedIntValue; + 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); @@ -5798,104 +6156,143 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRActionsClusterDisableActionParams +@implementation MTRDiagnosticLogsClusterRetrieveLogsResponseParams - (instancetype)init { if (self = [super init]) { - _actionID = @(0); + _status = @(0); - _invokeID = nil; + _logContent = [NSData data]; + + _utcTimeStamp = nil; + + _timeSinceBoot = nil; _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRActionsClusterDisableActionParams alloc] init]; + auto other = [[MTRDiagnosticLogsClusterRetrieveLogsResponseParams alloc] init]; - other.actionID = self.actionID; - other.invokeID = self.invokeID; + other.status = self.status; + other.logContent = self.logContent; + other.utcTimeStamp = self.utcTimeStamp; + other.timeSinceBoot = self.timeSinceBoot; 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:@"<%@: status:%@; logContent:%@; utcTimeStamp:%@; timeSinceBoot:%@; >", NSStringFromClass([self class]), _status, [_logContent base64EncodedStringWithOptions:0], _utcTimeStamp, _timeSinceBoot]; return descriptionString; } +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error +{ + if (!(self = [super init])) { + return nil; + } + + using DecodableType = chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsResponse::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 MTRActionsClusterDisableActionParams (InternalMethods) +@implementation MTRDiagnosticLogsClusterRetrieveLogsResponseParams (InternalMethods) -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsResponse::DecodableType &)decodableStruct { - chip::app::Clusters::Actions::Commands::DisableAction::Type encodableStruct; - ListFreer listFreer; { - encodableStruct.actionID = self.actionID.unsignedShortValue; + self.status = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.status)]; } { - if (self.invokeID != nil) { - auto & definedValue_0 = encodableStruct.invokeID.Emplace(); - definedValue_0 = self.invokeID.unsignedIntValue; + self.logContent = AsData(decodableStruct.logContent); + } + { + if (decodableStruct.UTCTimeStamp.HasValue()) { + self.utcTimeStamp = [NSNumber numberWithUnsignedLongLong:decodableStruct.UTCTimeStamp.Value()]; + } else { + self.utcTimeStamp = nil; } } - - auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); - if (buffer.IsNull()) { - return CHIP_ERROR_NO_MEMORY; + { + if (decodableStruct.timeSinceBoot.HasValue()) { + self.timeSinceBoot = [NSNumber numberWithUnsignedLongLong:decodableStruct.timeSinceBoot.Value()]; + } else { + self.timeSinceBoot = nil; + } } + return CHIP_NO_ERROR; +} - chip::System::PacketBufferTLVWriter writer; - // Commands never need chained buffers, since they cannot be chunked. - writer.Init(std::move(buffer), /* useChainedBuffers = */ false); +@end - ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); +@implementation MTRDiagnosticLogsClusterRetrieveLogsResponseParams (Deprecated) - ReturnErrorOnFailure(writer.Finalize(&buffer)); +- (void)setContent:(NSData * _Nonnull)content +{ + self.logContent = content; +} - reader.Init(std::move(buffer)); - return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +- (NSData * _Nonnull)content +{ + return self.logContent; } -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +- (void)setTimeStamp:(NSNumber * _Nullable)timeStamp { - chip::System::PacketBufferTLVReader reader; - CHIP_ERROR err = [self _encodeToTLVReader:reader]; - if (err != CHIP_NO_ERROR) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:err]; - } - return nil; - } + self.utcTimeStamp = timeStamp; +} - auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); - if (decodedObj == nil) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; - } - } - return decodedObj; +- (NSNumber * _Nullable)timeStamp +{ + return self.utcTimeStamp; } @end - -@implementation MTRActionsClusterDisableActionWithDurationParams +@implementation MTRGeneralDiagnosticsClusterTestEventTriggerParams - (instancetype)init { if (self = [super init]) { - _actionID = @(0); - - _invokeID = nil; + _enableKey = [NSData data]; - _duration = @(0); + _eventTrigger = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -5904,11 +6301,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRActionsClusterDisableActionWithDurationParams alloc] init]; + auto other = [[MTRGeneralDiagnosticsClusterTestEventTriggerParams alloc] init]; - other.actionID = self.actionID; - other.invokeID = self.invokeID; - other.duration = self.duration; + other.enableKey = self.enableKey; + other.eventTrigger = self.eventTrigger; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -5917,29 +6313,23 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: actionID:%@; invokeID:%@; duration:%@; >", NSStringFromClass([self class]), _actionID, _invokeID, _duration]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: enableKey:%@; eventTrigger:%@; >", NSStringFromClass([self class]), [_enableKey base64EncodedStringWithOptions:0], _eventTrigger]; return descriptionString; } @end -@implementation MTRActionsClusterDisableActionWithDurationParams (InternalMethods) +@implementation MTRGeneralDiagnosticsClusterTestEventTriggerParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::Actions::Commands::DisableActionWithDuration::Type encodableStruct; + chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::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.enableKey = AsByteSpan(self.enableKey); } { - encodableStruct.duration = self.duration.unsignedIntValue; + encodableStruct.eventTrigger = self.eventTrigger.unsignedLongLongValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -5980,7 +6370,7 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRBasicClusterMfgSpecificPingParams +@implementation MTRGeneralDiagnosticsClusterTimeSnapshotParams - (instancetype)init { if (self = [super init]) { @@ -5992,7 +6382,7 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRBasicClusterMfgSpecificPingParams alloc] init]; + auto other = [[MTRGeneralDiagnosticsClusterTimeSnapshotParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -6006,122 +6396,14 @@ - (NSString *)description 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; - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone; -{ - auto other = [[MTROTASoftwareUpdateProviderClusterQueryImageParams 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.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; - - return other; -} - -- (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]]; - return descriptionString; -} - @end -@implementation MTROTASoftwareUpdateProviderClusterQueryImageParams (InternalMethods) +@implementation MTRGeneralDiagnosticsClusterTimeSnapshotParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImage::Type encodableStruct; + chip::app::Clusters::GeneralDiagnostics::Commands::TimeSnapshot::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; - } - } - { - 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); if (buffer.IsNull()) { @@ -6147,99 +6429,45 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)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 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; -} + } + return nil; + } -- (NSNumber * _Nonnull)productId -{ - return self.productID; + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; } @end -@implementation MTROTASoftwareUpdateProviderClusterQueryImageResponseParams + +@implementation MTRGeneralDiagnosticsClusterTimeSnapshotResponseParams - (instancetype)init { if (self = [super init]) { - _status = @(0); - - _delayedActionTime = nil; - - _imageURI = nil; - - _softwareVersion = nil; - - _softwareVersionString = nil; - - _updateToken = nil; - - _userConsentNeeded = nil; + _systemTimeMs = @(0); - _metadataForRequestor = nil; - _timedInvokeTimeoutMs = nil; + _posixTimeMs = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROTASoftwareUpdateProviderClusterQueryImageResponseParams alloc] init]; + auto other = [[MTRGeneralDiagnosticsClusterTimeSnapshotResponseParams 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.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.systemTimeMs = self.systemTimeMs; + other.posixTimeMs = self.posixTimeMs; 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]]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: systemTimeMs:%@; posixTimeMs:%@; >", NSStringFromClass([self class]), _systemTimeMs, _posixTimeMs]; return descriptionString; } @@ -6250,7 +6478,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImageResponse::DecodableType; + using DecodableType = chip::app::Clusters::GeneralDiagnostics::Commands::TimeSnapshotResponse::DecodableType; chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue clusterID:DecodableType::GetClusterId() commandID:DecodableType::GetCommandId() @@ -6285,68 +6513,18 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r @end -@implementation MTROTASoftwareUpdateProviderClusterQueryImageResponseParams (InternalMethods) +@implementation MTRGeneralDiagnosticsClusterTimeSnapshotResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImageResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::GeneralDiagnostics::Commands::TimeSnapshotResponse::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; - } - } - { - 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; - } - } - { - if (decodableStruct.updateToken.HasValue()) { - self.updateToken = AsData(decodableStruct.updateToken.Value()); - } else { - self.updateToken = nil; - } - } - { - if (decodableStruct.userConsentNeeded.HasValue()) { - self.userConsentNeeded = [NSNumber numberWithBool:decodableStruct.userConsentNeeded.Value()]; - } else { - self.userConsentNeeded = nil; - } + self.systemTimeMs = [NSNumber numberWithUnsignedLongLong:decodableStruct.systemTimeMs]; } { - if (decodableStruct.metadataForRequestor.HasValue()) { - self.metadataForRequestor = AsData(decodableStruct.metadataForRequestor.Value()); + if (decodableStruct.posixTimeMs.IsNull()) { + self.posixTimeMs = nil; } else { - self.metadataForRequestor = nil; + self.posixTimeMs = [NSNumber numberWithUnsignedLongLong:decodableStruct.posixTimeMs.Value()]; } } return CHIP_NO_ERROR; @@ -6354,26 +6532,10 @@ - (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 MTRSoftwareDiagnosticsClusterResetWatermarksParams - (instancetype)init { if (self = [super init]) { - - _updateToken = [NSData data]; - - _newVersion = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -6382,10 +6544,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROTASoftwareUpdateProviderClusterApplyUpdateRequestParams alloc] init]; + auto other = [[MTRSoftwareDiagnosticsClusterResetWatermarksParams alloc] init]; - other.updateToken = self.updateToken; - other.newVersion = self.newVersion; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -6394,24 +6554,18 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: updateToken:%@; newVersion:%@; >", NSStringFromClass([self class]), [_updateToken base64EncodedStringWithOptions:0], _newVersion]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } @end -@implementation MTROTASoftwareUpdateProviderClusterApplyUpdateRequestParams (InternalMethods) +@implementation MTRSoftwareDiagnosticsClusterResetWatermarksParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::Type encodableStruct; + chip::app::Clusters::SoftwareDiagnostics::Commands::ResetWatermarks::Type encodableStruct; ListFreer listFreer; - { - encodableStruct.updateToken = AsByteSpan(self.updateToken); - } - { - encodableStruct.newVersion = self.newVersion.unsignedIntValue; - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -6451,114 +6605,83 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROtaSoftwareUpdateProviderClusterApplyUpdateRequestParams -@dynamic updateToken; -@dynamic newVersion; - -@dynamic timedInvokeTimeoutMs; -@dynamic serverSideProcessingTimeout; -@end -@implementation MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams +@implementation MTRThreadNetworkDiagnosticsClusterResetCountsParams - (instancetype)init { if (self = [super init]) { - - _action = @(0); - - _delayedActionTime = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams alloc] init]; + auto other = [[MTRThreadNetworkDiagnosticsClusterResetCountsParams alloc] init]; - other.action = self.action; - other.delayedActionTime = self.delayedActionTime; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: action:%@; delayedActionTime:%@; >", NSStringFromClass([self class]), _action, _delayedActionTime]; + 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::OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::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 MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams (InternalMethods) + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::DecodableType &)decodableStruct +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error { - { - self.action = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.action)]; + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; } - { - self.delayedActionTime = [NSNumber numberWithUnsignedInt:decodableStruct.delayedActionTime]; + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } } - return CHIP_NO_ERROR; + return decodedObj; } - -@end - -@implementation MTROtaSoftwareUpdateProviderClusterApplyUpdateResponseParams -@dynamic action; -@dynamic delayedActionTime; - -@dynamic timedInvokeTimeoutMs; @end -@implementation MTROTASoftwareUpdateProviderClusterNotifyUpdateAppliedParams -- (instancetype)init -{ - if (self = [super init]) { - _updateToken = [NSData data]; - - _softwareVersion = @(0); +@implementation MTRWiFiNetworkDiagnosticsClusterResetCountsParams +- (instancetype)init +{ + if (self = [super init]) { _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -6567,10 +6690,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROTASoftwareUpdateProviderClusterNotifyUpdateAppliedParams alloc] init]; + auto other = [[MTRWiFiNetworkDiagnosticsClusterResetCountsParams alloc] init]; - other.updateToken = self.updateToken; - other.softwareVersion = self.softwareVersion; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -6579,24 +6700,18 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: updateToken:%@; softwareVersion:%@; >", NSStringFromClass([self class]), [_updateToken base64EncodedStringWithOptions:0], _softwareVersion]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } @end -@implementation MTROTASoftwareUpdateProviderClusterNotifyUpdateAppliedParams (InternalMethods) +@implementation MTRWiFiNetworkDiagnosticsClusterResetCountsParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::Type encodableStruct; + chip::app::Clusters::WiFiNetworkDiagnostics::Commands::ResetCounts::Type encodableStruct; ListFreer listFreer; - { - encodableStruct.updateToken = AsByteSpan(self.updateToken); - } - { - encodableStruct.softwareVersion = self.softwareVersion.unsignedIntValue; - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -6636,27 +6751,10 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROtaSoftwareUpdateProviderClusterNotifyUpdateAppliedParams -@dynamic updateToken; -@dynamic softwareVersion; - -@dynamic timedInvokeTimeoutMs; -@dynamic serverSideProcessingTimeout; -@end -@implementation MTROTASoftwareUpdateRequestorClusterAnnounceOTAProviderParams +@implementation MTREthernetNetworkDiagnosticsClusterResetCountsParams - (instancetype)init { if (self = [super init]) { - - _providerNodeID = @(0); - - _vendorID = @(0); - - _announcementReason = @(0); - - _metadataForNode = nil; - - _endpoint = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -6665,13 +6763,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROTASoftwareUpdateRequestorClusterAnnounceOTAProviderParams alloc] init]; + auto other = [[MTREthernetNetworkDiagnosticsClusterResetCountsParams alloc] init]; - 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; @@ -6680,36 +6773,18 @@ - (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:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } @end -@implementation MTROTASoftwareUpdateRequestorClusterAnnounceOTAProviderParams (InternalMethods) +@implementation MTREthernetNetworkDiagnosticsClusterResetCountsParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::OtaSoftwareUpdateRequestor::Commands::AnnounceOTAProvider::Type encodableStruct; + chip::app::Clusters::EthernetNetworkDiagnostics::Commands::ResetCounts::Type encodableStruct; ListFreer listFreer; - { - encodableStruct.providerNodeID = self.providerNodeID.unsignedLongLongValue; - } - { - 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.endpoint = self.endpoint.unsignedShortValue; - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -6749,45 +6824,16 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@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 +@implementation MTRTimeSynchronizationClusterSetUTCTimeParams - (instancetype)init { if (self = [super init]) { - _expiryLengthSeconds = @(0); + _utcTime = @(0); - _breadcrumb = @(0); + _granularity = @(0); + + _timeSource = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -6796,10 +6842,11 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRGeneralCommissioningClusterArmFailSafeParams alloc] init]; + auto other = [[MTRTimeSynchronizationClusterSetUTCTimeParams alloc] init]; - other.expiryLengthSeconds = self.expiryLengthSeconds; - other.breadcrumb = self.breadcrumb; + other.utcTime = self.utcTime; + other.granularity = self.granularity; + other.timeSource = self.timeSource; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -6808,23 +6855,29 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: expiryLengthSeconds:%@; breadcrumb:%@; >", NSStringFromClass([self class]), _expiryLengthSeconds, _breadcrumb]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: utcTime:%@; granularity:%@; timeSource:%@; >", NSStringFromClass([self class]), _utcTime, _granularity, _timeSource]; return descriptionString; } @end -@implementation MTRGeneralCommissioningClusterArmFailSafeParams (InternalMethods) +@implementation MTRTimeSynchronizationClusterSetUTCTimeParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafe::Type encodableStruct; + chip::app::Clusters::TimeSynchronization::Commands::SetUTCTime::Type encodableStruct; ListFreer listFreer; { - encodableStruct.expiryLengthSeconds = self.expiryLengthSeconds.unsignedShortValue; + encodableStruct.UTCTime = self.utcTime.unsignedLongLongValue; } { - encodableStruct.breadcrumb = self.breadcrumb.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); + } } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -6865,107 +6918,105 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRGeneralCommissioningClusterArmFailSafeResponseParams +@implementation MTRTimeSynchronizationClusterSetUtcTimeParams +@dynamic utcTime; +@dynamic granularity; +@dynamic timeSource; + +@dynamic timedInvokeTimeoutMs; +@dynamic serverSideProcessingTimeout; +@end +@implementation MTRTimeSynchronizationClusterSetTrustedTimeSourceParams - (instancetype)init { if (self = [super init]) { - _errorCode = @(0); - - _debugText = @""; + _trustedTimeSource = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRGeneralCommissioningClusterArmFailSafeResponseParams alloc] init]; + auto other = [[MTRTimeSynchronizationClusterSetTrustedTimeSourceParams alloc] init]; - other.errorCode = self.errorCode; - other.debugText = self.debugText; + other.trustedTimeSource = self.trustedTimeSource; 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:@"<%@: trustedTimeSource:%@; >", NSStringFromClass([self class]), _trustedTimeSource]; return descriptionString; } -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error +@end + +@implementation MTRTimeSynchronizationClusterSetTrustedTimeSourceParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - if (!(self = [super init])) { - return nil; + chip::app::Clusters::TimeSynchronization::Commands::SetTrustedTimeSource::Type encodableStruct; + ListFreer listFreer; + { + 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; + } } - using DecodableType = chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafeResponse::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 MTRGeneralCommissioningClusterArmFailSafeResponseParams (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::ArmFailSafeResponse::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 MTRGeneralCommissioningClusterSetRegulatoryConfigParams +@implementation MTRTimeSynchronizationClusterSetTimeZoneParams - (instancetype)init { if (self = [super init]) { - _newRegulatoryConfig = @(0); - - _countryCode = @""; - - _breadcrumb = @(0); + _timeZone = [NSArray array]; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -6974,11 +7025,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRGeneralCommissioningClusterSetRegulatoryConfigParams alloc] init]; + auto other = [[MTRTimeSynchronizationClusterSetTimeZoneParams alloc] init]; - other.newRegulatoryConfig = self.newRegulatoryConfig; - other.countryCode = self.countryCode; - other.breadcrumb = self.breadcrumb; + other.timeZone = self.timeZone; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -6987,26 +7036,46 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: newRegulatoryConfig:%@; countryCode:%@; breadcrumb:%@; >", NSStringFromClass([self class]), _newRegulatoryConfig, _countryCode, _breadcrumb]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: timeZone:%@; >", NSStringFromClass([self class]), _timeZone]; return descriptionString; } @end -@implementation MTRGeneralCommissioningClusterSetRegulatoryConfigParams (InternalMethods) +@implementation MTRTimeSynchronizationClusterSetTimeZoneParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfig::Type encodableStruct; + chip::app::Clusters::TimeSynchronization::Commands::SetTimeZone::Type encodableStruct; ListFreer listFreer; { - encodableStruct.newRegulatoryConfig = static_cast>(self.newRegulatoryConfig.unsignedCharValue); - } - { - encodableStruct.countryCode = AsCharSpan(self.countryCode); - } - { - encodableStruct.breadcrumb = 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(); + } + } } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -7047,33 +7116,28 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams +@implementation MTRTimeSynchronizationClusterSetTimeZoneResponseParams - (instancetype)init { if (self = [super init]) { - _errorCode = @(0); - - _debugText = @""; - _timedInvokeTimeoutMs = nil; + _dstOffsetRequired = @(0); } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams alloc] init]; + auto other = [[MTRTimeSynchronizationClusterSetTimeZoneResponseParams alloc] init]; - other.errorCode = self.errorCode; - other.debugText = self.debugText; - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.dstOffsetRequired = self.dstOffsetRequired; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: errorCode:%@; debugText:%@; >", NSStringFromClass([self class]), _errorCode, _debugText]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: dstOffsetRequired:%@; >", NSStringFromClass([self class]), _dstOffsetRequired]; return descriptionString; } @@ -7084,7 +7148,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfigResponse::DecodableType; + using DecodableType = chip::app::Clusters::TimeSynchronization::Commands::SetTimeZoneResponse::DecodableType; chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue clusterID:DecodableType::GetClusterId() commandID:DecodableType::GetCommandId() @@ -7119,29 +7183,24 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r @end -@implementation MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams (InternalMethods) +@implementation MTRTimeSynchronizationClusterSetTimeZoneResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfigResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::TimeSynchronization::Commands::SetTimeZoneResponse::DecodableType &)decodableStruct { { - self.errorCode = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.errorCode)]; - } - { - self.debugText = AsString(decodableStruct.debugText); - if (self.debugText == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - return err; - } + self.dstOffsetRequired = [NSNumber numberWithBool:decodableStruct.DSTOffsetRequired]; } return CHIP_NO_ERROR; } @end -@implementation MTRGeneralCommissioningClusterCommissioningCompleteParams +@implementation MTRTimeSynchronizationClusterSetDSTOffsetParams - (instancetype)init { if (self = [super init]) { + + _dstOffset = [NSArray array]; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -7150,8 +7209,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRGeneralCommissioningClusterCommissioningCompleteParams alloc] init]; + auto other = [[MTRTimeSynchronizationClusterSetDSTOffsetParams alloc] init]; + other.dstOffset = self.dstOffset; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -7160,18 +7220,49 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: dstOffset:%@; >", NSStringFromClass([self class]), _dstOffset]; return descriptionString; } @end -@implementation MTRGeneralCommissioningClusterCommissioningCompleteParams (InternalMethods) +@implementation MTRTimeSynchronizationClusterSetDSTOffsetParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Type encodableStruct; + 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(); + } + } + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -7211,105 +7302,104 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRGeneralCommissioningClusterCommissioningCompleteResponseParams +@implementation MTRTimeSynchronizationClusterSetDefaultNTPParams - (instancetype)init { if (self = [super init]) { - _errorCode = @(0); - - _debugText = @""; + _defaultNTP = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRGeneralCommissioningClusterCommissioningCompleteResponseParams alloc] init]; + auto other = [[MTRTimeSynchronizationClusterSetDefaultNTPParams alloc] init]; - other.errorCode = self.errorCode; - other.debugText = self.debugText; + other.defaultNTP = self.defaultNTP; 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:@"<%@: 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::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 MTRAdministratorCommissioningClusterOpenCommissioningWindowParams - (instancetype)init { if (self = [super init]) { - _ssid = nil; + _commissioningTimeout = @(0); - _breadcrumb = nil; + _pakePasscodeVerifier = [NSData data]; + + _discriminator = @(0); + + _iterations = @(0); + + _salt = [NSData data]; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -7318,10 +7408,13 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRNetworkCommissioningClusterScanNetworksParams alloc] init]; + auto other = [[MTRAdministratorCommissioningClusterOpenCommissioningWindowParams alloc] init]; - other.ssid = self.ssid; - 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; @@ -7330,34 +7423,32 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: ssid:%@; breadcrumb:%@; >", NSStringFromClass([self class]), [_ssid base64EncodedStringWithOptions:0], _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 MTRNetworkCommissioningClusterScanNetworksParams (InternalMethods) +@implementation MTRAdministratorCommissioningClusterOpenCommissioningWindowParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworks::Type encodableStruct; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::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); - } - } + encodableStruct.commissioningTimeout = self.commissioningTimeout.unsignedShortValue; } { - if (self.breadcrumb != nil) { - auto & definedValue_0 = encodableStruct.breadcrumb.Emplace(); - definedValue_0 = self.breadcrumb.unsignedLongLongValue; - } + encodableStruct.PAKEPasscodeVerifier = AsByteSpan(self.pakePasscodeVerifier); + } + { + 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); @@ -7398,183 +7489,101 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRNetworkCommissioningClusterScanNetworksResponseParams +@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]) { - _networkingStatus = @(0); - - _debugText = nil; - - _wiFiScanResults = nil; - - _threadScanResults = nil; + _commissioningTimeout = @(0); _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRNetworkCommissioningClusterScanNetworksResponseParams alloc] init]; + auto other = [[MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; - other.networkingStatus = self.networkingStatus; - other.debugText = self.debugText; - other.wiFiScanResults = self.wiFiScanResults; - other.threadScanResults = self.threadScanResults; + other.commissioningTimeout = self.commissioningTimeout; 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:@"<%@: commissioningTimeout:%@; >", NSStringFromClass([self class]), _commissioningTimeout]; return descriptionString; } -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error +@end + +@implementation MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - if (!(self = [super init])) { - return nil; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.commissioningTimeout = self.commissioningTimeout.unsignedShortValue; } - 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 MTRAdministratorCommissioningClusterRevokeCommissioningParams - (instancetype)init { if (self = [super init]) { - - _ssid = [NSData data]; - - _credentials = [NSData data]; - - _breadcrumb = nil; - - _networkIdentity = nil; - - _clientIdentifier = nil; - - _possessionNonce = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -7583,14 +7592,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams alloc] init]; + auto other = [[MTRAdministratorCommissioningClusterRevokeCommissioningParams 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.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -7599,48 +7602,18 @@ - (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:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } @end -@implementation MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams (InternalMethods) +@implementation MTRAdministratorCommissioningClusterRevokeCommissioningParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::NetworkCommissioning::Commands::AddOrUpdateWiFiNetwork::Type encodableStruct; + chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::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); - } - } - { - 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); - } - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -7680,14 +7653,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams +@implementation MTROperationalCredentialsClusterAttestationRequestParams - (instancetype)init { if (self = [super init]) { - _operationalDataset = [NSData data]; - - _breadcrumb = nil; + _attestationNonce = [NSData data]; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -7696,10 +7667,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams alloc] init]; + auto other = [[MTROperationalCredentialsClusterAttestationRequestParams alloc] init]; - other.operationalDataset = self.operationalDataset; - other.breadcrumb = self.breadcrumb; + other.attestationNonce = self.attestationNonce; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -7708,26 +7678,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: operationalDataset:%@; breadcrumb:%@; >", NSStringFromClass([self class]), [_operationalDataset base64EncodedStringWithOptions:0], _breadcrumb]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: attestationNonce:%@; >", NSStringFromClass([self class]), [_attestationNonce base64EncodedStringWithOptions:0]]; return descriptionString; } @end -@implementation MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams (InternalMethods) +@implementation MTROperationalCredentialsClusterAttestationRequestParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::NetworkCommissioning::Commands::AddOrUpdateThreadNetwork::Type encodableStruct; + chip::app::Clusters::OperationalCredentials::Commands::AttestationRequest::Type encodableStruct; ListFreer listFreer; { - encodableStruct.operationalDataset = AsByteSpan(self.operationalDataset); - } - { - if (self.breadcrumb != nil) { - auto & definedValue_0 = encodableStruct.breadcrumb.Emplace(); - definedValue_0 = self.breadcrumb.unsignedLongLongValue; - } + encodableStruct.attestationNonce = AsByteSpan(self.attestationNonce); } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -7768,14 +7732,184 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRNetworkCommissioningClusterRemoveNetworkParams +@implementation MTROperationalCredentialsClusterAttestationResponseParams - (instancetype)init { if (self = [super init]) { - _networkID = [NSData data]; + _attestationElements = [NSData data]; - _breadcrumb = nil; + _attestationSignature = [NSData data]; + _timedInvokeTimeoutMs = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTROperationalCredentialsClusterAttestationResponseParams alloc] init]; + + other.attestationElements = self.attestationElements; + other.attestationSignature = self.attestationSignature; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: attestationElements:%@; attestationSignature:%@; >", NSStringFromClass([self class]), [_attestationElements base64EncodedStringWithOptions:0], [_attestationSignature 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::AttestationResponse::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) { + 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; + } + } + } + + 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 MTROperationalCredentialsClusterAttestationResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::OperationalCredentials::Commands::AttestationResponse::DecodableType &)decodableStruct +{ + { + self.attestationElements = AsData(decodableStruct.attestationElements); + } + { + self.attestationSignature = AsData(decodableStruct.attestationSignature); + } + return CHIP_NO_ERROR; +} + +@end + +@implementation MTROperationalCredentialsClusterAttestationResponseParams (Deprecated) + +- (void)setSignature:(NSData * _Nonnull)signature +{ + self.attestationSignature = signature; +} + +- (NSData * _Nonnull)signature +{ + return self.attestationSignature; +} +@end +@implementation MTROperationalCredentialsClusterCertificateChainRequestParams +- (instancetype)init +{ + if (self = [super init]) { + + _certificateType = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -7784,10 +7918,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRNetworkCommissioningClusterRemoveNetworkParams alloc] init]; + auto other = [[MTROperationalCredentialsClusterCertificateChainRequestParams alloc] init]; - other.networkID = self.networkID; - other.breadcrumb = self.breadcrumb; + other.certificateType = self.certificateType; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -7796,26 +7929,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: networkID:%@; breadcrumb:%@; >", NSStringFromClass([self class]), [_networkID base64EncodedStringWithOptions:0], _breadcrumb]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: certificateType:%@; >", NSStringFromClass([self class]), _certificateType]; return descriptionString; } @end -@implementation MTRNetworkCommissioningClusterRemoveNetworkParams (InternalMethods) +@implementation MTROperationalCredentialsClusterCertificateChainRequestParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::NetworkCommissioning::Commands::RemoveNetwork::Type encodableStruct; + chip::app::Clusters::OperationalCredentials::Commands::CertificateChainRequest::Type encodableStruct; ListFreer listFreer; { - encodableStruct.networkID = AsByteSpan(self.networkID); - } - { - if (self.breadcrumb != nil) { - auto & definedValue_0 = encodableStruct.breadcrumb.Emplace(); - definedValue_0 = self.breadcrumb.unsignedLongLongValue; - } + encodableStruct.certificateType = static_cast>(self.certificateType.unsignedCharValue); } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -7856,20 +7983,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRNetworkCommissioningClusterNetworkConfigResponseParams +@implementation MTROperationalCredentialsClusterCertificateChainResponseParams - (instancetype)init { if (self = [super init]) { - _networkingStatus = @(0); - - _debugText = nil; - - _networkIndex = nil; - - _clientIdentity = nil; - - _possessionSignature = nil; + _certificate = [NSData data]; _timedInvokeTimeoutMs = nil; } return self; @@ -7877,13 +7996,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRNetworkCommissioningClusterNetworkConfigResponseParams alloc] init]; + auto other = [[MTROperationalCredentialsClusterCertificateChainResponseParams alloc] init]; - other.networkingStatus = self.networkingStatus; - other.debugText = self.debugText; - other.networkIndex = self.networkIndex; - other.clientIdentity = self.clientIdentity; - other.possessionSignature = self.possessionSignature; + other.certificate = self.certificate; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; return other; @@ -7891,7 +8006,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (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:@"<%@: certificate:%@; >", NSStringFromClass([self class]), [_certificate base64EncodedStringWithOptions:0]]; return descriptionString; } @@ -7902,7 +8017,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::DecodableType; + using DecodableType = chip::app::Clusters::OperationalCredentials::Commands::CertificateChainResponse::DecodableType; chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue clusterID:DecodableType::GetClusterId() commandID:DecodableType::GetCommandId() @@ -7937,58 +8052,26 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r @end -@implementation MTRNetworkCommissioningClusterNetworkConfigResponseParams (InternalMethods) +@implementation MTROperationalCredentialsClusterCertificateChainResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::OperationalCredentials::Commands::CertificateChainResponse::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; - } - } - { - if (decodableStruct.possessionSignature.HasValue()) { - self.possessionSignature = AsData(decodableStruct.possessionSignature.Value()); - } else { - self.possessionSignature = nil; - } + self.certificate = AsData(decodableStruct.certificate); } return CHIP_NO_ERROR; } @end -@implementation MTRNetworkCommissioningClusterConnectNetworkParams +@implementation MTROperationalCredentialsClusterCSRRequestParams - (instancetype)init { if (self = [super init]) { - _networkID = [NSData data]; + _csrNonce = [NSData data]; - _breadcrumb = nil; + _isForUpdateNOC = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -7997,10 +8080,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRNetworkCommissioningClusterConnectNetworkParams alloc] init]; + auto other = [[MTROperationalCredentialsClusterCSRRequestParams alloc] init]; - other.networkID = self.networkID; - other.breadcrumb = self.breadcrumb; + other.csrNonce = self.csrNonce; + other.isForUpdateNOC = self.isForUpdateNOC; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -8009,25 +8092,25 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: networkID:%@; breadcrumb:%@; >", NSStringFromClass([self class]), [_networkID base64EncodedStringWithOptions:0], _breadcrumb]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: csrNonce:%@; isForUpdateNOC:%@; >", NSStringFromClass([self class]), [_csrNonce base64EncodedStringWithOptions:0], _isForUpdateNOC]; return descriptionString; } @end -@implementation MTRNetworkCommissioningClusterConnectNetworkParams (InternalMethods) +@implementation MTROperationalCredentialsClusterCSRRequestParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetwork::Type encodableStruct; + chip::app::Clusters::OperationalCredentials::Commands::CSRRequest::Type encodableStruct; ListFreer listFreer; { - encodableStruct.networkID = AsByteSpan(self.networkID); + encodableStruct.CSRNonce = AsByteSpan(self.csrNonce); } { - if (self.breadcrumb != nil) { - auto & definedValue_0 = encodableStruct.breadcrumb.Emplace(); - definedValue_0 = self.breadcrumb.unsignedLongLongValue; + if (self.isForUpdateNOC != nil) { + auto & definedValue_0 = encodableStruct.isForUpdateNOC.Emplace(); + definedValue_0 = self.isForUpdateNOC.boolValue; } } @@ -8069,16 +8152,14 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRNetworkCommissioningClusterConnectNetworkResponseParams +@implementation MTROperationalCredentialsClusterCSRResponseParams - (instancetype)init { if (self = [super init]) { - _networkingStatus = @(0); - - _debugText = nil; + _nocsrElements = [NSData data]; - _errorValue = nil; + _attestationSignature = [NSData data]; _timedInvokeTimeoutMs = nil; } return self; @@ -8086,11 +8167,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRNetworkCommissioningClusterConnectNetworkResponseParams alloc] init]; + auto other = [[MTROperationalCredentialsClusterCSRResponseParams alloc] init]; - other.networkingStatus = self.networkingStatus; - other.debugText = self.debugText; - other.errorValue = self.errorValue; + other.nocsrElements = self.nocsrElements; + other.attestationSignature = self.attestationSignature; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; return other; @@ -8098,7 +8178,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: networkingStatus:%@; debugText:%@; errorValue:%@; >", NSStringFromClass([self class]), _networkingStatus, _debugText, _errorValue]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: nocsrElements:%@; attestationSignature:%@; >", NSStringFromClass([self class]), [_nocsrElements base64EncodedStringWithOptions:0], [_attestationSignature base64EncodedStringWithOptions:0]]; return descriptionString; } @@ -8109,7 +8189,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetworkResponse::DecodableType; + using DecodableType = chip::app::Clusters::OperationalCredentials::Commands::CSRResponse::DecodableType; chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue clusterID:DecodableType::GetClusterId() commandID:DecodableType::GetCommandId() @@ -8144,46 +8224,35 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r @end -@implementation MTRNetworkCommissioningClusterConnectNetworkResponseParams (InternalMethods) +@implementation MTROperationalCredentialsClusterCSRResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetworkResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::OperationalCredentials::Commands::CSRResponse::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; - } + self.nocsrElements = AsData(decodableStruct.NOCSRElements); } { - if (decodableStruct.errorValue.IsNull()) { - self.errorValue = nil; - } else { - self.errorValue = [NSNumber numberWithInt:decodableStruct.errorValue.Value()]; - } + self.attestationSignature = AsData(decodableStruct.attestationSignature); } return CHIP_NO_ERROR; } @end -@implementation MTRNetworkCommissioningClusterReorderNetworkParams +@implementation MTROperationalCredentialsClusterAddNOCParams - (instancetype)init { if (self = [super init]) { - _networkID = [NSData data]; + _nocValue = [NSData data]; - _networkIndex = @(0); + _icacValue = nil; - _breadcrumb = nil; + _ipkValue = [NSData data]; + + _caseAdminSubject = @(0); + + _adminVendorId = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -8192,11 +8261,13 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRNetworkCommissioningClusterReorderNetworkParams alloc] init]; + auto other = [[MTROperationalCredentialsClusterAddNOCParams alloc] init]; - other.networkID = self.networkID; - other.networkIndex = self.networkIndex; - other.breadcrumb = self.breadcrumb; + 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; @@ -8205,29 +8276,35 @@ - (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:@"<%@: nocValue:%@; icacValue:%@; ipkValue:%@; caseAdminSubject:%@; adminVendorId:%@; >", NSStringFromClass([self class]), [_nocValue base64EncodedStringWithOptions:0], [_icacValue base64EncodedStringWithOptions:0], [_ipkValue base64EncodedStringWithOptions:0], _caseAdminSubject, _adminVendorId]; return descriptionString; } @end -@implementation MTRNetworkCommissioningClusterReorderNetworkParams (InternalMethods) +@implementation MTROperationalCredentialsClusterAddNOCParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::NetworkCommissioning::Commands::ReorderNetwork::Type encodableStruct; + chip::app::Clusters::OperationalCredentials::Commands::AddNOC::Type encodableStruct; ListFreer listFreer; { - encodableStruct.networkID = AsByteSpan(self.networkID); + encodableStruct.NOCValue = AsByteSpan(self.nocValue); } { - encodableStruct.networkIndex = self.networkIndex.unsignedCharValue; + if (self.icacValue != nil) { + auto & definedValue_0 = encodableStruct.ICACValue.Emplace(); + definedValue_0 = AsByteSpan(self.icacValue); + } } { - if (self.breadcrumb != nil) { - auto & definedValue_0 = encodableStruct.breadcrumb.Emplace(); - definedValue_0 = self.breadcrumb.unsignedLongLongValue; - } + 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); @@ -8268,14 +8345,14 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRNetworkCommissioningClusterQueryIdentityParams +@implementation MTROperationalCredentialsClusterUpdateNOCParams - (instancetype)init { if (self = [super init]) { - _keyIdentifier = [NSData data]; + _nocValue = [NSData data]; - _possessionNonce = nil; + _icacValue = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -8284,10 +8361,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRNetworkCommissioningClusterQueryIdentityParams alloc] init]; + auto other = [[MTROperationalCredentialsClusterUpdateNOCParams alloc] init]; - other.keyIdentifier = self.keyIdentifier; - other.possessionNonce = self.possessionNonce; + other.nocValue = self.nocValue; + other.icacValue = self.icacValue; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -8296,25 +8373,25 @@ - (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:@"<%@: nocValue:%@; icacValue:%@; >", NSStringFromClass([self class]), [_nocValue base64EncodedStringWithOptions:0], [_icacValue base64EncodedStringWithOptions:0]]; return descriptionString; } @end -@implementation MTRNetworkCommissioningClusterQueryIdentityParams (InternalMethods) +@implementation MTROperationalCredentialsClusterUpdateNOCParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::NetworkCommissioning::Commands::QueryIdentity::Type encodableStruct; + chip::app::Clusters::OperationalCredentials::Commands::UpdateNOC::Type encodableStruct; ListFreer listFreer; { - encodableStruct.keyIdentifier = AsByteSpan(self.keyIdentifier); + encodableStruct.NOCValue = AsByteSpan(self.nocValue); } { - if (self.possessionNonce != nil) { - auto & definedValue_0 = encodableStruct.possessionNonce.Emplace(); - definedValue_0 = AsByteSpan(self.possessionNonce); + if (self.icacValue != nil) { + auto & definedValue_0 = encodableStruct.ICACValue.Emplace(); + definedValue_0 = AsByteSpan(self.icacValue); } } @@ -8356,31 +8433,36 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRNetworkCommissioningClusterQueryIdentityResponseParams +@implementation MTROperationalCredentialsClusterNOCResponseParams - (instancetype)init { if (self = [super init]) { - _identity = [NSData data]; + _statusCode = @(0); - _possessionSignature = nil; + _fabricIndex = nil; + + _debugText = nil; + _timedInvokeTimeoutMs = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRNetworkCommissioningClusterQueryIdentityResponseParams alloc] init]; + auto other = [[MTROperationalCredentialsClusterNOCResponseParams alloc] init]; - other.identity = self.identity; - other.possessionSignature = self.possessionSignature; + other.statusCode = self.statusCode; + other.fabricIndex = self.fabricIndex; + other.debugText = self.debugText; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: identity:%@; possessionSignature:%@; >", NSStringFromClass([self class]), [_identity base64EncodedStringWithOptions:0], [_possessionSignature base64EncodedStringWithOptions:0]]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: statusCode:%@; fabricIndex:%@; debugText:%@; >", NSStringFromClass([self class]), _statusCode, _fabricIndex, _debugText]; return descriptionString; } @@ -8391,7 +8473,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::NetworkCommissioning::Commands::QueryIdentityResponse::DecodableType; + using DecodableType = chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType; chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue clusterID:DecodableType::GetClusterId() commandID:DecodableType::GetCommandId() @@ -8426,35 +8508,121 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r @end -@implementation MTRNetworkCommissioningClusterQueryIdentityResponseParams (InternalMethods) +@implementation MTROperationalCredentialsClusterNOCResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::NetworkCommissioning::Commands::QueryIdentityResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType &)decodableStruct { { - self.identity = AsData(decodableStruct.identity); + self.statusCode = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.statusCode)]; } { - if (decodableStruct.possessionSignature.HasValue()) { - self.possessionSignature = AsData(decodableStruct.possessionSignature.Value()); + if (decodableStruct.fabricIndex.HasValue()) { + self.fabricIndex = [NSNumber numberWithUnsignedChar:decodableStruct.fabricIndex.Value()]; } else { - self.possessionSignature = nil; + self.fabricIndex = 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; + } + } + return CHIP_NO_ERROR; +} + +@end + +@implementation MTROperationalCredentialsClusterUpdateFabricLabelParams +- (instancetype)init +{ + if (self = [super init]) { + + _label = @""; + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTROperationalCredentialsClusterUpdateFabricLabelParams alloc] init]; + + other.label = self.label; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: label:%@; >", NSStringFromClass([self class]), _label]; + return descriptionString; +} + +@end + +@implementation MTROperationalCredentialsClusterUpdateFabricLabelParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + 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()) { + 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; } - return CHIP_NO_ERROR; -} + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + } + } + return decodedObj; +} @end -@implementation MTRDiagnosticLogsClusterRetrieveLogsRequestParams +@implementation MTROperationalCredentialsClusterRemoveFabricParams - (instancetype)init { if (self = [super init]) { - _intent = @(0); - - _requestedProtocol = @(0); - - _transferFileDesignator = nil; + _fabricIndex = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -8463,11 +8631,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDiagnosticLogsClusterRetrieveLogsRequestParams alloc] init]; + auto other = [[MTROperationalCredentialsClusterRemoveFabricParams alloc] init]; - other.intent = self.intent; - other.requestedProtocol = self.requestedProtocol; - other.transferFileDesignator = self.transferFileDesignator; + other.fabricIndex = self.fabricIndex; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -8476,29 +8642,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:@"<%@: fabricIndex:%@; >", NSStringFromClass([self class]), _fabricIndex]; return descriptionString; } @end -@implementation MTRDiagnosticLogsClusterRetrieveLogsRequestParams (InternalMethods) +@implementation MTROperationalCredentialsClusterRemoveFabricParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsRequest::Type encodableStruct; + chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::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.fabricIndex = self.fabricIndex.unsignedCharValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -8539,143 +8696,103 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDiagnosticLogsClusterRetrieveLogsResponseParams +@implementation MTROperationalCredentialsClusterAddTrustedRootCertificateParams - (instancetype)init { if (self = [super init]) { - _status = @(0); - - _logContent = [NSData data]; - - _utcTimeStamp = nil; - - _timeSinceBoot = nil; + _rootCACertificate = [NSData data]; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDiagnosticLogsClusterRetrieveLogsResponseParams alloc] init]; + auto other = [[MTROperationalCredentialsClusterAddTrustedRootCertificateParams alloc] init]; - other.status = self.status; - other.logContent = self.logContent; - other.utcTimeStamp = self.utcTimeStamp; - other.timeSinceBoot = self.timeSinceBoot; + other.rootCACertificate = self.rootCACertificate; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; logContent:%@; utcTimeStamp:%@; timeSinceBoot:%@; >", NSStringFromClass([self class]), _status, [_logContent base64EncodedStringWithOptions:0], _utcTimeStamp, _timeSinceBoot]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: rootCACertificate:%@; >", NSStringFromClass([self class]), [_rootCACertificate base64EncodedStringWithOptions:0]]; return descriptionString; } -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error +@end + +@implementation MTROperationalCredentialsClusterAddTrustedRootCertificateParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - if (!(self = [super init])) { - return nil; + chip::app::Clusters::OperationalCredentials::Commands::AddTrustedRootCertificate::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.rootCACertificate = AsByteSpan(self.rootCACertificate); } - using DecodableType = chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsResponse::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 MTRDiagnosticLogsClusterRetrieveLogsResponseParams (InternalMethods) + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsResponse::DecodableType &)decodableStruct +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error { - { - 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; + 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.timeSinceBoot.HasValue()) { - self.timeSinceBoot = [NSNumber numberWithUnsignedLongLong:decodableStruct.timeSinceBoot.Value()]; - } else { - self.timeSinceBoot = 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 MTRDiagnosticLogsClusterRetrieveLogsResponseParams (Deprecated) - -- (void)setContent:(NSData * _Nonnull)content -{ - self.logContent = content; -} - -- (NSData * _Nonnull)content -{ - return self.logContent; -} +@implementation MTROperationalCredentialsClusterAddTrustedRootCertificateParams (Deprecated) -- (void)setTimeStamp:(NSNumber * _Nullable)timeStamp +- (void)setRootCertificate:(NSData * _Nonnull)rootCertificate { - self.utcTimeStamp = timeStamp; + self.rootCACertificate = rootCertificate; } -- (NSNumber * _Nullable)timeStamp +- (NSData * _Nonnull)rootCertificate { - return self.utcTimeStamp; + return self.rootCACertificate; } @end -@implementation MTRGeneralDiagnosticsClusterTestEventTriggerParams +@implementation MTRGroupKeyManagementClusterKeySetWriteParams - (instancetype)init { if (self = [super init]) { - _enableKey = [NSData data]; - - _eventTrigger = @(0); + _groupKeySet = [MTRGroupKeyManagementClusterGroupKeySetStruct new]; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -8684,10 +8801,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRGeneralDiagnosticsClusterTestEventTriggerParams alloc] init]; + auto other = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; - other.enableKey = self.enableKey; - other.eventTrigger = self.eventTrigger; + other.groupKeySet = self.groupKeySet; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -8696,23 +8812,57 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: enableKey:%@; eventTrigger:%@; >", NSStringFromClass([self class]), [_enableKey base64EncodedStringWithOptions:0], _eventTrigger]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupKeySet:%@; >", NSStringFromClass([self class]), _groupKeySet]; return descriptionString; } @end -@implementation MTRGeneralDiagnosticsClusterTestEventTriggerParams (InternalMethods) +@implementation MTRGroupKeyManagementClusterKeySetWriteParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type encodableStruct; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type encodableStruct; ListFreer listFreer; { - encodableStruct.enableKey = AsByteSpan(self.enableKey); - } - { - encodableStruct.eventTrigger = self.eventTrigger.unsignedLongLongValue; + 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; + } } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -8753,10 +8903,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRGeneralDiagnosticsClusterTimeSnapshotParams +@implementation MTRGroupKeyManagementClusterKeySetReadParams - (instancetype)init { if (self = [super init]) { + + _groupKeySetID = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -8765,8 +8917,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRGeneralDiagnosticsClusterTimeSnapshotParams alloc] init]; + auto other = [[MTRGroupKeyManagementClusterKeySetReadParams alloc] init]; + other.groupKeySetID = self.groupKeySetID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -8775,18 +8928,21 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupKeySetID:%@; >", NSStringFromClass([self class]), _groupKeySetID]; return descriptionString; } @end -@implementation MTRGeneralDiagnosticsClusterTimeSnapshotParams (InternalMethods) +@implementation MTRGroupKeyManagementClusterKeySetReadParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::GeneralDiagnostics::Commands::TimeSnapshot::Type encodableStruct; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type encodableStruct; ListFreer listFreer; + { + encodableStruct.groupKeySetID = self.groupKeySetID.unsignedShortValue; + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -8826,31 +8982,30 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRGeneralDiagnosticsClusterTimeSnapshotResponseParams +@implementation MTRGroupKeyManagementClusterKeySetReadResponseParams - (instancetype)init { if (self = [super init]) { - _systemTimeMs = @(0); - - _posixTimeMs = nil; + _groupKeySet = [MTRGroupKeyManagementClusterGroupKeySetStruct new]; + _timedInvokeTimeoutMs = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRGeneralDiagnosticsClusterTimeSnapshotResponseParams alloc] init]; + auto other = [[MTRGroupKeyManagementClusterKeySetReadResponseParams alloc] init]; - other.systemTimeMs = self.systemTimeMs; - other.posixTimeMs = self.posixTimeMs; + other.groupKeySet = self.groupKeySet; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: systemTimeMs:%@; posixTimeMs:%@; >", NSStringFromClass([self class]), _systemTimeMs, _posixTimeMs]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupKeySet:%@; >", NSStringFromClass([self class]), _groupKeySet]; return descriptionString; } @@ -8861,7 +9016,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::GeneralDiagnostics::Commands::TimeSnapshotResponse::DecodableType; + using DecodableType = chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::DecodableType; chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue clusterID:DecodableType::GetClusterId() commandID:DecodableType::GetCommandId() @@ -8896,18 +9051,43 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r @end -@implementation MTRGeneralDiagnosticsClusterTimeSnapshotResponseParams (InternalMethods) +@implementation MTRGroupKeyManagementClusterKeySetReadResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::GeneralDiagnostics::Commands::TimeSnapshotResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::DecodableType &)decodableStruct { { - self.systemTimeMs = [NSNumber numberWithUnsignedLongLong:decodableStruct.systemTimeMs]; - } - { - if (decodableStruct.posixTimeMs.IsNull()) { - self.posixTimeMs = nil; + 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.posixTimeMs = [NSNumber numberWithUnsignedLongLong:decodableStruct.posixTimeMs.Value()]; + 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; + } else { + self.groupKeySet.epochStartTime2 = [NSNumber numberWithUnsignedLongLong:decodableStruct.groupKeySet.epochStartTime2.Value()]; } } return CHIP_NO_ERROR; @@ -8915,10 +9095,12 @@ - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::GeneralD @end -@implementation MTRSoftwareDiagnosticsClusterResetWatermarksParams +@implementation MTRGroupKeyManagementClusterKeySetRemoveParams - (instancetype)init { if (self = [super init]) { + + _groupKeySetID = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -8927,8 +9109,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRSoftwareDiagnosticsClusterResetWatermarksParams alloc] init]; + auto other = [[MTRGroupKeyManagementClusterKeySetRemoveParams alloc] init]; + other.groupKeySetID = self.groupKeySetID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -8937,18 +9120,21 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupKeySetID:%@; >", NSStringFromClass([self class]), _groupKeySetID]; return descriptionString; } @end -@implementation MTRSoftwareDiagnosticsClusterResetWatermarksParams (InternalMethods) +@implementation MTRGroupKeyManagementClusterKeySetRemoveParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::SoftwareDiagnostics::Commands::ResetWatermarks::Type encodableStruct; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type encodableStruct; ListFreer listFreer; + { + encodableStruct.groupKeySetID = self.groupKeySetID.unsignedShortValue; + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -8988,7 +9174,7 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRThreadNetworkDiagnosticsClusterResetCountsParams +@implementation MTRGroupKeyManagementClusterKeySetReadAllIndicesParams - (instancetype)init { if (self = [super init]) { @@ -9000,7 +9186,7 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRThreadNetworkDiagnosticsClusterResetCountsParams alloc] init]; + auto other = [[MTRGroupKeyManagementClusterKeySetReadAllIndicesParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -9016,11 +9202,11 @@ - (NSString *)description @end -@implementation MTRThreadNetworkDiagnosticsClusterResetCountsParams (InternalMethods) +@implementation MTRGroupKeyManagementClusterKeySetReadAllIndicesParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::ThreadNetworkDiagnostics::Commands::ResetCounts::Type encodableStruct; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndices::Type encodableStruct; ListFreer listFreer; auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -9061,83 +9247,113 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRWiFiNetworkDiagnosticsClusterResetCountsParams +@implementation MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams - (instancetype)init { if (self = [super init]) { + + _groupKeySetIDs = [NSArray array]; _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRWiFiNetworkDiagnosticsClusterResetCountsParams 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 MTRWiFiNetworkDiagnosticsClusterResetCountsParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error { - chip::app::Clusters::WiFiNetworkDiagnostics::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::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 MTREthernetNetworkDiagnosticsClusterResetCountsParams +@implementation MTRICDManagementClusterRegisterClientParams - (instancetype)init { if (self = [super init]) { + + _checkInNodeID = @(0); + + _monitoredSubject = @(0); + + _key = [NSData data]; + + _verificationKey = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -9146,8 +9362,12 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTREthernetNetworkDiagnosticsClusterResetCountsParams alloc] init]; + auto other = [[MTRICDManagementClusterRegisterClientParams alloc] init]; + other.checkInNodeID = self.checkInNodeID; + other.monitoredSubject = self.monitoredSubject; + other.key = self.key; + other.verificationKey = self.verificationKey; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -9156,18 +9376,33 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: checkInNodeID:%@; monitoredSubject:%@; key:%@; verificationKey:%@; >", NSStringFromClass([self class]), _checkInNodeID, _monitoredSubject, [_key base64EncodedStringWithOptions:0], [_verificationKey base64EncodedStringWithOptions:0]]; return descriptionString; } @end -@implementation MTREthernetNetworkDiagnosticsClusterResetCountsParams (InternalMethods) +@implementation MTRICDManagementClusterRegisterClientParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::EthernetNetworkDiagnostics::Commands::ResetCounts::Type encodableStruct; + chip::app::Clusters::IcdManagement::Commands::RegisterClient::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); + } + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -9207,114 +9442,93 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRTimeSynchronizationClusterSetUTCTimeParams +@implementation MTRICDManagementClusterRegisterClientResponseParams - (instancetype)init { if (self = [super init]) { - _utcTime = @(0); - - _granularity = @(0); - - _timeSource = nil; - _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; + _icdCounter = @(0); } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRTimeSynchronizationClusterSetUTCTimeParams alloc] init]; + auto other = [[MTRICDManagementClusterRegisterClientResponseParams alloc] init]; - other.utcTime = self.utcTime; - other.granularity = self.granularity; - other.timeSource = self.timeSource; - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + other.icdCounter = self.icdCounter; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: utcTime:%@; granularity:%@; timeSource:%@; >", NSStringFromClass([self class]), _utcTime, _granularity, _timeSource]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: icdCounter:%@; >", NSStringFromClass([self class]), _icdCounter]; return descriptionString; } -@end - -@implementation MTRTimeSynchronizationClusterSetUTCTimeParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error { - chip::app::Clusters::TimeSynchronization::Commands::SetUTCTime::Type encodableStruct; - ListFreer listFreer; - { - encodableStruct.UTCTime = self.utcTime.unsignedLongLongValue; + if (!(self = [super init])) { + return nil; } - { - encodableStruct.granularity = static_cast>(self.granularity.unsignedCharValue); + + using DecodableType = chip::app::Clusters::IcdManagement::Commands::RegisterClientResponse::DecodableType; + chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue + clusterID:DecodableType::GetClusterId() + commandID:DecodableType::GetCommandId() + error:error]; + if (buffer.IsNull()) { + return nil; } - { - if (self.timeSource != nil) { - auto & definedValue_0 = encodableStruct.timeSource.Emplace(); - definedValue_0 = static_cast>(self.timeSource.unsignedCharValue); + + 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; + } } } - auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); - if (buffer.IsNull()) { - return CHIP_ERROR_NO_MEMORY; + 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; +} - 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)); +@end - reader.Init(std::move(buffer)); - return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); -} +@implementation MTRICDManagementClusterRegisterClientResponseParams (InternalMethods) -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::IcdManagement::Commands::RegisterClientResponse::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; - } - - auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); - if (decodedObj == nil) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; - } + { + self.icdCounter = [NSNumber numberWithUnsignedInt:decodableStruct.ICDCounter]; } - return decodedObj; + return CHIP_NO_ERROR; } -@end - -@implementation MTRTimeSynchronizationClusterSetUtcTimeParams -@dynamic utcTime; -@dynamic granularity; -@dynamic timeSource; -@dynamic timedInvokeTimeoutMs; -@dynamic serverSideProcessingTimeout; @end -@implementation MTRTimeSynchronizationClusterSetTrustedTimeSourceParams + +@implementation MTRICDManagementClusterUnregisterClientParams - (instancetype)init { if (self = [super init]) { - _trustedTimeSource = nil; + _checkInNodeID = @(0); + + _verificationKey = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -9323,9 +9537,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRTimeSynchronizationClusterSetTrustedTimeSourceParams alloc] init]; + auto other = [[MTRICDManagementClusterUnregisterClientParams alloc] init]; - other.trustedTimeSource = self.trustedTimeSource; + other.checkInNodeID = self.checkInNodeID; + other.verificationKey = self.verificationKey; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -9334,25 +9549,25 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: trustedTimeSource:%@; >", NSStringFromClass([self class]), _trustedTimeSource]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: checkInNodeID:%@; verificationKey:%@; >", NSStringFromClass([self class]), _checkInNodeID, [_verificationKey base64EncodedStringWithOptions:0]]; return descriptionString; } @end -@implementation MTRTimeSynchronizationClusterSetTrustedTimeSourceParams (InternalMethods) +@implementation MTRICDManagementClusterUnregisterClientParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::TimeSynchronization::Commands::SetTrustedTimeSource::Type encodableStruct; + chip::app::Clusters::IcdManagement::Commands::UnregisterClient::Type encodableStruct; ListFreer listFreer; { - 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; + encodableStruct.checkInNodeID = self.checkInNodeID.unsignedLongLongValue; + } + { + if (self.verificationKey != nil) { + auto & definedValue_0 = encodableStruct.verificationKey.Emplace(); + definedValue_0 = AsByteSpan(self.verificationKey); } } @@ -9394,12 +9609,10 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRTimeSynchronizationClusterSetTimeZoneParams +@implementation MTRICDManagementClusterStayActiveRequestParams - (instancetype)init { if (self = [super init]) { - - _timeZone = [NSArray array]; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -9408,9 +9621,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRTimeSynchronizationClusterSetTimeZoneParams alloc] init]; + auto other = [[MTRICDManagementClusterStayActiveRequestParams alloc] init]; - other.timeZone = self.timeZone; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -9419,47 +9631,18 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: timeZone:%@; >", NSStringFromClass([self class]), _timeZone]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } @end -@implementation MTRTimeSynchronizationClusterSetTimeZoneParams (InternalMethods) +@implementation MTRICDManagementClusterStayActiveRequestParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::TimeSynchronization::Commands::SetTimeZone::Type encodableStruct; + chip::app::Clusters::IcdManagement::Commands::StayActiveRequest::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(); - } - } - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -9499,28 +9682,28 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRTimeSynchronizationClusterSetTimeZoneResponseParams +@implementation MTRICDManagementClusterStayActiveResponseParams - (instancetype)init { if (self = [super init]) { - _dstOffsetRequired = @(0); + _promisedActiveDuration = @(0); } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRTimeSynchronizationClusterSetTimeZoneResponseParams alloc] init]; + auto other = [[MTRICDManagementClusterStayActiveResponseParams alloc] init]; - other.dstOffsetRequired = self.dstOffsetRequired; + other.promisedActiveDuration = self.promisedActiveDuration; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: dstOffsetRequired:%@; >", NSStringFromClass([self class]), _dstOffsetRequired]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: promisedActiveDuration:%@; >", NSStringFromClass([self class]), _promisedActiveDuration]; return descriptionString; } @@ -9531,7 +9714,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::TimeSynchronization::Commands::SetTimeZoneResponse::DecodableType; + using DecodableType = chip::app::Clusters::IcdManagement::Commands::StayActiveResponse::DecodableType; chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue clusterID:DecodableType::GetClusterId() commandID:DecodableType::GetCommandId() @@ -9565,132 +9748,25 @@ - (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) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader -{ - 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(); - } - } - } - - 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]; - } + +@implementation MTRICDManagementClusterStayActiveResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::IcdManagement::Commands::StayActiveResponse::DecodableType &)decodableStruct +{ + { + self.promisedActiveDuration = [NSNumber numberWithUnsignedInt:decodableStruct.promisedActiveDuration]; } - return decodedObj; + return CHIP_NO_ERROR; } + @end -@implementation MTRTimeSynchronizationClusterSetDefaultNTPParams +@implementation MTRTimerClusterSetTimerParams - (instancetype)init { if (self = [super init]) { - _defaultNTP = nil; + _newTime = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -9699,9 +9775,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRTimeSynchronizationClusterSetDefaultNTPParams alloc] init]; + auto other = [[MTRTimerClusterSetTimerParams alloc] init]; - other.defaultNTP = self.defaultNTP; + other.newTime = self.newTime; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -9710,25 +9786,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: defaultNTP:%@; >", NSStringFromClass([self class]), _defaultNTP]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: newTime:%@; >", NSStringFromClass([self class]), _newTime]; return descriptionString; } @end -@implementation MTRTimeSynchronizationClusterSetDefaultNTPParams (InternalMethods) +@implementation MTRTimerClusterSetTimerParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::TimeSynchronization::Commands::SetDefaultNTP::Type encodableStruct; + chip::app::Clusters::Timer::Commands::SetTimer::Type encodableStruct; ListFreer listFreer; { - if (self.defaultNTP == nil) { - encodableStruct.defaultNTP.SetNull(); - } else { - auto & nonNullValue_0 = encodableStruct.defaultNTP.SetNonNull(); - nonNullValue_0 = AsCharSpan(self.defaultNTP); - } + encodableStruct.newTime = self.newTime.unsignedIntValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -9769,20 +9840,10 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRAdministratorCommissioningClusterOpenCommissioningWindowParams +@implementation MTRTimerClusterResetTimerParams - (instancetype)init { if (self = [super init]) { - - _commissioningTimeout = @(0); - - _pakePasscodeVerifier = [NSData data]; - - _discriminator = @(0); - - _iterations = @(0); - - _salt = [NSData data]; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -9791,13 +9852,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRAdministratorCommissioningClusterOpenCommissioningWindowParams alloc] init]; + auto other = [[MTRTimerClusterResetTimerParams alloc] init]; - 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; @@ -9806,33 +9862,18 @@ - (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:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } @end -@implementation MTRAdministratorCommissioningClusterOpenCommissioningWindowParams (InternalMethods) +@implementation MTRTimerClusterResetTimerParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type encodableStruct; + chip::app::Clusters::Timer::Commands::ResetTimer::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); - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -9872,24 +9913,12 @@ - (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 MTRTimerClusterAddTimeParams - (instancetype)init { if (self = [super init]) { - _commissioningTimeout = @(0); + _additionalTime = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -9898,9 +9927,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams alloc] init]; + auto other = [[MTRTimerClusterAddTimeParams alloc] init]; - other.commissioningTimeout = self.commissioningTimeout; + other.additionalTime = self.additionalTime; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -9909,20 +9938,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: commissioningTimeout:%@; >", NSStringFromClass([self class]), _commissioningTimeout]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: additionalTime:%@; >", NSStringFromClass([self class]), _additionalTime]; return descriptionString; } @end -@implementation MTRAdministratorCommissioningClusterOpenBasicCommissioningWindowParams (InternalMethods) +@implementation MTRTimerClusterAddTimeParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type encodableStruct; + chip::app::Clusters::Timer::Commands::AddTime::Type encodableStruct; ListFreer listFreer; { - encodableStruct.commissioningTimeout = self.commissioningTimeout.unsignedShortValue; + encodableStruct.additionalTime = self.additionalTime.unsignedIntValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -9963,10 +9992,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRAdministratorCommissioningClusterRevokeCommissioningParams +@implementation MTRTimerClusterReduceTimeParams - (instancetype)init { if (self = [super init]) { + + _timeReduction = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -9975,8 +10006,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRAdministratorCommissioningClusterRevokeCommissioningParams alloc] init]; + auto other = [[MTRTimerClusterReduceTimeParams alloc] init]; + other.timeReduction = self.timeReduction; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -9985,18 +10017,21 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: timeReduction:%@; >", NSStringFromClass([self class]), _timeReduction]; return descriptionString; } @end -@implementation MTRAdministratorCommissioningClusterRevokeCommissioningParams (InternalMethods) +@implementation MTRTimerClusterReduceTimeParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Type encodableStruct; + chip::app::Clusters::Timer::Commands::ReduceTime::Type encodableStruct; ListFreer listFreer; + { + encodableStruct.timeReduction = self.timeReduction.unsignedIntValue; + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -10036,12 +10071,10 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROperationalCredentialsClusterAttestationRequestParams +@implementation MTROvenCavityOperationalStateClusterPauseParams - (instancetype)init { if (self = [super init]) { - - _attestationNonce = [NSData data]; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -10050,9 +10083,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROperationalCredentialsClusterAttestationRequestParams alloc] init]; + auto other = [[MTROvenCavityOperationalStateClusterPauseParams alloc] init]; - other.attestationNonce = self.attestationNonce; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -10061,21 +10093,18 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: attestationNonce:%@; >", NSStringFromClass([self class]), [_attestationNonce base64EncodedStringWithOptions:0]]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } @end -@implementation MTROperationalCredentialsClusterAttestationRequestParams (InternalMethods) +@implementation MTROvenCavityOperationalStateClusterPauseParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::OperationalCredentials::Commands::AttestationRequest::Type encodableStruct; + chip::app::Clusters::OvenCavityOperationalState::Commands::Pause::Type encodableStruct; ListFreer listFreer; - { - encodableStruct.attestationNonce = AsByteSpan(self.attestationNonce); - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -10115,184 +10144,156 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROperationalCredentialsClusterAttestationResponseParams +@implementation MTROvenCavityOperationalStateClusterStopParams - (instancetype)init { if (self = [super init]) { - - _attestationElements = [NSData data]; - - _attestationSignature = [NSData data]; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROperationalCredentialsClusterAttestationResponseParams alloc] init]; + auto other = [[MTROvenCavityOperationalStateClusterStopParams alloc] init]; - other.attestationElements = self.attestationElements; - other.attestationSignature = self.attestationSignature; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: attestationElements:%@; attestationSignature:%@; >", NSStringFromClass([self class]), [_attestationElements 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 MTROvenCavityOperationalStateClusterStopParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - if (!(self = [super init])) { - return nil; - } + chip::app::Clusters::OvenCavityOperationalState::Commands::Stop::Type encodableStruct; + ListFreer listFreer; - using DecodableType = chip::app::Clusters::OperationalCredentials::Commands::AttestationResponse::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) { - 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; - } + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); - id data = itemDictionary[MTRDataKey]; - if (data == nil || ![data isKindOfClass:NSDictionary.class]) { - err = CHIP_ERROR_INVALID_ARGUMENT; - break; - } + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); - 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; - } + ReturnErrorOnFailure(writer.Finalize(&buffer)); - NSString * dataTypeString = dataType; - if (![dataTypeString isEqualToString:MTROctetStringValueType]) { - err = CHIP_ERROR_INVALID_ARGUMENT; - break; - } + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} - self.attestationChallenge = dataValue; - break; - } +- (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; + } - // Do not add code here without first checking whether err is success. - } while (0); - } - if (err == CHIP_NO_ERROR) { - return self; - } + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; } } + return decodedObj; +} +@end - 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]; +@implementation MTROvenCavityOperationalStateClusterStartParams +- (instancetype)init +{ + if (self = [super init]) { + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } - return nil; + return self; } -@end +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTROvenCavityOperationalStateClusterStartParams alloc] init]; -@implementation MTROperationalCredentialsClusterAttestationResponseParams (InternalMethods) + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::OperationalCredentials::Commands::AttestationResponse::DecodableType &)decodableStruct + return other; +} + +- (NSString *)description { - { - self.attestationElements = AsData(decodableStruct.attestationElements); - } - { - self.attestationSignature = AsData(decodableStruct.attestationSignature); - } - return CHIP_NO_ERROR; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + return descriptionString; } @end -@implementation MTROperationalCredentialsClusterAttestationResponseParams (Deprecated) +@implementation MTROvenCavityOperationalStateClusterStartParams (InternalMethods) -- (void)setSignature:(NSData * _Nonnull)signature +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - self.attestationSignature = signature; + chip::app::Clusters::OvenCavityOperationalState::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; + } + + 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()); } -- (NSData * _Nonnull)signature +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error { - return self.attestationSignature; + 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 MTROperationalCredentialsClusterCertificateChainRequestParams + +@implementation MTROvenCavityOperationalStateClusterResumeParams - (instancetype)init { if (self = [super init]) { - - _certificateType = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -10301,9 +10302,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROperationalCredentialsClusterCertificateChainRequestParams alloc] init]; + auto other = [[MTROvenCavityOperationalStateClusterResumeParams alloc] init]; - other.certificateType = self.certificateType; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -10312,21 +10312,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 MTROvenCavityOperationalStateClusterResumeParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::OperationalCredentials::Commands::CertificateChainRequest::Type encodableStruct; + chip::app::Clusters::OvenCavityOperationalState::Commands::Resume::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 +10363,28 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROperationalCredentialsClusterCertificateChainResponseParams +@implementation MTROvenCavityOperationalStateClusterOperationalCommandResponseParams - (instancetype)init { if (self = [super init]) { - _certificate = [NSData data]; - _timedInvokeTimeoutMs = nil; + _commandResponseState = [MTROvenCavityOperationalStateClusterErrorStateStruct new]; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROperationalCredentialsClusterCertificateChainResponseParams alloc] init]; + auto other = [[MTROvenCavityOperationalStateClusterOperationalCommandResponseParams alloc] init]; - other.certificate = self.certificate; - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.commandResponseState = self.commandResponseState; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: certificate:%@; >", NSStringFromClass([self class]), [_certificate base64EncodedStringWithOptions:0]]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: commandResponseState:%@; >", NSStringFromClass([self class]), _commandResponseState]; return descriptionString; } @@ -10400,7 +10395,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::OperationalCredentials::Commands::CertificateChainResponse::DecodableType; + using DecodableType = chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::DecodableType; chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue clusterID:DecodableType::GetClusterId() commandID:DecodableType::GetCommandId() @@ -10435,26 +10430,43 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r @end -@implementation MTROperationalCredentialsClusterCertificateChainResponseParams (InternalMethods) +@implementation MTROvenCavityOperationalStateClusterOperationalCommandResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::OperationalCredentials::Commands::CertificateChainResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::DecodableType &)decodableStruct { { - self.certificate = AsData(decodableStruct.certificate); + 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 MTROperationalCredentialsClusterCSRRequestParams +@implementation MTROvenModeClusterChangeToModeParams - (instancetype)init { if (self = [super init]) { - _csrNonce = [NSData data]; - - _isForUpdateNOC = nil; + _newMode = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -10463,10 +10475,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROperationalCredentialsClusterCSRRequestParams alloc] init]; + auto other = [[MTROvenModeClusterChangeToModeParams alloc] init]; - other.csrNonce = self.csrNonce; - other.isForUpdateNOC = self.isForUpdateNOC; + other.newMode = self.newMode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -10475,26 +10486,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:@"<%@: newMode:%@; >", NSStringFromClass([self class]), _newMode]; return descriptionString; } @end -@implementation MTROperationalCredentialsClusterCSRRequestParams (InternalMethods) +@implementation MTROvenModeClusterChangeToModeParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::OperationalCredentials::Commands::CSRRequest::Type encodableStruct; + chip::app::Clusters::OvenMode::Commands::ChangeToMode::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.newMode = self.newMode.unsignedCharValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -10535,33 +10540,31 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROperationalCredentialsClusterCSRResponseParams +@implementation MTROvenModeClusterChangeToModeResponseParams - (instancetype)init { if (self = [super init]) { - _nocsrElements = [NSData data]; + _status = @(0); - _attestationSignature = [NSData data]; - _timedInvokeTimeoutMs = nil; + _statusText = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROperationalCredentialsClusterCSRResponseParams alloc] init]; + auto other = [[MTROvenModeClusterChangeToModeResponseParams alloc] init]; - other.nocsrElements = self.nocsrElements; - other.attestationSignature = self.attestationSignature; - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.status = self.status; + other.statusText = self.statusText; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: nocsrElements:%@; attestationSignature:%@; >", NSStringFromClass([self class]), [_nocsrElements base64EncodedStringWithOptions:0], [_attestationSignature base64EncodedStringWithOptions:0]]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; statusText:%@; >", NSStringFromClass([self class]), _status, _statusText]; return descriptionString; } @@ -10572,7 +10575,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::OperationalCredentials::Commands::CSRResponse::DecodableType; + using DecodableType = chip::app::Clusters::OvenMode::Commands::ChangeToModeResponse::DecodableType; chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue clusterID:DecodableType::GetClusterId() commandID:DecodableType::GetCommandId() @@ -10607,35 +10610,35 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r @end -@implementation MTROperationalCredentialsClusterCSRResponseParams (InternalMethods) +@implementation MTROvenModeClusterChangeToModeResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::OperationalCredentials::Commands::CSRResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::OvenMode::Commands::ChangeToModeResponse::DecodableType &)decodableStruct { { - self.nocsrElements = AsData(decodableStruct.NOCSRElements); + self.status = [NSNumber numberWithUnsignedChar:decodableStruct.status]; } { - self.attestationSignature = AsData(decodableStruct.attestationSignature); + 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 MTROperationalCredentialsClusterAddNOCParams +@implementation MTRModeSelectClusterChangeToModeParams - (instancetype)init { if (self = [super init]) { - _nocValue = [NSData data]; - - _icacValue = nil; - - _ipkValue = [NSData data]; - - _caseAdminSubject = @(0); - - _adminVendorId = @(0); + _newMode = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -10644,13 +10647,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROperationalCredentialsClusterAddNOCParams alloc] init]; + auto other = [[MTRModeSelectClusterChangeToModeParams alloc] init]; - other.nocValue = self.nocValue; - other.icacValue = self.icacValue; - other.ipkValue = self.ipkValue; - other.caseAdminSubject = self.caseAdminSubject; - other.adminVendorId = self.adminVendorId; + other.newMode = self.newMode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -10659,35 +10658,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:@"<%@: newMode:%@; >", NSStringFromClass([self class]), _newMode]; return descriptionString; } @end -@implementation MTROperationalCredentialsClusterAddNOCParams (InternalMethods) +@implementation MTRModeSelectClusterChangeToModeParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::OperationalCredentials::Commands::AddNOC::Type encodableStruct; + chip::app::Clusters::ModeSelect::Commands::ChangeToMode::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.newMode = self.newMode.unsignedCharValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -10728,14 +10712,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROperationalCredentialsClusterUpdateNOCParams +@implementation MTRLaundryWasherModeClusterChangeToModeParams - (instancetype)init { if (self = [super init]) { - _nocValue = [NSData data]; - - _icacValue = nil; + _newMode = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -10744,10 +10726,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROperationalCredentialsClusterUpdateNOCParams alloc] init]; + auto other = [[MTRLaundryWasherModeClusterChangeToModeParams alloc] init]; - other.nocValue = self.nocValue; - other.icacValue = self.icacValue; + other.newMode = self.newMode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -10756,26 +10737,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:@"<%@: newMode:%@; >", NSStringFromClass([self class]), _newMode]; return descriptionString; } @end -@implementation MTROperationalCredentialsClusterUpdateNOCParams (InternalMethods) +@implementation MTRLaundryWasherModeClusterChangeToModeParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::OperationalCredentials::Commands::UpdateNOC::Type encodableStruct; + chip::app::Clusters::LaundryWasherMode::Commands::ChangeToMode::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.newMode = self.newMode.unsignedCharValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -10816,36 +10791,31 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROperationalCredentialsClusterNOCResponseParams +@implementation MTRLaundryWasherModeClusterChangeToModeResponseParams - (instancetype)init { if (self = [super init]) { - _statusCode = @(0); - - _fabricIndex = nil; + _status = @(0); - _debugText = nil; - _timedInvokeTimeoutMs = nil; + _statusText = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROperationalCredentialsClusterNOCResponseParams alloc] init]; + auto other = [[MTRLaundryWasherModeClusterChangeToModeResponseParams alloc] init]; - other.statusCode = self.statusCode; - other.fabricIndex = self.fabricIndex; - other.debugText = self.debugText; - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.status = self.status; + other.statusText = self.statusText; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: statusCode:%@; fabricIndex:%@; debugText:%@; >", NSStringFromClass([self class]), _statusCode, _fabricIndex, _debugText]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; statusText:%@; >", NSStringFromClass([self class]), _status, _statusText]; return descriptionString; } @@ -10856,7 +10826,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType; + using DecodableType = chip::app::Clusters::LaundryWasherMode::Commands::ChangeToModeResponse::DecodableType; chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue clusterID:DecodableType::GetClusterId() commandID:DecodableType::GetCommandId() @@ -10891,29 +10861,22 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r @end -@implementation MTROperationalCredentialsClusterNOCResponseParams (InternalMethods) +@implementation MTRLaundryWasherModeClusterChangeToModeResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::LaundryWasherMode::Commands::ChangeToModeResponse::DecodableType &)decodableStruct { { - self.statusCode = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.statusCode)]; - } - { - if (decodableStruct.fabricIndex.HasValue()) { - self.fabricIndex = [NSNumber numberWithUnsignedChar:decodableStruct.fabricIndex.Value()]; - } else { - self.fabricIndex = nil; - } + self.status = [NSNumber numberWithUnsignedChar:decodableStruct.status]; } { - if (decodableStruct.debugText.HasValue()) { - self.debugText = AsString(decodableStruct.debugText.Value()); - if (self.debugText == nil) { + 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.debugText = nil; + self.statusText = nil; } } return CHIP_NO_ERROR; @@ -10921,12 +10884,12 @@ - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::Operatio @end -@implementation MTROperationalCredentialsClusterUpdateFabricLabelParams +@implementation MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams - (instancetype)init { if (self = [super init]) { - _label = @""; + _newMode = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -10935,9 +10898,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROperationalCredentialsClusterUpdateFabricLabelParams alloc] init]; + auto other = [[MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams alloc] init]; - other.label = self.label; + other.newMode = self.newMode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -10946,20 +10909,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: label:%@; >", NSStringFromClass([self class]), _label]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: newMode:%@; >", NSStringFromClass([self class]), _newMode]; return descriptionString; } @end -@implementation MTROperationalCredentialsClusterUpdateFabricLabelParams (InternalMethods) +@implementation MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::OperationalCredentials::Commands::UpdateFabricLabel::Type encodableStruct; + chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToMode::Type encodableStruct; ListFreer listFreer; { - encodableStruct.label = AsCharSpan(self.label); + encodableStruct.newMode = self.newMode.unsignedCharValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -11000,182 +10963,105 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROperationalCredentialsClusterRemoveFabricParams +@implementation MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams - (instancetype)init { if (self = [super init]) { - _fabricIndex = @(0); - _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; + _status = @(0); + + _statusText = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROperationalCredentialsClusterRemoveFabricParams alloc] init]; + auto other = [[MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams alloc] init]; - other.fabricIndex = self.fabricIndex; - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + other.status = self.status; + other.statusText = self.statusText; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: fabricIndex:%@; >", NSStringFromClass([self class]), _fabricIndex]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; statusText:%@; >", NSStringFromClass([self class]), _status, _statusText]; return descriptionString; } -@end - -@implementation MTROperationalCredentialsClusterRemoveFabricParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error { - chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type encodableStruct; - ListFreer listFreer; - { - encodableStruct.fabricIndex = self.fabricIndex.unsignedCharValue; + if (!(self = [super init])) { + return nil; } - auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + using DecodableType = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::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; - } - - 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]; + 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; + } } } - return decodedObj; -} -@end - -@implementation MTROperationalCredentialsClusterAddTrustedRootCertificateParams -- (instancetype)init -{ - if (self = [super init]) { - _rootCACertificate = [NSData data]; - _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = 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 self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone; -{ - auto other = [[MTROperationalCredentialsClusterAddTrustedRootCertificateParams alloc] init]; - - other.rootCACertificate = self.rootCACertificate; - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: rootCACertificate:%@; >", NSStringFromClass([self class]), [_rootCACertificate base64EncodedStringWithOptions:0]]; - return descriptionString; + return nil; } @end -@implementation MTROperationalCredentialsClusterAddTrustedRootCertificateParams (InternalMethods) +@implementation MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams (InternalMethods) -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToModeResponse::DecodableType &)decodableStruct { - chip::app::Clusters::OperationalCredentials::Commands::AddTrustedRootCertificate::Type encodableStruct; - ListFreer listFreer; { - encodableStruct.rootCACertificate = AsByteSpan(self.rootCACertificate); - } - - 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; + 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; -} -@end - -@implementation MTROperationalCredentialsClusterAddTrustedRootCertificateParams (Deprecated) - -- (void)setRootCertificate:(NSData * _Nonnull)rootCertificate -{ - self.rootCACertificate = rootCertificate; + return CHIP_NO_ERROR; } -- (NSData * _Nonnull)rootCertificate -{ - return self.rootCACertificate; -} @end -@implementation MTRGroupKeyManagementClusterKeySetWriteParams + +@implementation MTRRVCRunModeClusterChangeToModeParams - (instancetype)init { if (self = [super init]) { - _groupKeySet = [MTRGroupKeyManagementClusterGroupKeySetStruct new]; + _newMode = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -11184,9 +11070,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + auto other = [[MTRRVCRunModeClusterChangeToModeParams alloc] init]; - other.groupKeySet = self.groupKeySet; + other.newMode = self.newMode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -11195,57 +11081,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupKeySet:%@; >", NSStringFromClass([self class]), _groupKeySet]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: newMode:%@; >", NSStringFromClass([self class]), _newMode]; return descriptionString; } @end -@implementation MTRGroupKeyManagementClusterKeySetWriteParams (InternalMethods) +@implementation MTRRVCRunModeClusterChangeToModeParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type encodableStruct; + chip::app::Clusters::RvcRunMode::Commands::ChangeToMode::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; - } + encodableStruct.newMode = self.newMode.unsignedCharValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -11286,12 +11135,105 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRGroupKeyManagementClusterKeySetReadParams +@implementation MTRRVCRunModeClusterChangeToModeResponseParams - (instancetype)init { if (self = [super init]) { - _groupKeySetID = @(0); + _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 CHIP_NO_ERROR; +} + +@end + +@implementation MTRRVCCleanModeClusterChangeToModeParams +- (instancetype)init +{ + if (self = [super init]) { + + _newMode = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -11300,9 +11242,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRGroupKeyManagementClusterKeySetReadParams alloc] init]; + auto other = [[MTRRVCCleanModeClusterChangeToModeParams alloc] init]; - other.groupKeySetID = self.groupKeySetID; + other.newMode = self.newMode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -11311,20 +11253,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 MTRRVCCleanModeClusterChangeToModeParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type encodableStruct; + chip::app::Clusters::RvcCleanMode::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 +11307,31 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRGroupKeyManagementClusterKeySetReadResponseParams +@implementation MTRRVCCleanModeClusterChangeToModeResponseParams - (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 = [[MTRRVCCleanModeClusterChangeToModeResponseParams 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 +11342,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::DecodableType; + using DecodableType = chip::app::Clusters::RvcCleanMode::Commands::ChangeToModeResponse::DecodableType; chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue clusterID:DecodableType::GetClusterId() commandID:DecodableType::GetCommandId() @@ -11434,43 +11377,22 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r @end -@implementation MTRGroupKeyManagementClusterKeySetReadResponseParams (InternalMethods) +@implementation MTRRVCCleanModeClusterChangeToModeResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::RvcCleanMode::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 +11400,14 @@ - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::GroupKey @end -@implementation MTRGroupKeyManagementClusterKeySetRemoveParams +@implementation MTRTemperatureControlClusterSetTemperatureParams - (instancetype)init { if (self = [super init]) { - _groupKeySetID = @(0); + _targetTemperature = nil; + + _targetTemperatureLevel = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -11492,9 +11416,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRGroupKeyManagementClusterKeySetRemoveParams alloc] init]; + auto other = [[MTRTemperatureControlClusterSetTemperatureParams alloc] init]; - other.groupKeySetID = self.groupKeySetID; + other.targetTemperature = self.targetTemperature; + other.targetTemperatureLevel = self.targetTemperatureLevel; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -11503,20 +11428,29 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupKeySetID:%@; >", NSStringFromClass([self class]), _groupKeySetID]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: targetTemperature:%@; targetTemperatureLevel:%@; >", NSStringFromClass([self class]), _targetTemperature, _targetTemperatureLevel]; return descriptionString; } @end -@implementation MTRGroupKeyManagementClusterKeySetRemoveParams (InternalMethods) +@implementation MTRTemperatureControlClusterSetTemperatureParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type encodableStruct; + chip::app::Clusters::TemperatureControl::Commands::SetTemperature::Type encodableStruct; ListFreer listFreer; { - encodableStruct.groupKeySetID = self.groupKeySetID.unsignedShortValue; + 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); @@ -11557,10 +11491,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRGroupKeyManagementClusterKeySetReadAllIndicesParams +@implementation MTRDishwasherModeClusterChangeToModeParams - (instancetype)init { if (self = [super init]) { + + _newMode = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -11569,8 +11505,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRGroupKeyManagementClusterKeySetReadAllIndicesParams alloc] init]; + auto other = [[MTRDishwasherModeClusterChangeToModeParams alloc] init]; + other.newMode = self.newMode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -11579,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 MTRGroupKeyManagementClusterKeySetReadAllIndicesParams (InternalMethods) +@implementation MTRDishwasherModeClusterChangeToModeParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndices::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()) { @@ -11630,30 +11570,31 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams +@implementation MTRDishwasherModeClusterChangeToModeResponseParams - (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 = [[MTRDishwasherModeClusterChangeToModeResponseParams 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 +11605,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndicesResponse::DecodableType; + using DecodableType = chip::app::Clusters::DishwasherMode::Commands::ChangeToModeResponse::DecodableType; chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue clusterID:DecodableType::GetClusterId() commandID:DecodableType::GetCommandId() @@ -11699,25 +11640,22 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r @end -@implementation MTRGroupKeyManagementClusterKeySetReadAllIndicesResponseParams (InternalMethods) +@implementation MTRDishwasherModeClusterChangeToModeResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndicesResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::DishwasherMode::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 +11663,10 @@ - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::GroupKey @end -@implementation MTRICDManagementClusterRegisterClientParams +@implementation MTRSmokeCOAlarmClusterSelfTestRequestParams - (instancetype)init { if (self = [super init]) { - - _checkInNodeID = @(0); - - _monitoredSubject = @(0); - - _key = [NSData data]; - - _verificationKey = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -11745,12 +11675,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRICDManagementClusterRegisterClientParams alloc] init]; + auto other = [[MTRSmokeCOAlarmClusterSelfTestRequestParams alloc] init]; - other.checkInNodeID = self.checkInNodeID; - other.monitoredSubject = self.monitoredSubject; - other.key = self.key; - other.verificationKey = self.verificationKey; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -11759,33 +11685,18 @@ - (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:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } @end -@implementation MTRICDManagementClusterRegisterClientParams (InternalMethods) +@implementation MTRSmokeCOAlarmClusterSelfTestRequestParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::IcdManagement::Commands::RegisterClient::Type encodableStruct; + chip::app::Clusters::SmokeCoAlarm::Commands::SelfTestRequest::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); - } - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -11825,93 +11736,178 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRICDManagementClusterRegisterClientResponseParams +@implementation MTRDishwasherAlarmClusterResetParams - (instancetype)init { if (self = [super init]) { - _icdCounter = @(0); + _alarms = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRICDManagementClusterRegisterClientResponseParams alloc] init]; + auto other = [[MTRDishwasherAlarmClusterResetParams alloc] init]; - other.icdCounter = self.icdCounter; + other.alarms = self.alarms; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: icdCounter:%@; >", NSStringFromClass([self class]), _icdCounter]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: alarms:%@; >", NSStringFromClass([self class]), _alarms]; return descriptionString; } -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error +@end + +@implementation MTRDishwasherAlarmClusterResetParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - if (!(self = [super init])) { - return nil; + chip::app::Clusters::DishwasherAlarm::Commands::Reset::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.alarms = static_cast>(self.alarms.unsignedIntValue); } - using DecodableType = chip::app::Clusters::IcdManagement::Commands::RegisterClientResponse::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 MTRDishwasherAlarmClusterModifyEnabledAlarmsParams +- (instancetype)init +{ + if (self = [super init]) { + + _mask = @(0); + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRDishwasherAlarmClusterModifyEnabledAlarmsParams alloc] init]; + + other.mask = self.mask; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: mask:%@; >", NSStringFromClass([self class]), _mask]; + return descriptionString; } @end -@implementation MTRICDManagementClusterRegisterClientResponseParams (InternalMethods) +@implementation MTRDishwasherAlarmClusterModifyEnabledAlarmsParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::IcdManagement::Commands::RegisterClientResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { + chip::app::Clusters::DishwasherAlarm::Commands::ModifyEnabledAlarms::Type encodableStruct; + ListFreer listFreer; { - self.icdCounter = [NSNumber numberWithUnsignedInt:decodableStruct.ICDCounter]; + encodableStruct.mask = static_cast>(self.mask.unsignedIntValue); } - return CHIP_NO_ERROR; + + 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 MTRICDManagementClusterUnregisterClientParams +@implementation MTRMicrowaveOvenControlClusterSetCookingParametersParams - (instancetype)init { if (self = [super init]) { - _checkInNodeID = @(0); + _cookMode = nil; - _verificationKey = nil; + _cookTime = nil; + + _powerSetting = nil; + + _wattSettingIndex = nil; + + _startAfterSetting = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -11920,10 +11916,13 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRICDManagementClusterUnregisterClientParams alloc] init]; + auto other = [[MTRMicrowaveOvenControlClusterSetCookingParametersParams alloc] init]; - other.checkInNodeID = self.checkInNodeID; - other.verificationKey = self.verificationKey; + other.cookMode = self.cookMode; + other.cookTime = self.cookTime; + other.powerSetting = self.powerSetting; + other.wattSettingIndex = self.wattSettingIndex; + other.startAfterSetting = self.startAfterSetting; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -11932,25 +11931,46 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: checkInNodeID:%@; verificationKey:%@; >", NSStringFromClass([self class]), _checkInNodeID, [_verificationKey base64EncodedStringWithOptions:0]]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: cookMode:%@; cookTime:%@; powerSetting:%@; wattSettingIndex:%@; startAfterSetting:%@; >", NSStringFromClass([self class]), _cookMode, _cookTime, _powerSetting, _wattSettingIndex, _startAfterSetting]; return descriptionString; } @end -@implementation MTRICDManagementClusterUnregisterClientParams (InternalMethods) +@implementation MTRMicrowaveOvenControlClusterSetCookingParametersParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::IcdManagement::Commands::UnregisterClient::Type encodableStruct; + chip::app::Clusters::MicrowaveOvenControl::Commands::SetCookingParameters::Type encodableStruct; ListFreer listFreer; { - encodableStruct.checkInNodeID = self.checkInNodeID.unsignedLongLongValue; + if (self.cookMode != nil) { + auto & definedValue_0 = encodableStruct.cookMode.Emplace(); + definedValue_0 = self.cookMode.unsignedCharValue; + } } { - if (self.verificationKey != nil) { - auto & definedValue_0 = encodableStruct.verificationKey.Emplace(); - definedValue_0 = AsByteSpan(self.verificationKey); + 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; + } + } + { + if (self.wattSettingIndex != nil) { + auto & definedValue_0 = encodableStruct.wattSettingIndex.Emplace(); + definedValue_0 = self.wattSettingIndex.unsignedCharValue; + } + } + { + if (self.startAfterSetting != nil) { + auto & definedValue_0 = encodableStruct.startAfterSetting.Emplace(); + definedValue_0 = self.startAfterSetting.boolValue; } } @@ -11992,10 +12012,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRICDManagementClusterStayActiveRequestParams +@implementation MTRMicrowaveOvenControlClusterAddMoreTimeParams - (instancetype)init { if (self = [super init]) { + + _timeToAdd = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -12004,8 +12026,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRICDManagementClusterStayActiveRequestParams alloc] init]; + auto other = [[MTRMicrowaveOvenControlClusterAddMoreTimeParams alloc] init]; + other.timeToAdd = self.timeToAdd; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -12014,18 +12037,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 MTRICDManagementClusterStayActiveRequestParams (InternalMethods) +@implementation MTRMicrowaveOvenControlClusterAddMoreTimeParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::IcdManagement::Commands::StayActiveRequest::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()) { @@ -12065,91 +12091,10 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRICDManagementClusterStayActiveResponseParams -- (instancetype)init -{ - if (self = [super init]) { - - _promisedActiveDuration = @(0); - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone; -{ - auto other = [[MTRICDManagementClusterStayActiveResponseParams alloc] init]; - - other.promisedActiveDuration = self.promisedActiveDuration; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: promisedActiveDuration:%@; >", NSStringFromClass([self class]), _promisedActiveDuration]; - return descriptionString; -} - -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error -{ - if (!(self = [super init])) { - return nil; - } - - using DecodableType = chip::app::Clusters::IcdManagement::Commands::StayActiveResponse::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 MTRICDManagementClusterStayActiveResponseParams (InternalMethods) - -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::IcdManagement::Commands::StayActiveResponse::DecodableType &)decodableStruct -{ - { - self.promisedActiveDuration = [NSNumber numberWithUnsignedInt:decodableStruct.promisedActiveDuration]; - } - return CHIP_NO_ERROR; -} - -@end - -@implementation MTRTimerClusterSetTimerParams +@implementation MTROperationalStateClusterPauseParams - (instancetype)init { if (self = [super init]) { - - _newTime = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -12158,9 +12103,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRTimerClusterSetTimerParams alloc] init]; + auto other = [[MTROperationalStateClusterPauseParams alloc] init]; - other.newTime = self.newTime; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -12169,21 +12113,18 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: newTime:%@; >", NSStringFromClass([self class]), _newTime]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } @end -@implementation MTRTimerClusterSetTimerParams (InternalMethods) +@implementation MTROperationalStateClusterPauseParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::Timer::Commands::SetTimer::Type encodableStruct; + chip::app::Clusters::OperationalState::Commands::Pause::Type encodableStruct; ListFreer listFreer; - { - encodableStruct.newTime = self.newTime.unsignedIntValue; - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -12223,7 +12164,7 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRTimerClusterResetTimerParams +@implementation MTROperationalStateClusterStopParams - (instancetype)init { if (self = [super init]) { @@ -12235,7 +12176,7 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRTimerClusterResetTimerParams alloc] init]; + auto other = [[MTROperationalStateClusterStopParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -12251,11 +12192,11 @@ - (NSString *)description @end -@implementation MTRTimerClusterResetTimerParams (InternalMethods) +@implementation MTROperationalStateClusterStopParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::Timer::Commands::ResetTimer::Type encodableStruct; + chip::app::Clusters::OperationalState::Commands::Stop::Type encodableStruct; ListFreer listFreer; auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -12296,12 +12237,10 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRTimerClusterAddTimeParams +@implementation MTROperationalStateClusterStartParams - (instancetype)init { if (self = [super init]) { - - _additionalTime = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -12310,9 +12249,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRTimerClusterAddTimeParams alloc] init]; + auto other = [[MTROperationalStateClusterStartParams alloc] init]; - other.additionalTime = self.additionalTime; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -12321,21 +12259,18 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: additionalTime:%@; >", NSStringFromClass([self class]), _additionalTime]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } @end -@implementation MTRTimerClusterAddTimeParams (InternalMethods) +@implementation MTROperationalStateClusterStartParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::Timer::Commands::AddTime::Type encodableStruct; + chip::app::Clusters::OperationalState::Commands::Start::Type encodableStruct; ListFreer listFreer; - { - encodableStruct.additionalTime = self.additionalTime.unsignedIntValue; - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -12375,12 +12310,10 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRTimerClusterReduceTimeParams +@implementation MTROperationalStateClusterResumeParams - (instancetype)init { if (self = [super init]) { - - _timeReduction = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -12389,9 +12322,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRTimerClusterReduceTimeParams alloc] init]; + auto other = [[MTROperationalStateClusterResumeParams alloc] init]; - other.timeReduction = self.timeReduction; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -12400,21 +12332,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 MTROperationalStateClusterResumeParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::Timer::Commands::ReduceTime::Type encodableStruct; + chip::app::Clusters::OperationalState::Commands::Resume::Type encodableStruct; ListFreer listFreer; - { - encodableStruct.timeReduction = self.timeReduction.unsignedIntValue; - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -12454,80 +12383,105 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROvenCavityOperationalStateClusterPauseParams +@implementation MTROperationalStateClusterOperationalCommandResponseParams - (instancetype)init { if (self = [super init]) { - _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; + + _commandResponseState = [MTROperationalStateClusterErrorStateStruct new]; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROvenCavityOperationalStateClusterPauseParams alloc] init]; + auto other = [[MTROperationalStateClusterOperationalCommandResponseParams alloc] init]; - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + other.commandResponseState = self.commandResponseState; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: commandResponseState:%@; >", NSStringFromClass([self class]), _commandResponseState]; return descriptionString; } -@end - -@implementation MTROvenCavityOperationalStateClusterPauseParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error { - chip::app::Clusters::OvenCavityOperationalState::Commands::Pause::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::OperationalState::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 MTROperationalStateClusterOperationalCommandResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::OperationalState::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 = [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.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 MTROvenCavityOperationalStateClusterStopParams +@implementation MTRRVCOperationalStateClusterPauseParams - (instancetype)init { if (self = [super init]) { @@ -12539,7 +12493,7 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROvenCavityOperationalStateClusterStopParams alloc] init]; + auto other = [[MTRRVCOperationalStateClusterPauseParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -12555,11 +12509,11 @@ - (NSString *)description @end -@implementation MTROvenCavityOperationalStateClusterStopParams (InternalMethods) +@implementation MTRRVCOperationalStateClusterPauseParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::OvenCavityOperationalState::Commands::Stop::Type encodableStruct; + chip::app::Clusters::RvcOperationalState::Commands::Pause::Type encodableStruct; ListFreer listFreer; auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -12600,7 +12554,7 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROvenCavityOperationalStateClusterStartParams +@implementation MTRRVCOperationalStateClusterStopParams - (instancetype)init { if (self = [super init]) { @@ -12612,7 +12566,7 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROvenCavityOperationalStateClusterStartParams alloc] init]; + auto other = [[MTRRVCOperationalStateClusterStopParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -12628,11 +12582,11 @@ - (NSString *)description @end -@implementation MTROvenCavityOperationalStateClusterStartParams (InternalMethods) +@implementation MTRRVCOperationalStateClusterStopParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::OvenCavityOperationalState::Commands::Start::Type encodableStruct; + chip::app::Clusters::RvcOperationalState::Commands::Stop::Type encodableStruct; ListFreer listFreer; auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -12673,7 +12627,7 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROvenCavityOperationalStateClusterResumeParams +@implementation MTRRVCOperationalStateClusterStartParams - (instancetype)init { if (self = [super init]) { @@ -12685,7 +12639,7 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROvenCavityOperationalStateClusterResumeParams alloc] init]; + auto other = [[MTRRVCOperationalStateClusterStartParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -12701,11 +12655,11 @@ - (NSString *)description @end -@implementation MTROvenCavityOperationalStateClusterResumeParams (InternalMethods) +@implementation MTRRVCOperationalStateClusterStartParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::OvenCavityOperationalState::Commands::Resume::Type encodableStruct; + chip::app::Clusters::RvcOperationalState::Commands::Start::Type encodableStruct; ListFreer listFreer; auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -12746,110 +12700,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 MTRRVCOperationalStateClusterResumeParams - (instancetype)init { if (self = [super init]) { - - _newMode = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -12858,9 +12712,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROvenModeClusterChangeToModeParams alloc] init]; + auto other = [[MTRRVCOperationalStateClusterResumeParams alloc] init]; - other.newMode = self.newMode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -12869,21 +12722,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 MTRRVCOperationalStateClusterResumeParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::OvenMode::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()) { @@ -12923,31 +12773,28 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROvenModeClusterChangeToModeResponseParams +@implementation MTRRVCOperationalStateClusterOperationalCommandResponseParams - (instancetype)init { if (self = [super init]) { - _status = @(0); - - _statusText = nil; + _commandResponseState = [MTRRVCOperationalStateClusterErrorStateStruct new]; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROvenModeClusterChangeToModeResponseParams 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; } @@ -12958,7 +12805,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::OvenMode::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() @@ -12991,116 +12838,53 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } -@end - -@implementation MTROvenModeClusterChangeToModeResponseParams (InternalMethods) - -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::OvenMode::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 CHIP_NO_ERROR; -} - -@end - -@implementation MTRModeSelectClusterChangeToModeParams -- (instancetype)init -{ - if (self = [super init]) { - - _newMode = @(0); - _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone; -{ - auto other = [[MTRModeSelectClusterChangeToModeParams alloc] init]; - - other.newMode = self.newMode; - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: newMode:%@; >", NSStringFromClass([self class]), _newMode]; - return descriptionString; -} - -@end - -@implementation MTRModeSelectClusterChangeToModeParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader -{ - chip::app::Clusters::ModeSelect::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()) { - 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()); -} +@end -- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error +@implementation MTRRVCOperationalStateClusterOperationalCommandResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::RvcOperationalState::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 = [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; } - 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 MTRLaundryWasherModeClusterChangeToModeParams +@implementation MTRScenesManagementClusterAddSceneParams - (instancetype)init { if (self = [super init]) { - _newMode = @(0); + _groupID = @(0); + + _sceneID = @(0); + + _transitionTime = @(0); + + _sceneName = @""; + + _extensionFieldSets = [NSArray array]; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -13109,9 +12893,13 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRLaundryWasherModeClusterChangeToModeParams 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; @@ -13120,20 +12908,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 MTRLaundryWasherModeClusterChangeToModeParams (InternalMethods) +@implementation MTRScenesManagementClusterAddSceneParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::LaundryWasherMode::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); @@ -13174,31 +13018,34 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRLaundryWasherModeClusterChangeToModeResponseParams +@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 = [[MTRLaundryWasherModeClusterChangeToModeResponseParams 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; } @@ -13209,7 +13056,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::LaundryWasherMode::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() @@ -13244,35 +13091,32 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r @end -@implementation MTRLaundryWasherModeClusterChangeToModeResponseParams (InternalMethods) +@implementation MTRScenesManagementClusterAddSceneResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::LaundryWasherMode::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; - } + self.groupID = [NSNumber numberWithUnsignedShort:decodableStruct.groupID]; + } + { + self.sceneID = [NSNumber numberWithUnsignedChar:decodableStruct.sceneID]; } return CHIP_NO_ERROR; } @end -@implementation MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams +@implementation MTRScenesManagementClusterViewSceneParams - (instancetype)init { if (self = [super init]) { - _newMode = @(0); + _groupID = @(0); + + _sceneID = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -13281,9 +13125,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams 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; @@ -13292,20 +13137,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 MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams (InternalMethods) +@implementation MTRScenesManagementClusterViewSceneParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::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); @@ -13346,31 +13194,43 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams +@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 = [[MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams 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; } @@ -13381,7 +13241,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::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() @@ -13416,22 +13276,74 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r @end -@implementation MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeResponseParams (InternalMethods) +@implementation MTRScenesManagementClusterViewSceneResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::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; @@ -13439,12 +13351,14 @@ - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::Refriger @end -@implementation MTRRVCRunModeClusterChangeToModeParams +@implementation MTRScenesManagementClusterRemoveSceneParams - (instancetype)init { if (self = [super init]) { - _newMode = @(0); + _groupID = @(0); + + _sceneID = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -13453,9 +13367,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRRVCRunModeClusterChangeToModeParams alloc] init]; + auto other = [[MTRScenesManagementClusterRemoveSceneParams alloc] init]; - other.newMode = self.newMode; + other.groupID = self.groupID; + other.sceneID = self.sceneID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -13464,20 +13379,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 MTRRVCRunModeClusterChangeToModeParams (InternalMethods) +@implementation MTRScenesManagementClusterRemoveSceneParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::RvcRunMode::Commands::ChangeToMode::Type encodableStruct; + chip::app::Clusters::ScenesManagement::Commands::RemoveScene::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); @@ -13518,31 +13436,34 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRRVCRunModeClusterChangeToModeResponseParams +@implementation MTRScenesManagementClusterRemoveSceneResponseParams - (instancetype)init { if (self = [super init]) { _status = @(0); - _statusText = nil; + _groupID = @(0); + + _sceneID = @(0); } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRRVCRunModeClusterChangeToModeResponseParams alloc] init]; + auto other = [[MTRScenesManagementClusterRemoveSceneResponseParams 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; } @@ -13553,7 +13474,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::RvcRunMode::Commands::ChangeToModeResponse::DecodableType; + using DecodableType = chip::app::Clusters::ScenesManagement::Commands::RemoveSceneResponse::DecodableType; chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue clusterID:DecodableType::GetClusterId() commandID:DecodableType::GetCommandId() @@ -13588,35 +13509,30 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r @end -@implementation MTRRVCRunModeClusterChangeToModeResponseParams (InternalMethods) +@implementation MTRScenesManagementClusterRemoveSceneResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::RvcRunMode::Commands::ChangeToModeResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ScenesManagement::Commands::RemoveSceneResponse::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; - } + self.groupID = [NSNumber numberWithUnsignedShort:decodableStruct.groupID]; + } + { + self.sceneID = [NSNumber numberWithUnsignedChar:decodableStruct.sceneID]; } return CHIP_NO_ERROR; } @end -@implementation MTRRVCCleanModeClusterChangeToModeParams +@implementation MTRScenesManagementClusterRemoveAllScenesParams - (instancetype)init { if (self = [super init]) { - _newMode = @(0); + _groupID = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -13625,9 +13541,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRRVCCleanModeClusterChangeToModeParams alloc] init]; + auto other = [[MTRScenesManagementClusterRemoveAllScenesParams alloc] init]; - other.newMode = self.newMode; + other.groupID = self.groupID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -13636,20 +13552,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: newMode:%@; >", NSStringFromClass([self class]), _newMode]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupID:%@; >", NSStringFromClass([self class]), _groupID]; return descriptionString; } @end -@implementation MTRRVCCleanModeClusterChangeToModeParams (InternalMethods) +@implementation MTRScenesManagementClusterRemoveAllScenesParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::RvcCleanMode::Commands::ChangeToMode::Type encodableStruct; + chip::app::Clusters::ScenesManagement::Commands::RemoveAllScenes::Type encodableStruct; ListFreer listFreer; { - encodableStruct.newMode = self.newMode.unsignedCharValue; + encodableStruct.groupID = self.groupID.unsignedShortValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -13690,31 +13606,31 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRRVCCleanModeClusterChangeToModeResponseParams +@implementation MTRScenesManagementClusterRemoveAllScenesResponseParams - (instancetype)init { if (self = [super init]) { _status = @(0); - _statusText = nil; + _groupID = @(0); } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRRVCCleanModeClusterChangeToModeResponseParams alloc] init]; + auto other = [[MTRScenesManagementClusterRemoveAllScenesResponseParams alloc] init]; other.status = self.status; - other.statusText = self.statusText; + other.groupID = self.groupID; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; statusText:%@; >", NSStringFromClass([self class]), _status, _statusText]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; groupID:%@; >", NSStringFromClass([self class]), _status, _groupID]; return descriptionString; } @@ -13725,7 +13641,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::RvcCleanMode::Commands::ChangeToModeResponse::DecodableType; + using DecodableType = chip::app::Clusters::ScenesManagement::Commands::RemoveAllScenesResponse::DecodableType; chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue clusterID:DecodableType::GetClusterId() commandID:DecodableType::GetCommandId() @@ -13760,37 +13676,29 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r @end -@implementation MTRRVCCleanModeClusterChangeToModeResponseParams (InternalMethods) +@implementation MTRScenesManagementClusterRemoveAllScenesResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::RvcCleanMode::Commands::ChangeToModeResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ScenesManagement::Commands::RemoveAllScenesResponse::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; - } + self.groupID = [NSNumber numberWithUnsignedShort:decodableStruct.groupID]; } return CHIP_NO_ERROR; } @end -@implementation MTRTemperatureControlClusterSetTemperatureParams +@implementation MTRScenesManagementClusterStoreSceneParams - (instancetype)init { if (self = [super init]) { - _targetTemperature = nil; + _groupID = @(0); - _targetTemperatureLevel = nil; + _sceneID = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -13799,10 +13707,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRTemperatureControlClusterSetTemperatureParams alloc] init]; + auto other = [[MTRScenesManagementClusterStoreSceneParams alloc] init]; - other.targetTemperature = self.targetTemperature; - other.targetTemperatureLevel = self.targetTemperatureLevel; + other.groupID = self.groupID; + other.sceneID = self.sceneID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -13811,108 +13719,23 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: targetTemperature:%@; targetTemperatureLevel:%@; >", NSStringFromClass([self class]), _targetTemperature, _targetTemperatureLevel]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupID:%@; sceneID:%@; >", NSStringFromClass([self class]), _groupID, _sceneID]; return descriptionString; } @end -@implementation MTRTemperatureControlClusterSetTemperatureParams (InternalMethods) +@implementation MTRScenesManagementClusterStoreSceneParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::TemperatureControl::Commands::SetTemperature::Type encodableStruct; + chip::app::Clusters::ScenesManagement::Commands::StoreScene::Type encodableStruct; ListFreer listFreer; { - 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); - 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 MTRDishwasherModeClusterChangeToModeParams -- (instancetype)init -{ - if (self = [super init]) { - - _newMode = @(0); - _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; + encodableStruct.groupID = self.groupID.unsignedShortValue; } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone; -{ - auto other = [[MTRDishwasherModeClusterChangeToModeParams alloc] init]; - - other.newMode = self.newMode; - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: newMode:%@; >", NSStringFromClass([self class]), _newMode]; - return descriptionString; -} - -@end - -@implementation MTRDishwasherModeClusterChangeToModeParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader -{ - chip::app::Clusters::DishwasherMode::Commands::ChangeToMode::Type encodableStruct; - ListFreer listFreer; { - encodableStruct.newMode = self.newMode.unsignedCharValue; + encodableStruct.sceneID = self.sceneID.unsignedCharValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -13953,31 +13776,34 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDishwasherModeClusterChangeToModeResponseParams +@implementation MTRScenesManagementClusterStoreSceneResponseParams - (instancetype)init { if (self = [super init]) { _status = @(0); - _statusText = nil; + _groupID = @(0); + + _sceneID = @(0); } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDishwasherModeClusterChangeToModeResponseParams alloc] init]; + auto other = [[MTRScenesManagementClusterStoreSceneResponseParams 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; } @@ -13988,7 +13814,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::DishwasherMode::Commands::ChangeToModeResponse::DecodableType; + using DecodableType = chip::app::Clusters::ScenesManagement::Commands::StoreSceneResponse::DecodableType; chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue clusterID:DecodableType::GetClusterId() commandID:DecodableType::GetCommandId() @@ -14023,108 +13849,34 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r @end -@implementation MTRDishwasherModeClusterChangeToModeResponseParams (InternalMethods) +@implementation MTRScenesManagementClusterStoreSceneResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::DishwasherMode::Commands::ChangeToModeResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ScenesManagement::Commands::StoreSceneResponse::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 MTRSmokeCOAlarmClusterSelfTestRequestParams -- (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]; - } + { + self.groupID = [NSNumber numberWithUnsignedShort:decodableStruct.groupID]; } - return decodedObj; + { + self.sceneID = [NSNumber numberWithUnsignedChar:decodableStruct.sceneID]; + } + return CHIP_NO_ERROR; } + @end -@implementation MTRDishwasherAlarmClusterResetParams +@implementation MTRScenesManagementClusterRecallSceneParams - (instancetype)init { if (self = [super init]) { - _alarms = @(0); + _groupID = @(0); + + _sceneID = @(0); + + _transitionTime = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -14133,9 +13885,11 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDishwasherAlarmClusterResetParams alloc] init]; + auto other = [[MTRScenesManagementClusterRecallSceneParams alloc] init]; - other.alarms = self.alarms; + other.groupID = self.groupID; + other.sceneID = self.sceneID; + other.transitionTime = self.transitionTime; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -14144,20 +13898,34 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: alarms:%@; >", NSStringFromClass([self class]), _alarms]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupID:%@; sceneID:%@; transitionTime:%@; >", NSStringFromClass([self class]), _groupID, _sceneID, _transitionTime]; return descriptionString; } @end -@implementation MTRDishwasherAlarmClusterResetParams (InternalMethods) +@implementation MTRScenesManagementClusterRecallSceneParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DishwasherAlarm::Commands::Reset::Type encodableStruct; + chip::app::Clusters::ScenesManagement::Commands::RecallScene::Type encodableStruct; ListFreer listFreer; { - encodableStruct.alarms = static_cast>(self.alarms.unsignedIntValue); + 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); @@ -14198,12 +13966,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDishwasherAlarmClusterModifyEnabledAlarmsParams +@implementation MTRScenesManagementClusterGetSceneMembershipParams - (instancetype)init { if (self = [super init]) { - _mask = @(0); + _groupID = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -14212,9 +13980,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDishwasherAlarmClusterModifyEnabledAlarmsParams alloc] init]; + auto other = [[MTRScenesManagementClusterGetSceneMembershipParams alloc] init]; - other.mask = self.mask; + other.groupID = self.groupID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -14223,20 +13991,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: mask:%@; >", NSStringFromClass([self class]), _mask]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupID:%@; >", NSStringFromClass([self class]), _groupID]; return descriptionString; } @end -@implementation MTRDishwasherAlarmClusterModifyEnabledAlarmsParams (InternalMethods) +@implementation MTRScenesManagementClusterGetSceneMembershipParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DishwasherAlarm::Commands::ModifyEnabledAlarms::Type encodableStruct; + chip::app::Clusters::ScenesManagement::Commands::GetSceneMembership::Type encodableStruct; ListFreer listFreer; { - encodableStruct.mask = static_cast>(self.mask.unsignedIntValue); + encodableStruct.groupID = self.groupID.unsignedShortValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -14277,112 +14045,139 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRMicrowaveOvenControlClusterSetCookingParametersParams +@implementation MTRScenesManagementClusterGetSceneMembershipResponseParams - (instancetype)init { if (self = [super init]) { - _cookMode = nil; + _status = @(0); - _cookTime = nil; + _capacity = nil; - _powerSetting = nil; - _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; + _groupID = @(0); + + _sceneList = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRMicrowaveOvenControlClusterSetCookingParametersParams alloc] init]; + auto other = [[MTRScenesManagementClusterGetSceneMembershipResponseParams alloc] init]; - other.cookMode = self.cookMode; - other.cookTime = self.cookTime; - other.powerSetting = self.powerSetting; - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + other.status = self.status; + other.capacity = self.capacity; + other.groupID = self.groupID; + other.sceneList = self.sceneList; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: cookMode:%@; cookTime:%@; powerSetting:%@; >", NSStringFromClass([self class]), _cookMode, _cookTime, _powerSetting]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; capacity:%@; groupID:%@; sceneList:%@; >", NSStringFromClass([self class]), _status, _capacity, _groupID, _sceneList]; return descriptionString; } -@end - -@implementation MTRMicrowaveOvenControlClusterSetCookingParametersParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error { - 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; - } + if (!(self = [super init])) { + return nil; } - auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + using DecodableType = chip::app::Clusters::ScenesManagement::Commands::GetSceneMembershipResponse::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 MTRScenesManagementClusterGetSceneMembershipResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ScenesManagement::Commands::GetSceneMembershipResponse::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]; + } + { + if (decodableStruct.capacity.IsNull()) { + self.capacity = nil; + } else { + self.capacity = [NSNumber numberWithUnsignedChar:decodableStruct.capacity.Value()]; } - return nil; } - - auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); - if (decodedObj == nil) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + { + 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 decodedObj; + return CHIP_NO_ERROR; } + @end -@implementation MTRMicrowaveOvenControlClusterAddMoreTimeParams +@implementation MTRScenesManagementClusterEnhancedAddSceneParams - (instancetype)init { if (self = [super init]) { - _timeToAdd = @(0); + _groupID = @(0); + + _sceneID = @(0); + + _transitionTime = @(0); + + _sceneName = @""; + + _extensionFieldSets = [NSArray array]; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -14391,9 +14186,13 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRMicrowaveOvenControlClusterAddMoreTimeParams alloc] init]; + auto other = [[MTRScenesManagementClusterEnhancedAddSceneParams alloc] init]; - other.timeToAdd = self.timeToAdd; + 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; @@ -14402,20 +14201,76 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: timeToAdd:%@; >", NSStringFromClass([self class]), _timeToAdd]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupID:%@; sceneID:%@; transitionTime:%@; sceneName:%@; extensionFieldSets:%@; >", NSStringFromClass([self class]), _groupID, _sceneID, _transitionTime, _sceneName, _extensionFieldSets]; return descriptionString; } @end -@implementation MTRMicrowaveOvenControlClusterAddMoreTimeParams (InternalMethods) +@implementation MTRScenesManagementClusterEnhancedAddSceneParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::MicrowaveOvenControl::Commands::AddMoreTime::Type encodableStruct; + chip::app::Clusters::ScenesManagement::Commands::EnhancedAddScene::Type encodableStruct; ListFreer listFreer; { - encodableStruct.timeToAdd = self.timeToAdd.unsignedIntValue; + 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); @@ -14456,83 +14311,105 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROperationalStateClusterPauseParams +@implementation MTRScenesManagementClusterEnhancedAddSceneResponseParams - (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 = [[MTROperationalStateClusterPauseParams alloc] init]; + auto other = [[MTRScenesManagementClusterEnhancedAddSceneResponseParams 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 MTROperationalStateClusterPauseParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error { - chip::app::Clusters::OperationalState::Commands::Pause::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::EnhancedAddSceneResponse::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 MTRScenesManagementClusterEnhancedAddSceneResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ScenesManagement::Commands::EnhancedAddSceneResponse::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 MTROperationalStateClusterStopParams +@implementation MTRScenesManagementClusterEnhancedViewSceneParams - (instancetype)init { if (self = [super init]) { + + _groupID = @(0); + + _sceneID = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -14541,8 +14418,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROperationalStateClusterStopParams alloc] init]; + auto other = [[MTRScenesManagementClusterEnhancedViewSceneParams alloc] init]; + other.groupID = self.groupID; + other.sceneID = self.sceneID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -14551,18 +14430,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 MTROperationalStateClusterStopParams (InternalMethods) +@implementation MTRScenesManagementClusterEnhancedViewSceneParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::OperationalState::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()) { @@ -14602,83 +14487,177 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROperationalStateClusterStartParams +@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 = [[MTROperationalStateClusterStartParams 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 MTROperationalStateClusterStartParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error { - chip::app::Clusters::OperationalState::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; + } + } + { + 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 decodedObj; + return CHIP_NO_ERROR; } + @end -@implementation MTROperationalStateClusterResumeParams +@implementation MTRScenesManagementClusterCopySceneParams - (instancetype)init { if (self = [super init]) { + + _mode = @(0); + + _groupIdentifierFrom = @(0); + + _sceneIdentifierFrom = @(0); + + _groupIdentifierTo = @(0); + + _sceneIdentifierTo = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -14687,8 +14666,13 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROperationalStateClusterResumeParams 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; @@ -14697,18 +14681,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 MTROperationalStateClusterResumeParams (InternalMethods) +@implementation MTRScenesManagementClusterCopySceneParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::OperationalState::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()) { @@ -14748,28 +14747,34 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTROperationalStateClusterOperationalCommandResponseParams +@implementation MTRScenesManagementClusterCopySceneResponseParams - (instancetype)init { if (self = [super init]) { - _commandResponseState = [MTROperationalStateClusterErrorStateStruct new]; + _status = @(0); + + _groupIdentifierFrom = @(0); + + _sceneIdentifierFrom = @(0); } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTROperationalStateClusterOperationalCommandResponseParams 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; } @@ -14780,7 +14785,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::OperationalState::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() @@ -14815,38 +14820,25 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r @end -@implementation MTROperationalStateClusterOperationalCommandResponseParams (InternalMethods) +@implementation MTRScenesManagementClusterCopySceneResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::OperationalState::Commands::OperationalCommandResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::ScenesManagement::Commands::CopySceneResponse::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; - } - } 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; } @end -@implementation MTRRVCOperationalStateClusterPauseParams +@implementation MTRHEPAFilterMonitoringClusterResetConditionParams - (instancetype)init { if (self = [super init]) { @@ -14858,7 +14850,7 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRRVCOperationalStateClusterPauseParams alloc] init]; + auto other = [[MTRHEPAFilterMonitoringClusterResetConditionParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -14874,11 +14866,11 @@ - (NSString *)description @end -@implementation MTRRVCOperationalStateClusterPauseParams (InternalMethods) +@implementation MTRHEPAFilterMonitoringClusterResetConditionParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::RvcOperationalState::Commands::Pause::Type encodableStruct; + chip::app::Clusters::HepaFilterMonitoring::Commands::ResetCondition::Type encodableStruct; ListFreer listFreer; auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -14919,7 +14911,7 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRRVCOperationalStateClusterStopParams +@implementation MTRActivatedCarbonFilterMonitoringClusterResetConditionParams - (instancetype)init { if (self = [super init]) { @@ -14931,7 +14923,7 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRRVCOperationalStateClusterStopParams alloc] init]; + auto other = [[MTRActivatedCarbonFilterMonitoringClusterResetConditionParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -14947,11 +14939,11 @@ - (NSString *)description @end -@implementation MTRRVCOperationalStateClusterStopParams (InternalMethods) +@implementation MTRActivatedCarbonFilterMonitoringClusterResetConditionParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::RvcOperationalState::Commands::Stop::Type encodableStruct; + chip::app::Clusters::ActivatedCarbonFilterMonitoring::Commands::ResetCondition::Type encodableStruct; ListFreer listFreer; auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -14992,10 +14984,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRRVCOperationalStateClusterStartParams +@implementation MTRBooleanStateConfigurationClusterSuppressAlarmParams - (instancetype)init { if (self = [super init]) { + + _alarmsToSuppress = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -15004,8 +14998,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRRVCOperationalStateClusterStartParams alloc] init]; + auto other = [[MTRBooleanStateConfigurationClusterSuppressAlarmParams alloc] init]; + other.alarmsToSuppress = self.alarmsToSuppress; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -15014,18 +15009,21 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: alarmsToSuppress:%@; >", NSStringFromClass([self class]), _alarmsToSuppress]; return descriptionString; } @end -@implementation MTRRVCOperationalStateClusterStartParams (InternalMethods) +@implementation MTRBooleanStateConfigurationClusterSuppressAlarmParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::RvcOperationalState::Commands::Start::Type encodableStruct; + chip::app::Clusters::BooleanStateConfiguration::Commands::SuppressAlarm::Type encodableStruct; ListFreer listFreer; + { + encodableStruct.alarmsToSuppress = static_cast>(self.alarmsToSuppress.unsignedCharValue); + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -15065,10 +15063,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRRVCOperationalStateClusterResumeParams +@implementation MTRBooleanStateConfigurationClusterEnableDisableAlarmParams - (instancetype)init { if (self = [super init]) { + + _alarmsToEnableDisable = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -15077,8 +15077,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRRVCOperationalStateClusterResumeParams alloc] init]; + auto other = [[MTRBooleanStateConfigurationClusterEnableDisableAlarmParams alloc] init]; + other.alarmsToEnableDisable = self.alarmsToEnableDisable; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -15087,18 +15088,21 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: alarmsToEnableDisable:%@; >", NSStringFromClass([self class]), _alarmsToEnableDisable]; return descriptionString; } @end -@implementation MTRRVCOperationalStateClusterResumeParams (InternalMethods) +@implementation MTRBooleanStateConfigurationClusterEnableDisableAlarmParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::RvcOperationalState::Commands::Resume::Type encodableStruct; + chip::app::Clusters::BooleanStateConfiguration::Commands::EnableDisableAlarm::Type encodableStruct; ListFreer listFreer; + { + encodableStruct.alarmsToEnableDisable = static_cast>(self.alarmsToEnableDisable.unsignedCharValue); + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -15138,105 +15142,103 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRRVCOperationalStateClusterOperationalCommandResponseParams +@implementation MTRValveConfigurationAndControlClusterOpenParams - (instancetype)init { if (self = [super init]) { - _commandResponseState = [MTRRVCOperationalStateClusterErrorStateStruct new]; + _openDuration = nil; + + _targetLevel = nil; + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRRVCOperationalStateClusterOperationalCommandResponseParams alloc] init]; + auto other = [[MTRValveConfigurationAndControlClusterOpenParams alloc] init]; - other.commandResponseState = self.commandResponseState; + other.openDuration = self.openDuration; + other.targetLevel = self.targetLevel; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: commandResponseState:%@; >", NSStringFromClass([self class]), _commandResponseState]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: openDuration:%@; targetLevel:%@; >", NSStringFromClass([self class]), _openDuration, _targetLevel]; return descriptionString; } -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error -{ - if (!(self = [super init])) { - return nil; - } - - using DecodableType = chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::DecodableType; - chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue - clusterID:DecodableType::GetClusterId() - commandID:DecodableType::GetCommandId() - error:error]; - if (buffer.IsNull()) { - return nil; - } +@end - chip::TLV::TLVReader reader; - reader.Init(buffer->Start(), buffer->DataLength()); +@implementation MTRValveConfigurationAndControlClusterOpenParams (InternalMethods) - 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_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::ValveConfigurationAndControl::Commands::Open::Type encodableStruct; + ListFreer listFreer; + { + if (self.openDuration != nil) { + auto & definedValue_0 = encodableStruct.openDuration.Emplace(); + if (self.openDuration == nil) { + definedValue_0.SetNull(); + } else { + auto & nonNullValue_1 = definedValue_0.SetNonNull(); + nonNullValue_1 = self.openDuration.unsignedIntValue; } } } + { + if (self.targetLevel != nil) { + auto & definedValue_0 = encodableStruct.targetLevel.Emplace(); + definedValue_0 = self.targetLevel.unsignedCharValue; + } + } - 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 buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + if (buffer.IsNull()) { + return CHIP_ERROR_NO_MEMORY; } - return nil; -} -@end + chip::System::PacketBufferTLVWriter writer; + // Commands never need chained buffers, since they cannot be chunked. + writer.Init(std::move(buffer), /* useChainedBuffers = */ false); -@implementation MTRRVCOperationalStateClusterOperationalCommandResponseParams (InternalMethods) + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::RvcOperationalState::Commands::OperationalCommandResponse::DecodableType &)decodableStruct + 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.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; + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; } - 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 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 MTRHEPAFilterMonitoringClusterResetConditionParams +@implementation MTRValveConfigurationAndControlClusterCloseParams - (instancetype)init { if (self = [super init]) { @@ -15248,7 +15250,7 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRHEPAFilterMonitoringClusterResetConditionParams alloc] init]; + auto other = [[MTRValveConfigurationAndControlClusterCloseParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -15264,11 +15266,11 @@ - (NSString *)description @end -@implementation MTRHEPAFilterMonitoringClusterResetConditionParams (InternalMethods) +@implementation MTRValveConfigurationAndControlClusterCloseParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::HepaFilterMonitoring::Commands::ResetCondition::Type encodableStruct; + chip::app::Clusters::ValveConfigurationAndControl::Commands::Close::Type encodableStruct; ListFreer listFreer; auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -15309,10 +15311,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRActivatedCarbonFilterMonitoringClusterResetConditionParams +@implementation MTRDemandResponseLoadControlClusterRegisterLoadControlProgramRequestParams - (instancetype)init { if (self = [super init]) { + + _loadControlProgram = [MTRDemandResponseLoadControlClusterLoadControlProgramStruct new]; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -15321,8 +15325,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRActivatedCarbonFilterMonitoringClusterResetConditionParams alloc] init]; + auto other = [[MTRDemandResponseLoadControlClusterRegisterLoadControlProgramRequestParams alloc] init]; + other.loadControlProgram = self.loadControlProgram; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -15331,18 +15336,40 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: loadControlProgram:%@; >", NSStringFromClass([self class]), _loadControlProgram]; return descriptionString; } @end -@implementation MTRActivatedCarbonFilterMonitoringClusterResetConditionParams (InternalMethods) +@implementation MTRDemandResponseLoadControlClusterRegisterLoadControlProgramRequestParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::ActivatedCarbonFilterMonitoring::Commands::ResetCondition::Type encodableStruct; + chip::app::Clusters::DemandResponseLoadControl::Commands::RegisterLoadControlProgramRequest::Type encodableStruct; ListFreer listFreer; + { + encodableStruct.loadControlProgram.programID = AsByteSpan(self.loadControlProgram.programID); + encodableStruct.loadControlProgram.name = AsCharSpan(self.loadControlProgram.name); + if (self.loadControlProgram.enrollmentGroup == nil) { + encodableStruct.loadControlProgram.enrollmentGroup.SetNull(); + } else { + auto & nonNullValue_1 = encodableStruct.loadControlProgram.enrollmentGroup.SetNonNull(); + nonNullValue_1 = self.loadControlProgram.enrollmentGroup.unsignedCharValue; + } + if (self.loadControlProgram.randomStartMinutes == nil) { + encodableStruct.loadControlProgram.randomStartMinutes.SetNull(); + } else { + auto & nonNullValue_1 = encodableStruct.loadControlProgram.randomStartMinutes.SetNonNull(); + nonNullValue_1 = self.loadControlProgram.randomStartMinutes.unsignedCharValue; + } + if (self.loadControlProgram.randomDurationMinutes == nil) { + encodableStruct.loadControlProgram.randomDurationMinutes.SetNull(); + } else { + auto & nonNullValue_1 = encodableStruct.loadControlProgram.randomDurationMinutes.SetNonNull(); + nonNullValue_1 = self.loadControlProgram.randomDurationMinutes.unsignedCharValue; + } + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -15382,12 +15409,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRBooleanStateConfigurationClusterSuppressAlarmParams +@implementation MTRDemandResponseLoadControlClusterUnregisterLoadControlProgramRequestParams - (instancetype)init { if (self = [super init]) { - _alarmsToSuppress = @(0); + _loadControlProgramID = [NSData data]; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -15396,9 +15423,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRBooleanStateConfigurationClusterSuppressAlarmParams alloc] init]; + auto other = [[MTRDemandResponseLoadControlClusterUnregisterLoadControlProgramRequestParams alloc] init]; - other.alarmsToSuppress = self.alarmsToSuppress; + other.loadControlProgramID = self.loadControlProgramID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -15407,20 +15434,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: alarmsToSuppress:%@; >", NSStringFromClass([self class]), _alarmsToSuppress]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: loadControlProgramID:%@; >", NSStringFromClass([self class]), [_loadControlProgramID base64EncodedStringWithOptions:0]]; return descriptionString; } @end -@implementation MTRBooleanStateConfigurationClusterSuppressAlarmParams (InternalMethods) +@implementation MTRDemandResponseLoadControlClusterUnregisterLoadControlProgramRequestParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::BooleanStateConfiguration::Commands::SuppressAlarm::Type encodableStruct; + chip::app::Clusters::DemandResponseLoadControl::Commands::UnregisterLoadControlProgramRequest::Type encodableStruct; ListFreer listFreer; { - encodableStruct.alarmsToSuppress = static_cast>(self.alarmsToSuppress.unsignedCharValue); + encodableStruct.loadControlProgramID = AsByteSpan(self.loadControlProgramID); } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -15461,12 +15488,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRBooleanStateConfigurationClusterEnableDisableAlarmParams +@implementation MTRDemandResponseLoadControlClusterAddLoadControlEventRequestParams - (instancetype)init { if (self = [super init]) { - _alarmsToEnableDisable = @(0); + _event = [MTRDemandResponseLoadControlClusterLoadControlEventStruct new]; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -15475,9 +15502,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRBooleanStateConfigurationClusterEnableDisableAlarmParams alloc] init]; + auto other = [[MTRDemandResponseLoadControlClusterAddLoadControlEventRequestParams alloc] init]; - other.alarmsToEnableDisable = self.alarmsToEnableDisable; + other.event = self.event; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -15486,20 +15513,117 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: alarmsToEnableDisable:%@; >", NSStringFromClass([self class]), _alarmsToEnableDisable]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: event:%@; >", NSStringFromClass([self class]), _event]; return descriptionString; } @end -@implementation MTRBooleanStateConfigurationClusterEnableDisableAlarmParams (InternalMethods) +@implementation MTRDemandResponseLoadControlClusterAddLoadControlEventRequestParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::BooleanStateConfiguration::Commands::EnableDisableAlarm::Type encodableStruct; + chip::app::Clusters::DemandResponseLoadControl::Commands::AddLoadControlEventRequest::Type encodableStruct; ListFreer listFreer; { - encodableStruct.alarmsToEnableDisable = static_cast>(self.alarmsToEnableDisable.unsignedCharValue); + encodableStruct.event.eventID = AsByteSpan(self.event.eventID); + if (self.event.programID == nil) { + encodableStruct.event.programID.SetNull(); + } else { + auto & nonNullValue_1 = encodableStruct.event.programID.SetNonNull(); + nonNullValue_1 = AsByteSpan(self.event.programID); + } + encodableStruct.event.control = static_cast>(self.event.control.unsignedShortValue); + encodableStruct.event.deviceClass = static_cast>(self.event.deviceClass.unsignedIntValue); + if (self.event.enrollmentGroup != nil) { + auto & definedValue_1 = encodableStruct.event.enrollmentGroup.Emplace(); + definedValue_1 = self.event.enrollmentGroup.unsignedCharValue; + } + encodableStruct.event.criticality = static_cast>(self.event.criticality.unsignedCharValue); + if (self.event.startTime == nil) { + encodableStruct.event.startTime.SetNull(); + } else { + auto & nonNullValue_1 = encodableStruct.event.startTime.SetNonNull(); + nonNullValue_1 = self.event.startTime.unsignedIntValue; + } + { + using ListType_1 = std::remove_reference_t; + using ListMemberType_1 = ListMemberTypeGetter::Type; + if (self.event.transitions.count != 0) { + auto * listHolder_1 = new ListHolder(self.event.transitions.count); + if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { + return CHIP_ERROR_INVALID_ARGUMENT; + } + listFreer.add(listHolder_1); + for (size_t i_1 = 0; i_1 < self.event.transitions.count; ++i_1) { + if (![self.event.transitions[i_1] isKindOfClass:[MTRDemandResponseLoadControlClusterLoadControlEventTransitionStruct class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_1 = (MTRDemandResponseLoadControlClusterLoadControlEventTransitionStruct *) self.event.transitions[i_1]; + listHolder_1->mList[i_1].duration = element_1.duration.unsignedShortValue; + listHolder_1->mList[i_1].control = static_castmList[i_1].control)>>(element_1.control.unsignedShortValue); + if (element_1.temperatureControl != nil) { + auto & definedValue_3 = listHolder_1->mList[i_1].temperatureControl.Emplace(); + if (element_1.temperatureControl.coolingTempOffset != nil) { + auto & definedValue_5 = definedValue_3.coolingTempOffset.Emplace(); + if (element_1.temperatureControl.coolingTempOffset == nil) { + definedValue_5.SetNull(); + } else { + auto & nonNullValue_6 = definedValue_5.SetNonNull(); + nonNullValue_6 = element_1.temperatureControl.coolingTempOffset.unsignedShortValue; + } + } + if (element_1.temperatureControl.heatingtTempOffset != nil) { + auto & definedValue_5 = definedValue_3.heatingtTempOffset.Emplace(); + if (element_1.temperatureControl.heatingtTempOffset == nil) { + definedValue_5.SetNull(); + } else { + auto & nonNullValue_6 = definedValue_5.SetNonNull(); + nonNullValue_6 = element_1.temperatureControl.heatingtTempOffset.unsignedShortValue; + } + } + if (element_1.temperatureControl.coolingTempSetpoint != nil) { + auto & definedValue_5 = definedValue_3.coolingTempSetpoint.Emplace(); + if (element_1.temperatureControl.coolingTempSetpoint == nil) { + definedValue_5.SetNull(); + } else { + auto & nonNullValue_6 = definedValue_5.SetNonNull(); + nonNullValue_6 = element_1.temperatureControl.coolingTempSetpoint.shortValue; + } + } + if (element_1.temperatureControl.heatingTempSetpoint != nil) { + auto & definedValue_5 = definedValue_3.heatingTempSetpoint.Emplace(); + if (element_1.temperatureControl.heatingTempSetpoint == nil) { + definedValue_5.SetNull(); + } else { + auto & nonNullValue_6 = definedValue_5.SetNonNull(); + nonNullValue_6 = element_1.temperatureControl.heatingTempSetpoint.shortValue; + } + } + } + if (element_1.averageLoadControl != nil) { + auto & definedValue_3 = listHolder_1->mList[i_1].averageLoadControl.Emplace(); + definedValue_3.loadAdjustment = element_1.averageLoadControl.loadAdjustment.charValue; + } + if (element_1.dutyCycleControl != nil) { + auto & definedValue_3 = listHolder_1->mList[i_1].dutyCycleControl.Emplace(); + definedValue_3.dutyCycle = element_1.dutyCycleControl.dutyCycle.unsignedCharValue; + } + if (element_1.powerSavingsControl != nil) { + auto & definedValue_3 = listHolder_1->mList[i_1].powerSavingsControl.Emplace(); + definedValue_3.powerSavings = element_1.powerSavingsControl.powerSavings.unsignedCharValue; + } + if (element_1.heatingSourceControl != nil) { + auto & definedValue_3 = listHolder_1->mList[i_1].heatingSourceControl.Emplace(); + definedValue_3.heatingSource = static_cast>(element_1.heatingSourceControl.heatingSource.unsignedCharValue); + } + } + encodableStruct.event.transitions = ListType_1(listHolder_1->mList, self.event.transitions.count); + } else { + encodableStruct.event.transitions = ListType_1(); + } + } } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -15540,14 +15664,14 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRValveConfigurationAndControlClusterOpenParams +@implementation MTRDemandResponseLoadControlClusterRemoveLoadControlEventRequestParams - (instancetype)init { if (self = [super init]) { - _openDuration = nil; + _eventID = [NSData data]; - _targetLevel = nil; + _cancelControl = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -15556,10 +15680,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRValveConfigurationAndControlClusterOpenParams alloc] init]; + auto other = [[MTRDemandResponseLoadControlClusterRemoveLoadControlEventRequestParams alloc] init]; - other.openDuration = self.openDuration; - other.targetLevel = self.targetLevel; + other.eventID = self.eventID; + other.cancelControl = self.cancelControl; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -15568,34 +15692,23 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: openDuration:%@; targetLevel:%@; >", NSStringFromClass([self class]), _openDuration, _targetLevel]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: eventID:%@; cancelControl:%@; >", NSStringFromClass([self class]), [_eventID base64EncodedStringWithOptions:0], _cancelControl]; return descriptionString; } @end -@implementation MTRValveConfigurationAndControlClusterOpenParams (InternalMethods) +@implementation MTRDemandResponseLoadControlClusterRemoveLoadControlEventRequestParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::ValveConfigurationAndControl::Commands::Open::Type encodableStruct; + chip::app::Clusters::DemandResponseLoadControl::Commands::RemoveLoadControlEventRequest::Type encodableStruct; ListFreer listFreer; { - if (self.openDuration != nil) { - auto & definedValue_0 = encodableStruct.openDuration.Emplace(); - if (self.openDuration == nil) { - definedValue_0.SetNull(); - } else { - auto & nonNullValue_1 = definedValue_0.SetNonNull(); - nonNullValue_1 = self.openDuration.unsignedIntValue; - } - } + encodableStruct.eventID = AsByteSpan(self.eventID); } { - if (self.targetLevel != nil) { - auto & definedValue_0 = encodableStruct.targetLevel.Emplace(); - definedValue_0 = self.targetLevel.unsignedCharValue; - } + encodableStruct.cancelControl = static_cast>(self.cancelControl.unsignedShortValue); } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -15636,7 +15749,7 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRValveConfigurationAndControlClusterCloseParams +@implementation MTRDemandResponseLoadControlClusterClearLoadControlEventsRequestParams - (instancetype)init { if (self = [super init]) { @@ -15648,7 +15761,7 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRValveConfigurationAndControlClusterCloseParams alloc] init]; + auto other = [[MTRDemandResponseLoadControlClusterClearLoadControlEventsRequestParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -15664,11 +15777,11 @@ - (NSString *)description @end -@implementation MTRValveConfigurationAndControlClusterCloseParams (InternalMethods) +@implementation MTRDemandResponseLoadControlClusterClearLoadControlEventsRequestParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::ValveConfigurationAndControl::Commands::Close::Type encodableStruct; + chip::app::Clusters::DemandResponseLoadControl::Commands::ClearLoadControlEventsRequest::Type encodableStruct; ListFreer listFreer; auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -15709,12 +15822,14 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDemandResponseLoadControlClusterRegisterLoadControlProgramRequestParams +@implementation MTRDeviceEnergyManagementClusterPowerAdjustRequestParams - (instancetype)init { if (self = [super init]) { - _loadControlProgram = [MTRDemandResponseLoadControlClusterLoadControlProgramStruct new]; + _power = @(0); + + _duration = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -15723,9 +15838,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDemandResponseLoadControlClusterRegisterLoadControlProgramRequestParams alloc] init]; + auto other = [[MTRDeviceEnergyManagementClusterPowerAdjustRequestParams alloc] init]; - other.loadControlProgram = self.loadControlProgram; + other.power = self.power; + other.duration = self.duration; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -15734,39 +15850,23 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: loadControlProgram:%@; >", NSStringFromClass([self class]), _loadControlProgram]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: power:%@; duration:%@; >", NSStringFromClass([self class]), _power, _duration]; return descriptionString; } @end -@implementation MTRDemandResponseLoadControlClusterRegisterLoadControlProgramRequestParams (InternalMethods) +@implementation MTRDeviceEnergyManagementClusterPowerAdjustRequestParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DemandResponseLoadControl::Commands::RegisterLoadControlProgramRequest::Type encodableStruct; - ListFreer listFreer; - { - encodableStruct.loadControlProgram.programID = AsByteSpan(self.loadControlProgram.programID); - encodableStruct.loadControlProgram.name = AsCharSpan(self.loadControlProgram.name); - if (self.loadControlProgram.enrollmentGroup == nil) { - encodableStruct.loadControlProgram.enrollmentGroup.SetNull(); - } else { - auto & nonNullValue_1 = encodableStruct.loadControlProgram.enrollmentGroup.SetNonNull(); - nonNullValue_1 = self.loadControlProgram.enrollmentGroup.unsignedCharValue; - } - if (self.loadControlProgram.randomStartMinutes == nil) { - encodableStruct.loadControlProgram.randomStartMinutes.SetNull(); - } else { - auto & nonNullValue_1 = encodableStruct.loadControlProgram.randomStartMinutes.SetNonNull(); - nonNullValue_1 = self.loadControlProgram.randomStartMinutes.unsignedCharValue; - } - if (self.loadControlProgram.randomDurationMinutes == nil) { - encodableStruct.loadControlProgram.randomDurationMinutes.SetNull(); - } else { - auto & nonNullValue_1 = encodableStruct.loadControlProgram.randomDurationMinutes.SetNonNull(); - nonNullValue_1 = self.loadControlProgram.randomDurationMinutes.unsignedCharValue; - } + chip::app::Clusters::DeviceEnergyManagement::Commands::PowerAdjustRequest::Type encodableStruct; + ListFreer listFreer; + { + encodableStruct.power = self.power.longLongValue; + } + { + encodableStruct.duration = self.duration.unsignedIntValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -15807,12 +15907,10 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDemandResponseLoadControlClusterUnregisterLoadControlProgramRequestParams +@implementation MTRDeviceEnergyManagementClusterCancelPowerAdjustRequestParams - (instancetype)init { if (self = [super init]) { - - _loadControlProgramID = [NSData data]; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -15821,9 +15919,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDemandResponseLoadControlClusterUnregisterLoadControlProgramRequestParams alloc] init]; + auto other = [[MTRDeviceEnergyManagementClusterCancelPowerAdjustRequestParams alloc] init]; - other.loadControlProgramID = self.loadControlProgramID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -15832,21 +15929,18 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: loadControlProgramID:%@; >", NSStringFromClass([self class]), [_loadControlProgramID base64EncodedStringWithOptions:0]]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } @end -@implementation MTRDemandResponseLoadControlClusterUnregisterLoadControlProgramRequestParams (InternalMethods) +@implementation MTRDeviceEnergyManagementClusterCancelPowerAdjustRequestParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DemandResponseLoadControl::Commands::UnregisterLoadControlProgramRequest::Type encodableStruct; + chip::app::Clusters::DeviceEnergyManagement::Commands::CancelPowerAdjustRequest::Type encodableStruct; ListFreer listFreer; - { - encodableStruct.loadControlProgramID = AsByteSpan(self.loadControlProgramID); - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -15886,12 +15980,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDemandResponseLoadControlClusterAddLoadControlEventRequestParams +@implementation MTRDeviceEnergyManagementClusterStartTimeAdjustRequestParams - (instancetype)init { if (self = [super init]) { - _event = [MTRDemandResponseLoadControlClusterLoadControlEventStruct new]; + _requestedStartTime = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -15900,9 +15994,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDemandResponseLoadControlClusterAddLoadControlEventRequestParams alloc] init]; + auto other = [[MTRDeviceEnergyManagementClusterStartTimeAdjustRequestParams alloc] init]; - other.event = self.event; + other.requestedStartTime = self.requestedStartTime; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -15911,117 +16005,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: event:%@; >", NSStringFromClass([self class]), _event]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: requestedStartTime:%@; >", NSStringFromClass([self class]), _requestedStartTime]; return descriptionString; } @end -@implementation MTRDemandResponseLoadControlClusterAddLoadControlEventRequestParams (InternalMethods) +@implementation MTRDeviceEnergyManagementClusterStartTimeAdjustRequestParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DemandResponseLoadControl::Commands::AddLoadControlEventRequest::Type encodableStruct; + chip::app::Clusters::DeviceEnergyManagement::Commands::StartTimeAdjustRequest::Type encodableStruct; ListFreer listFreer; { - encodableStruct.event.eventID = AsByteSpan(self.event.eventID); - if (self.event.programID == nil) { - encodableStruct.event.programID.SetNull(); - } else { - auto & nonNullValue_1 = encodableStruct.event.programID.SetNonNull(); - nonNullValue_1 = AsByteSpan(self.event.programID); - } - encodableStruct.event.control = static_cast>(self.event.control.unsignedShortValue); - encodableStruct.event.deviceClass = static_cast>(self.event.deviceClass.unsignedIntValue); - if (self.event.enrollmentGroup != nil) { - auto & definedValue_1 = encodableStruct.event.enrollmentGroup.Emplace(); - definedValue_1 = self.event.enrollmentGroup.unsignedCharValue; - } - encodableStruct.event.criticality = static_cast>(self.event.criticality.unsignedCharValue); - if (self.event.startTime == nil) { - encodableStruct.event.startTime.SetNull(); - } else { - auto & nonNullValue_1 = encodableStruct.event.startTime.SetNonNull(); - nonNullValue_1 = self.event.startTime.unsignedIntValue; - } - { - using ListType_1 = std::remove_reference_t; - using ListMemberType_1 = ListMemberTypeGetter::Type; - if (self.event.transitions.count != 0) { - auto * listHolder_1 = new ListHolder(self.event.transitions.count); - if (listHolder_1 == nullptr || listHolder_1->mList == nullptr) { - return CHIP_ERROR_INVALID_ARGUMENT; - } - listFreer.add(listHolder_1); - for (size_t i_1 = 0; i_1 < self.event.transitions.count; ++i_1) { - if (![self.event.transitions[i_1] isKindOfClass:[MTRDemandResponseLoadControlClusterLoadControlEventTransitionStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_1 = (MTRDemandResponseLoadControlClusterLoadControlEventTransitionStruct *) self.event.transitions[i_1]; - listHolder_1->mList[i_1].duration = element_1.duration.unsignedShortValue; - listHolder_1->mList[i_1].control = static_castmList[i_1].control)>>(element_1.control.unsignedShortValue); - if (element_1.temperatureControl != nil) { - auto & definedValue_3 = listHolder_1->mList[i_1].temperatureControl.Emplace(); - if (element_1.temperatureControl.coolingTempOffset != nil) { - auto & definedValue_5 = definedValue_3.coolingTempOffset.Emplace(); - if (element_1.temperatureControl.coolingTempOffset == nil) { - definedValue_5.SetNull(); - } else { - auto & nonNullValue_6 = definedValue_5.SetNonNull(); - nonNullValue_6 = element_1.temperatureControl.coolingTempOffset.unsignedShortValue; - } - } - if (element_1.temperatureControl.heatingtTempOffset != nil) { - auto & definedValue_5 = definedValue_3.heatingtTempOffset.Emplace(); - if (element_1.temperatureControl.heatingtTempOffset == nil) { - definedValue_5.SetNull(); - } else { - auto & nonNullValue_6 = definedValue_5.SetNonNull(); - nonNullValue_6 = element_1.temperatureControl.heatingtTempOffset.unsignedShortValue; - } - } - if (element_1.temperatureControl.coolingTempSetpoint != nil) { - auto & definedValue_5 = definedValue_3.coolingTempSetpoint.Emplace(); - if (element_1.temperatureControl.coolingTempSetpoint == nil) { - definedValue_5.SetNull(); - } else { - auto & nonNullValue_6 = definedValue_5.SetNonNull(); - nonNullValue_6 = element_1.temperatureControl.coolingTempSetpoint.shortValue; - } - } - if (element_1.temperatureControl.heatingTempSetpoint != nil) { - auto & definedValue_5 = definedValue_3.heatingTempSetpoint.Emplace(); - if (element_1.temperatureControl.heatingTempSetpoint == nil) { - definedValue_5.SetNull(); - } else { - auto & nonNullValue_6 = definedValue_5.SetNonNull(); - nonNullValue_6 = element_1.temperatureControl.heatingTempSetpoint.shortValue; - } - } - } - if (element_1.averageLoadControl != nil) { - auto & definedValue_3 = listHolder_1->mList[i_1].averageLoadControl.Emplace(); - definedValue_3.loadAdjustment = element_1.averageLoadControl.loadAdjustment.charValue; - } - if (element_1.dutyCycleControl != nil) { - auto & definedValue_3 = listHolder_1->mList[i_1].dutyCycleControl.Emplace(); - definedValue_3.dutyCycle = element_1.dutyCycleControl.dutyCycle.unsignedCharValue; - } - if (element_1.powerSavingsControl != nil) { - auto & definedValue_3 = listHolder_1->mList[i_1].powerSavingsControl.Emplace(); - definedValue_3.powerSavings = element_1.powerSavingsControl.powerSavings.unsignedCharValue; - } - if (element_1.heatingSourceControl != nil) { - auto & definedValue_3 = listHolder_1->mList[i_1].heatingSourceControl.Emplace(); - definedValue_3.heatingSource = static_cast>(element_1.heatingSourceControl.heatingSource.unsignedCharValue); - } - } - encodableStruct.event.transitions = ListType_1(listHolder_1->mList, self.event.transitions.count); - } else { - encodableStruct.event.transitions = ListType_1(); - } - } + encodableStruct.requestedStartTime = self.requestedStartTime.unsignedIntValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -16062,14 +16059,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDemandResponseLoadControlClusterRemoveLoadControlEventRequestParams +@implementation MTRDeviceEnergyManagementClusterPauseRequestParams - (instancetype)init { if (self = [super init]) { - _eventID = [NSData data]; - - _cancelControl = @(0); + _duration = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -16078,10 +16073,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDemandResponseLoadControlClusterRemoveLoadControlEventRequestParams alloc] init]; + auto other = [[MTRDeviceEnergyManagementClusterPauseRequestParams alloc] init]; - other.eventID = self.eventID; - other.cancelControl = self.cancelControl; + other.duration = self.duration; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -16090,23 +16084,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: eventID:%@; cancelControl:%@; >", NSStringFromClass([self class]), [_eventID base64EncodedStringWithOptions:0], _cancelControl]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: duration:%@; >", NSStringFromClass([self class]), _duration]; return descriptionString; } @end -@implementation MTRDemandResponseLoadControlClusterRemoveLoadControlEventRequestParams (InternalMethods) +@implementation MTRDeviceEnergyManagementClusterPauseRequestParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DemandResponseLoadControl::Commands::RemoveLoadControlEventRequest::Type encodableStruct; + chip::app::Clusters::DeviceEnergyManagement::Commands::PauseRequest::Type encodableStruct; ListFreer listFreer; { - encodableStruct.eventID = AsByteSpan(self.eventID); - } - { - encodableStruct.cancelControl = static_cast>(self.cancelControl.unsignedShortValue); + encodableStruct.duration = self.duration.unsignedIntValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -16147,7 +16138,7 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDemandResponseLoadControlClusterClearLoadControlEventsRequestParams +@implementation MTRDeviceEnergyManagementClusterResumeRequestParams - (instancetype)init { if (self = [super init]) { @@ -16159,7 +16150,7 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDemandResponseLoadControlClusterClearLoadControlEventsRequestParams alloc] init]; + auto other = [[MTRDeviceEnergyManagementClusterResumeRequestParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -16175,11 +16166,11 @@ - (NSString *)description @end -@implementation MTRDemandResponseLoadControlClusterClearLoadControlEventsRequestParams (InternalMethods) +@implementation MTRDeviceEnergyManagementClusterResumeRequestParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DemandResponseLoadControl::Commands::ClearLoadControlEventsRequest::Type encodableStruct; + chip::app::Clusters::DeviceEnergyManagement::Commands::ResumeRequest::Type encodableStruct; ListFreer listFreer; auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -16220,14 +16211,14 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDeviceEnergyManagementClusterPowerAdjustRequestParams +@implementation MTRDeviceEnergyManagementClusterModifyForecastRequestParams - (instancetype)init { if (self = [super init]) { - _power = @(0); + _forecastId = @(0); - _duration = @(0); + _slotAdjustments = [NSArray array]; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -16236,10 +16227,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDeviceEnergyManagementClusterPowerAdjustRequestParams alloc] init]; + auto other = [[MTRDeviceEnergyManagementClusterModifyForecastRequestParams alloc] init]; - other.power = self.power; - other.duration = self.duration; + other.forecastId = self.forecastId; + other.slotAdjustments = self.slotAdjustments; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -16248,97 +16239,47 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: power:%@; duration:%@; >", NSStringFromClass([self class]), _power, _duration]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: forecastId:%@; slotAdjustments:%@; >", NSStringFromClass([self class]), _forecastId, _slotAdjustments]; return descriptionString; } @end -@implementation MTRDeviceEnergyManagementClusterPowerAdjustRequestParams (InternalMethods) +@implementation MTRDeviceEnergyManagementClusterModifyForecastRequestParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DeviceEnergyManagement::Commands::PowerAdjustRequest::Type encodableStruct; + chip::app::Clusters::DeviceEnergyManagement::Commands::ModifyForecastRequest::Type encodableStruct; ListFreer listFreer; { - encodableStruct.power = self.power.longLongValue; + encodableStruct.forecastId = self.forecastId.unsignedIntValue; } { - encodableStruct.duration = self.duration.unsignedIntValue; - } - - 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 MTRDeviceEnergyManagementClusterCancelPowerAdjustRequestParams -- (instancetype)init -{ - if (self = [super init]) { - _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (self.slotAdjustments.count != 0) { + auto * listHolder_0 = new ListHolder(self.slotAdjustments.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.slotAdjustments.count; ++i_0) { + if (![self.slotAdjustments[i_0] isKindOfClass:[MTRDeviceEnergyManagementClusterSlotAdjustmentStruct class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (MTRDeviceEnergyManagementClusterSlotAdjustmentStruct *) self.slotAdjustments[i_0]; + listHolder_0->mList[i_0].slotIndex = element_0.slotIndex.unsignedCharValue; + listHolder_0->mList[i_0].nominalPower = element_0.nominalPower.longLongValue; + listHolder_0->mList[i_0].duration = element_0.duration.unsignedIntValue; + } + encodableStruct.slotAdjustments = ListType_0(listHolder_0->mList, self.slotAdjustments.count); + } else { + encodableStruct.slotAdjustments = ListType_0(); + } + } } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone; -{ - auto other = [[MTRDeviceEnergyManagementClusterCancelPowerAdjustRequestParams 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 MTRDeviceEnergyManagementClusterCancelPowerAdjustRequestParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader -{ - chip::app::Clusters::DeviceEnergyManagement::Commands::CancelPowerAdjustRequest::Type encodableStruct; - ListFreer listFreer; auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -16378,12 +16319,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDeviceEnergyManagementClusterStartTimeAdjustRequestParams +@implementation MTRDeviceEnergyManagementClusterRequestConstraintBasedForecastParams - (instancetype)init { if (self = [super init]) { - _requestedStartTime = @(0); + _constraints = [NSArray array]; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -16392,9 +16333,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDeviceEnergyManagementClusterStartTimeAdjustRequestParams alloc] init]; + auto other = [[MTRDeviceEnergyManagementClusterRequestConstraintBasedForecastParams alloc] init]; - other.requestedStartTime = self.requestedStartTime; + other.constraints = self.constraints; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -16403,20 +16344,54 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: requestedStartTime:%@; >", NSStringFromClass([self class]), _requestedStartTime]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: constraints:%@; >", NSStringFromClass([self class]), _constraints]; return descriptionString; } @end -@implementation MTRDeviceEnergyManagementClusterStartTimeAdjustRequestParams (InternalMethods) +@implementation MTRDeviceEnergyManagementClusterRequestConstraintBasedForecastParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DeviceEnergyManagement::Commands::StartTimeAdjustRequest::Type encodableStruct; + chip::app::Clusters::DeviceEnergyManagement::Commands::RequestConstraintBasedForecast::Type encodableStruct; ListFreer listFreer; { - encodableStruct.requestedStartTime = self.requestedStartTime.unsignedIntValue; + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (self.constraints.count != 0) { + auto * listHolder_0 = new ListHolder(self.constraints.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.constraints.count; ++i_0) { + if (![self.constraints[i_0] isKindOfClass:[MTRDeviceEnergyManagementClusterConstraintsStruct class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (MTRDeviceEnergyManagementClusterConstraintsStruct *) self.constraints[i_0]; + listHolder_0->mList[i_0].startTime = element_0.startTime.unsignedIntValue; + listHolder_0->mList[i_0].duration = element_0.duration.unsignedIntValue; + if (element_0.nominalPower != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].nominalPower.Emplace(); + definedValue_2 = element_0.nominalPower.longLongValue; + } + if (element_0.maximumEnergy != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].maximumEnergy.Emplace(); + definedValue_2 = element_0.maximumEnergy.longLongValue; + } + if (element_0.loadControl != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].loadControl.Emplace(); + definedValue_2 = element_0.loadControl.charValue; + } + } + encodableStruct.constraints = ListType_0(listHolder_0->mList, self.constraints.count); + } else { + encodableStruct.constraints = ListType_0(); + } + } } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -16457,86 +16432,117 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDeviceEnergyManagementClusterPauseRequestParams +@implementation MTREnergyEVSEClusterGetTargetsResponseParams - (instancetype)init { if (self = [super init]) { - _duration = @(0); - _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; + _dayOfWeekforSequence = @(0); + + _chargingTargets = [NSArray array]; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDeviceEnergyManagementClusterPauseRequestParams alloc] init]; + auto other = [[MTREnergyEVSEClusterGetTargetsResponseParams alloc] init]; - other.duration = self.duration; - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + other.dayOfWeekforSequence = self.dayOfWeekforSequence; + other.chargingTargets = self.chargingTargets; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: duration:%@; >", NSStringFromClass([self class]), _duration]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: dayOfWeekforSequence:%@; chargingTargets:%@; >", NSStringFromClass([self class]), _dayOfWeekforSequence, _chargingTargets]; return descriptionString; } -@end - -@implementation MTRDeviceEnergyManagementClusterPauseRequestParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error { - chip::app::Clusters::DeviceEnergyManagement::Commands::PauseRequest::Type encodableStruct; - ListFreer listFreer; - { - 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::EnergyEvse::Commands::GetTargetsResponse::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 MTREnergyEVSEClusterGetTargetsResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::EnergyEvse::Commands::GetTargetsResponse::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.dayOfWeekforSequence = [NSNumber numberWithUnsignedChar:decodableStruct.dayOfWeekforSequence.Raw()]; } - - auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); - if (decodedObj == nil) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + { + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = decodableStruct.chargingTargets.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTREnergyEVSEClusterChargingTargetStruct * newElement_0; + newElement_0 = [MTREnergyEVSEClusterChargingTargetStruct new]; + newElement_0.targetTimeMinutesPastMidnight = [NSNumber numberWithUnsignedShort:entry_0.targetTimeMinutesPastMidnight]; + if (entry_0.targetSoC.HasValue()) { + newElement_0.targetSoC = [NSNumber numberWithUnsignedChar:entry_0.targetSoC.Value()]; + } else { + newElement_0.targetSoC = nil; + } + if (entry_0.addedEnergy.HasValue()) { + newElement_0.addedEnergy = [NSNumber numberWithLongLong:entry_0.addedEnergy.Value()]; + } else { + newElement_0.addedEnergy = nil; + } + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + return err; + } + self.chargingTargets = array_0; } } - return decodedObj; + return CHIP_NO_ERROR; } + @end -@implementation MTRDeviceEnergyManagementClusterResumeRequestParams +@implementation MTREnergyEVSEClusterDisableParams - (instancetype)init { if (self = [super init]) { @@ -16548,7 +16554,7 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDeviceEnergyManagementClusterResumeRequestParams alloc] init]; + auto other = [[MTREnergyEVSEClusterDisableParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -16564,11 +16570,11 @@ - (NSString *)description @end -@implementation MTRDeviceEnergyManagementClusterResumeRequestParams (InternalMethods) +@implementation MTREnergyEVSEClusterDisableParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DeviceEnergyManagement::Commands::ResumeRequest::Type encodableStruct; + chip::app::Clusters::EnergyEvse::Commands::Disable::Type encodableStruct; ListFreer listFreer; auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -16609,14 +16615,16 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDeviceEnergyManagementClusterModifyForecastRequestParams +@implementation MTREnergyEVSEClusterEnableChargingParams - (instancetype)init { if (self = [super init]) { - _forecastId = @(0); + _chargingEnabledUntil = nil; - _slotAdjustments = [NSArray array]; + _minimumChargeCurrent = @(0); + + _maximumChargeCurrent = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -16625,10 +16633,11 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDeviceEnergyManagementClusterModifyForecastRequestParams alloc] init]; + auto other = [[MTREnergyEVSEClusterEnableChargingParams alloc] init]; - other.forecastId = self.forecastId; - other.slotAdjustments = self.slotAdjustments; + other.chargingEnabledUntil = self.chargingEnabledUntil; + other.minimumChargeCurrent = self.minimumChargeCurrent; + other.maximumChargeCurrent = self.maximumChargeCurrent; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -16637,46 +16646,31 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: forecastId:%@; slotAdjustments:%@; >", NSStringFromClass([self class]), _forecastId, _slotAdjustments]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: chargingEnabledUntil:%@; minimumChargeCurrent:%@; maximumChargeCurrent:%@; >", NSStringFromClass([self class]), _chargingEnabledUntil, _minimumChargeCurrent, _maximumChargeCurrent]; return descriptionString; } @end -@implementation MTRDeviceEnergyManagementClusterModifyForecastRequestParams (InternalMethods) +@implementation MTREnergyEVSEClusterEnableChargingParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DeviceEnergyManagement::Commands::ModifyForecastRequest::Type encodableStruct; + chip::app::Clusters::EnergyEvse::Commands::EnableCharging::Type encodableStruct; ListFreer listFreer; { - encodableStruct.forecastId = self.forecastId.unsignedIntValue; + if (self.chargingEnabledUntil == nil) { + encodableStruct.chargingEnabledUntil.SetNull(); + } else { + auto & nonNullValue_0 = encodableStruct.chargingEnabledUntil.SetNonNull(); + nonNullValue_0 = self.chargingEnabledUntil.unsignedIntValue; + } } { - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (self.slotAdjustments.count != 0) { - auto * listHolder_0 = new ListHolder(self.slotAdjustments.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.slotAdjustments.count; ++i_0) { - if (![self.slotAdjustments[i_0] isKindOfClass:[MTRDeviceEnergyManagementClusterSlotAdjustmentStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRDeviceEnergyManagementClusterSlotAdjustmentStruct *) self.slotAdjustments[i_0]; - listHolder_0->mList[i_0].slotIndex = element_0.slotIndex.unsignedCharValue; - listHolder_0->mList[i_0].nominalPower = element_0.nominalPower.longLongValue; - listHolder_0->mList[i_0].duration = element_0.duration.unsignedIntValue; - } - encodableStruct.slotAdjustments = ListType_0(listHolder_0->mList, self.slotAdjustments.count); - } else { - encodableStruct.slotAdjustments = ListType_0(); - } - } + encodableStruct.minimumChargeCurrent = self.minimumChargeCurrent.longLongValue; + } + { + encodableStruct.maximumChargeCurrent = self.maximumChargeCurrent.longLongValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -16717,12 +16711,14 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDeviceEnergyManagementClusterRequestConstraintBasedForecastParams +@implementation MTREnergyEVSEClusterEnableDischargingParams - (instancetype)init { if (self = [super init]) { - _constraints = [NSArray array]; + _dischargingEnabledUntil = nil; + + _maximumDischargeCurrent = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -16731,9 +16727,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDeviceEnergyManagementClusterRequestConstraintBasedForecastParams alloc] init]; + auto other = [[MTREnergyEVSEClusterEnableDischargingParams alloc] init]; - other.constraints = self.constraints; + other.dischargingEnabledUntil = self.dischargingEnabledUntil; + other.maximumDischargeCurrent = self.maximumDischargeCurrent; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -16742,55 +16739,29 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: constraints:%@; >", NSStringFromClass([self class]), _constraints]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: dischargingEnabledUntil:%@; maximumDischargeCurrent:%@; >", NSStringFromClass([self class]), _dischargingEnabledUntil, _maximumDischargeCurrent]; return descriptionString; } @end -@implementation MTRDeviceEnergyManagementClusterRequestConstraintBasedForecastParams (InternalMethods) +@implementation MTREnergyEVSEClusterEnableDischargingParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DeviceEnergyManagement::Commands::RequestConstraintBasedForecast::Type encodableStruct; + chip::app::Clusters::EnergyEvse::Commands::EnableDischarging::Type encodableStruct; ListFreer listFreer; { - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (self.constraints.count != 0) { - auto * listHolder_0 = new ListHolder(self.constraints.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.constraints.count; ++i_0) { - if (![self.constraints[i_0] isKindOfClass:[MTRDeviceEnergyManagementClusterConstraintsStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRDeviceEnergyManagementClusterConstraintsStruct *) self.constraints[i_0]; - listHolder_0->mList[i_0].startTime = element_0.startTime.unsignedIntValue; - listHolder_0->mList[i_0].duration = element_0.duration.unsignedIntValue; - if (element_0.nominalPower != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].nominalPower.Emplace(); - definedValue_2 = element_0.nominalPower.longLongValue; - } - if (element_0.maximumEnergy != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].maximumEnergy.Emplace(); - definedValue_2 = element_0.maximumEnergy.longLongValue; - } - if (element_0.loadControl != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].loadControl.Emplace(); - definedValue_2 = element_0.loadControl.charValue; - } - } - encodableStruct.constraints = ListType_0(listHolder_0->mList, self.constraints.count); - } else { - encodableStruct.constraints = ListType_0(); - } + if (self.dischargingEnabledUntil == nil) { + encodableStruct.dischargingEnabledUntil.SetNull(); + } else { + auto & nonNullValue_0 = encodableStruct.dischargingEnabledUntil.SetNonNull(); + nonNullValue_0 = self.dischargingEnabledUntil.unsignedIntValue; } } + { + encodableStruct.maximumDischargeCurrent = self.maximumDischargeCurrent.longLongValue; + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -16830,120 +16801,87 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTREnergyEVSEClusterGetTargetsResponseParams +@implementation MTREnergyEVSEClusterStartDiagnosticsParams - (instancetype)init { if (self = [super init]) { - - _dayOfWeekforSequence = @(0); - - _chargingTargets = [NSArray array]; + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTREnergyEVSEClusterGetTargetsResponseParams alloc] init]; + auto other = [[MTREnergyEVSEClusterStartDiagnosticsParams alloc] init]; - other.dayOfWeekforSequence = self.dayOfWeekforSequence; - other.chargingTargets = self.chargingTargets; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: dayOfWeekforSequence:%@; chargingTargets:%@; >", NSStringFromClass([self class]), _dayOfWeekforSequence, _chargingTargets]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error +@end + +@implementation MTREnergyEVSEClusterStartDiagnosticsParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - if (!(self = [super init])) { - return nil; - } + chip::app::Clusters::EnergyEvse::Commands::StartDiagnostics::Type encodableStruct; + ListFreer listFreer; - using DecodableType = chip::app::Clusters::EnergyEvse::Commands::GetTargetsResponse::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 MTREnergyEVSEClusterGetTargetsResponseParams (InternalMethods) + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::EnergyEvse::Commands::GetTargetsResponse::DecodableType &)decodableStruct +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error { - { - self.dayOfWeekforSequence = [NSNumber numberWithUnsignedChar:decodableStruct.dayOfWeekforSequence.Raw()]; + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; } - { - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = decodableStruct.chargingTargets.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - MTREnergyEVSEClusterChargingTargetStruct * newElement_0; - newElement_0 = [MTREnergyEVSEClusterChargingTargetStruct new]; - newElement_0.targetTimeMinutesPastMidnight = [NSNumber numberWithUnsignedShort:entry_0.targetTimeMinutesPastMidnight]; - if (entry_0.targetSoC.HasValue()) { - newElement_0.targetSoC = [NSNumber numberWithUnsignedChar:entry_0.targetSoC.Value()]; - } else { - newElement_0.targetSoC = nil; - } - if (entry_0.addedEnergy.HasValue()) { - newElement_0.addedEnergy = [NSNumber numberWithLongLong:entry_0.addedEnergy.Value()]; - } else { - newElement_0.addedEnergy = nil; - } - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - return err; - } - self.chargingTargets = array_0; + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; } } - return CHIP_NO_ERROR; + return decodedObj; } - @end -@implementation MTREnergyEVSEClusterDisableParams +@implementation MTREnergyEVSEClusterSetTargetsParams - (instancetype)init { if (self = [super init]) { + + _dayOfWeekforSequence = @(0); + + _chargingTargets = [NSArray array]; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -16952,8 +16890,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTREnergyEVSEClusterDisableParams alloc] init]; + auto other = [[MTREnergyEVSEClusterSetTargetsParams alloc] init]; + other.dayOfWeekforSequence = self.dayOfWeekforSequence; + other.chargingTargets = self.chargingTargets; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -16962,18 +16902,53 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: dayOfWeekforSequence:%@; chargingTargets:%@; >", NSStringFromClass([self class]), _dayOfWeekforSequence, _chargingTargets]; return descriptionString; } @end -@implementation MTREnergyEVSEClusterDisableParams (InternalMethods) +@implementation MTREnergyEVSEClusterSetTargetsParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::EnergyEvse::Commands::Disable::Type encodableStruct; + chip::app::Clusters::EnergyEvse::Commands::SetTargets::Type encodableStruct; ListFreer listFreer; + { + encodableStruct.dayOfWeekforSequence = static_cast>(self.dayOfWeekforSequence.unsignedCharValue); + } + { + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (self.chargingTargets.count != 0) { + auto * listHolder_0 = new ListHolder(self.chargingTargets.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.chargingTargets.count; ++i_0) { + if (![self.chargingTargets[i_0] isKindOfClass:[MTREnergyEVSEClusterChargingTargetStruct class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (MTREnergyEVSEClusterChargingTargetStruct *) self.chargingTargets[i_0]; + listHolder_0->mList[i_0].targetTimeMinutesPastMidnight = element_0.targetTimeMinutesPastMidnight.unsignedShortValue; + if (element_0.targetSoC != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].targetSoC.Emplace(); + definedValue_2 = element_0.targetSoC.unsignedCharValue; + } + if (element_0.addedEnergy != nil) { + auto & definedValue_2 = listHolder_0->mList[i_0].addedEnergy.Emplace(); + definedValue_2 = element_0.addedEnergy.longLongValue; + } + } + encodableStruct.chargingTargets = ListType_0(listHolder_0->mList, self.chargingTargets.count); + } else { + encodableStruct.chargingTargets = ListType_0(); + } + } + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -17013,16 +16988,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTREnergyEVSEClusterEnableChargingParams +@implementation MTREnergyEVSEClusterGetTargetsParams - (instancetype)init { if (self = [super init]) { - _chargingEnabledUntil = nil; - - _minimumChargeCurrent = @(0); - - _maximumChargeCurrent = @(0); + _daysToReturn = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -17031,11 +17002,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTREnergyEVSEClusterEnableChargingParams alloc] init]; + auto other = [[MTREnergyEVSEClusterGetTargetsParams alloc] init]; - other.chargingEnabledUntil = self.chargingEnabledUntil; - other.minimumChargeCurrent = self.minimumChargeCurrent; - other.maximumChargeCurrent = self.maximumChargeCurrent; + other.daysToReturn = self.daysToReturn; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -17044,31 +17013,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: chargingEnabledUntil:%@; minimumChargeCurrent:%@; maximumChargeCurrent:%@; >", NSStringFromClass([self class]), _chargingEnabledUntil, _minimumChargeCurrent, _maximumChargeCurrent]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: daysToReturn:%@; >", NSStringFromClass([self class]), _daysToReturn]; return descriptionString; } @end -@implementation MTREnergyEVSEClusterEnableChargingParams (InternalMethods) +@implementation MTREnergyEVSEClusterGetTargetsParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::EnergyEvse::Commands::EnableCharging::Type encodableStruct; + chip::app::Clusters::EnergyEvse::Commands::GetTargets::Type encodableStruct; ListFreer listFreer; { - if (self.chargingEnabledUntil == nil) { - encodableStruct.chargingEnabledUntil.SetNull(); - } else { - auto & nonNullValue_0 = encodableStruct.chargingEnabledUntil.SetNonNull(); - nonNullValue_0 = self.chargingEnabledUntil.unsignedIntValue; - } - } - { - encodableStruct.minimumChargeCurrent = self.minimumChargeCurrent.longLongValue; - } - { - encodableStruct.maximumChargeCurrent = self.maximumChargeCurrent.longLongValue; + encodableStruct.daysToReturn = static_cast>(self.daysToReturn.unsignedCharValue); } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -17109,14 +17067,10 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTREnergyEVSEClusterEnableDischargingParams +@implementation MTREnergyEVSEClusterClearTargetsParams - (instancetype)init { if (self = [super init]) { - - _dischargingEnabledUntil = nil; - - _maximumDischargeCurrent = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -17125,10 +17079,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTREnergyEVSEClusterEnableDischargingParams alloc] init]; + auto other = [[MTREnergyEVSEClusterClearTargetsParams alloc] init]; - other.dischargingEnabledUntil = self.dischargingEnabledUntil; - other.maximumDischargeCurrent = self.maximumDischargeCurrent; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -17137,29 +17089,18 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: dischargingEnabledUntil:%@; maximumDischargeCurrent:%@; >", NSStringFromClass([self class]), _dischargingEnabledUntil, _maximumDischargeCurrent]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } @end -@implementation MTREnergyEVSEClusterEnableDischargingParams (InternalMethods) +@implementation MTREnergyEVSEClusterClearTargetsParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::EnergyEvse::Commands::EnableDischarging::Type encodableStruct; + chip::app::Clusters::EnergyEvse::Commands::ClearTargets::Type encodableStruct; ListFreer listFreer; - { - if (self.dischargingEnabledUntil == nil) { - encodableStruct.dischargingEnabledUntil.SetNull(); - } else { - auto & nonNullValue_0 = encodableStruct.dischargingEnabledUntil.SetNonNull(); - nonNullValue_0 = self.dischargingEnabledUntil.unsignedIntValue; - } - } - { - encodableStruct.maximumDischargeCurrent = self.maximumDischargeCurrent.longLongValue; - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -17199,10 +17140,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTREnergyEVSEClusterStartDiagnosticsParams +@implementation MTRDoorLockClusterLockDoorParams - (instancetype)init { if (self = [super init]) { + + _pinCode = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -17211,8 +17154,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTREnergyEVSEClusterStartDiagnosticsParams alloc] init]; + auto other = [[MTRDoorLockClusterLockDoorParams alloc] init]; + other.pinCode = self.pinCode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -17221,18 +17165,24 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: pinCode:%@; >", NSStringFromClass([self class]), [_pinCode base64EncodedStringWithOptions:0]]; return descriptionString; } @end -@implementation MTREnergyEVSEClusterStartDiagnosticsParams (InternalMethods) +@implementation MTRDoorLockClusterLockDoorParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::EnergyEvse::Commands::StartDiagnostics::Type encodableStruct; + chip::app::Clusters::DoorLock::Commands::LockDoor::Type encodableStruct; ListFreer listFreer; + { + if (self.pinCode != nil) { + auto & definedValue_0 = encodableStruct.PINCode.Emplace(); + definedValue_0 = AsByteSpan(self.pinCode); + } + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -17272,14 +17222,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTREnergyEVSEClusterSetTargetsParams +@implementation MTRDoorLockClusterUnlockDoorParams - (instancetype)init { if (self = [super init]) { - _dayOfWeekforSequence = @(0); - - _chargingTargets = [NSArray array]; + _pinCode = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -17288,10 +17236,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTREnergyEVSEClusterSetTargetsParams alloc] init]; + auto other = [[MTRDoorLockClusterUnlockDoorParams alloc] init]; - other.dayOfWeekforSequence = self.dayOfWeekforSequence; - other.chargingTargets = self.chargingTargets; + other.pinCode = self.pinCode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -17300,51 +17247,22 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: dayOfWeekforSequence:%@; chargingTargets:%@; >", NSStringFromClass([self class]), _dayOfWeekforSequence, _chargingTargets]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: pinCode:%@; >", NSStringFromClass([self class]), [_pinCode base64EncodedStringWithOptions:0]]; return descriptionString; } @end -@implementation MTREnergyEVSEClusterSetTargetsParams (InternalMethods) +@implementation MTRDoorLockClusterUnlockDoorParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::EnergyEvse::Commands::SetTargets::Type encodableStruct; + chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type encodableStruct; ListFreer listFreer; { - encodableStruct.dayOfWeekforSequence = static_cast>(self.dayOfWeekforSequence.unsignedCharValue); - } - { - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (self.chargingTargets.count != 0) { - auto * listHolder_0 = new ListHolder(self.chargingTargets.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.chargingTargets.count; ++i_0) { - if (![self.chargingTargets[i_0] isKindOfClass:[MTREnergyEVSEClusterChargingTargetStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTREnergyEVSEClusterChargingTargetStruct *) self.chargingTargets[i_0]; - listHolder_0->mList[i_0].targetTimeMinutesPastMidnight = element_0.targetTimeMinutesPastMidnight.unsignedShortValue; - if (element_0.targetSoC != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].targetSoC.Emplace(); - definedValue_2 = element_0.targetSoC.unsignedCharValue; - } - if (element_0.addedEnergy != nil) { - auto & definedValue_2 = listHolder_0->mList[i_0].addedEnergy.Emplace(); - definedValue_2 = element_0.addedEnergy.longLongValue; - } - } - encodableStruct.chargingTargets = ListType_0(listHolder_0->mList, self.chargingTargets.count); - } else { - encodableStruct.chargingTargets = ListType_0(); - } + if (self.pinCode != nil) { + auto & definedValue_0 = encodableStruct.PINCode.Emplace(); + definedValue_0 = AsByteSpan(self.pinCode); } } @@ -17386,12 +17304,14 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTREnergyEVSEClusterGetTargetsParams +@implementation MTRDoorLockClusterUnlockWithTimeoutParams - (instancetype)init { if (self = [super init]) { - _daysToReturn = @(0); + _timeout = @(0); + + _pinCode = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -17400,9 +17320,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTREnergyEVSEClusterGetTargetsParams alloc] init]; + auto other = [[MTRDoorLockClusterUnlockWithTimeoutParams alloc] init]; - other.daysToReturn = self.daysToReturn; + other.timeout = self.timeout; + other.pinCode = self.pinCode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -17411,20 +17332,26 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: daysToReturn:%@; >", NSStringFromClass([self class]), _daysToReturn]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: timeout:%@; pinCode:%@; >", NSStringFromClass([self class]), _timeout, [_pinCode base64EncodedStringWithOptions:0]]; return descriptionString; } @end -@implementation MTREnergyEVSEClusterGetTargetsParams (InternalMethods) +@implementation MTRDoorLockClusterUnlockWithTimeoutParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::EnergyEvse::Commands::GetTargets::Type encodableStruct; + chip::app::Clusters::DoorLock::Commands::UnlockWithTimeout::Type encodableStruct; ListFreer listFreer; { - encodableStruct.daysToReturn = static_cast>(self.daysToReturn.unsignedCharValue); + encodableStruct.timeout = self.timeout.unsignedShortValue; + } + { + if (self.pinCode != nil) { + auto & definedValue_0 = encodableStruct.PINCode.Emplace(); + definedValue_0 = AsByteSpan(self.pinCode); + } } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -17465,10 +17392,24 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTREnergyEVSEClusterClearTargetsParams +@implementation MTRDoorLockClusterSetWeekDayScheduleParams - (instancetype)init { if (self = [super init]) { + + _weekDayIndex = @(0); + + _userIndex = @(0); + + _daysMask = @(0); + + _startHour = @(0); + + _startMinute = @(0); + + _endHour = @(0); + + _endMinute = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -17477,8 +17418,15 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTREnergyEVSEClusterClearTargetsParams alloc] init]; + auto other = [[MTRDoorLockClusterSetWeekDayScheduleParams alloc] init]; + other.weekDayIndex = self.weekDayIndex; + other.userIndex = self.userIndex; + other.daysMask = self.daysMask; + other.startHour = self.startHour; + other.startMinute = self.startMinute; + other.endHour = self.endHour; + other.endMinute = self.endMinute; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -17487,18 +17435,39 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: weekDayIndex:%@; userIndex:%@; daysMask:%@; startHour:%@; startMinute:%@; endHour:%@; endMinute:%@; >", NSStringFromClass([self class]), _weekDayIndex, _userIndex, _daysMask, _startHour, _startMinute, _endHour, _endMinute]; return descriptionString; } @end -@implementation MTREnergyEVSEClusterClearTargetsParams (InternalMethods) +@implementation MTRDoorLockClusterSetWeekDayScheduleParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::EnergyEvse::Commands::ClearTargets::Type encodableStruct; + chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type encodableStruct; ListFreer listFreer; + { + encodableStruct.weekDayIndex = self.weekDayIndex.unsignedCharValue; + } + { + encodableStruct.userIndex = self.userIndex.unsignedShortValue; + } + { + encodableStruct.daysMask = static_cast>(self.daysMask.unsignedCharValue); + } + { + encodableStruct.startHour = self.startHour.unsignedCharValue; + } + { + encodableStruct.startMinute = self.startMinute.unsignedCharValue; + } + { + encodableStruct.endHour = self.endHour.unsignedCharValue; + } + { + encodableStruct.endMinute = self.endMinute.unsignedCharValue; + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -17538,12 +17507,14 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDoorLockClusterLockDoorParams +@implementation MTRDoorLockClusterGetWeekDayScheduleParams - (instancetype)init { if (self = [super init]) { - _pinCode = nil; + _weekDayIndex = @(0); + + _userIndex = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -17552,9 +17523,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDoorLockClusterLockDoorParams alloc] init]; + auto other = [[MTRDoorLockClusterGetWeekDayScheduleParams alloc] init]; - other.pinCode = self.pinCode; + other.weekDayIndex = self.weekDayIndex; + other.userIndex = self.userIndex; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -17563,23 +17535,23 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: pinCode:%@; >", NSStringFromClass([self class]), [_pinCode base64EncodedStringWithOptions:0]]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: weekDayIndex:%@; userIndex:%@; >", NSStringFromClass([self class]), _weekDayIndex, _userIndex]; return descriptionString; } @end -@implementation MTRDoorLockClusterLockDoorParams (InternalMethods) +@implementation MTRDoorLockClusterGetWeekDayScheduleParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DoorLock::Commands::LockDoor::Type encodableStruct; + chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type encodableStruct; ListFreer listFreer; { - if (self.pinCode != nil) { - auto & definedValue_0 = encodableStruct.PINCode.Emplace(); - definedValue_0 = AsByteSpan(self.pinCode); - } + encodableStruct.weekDayIndex = self.weekDayIndex.unsignedCharValue; + } + { + encodableStruct.userIndex = self.userIndex.unsignedShortValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -17620,96 +17592,157 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDoorLockClusterUnlockDoorParams +@implementation MTRDoorLockClusterGetWeekDayScheduleResponseParams - (instancetype)init { if (self = [super init]) { - _pinCode = nil; + _weekDayIndex = @(0); + + _userIndex = @(0); + + _status = @(0); + + _daysMask = nil; + + _startHour = nil; + + _startMinute = nil; + + _endHour = nil; + + _endMinute = nil; _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDoorLockClusterUnlockDoorParams alloc] init]; + auto other = [[MTRDoorLockClusterGetWeekDayScheduleResponseParams alloc] init]; + + other.weekDayIndex = self.weekDayIndex; + other.userIndex = self.userIndex; + other.status = self.status; + other.daysMask = self.daysMask; + other.startHour = self.startHour; + other.startMinute = self.startMinute; + other.endHour = self.endHour; + other.endMinute = self.endMinute; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: weekDayIndex:%@; userIndex:%@; status:%@; daysMask:%@; startHour:%@; startMinute:%@; endHour:%@; endMinute:%@; >", NSStringFromClass([self class]), _weekDayIndex, _userIndex, _status, _daysMask, _startHour, _startMinute, _endHour, _endMinute]; + return descriptionString; +} + +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error +{ + if (!(self = [super init])) { + return nil; + } + + using DecodableType = chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType; + chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue + clusterID:DecodableType::GetClusterId() + commandID:DecodableType::GetCommandId() + error:error]; + if (buffer.IsNull()) { + return nil; + } - other.pinCode = self.pinCode; - other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + chip::TLV::TLVReader reader; + reader.Init(buffer->Start(), buffer->DataLength()); - return other; -} + 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:@"<%@: pinCode:%@; >", NSStringFromClass([self class]), [_pinCode base64EncodedStringWithOptions:0]]; - 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 MTRDoorLockClusterUnlockDoorParams (InternalMethods) +@implementation MTRDoorLockClusterGetWeekDayScheduleResponseParams (InternalMethods) -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType &)decodableStruct { - chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type encodableStruct; - ListFreer listFreer; { - if (self.pinCode != nil) { - auto & definedValue_0 = encodableStruct.PINCode.Emplace(); - definedValue_0 = AsByteSpan(self.pinCode); + self.weekDayIndex = [NSNumber numberWithUnsignedChar:decodableStruct.weekDayIndex]; + } + { + self.userIndex = [NSNumber numberWithUnsignedShort:decodableStruct.userIndex]; + } + { + self.status = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.status)]; + } + { + if (decodableStruct.daysMask.HasValue()) { + self.daysMask = [NSNumber numberWithUnsignedChar:decodableStruct.daysMask.Value().Raw()]; + } else { + self.daysMask = nil; } } - - auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); - if (buffer.IsNull()) { - return CHIP_ERROR_NO_MEMORY; + { + if (decodableStruct.startHour.HasValue()) { + self.startHour = [NSNumber numberWithUnsignedChar:decodableStruct.startHour.Value()]; + } else { + self.startHour = 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.startMinute.HasValue()) { + self.startMinute = [NSNumber numberWithUnsignedChar:decodableStruct.startMinute.Value()]; + } else { + self.startMinute = nil; } - return nil; } - - auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); - if (decodedObj == nil) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + { + if (decodableStruct.endHour.HasValue()) { + self.endHour = [NSNumber numberWithUnsignedChar:decodableStruct.endHour.Value()]; + } else { + self.endHour = nil; } } - return decodedObj; + { + if (decodableStruct.endMinute.HasValue()) { + self.endMinute = [NSNumber numberWithUnsignedChar:decodableStruct.endMinute.Value()]; + } else { + self.endMinute = nil; + } + } + return CHIP_NO_ERROR; } + @end -@implementation MTRDoorLockClusterUnlockWithTimeoutParams +@implementation MTRDoorLockClusterClearWeekDayScheduleParams - (instancetype)init { if (self = [super init]) { - _timeout = @(0); + _weekDayIndex = @(0); - _pinCode = nil; + _userIndex = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -17718,10 +17751,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDoorLockClusterUnlockWithTimeoutParams alloc] init]; + auto other = [[MTRDoorLockClusterClearWeekDayScheduleParams alloc] init]; - other.timeout = self.timeout; - other.pinCode = self.pinCode; + other.weekDayIndex = self.weekDayIndex; + other.userIndex = self.userIndex; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -17730,26 +17763,23 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: timeout:%@; pinCode:%@; >", NSStringFromClass([self class]), _timeout, [_pinCode base64EncodedStringWithOptions:0]]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: weekDayIndex:%@; userIndex:%@; >", NSStringFromClass([self class]), _weekDayIndex, _userIndex]; return descriptionString; } @end -@implementation MTRDoorLockClusterUnlockWithTimeoutParams (InternalMethods) +@implementation MTRDoorLockClusterClearWeekDayScheduleParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DoorLock::Commands::UnlockWithTimeout::Type encodableStruct; + chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::Type encodableStruct; ListFreer listFreer; { - encodableStruct.timeout = self.timeout.unsignedShortValue; + encodableStruct.weekDayIndex = self.weekDayIndex.unsignedCharValue; } { - if (self.pinCode != nil) { - auto & definedValue_0 = encodableStruct.PINCode.Emplace(); - definedValue_0 = AsByteSpan(self.pinCode); - } + encodableStruct.userIndex = self.userIndex.unsignedShortValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -17790,24 +17820,18 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDoorLockClusterSetWeekDayScheduleParams +@implementation MTRDoorLockClusterSetYearDayScheduleParams - (instancetype)init { if (self = [super init]) { - _weekDayIndex = @(0); + _yearDayIndex = @(0); _userIndex = @(0); - _daysMask = @(0); - - _startHour = @(0); - - _startMinute = @(0); - - _endHour = @(0); + _localStartTime = @(0); - _endMinute = @(0); + _localEndTime = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -17816,15 +17840,12 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDoorLockClusterSetWeekDayScheduleParams alloc] init]; + auto other = [[MTRDoorLockClusterSetYearDayScheduleParams alloc] init]; - other.weekDayIndex = self.weekDayIndex; + other.yearDayIndex = self.yearDayIndex; other.userIndex = self.userIndex; - other.daysMask = self.daysMask; - other.startHour = self.startHour; - other.startMinute = self.startMinute; - other.endHour = self.endHour; - other.endMinute = self.endMinute; + other.localStartTime = self.localStartTime; + other.localEndTime = self.localEndTime; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -17833,38 +17854,29 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: weekDayIndex:%@; userIndex:%@; daysMask:%@; startHour:%@; startMinute:%@; endHour:%@; endMinute:%@; >", NSStringFromClass([self class]), _weekDayIndex, _userIndex, _daysMask, _startHour, _startMinute, _endHour, _endMinute]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: yearDayIndex:%@; userIndex:%@; localStartTime:%@; localEndTime:%@; >", NSStringFromClass([self class]), _yearDayIndex, _userIndex, _localStartTime, _localEndTime]; return descriptionString; } @end -@implementation MTRDoorLockClusterSetWeekDayScheduleParams (InternalMethods) +@implementation MTRDoorLockClusterSetYearDayScheduleParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DoorLock::Commands::SetWeekDaySchedule::Type encodableStruct; + chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type encodableStruct; ListFreer listFreer; { - encodableStruct.weekDayIndex = self.weekDayIndex.unsignedCharValue; + encodableStruct.yearDayIndex = self.yearDayIndex.unsignedCharValue; } { encodableStruct.userIndex = self.userIndex.unsignedShortValue; } { - encodableStruct.daysMask = static_cast>(self.daysMask.unsignedCharValue); - } - { - encodableStruct.startHour = self.startHour.unsignedCharValue; - } - { - encodableStruct.startMinute = self.startMinute.unsignedCharValue; - } - { - encodableStruct.endHour = self.endHour.unsignedCharValue; + encodableStruct.localStartTime = self.localStartTime.unsignedIntValue; } { - encodableStruct.endMinute = self.endMinute.unsignedCharValue; + encodableStruct.localEndTime = self.localEndTime.unsignedIntValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -17905,12 +17917,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDoorLockClusterGetWeekDayScheduleParams +@implementation MTRDoorLockClusterGetYearDayScheduleParams - (instancetype)init { if (self = [super init]) { - _weekDayIndex = @(0); + _yearDayIndex = @(0); _userIndex = @(0); _timedInvokeTimeoutMs = nil; @@ -17921,9 +17933,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDoorLockClusterGetWeekDayScheduleParams alloc] init]; + auto other = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; - other.weekDayIndex = self.weekDayIndex; + other.yearDayIndex = self.yearDayIndex; other.userIndex = self.userIndex; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -17933,20 +17945,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: weekDayIndex:%@; userIndex:%@; >", NSStringFromClass([self class]), _weekDayIndex, _userIndex]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: yearDayIndex:%@; userIndex:%@; >", NSStringFromClass([self class]), _yearDayIndex, _userIndex]; return descriptionString; } @end -@implementation MTRDoorLockClusterGetWeekDayScheduleParams (InternalMethods) +@implementation MTRDoorLockClusterGetYearDayScheduleParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DoorLock::Commands::GetWeekDaySchedule::Type encodableStruct; + chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type encodableStruct; ListFreer listFreer; { - encodableStruct.weekDayIndex = self.weekDayIndex.unsignedCharValue; + encodableStruct.yearDayIndex = self.yearDayIndex.unsignedCharValue; } { encodableStruct.userIndex = self.userIndex.unsignedShortValue; @@ -17990,26 +18002,20 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDoorLockClusterGetWeekDayScheduleResponseParams +@implementation MTRDoorLockClusterGetYearDayScheduleResponseParams - (instancetype)init { if (self = [super init]) { - _weekDayIndex = @(0); + _yearDayIndex = @(0); _userIndex = @(0); _status = @(0); - _daysMask = nil; - - _startHour = nil; - - _startMinute = nil; - - _endHour = nil; + _localStartTime = nil; - _endMinute = nil; + _localEndTime = nil; _timedInvokeTimeoutMs = nil; } return self; @@ -18017,16 +18023,13 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDoorLockClusterGetWeekDayScheduleResponseParams alloc] init]; + auto other = [[MTRDoorLockClusterGetYearDayScheduleResponseParams alloc] init]; - other.weekDayIndex = self.weekDayIndex; + other.yearDayIndex = self.yearDayIndex; other.userIndex = self.userIndex; other.status = self.status; - other.daysMask = self.daysMask; - other.startHour = self.startHour; - other.startMinute = self.startMinute; - other.endHour = self.endHour; - other.endMinute = self.endMinute; + other.localStartTime = self.localStartTime; + other.localEndTime = self.localEndTime; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; return other; @@ -18034,7 +18037,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: weekDayIndex:%@; userIndex:%@; status:%@; daysMask:%@; startHour:%@; startMinute:%@; endHour:%@; endMinute:%@; >", NSStringFromClass([self class]), _weekDayIndex, _userIndex, _status, _daysMask, _startHour, _startMinute, _endHour, _endMinute]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: yearDayIndex:%@; userIndex:%@; status:%@; localStartTime:%@; localEndTime:%@; >", NSStringFromClass([self class]), _yearDayIndex, _userIndex, _status, _localStartTime, _localEndTime]; return descriptionString; } @@ -18045,7 +18048,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType; + using DecodableType = chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType; chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue clusterID:DecodableType::GetClusterId() commandID:DecodableType::GetCommandId() @@ -18080,12 +18083,12 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r @end -@implementation MTRDoorLockClusterGetWeekDayScheduleResponseParams (InternalMethods) +@implementation MTRDoorLockClusterGetYearDayScheduleResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::DoorLock::Commands::GetWeekDayScheduleResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType &)decodableStruct { { - self.weekDayIndex = [NSNumber numberWithUnsignedChar:decodableStruct.weekDayIndex]; + self.yearDayIndex = [NSNumber numberWithUnsignedChar:decodableStruct.yearDayIndex]; } { self.userIndex = [NSNumber numberWithUnsignedShort:decodableStruct.userIndex]; @@ -18094,38 +18097,17 @@ - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::DoorLock self.status = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.status)]; } { - if (decodableStruct.daysMask.HasValue()) { - self.daysMask = [NSNumber numberWithUnsignedChar:decodableStruct.daysMask.Value().Raw()]; - } else { - self.daysMask = nil; - } - } - { - if (decodableStruct.startHour.HasValue()) { - self.startHour = [NSNumber numberWithUnsignedChar:decodableStruct.startHour.Value()]; - } else { - self.startHour = nil; - } - } - { - if (decodableStruct.startMinute.HasValue()) { - self.startMinute = [NSNumber numberWithUnsignedChar:decodableStruct.startMinute.Value()]; - } else { - self.startMinute = nil; - } - } - { - if (decodableStruct.endHour.HasValue()) { - self.endHour = [NSNumber numberWithUnsignedChar:decodableStruct.endHour.Value()]; + if (decodableStruct.localStartTime.HasValue()) { + self.localStartTime = [NSNumber numberWithUnsignedInt:decodableStruct.localStartTime.Value()]; } else { - self.endHour = nil; + self.localStartTime = nil; } } { - if (decodableStruct.endMinute.HasValue()) { - self.endMinute = [NSNumber numberWithUnsignedChar:decodableStruct.endMinute.Value()]; + if (decodableStruct.localEndTime.HasValue()) { + self.localEndTime = [NSNumber numberWithUnsignedInt:decodableStruct.localEndTime.Value()]; } else { - self.endMinute = nil; + self.localEndTime = nil; } } return CHIP_NO_ERROR; @@ -18133,12 +18115,12 @@ - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::DoorLock @end -@implementation MTRDoorLockClusterClearWeekDayScheduleParams +@implementation MTRDoorLockClusterClearYearDayScheduleParams - (instancetype)init { if (self = [super init]) { - _weekDayIndex = @(0); + _yearDayIndex = @(0); _userIndex = @(0); _timedInvokeTimeoutMs = nil; @@ -18149,9 +18131,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDoorLockClusterClearWeekDayScheduleParams alloc] init]; + auto other = [[MTRDoorLockClusterClearYearDayScheduleParams alloc] init]; - other.weekDayIndex = self.weekDayIndex; + other.yearDayIndex = self.yearDayIndex; other.userIndex = self.userIndex; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -18161,20 +18143,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: weekDayIndex:%@; userIndex:%@; >", NSStringFromClass([self class]), _weekDayIndex, _userIndex]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: yearDayIndex:%@; userIndex:%@; >", NSStringFromClass([self class]), _yearDayIndex, _userIndex]; return descriptionString; } @end -@implementation MTRDoorLockClusterClearWeekDayScheduleParams (InternalMethods) +@implementation MTRDoorLockClusterClearYearDayScheduleParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DoorLock::Commands::ClearWeekDaySchedule::Type encodableStruct; + chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Type encodableStruct; ListFreer listFreer; { - encodableStruct.weekDayIndex = self.weekDayIndex.unsignedCharValue; + encodableStruct.yearDayIndex = self.yearDayIndex.unsignedCharValue; } { encodableStruct.userIndex = self.userIndex.unsignedShortValue; @@ -18218,18 +18200,18 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDoorLockClusterSetYearDayScheduleParams +@implementation MTRDoorLockClusterSetHolidayScheduleParams - (instancetype)init { if (self = [super init]) { - _yearDayIndex = @(0); - - _userIndex = @(0); + _holidayIndex = @(0); _localStartTime = @(0); _localEndTime = @(0); + + _operatingMode = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -18238,12 +18220,12 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDoorLockClusterSetYearDayScheduleParams alloc] init]; + auto other = [[MTRDoorLockClusterSetHolidayScheduleParams alloc] init]; - other.yearDayIndex = self.yearDayIndex; - other.userIndex = self.userIndex; + other.holidayIndex = self.holidayIndex; other.localStartTime = self.localStartTime; other.localEndTime = self.localEndTime; + other.operatingMode = self.operatingMode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -18252,23 +18234,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: yearDayIndex:%@; userIndex:%@; localStartTime:%@; localEndTime:%@; >", NSStringFromClass([self class]), _yearDayIndex, _userIndex, _localStartTime, _localEndTime]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: holidayIndex:%@; localStartTime:%@; localEndTime:%@; operatingMode:%@; >", NSStringFromClass([self class]), _holidayIndex, _localStartTime, _localEndTime, _operatingMode]; return descriptionString; } @end -@implementation MTRDoorLockClusterSetYearDayScheduleParams (InternalMethods) +@implementation MTRDoorLockClusterSetHolidayScheduleParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DoorLock::Commands::SetYearDaySchedule::Type encodableStruct; + chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::Type encodableStruct; ListFreer listFreer; { - encodableStruct.yearDayIndex = self.yearDayIndex.unsignedCharValue; - } - { - encodableStruct.userIndex = self.userIndex.unsignedShortValue; + encodableStruct.holidayIndex = self.holidayIndex.unsignedCharValue; } { encodableStruct.localStartTime = self.localStartTime.unsignedIntValue; @@ -18276,6 +18255,9 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { encodableStruct.localEndTime = self.localEndTime.unsignedIntValue; } + { + encodableStruct.operatingMode = static_cast>(self.operatingMode.unsignedCharValue); + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -18315,14 +18297,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDoorLockClusterGetYearDayScheduleParams +@implementation MTRDoorLockClusterGetHolidayScheduleParams - (instancetype)init { if (self = [super init]) { - _yearDayIndex = @(0); - - _userIndex = @(0); + _holidayIndex = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -18331,10 +18311,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDoorLockClusterGetYearDayScheduleParams alloc] init]; + auto other = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; - other.yearDayIndex = self.yearDayIndex; - other.userIndex = self.userIndex; + other.holidayIndex = self.holidayIndex; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -18343,23 +18322,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: yearDayIndex:%@; userIndex:%@; >", NSStringFromClass([self class]), _yearDayIndex, _userIndex]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: holidayIndex:%@; >", NSStringFromClass([self class]), _holidayIndex]; return descriptionString; } @end -@implementation MTRDoorLockClusterGetYearDayScheduleParams (InternalMethods) +@implementation MTRDoorLockClusterGetHolidayScheduleParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DoorLock::Commands::GetYearDaySchedule::Type encodableStruct; + chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type encodableStruct; ListFreer listFreer; { - encodableStruct.yearDayIndex = self.yearDayIndex.unsignedCharValue; - } - { - encodableStruct.userIndex = self.userIndex.unsignedShortValue; + encodableStruct.holidayIndex = self.holidayIndex.unsignedCharValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -18400,20 +18376,20 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDoorLockClusterGetYearDayScheduleResponseParams +@implementation MTRDoorLockClusterGetHolidayScheduleResponseParams - (instancetype)init { if (self = [super init]) { - _yearDayIndex = @(0); - - _userIndex = @(0); + _holidayIndex = @(0); _status = @(0); _localStartTime = nil; _localEndTime = nil; + + _operatingMode = nil; _timedInvokeTimeoutMs = nil; } return self; @@ -18421,13 +18397,13 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDoorLockClusterGetYearDayScheduleResponseParams alloc] init]; + auto other = [[MTRDoorLockClusterGetHolidayScheduleResponseParams alloc] init]; - other.yearDayIndex = self.yearDayIndex; - other.userIndex = self.userIndex; + other.holidayIndex = self.holidayIndex; other.status = self.status; other.localStartTime = self.localStartTime; other.localEndTime = self.localEndTime; + other.operatingMode = self.operatingMode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; return other; @@ -18435,7 +18411,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: yearDayIndex:%@; userIndex:%@; status:%@; localStartTime:%@; localEndTime:%@; >", NSStringFromClass([self class]), _yearDayIndex, _userIndex, _status, _localStartTime, _localEndTime]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: holidayIndex:%@; status:%@; localStartTime:%@; localEndTime:%@; operatingMode:%@; >", NSStringFromClass([self class]), _holidayIndex, _status, _localStartTime, _localEndTime, _operatingMode]; return descriptionString; } @@ -18446,7 +18422,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType; + using DecodableType = chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType; chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue clusterID:DecodableType::GetClusterId() commandID:DecodableType::GetCommandId() @@ -18481,15 +18457,12 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r @end -@implementation MTRDoorLockClusterGetYearDayScheduleResponseParams (InternalMethods) +@implementation MTRDoorLockClusterGetHolidayScheduleResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::DoorLock::Commands::GetYearDayScheduleResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType &)decodableStruct { { - self.yearDayIndex = [NSNumber numberWithUnsignedChar:decodableStruct.yearDayIndex]; - } - { - self.userIndex = [NSNumber numberWithUnsignedShort:decodableStruct.userIndex]; + self.holidayIndex = [NSNumber numberWithUnsignedChar:decodableStruct.holidayIndex]; } { self.status = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.status)]; @@ -18508,19 +18481,24 @@ - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::DoorLock self.localEndTime = nil; } } + { + if (decodableStruct.operatingMode.HasValue()) { + self.operatingMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.operatingMode.Value())]; + } else { + self.operatingMode = nil; + } + } return CHIP_NO_ERROR; } @end -@implementation MTRDoorLockClusterClearYearDayScheduleParams +@implementation MTRDoorLockClusterClearHolidayScheduleParams - (instancetype)init { if (self = [super init]) { - _yearDayIndex = @(0); - - _userIndex = @(0); + _holidayIndex = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -18529,10 +18507,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDoorLockClusterClearYearDayScheduleParams alloc] init]; + auto other = [[MTRDoorLockClusterClearHolidayScheduleParams alloc] init]; - other.yearDayIndex = self.yearDayIndex; - other.userIndex = self.userIndex; + other.holidayIndex = self.holidayIndex; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -18541,23 +18518,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: yearDayIndex:%@; userIndex:%@; >", NSStringFromClass([self class]), _yearDayIndex, _userIndex]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: holidayIndex:%@; >", NSStringFromClass([self class]), _holidayIndex]; return descriptionString; } @end -@implementation MTRDoorLockClusterClearYearDayScheduleParams (InternalMethods) +@implementation MTRDoorLockClusterClearHolidayScheduleParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DoorLock::Commands::ClearYearDaySchedule::Type encodableStruct; + chip::app::Clusters::DoorLock::Commands::ClearHolidaySchedule::Type encodableStruct; ListFreer listFreer; { - encodableStruct.yearDayIndex = self.yearDayIndex.unsignedCharValue; - } - { - encodableStruct.userIndex = self.userIndex.unsignedShortValue; + encodableStruct.holidayIndex = self.holidayIndex.unsignedCharValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -18598,18 +18572,24 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDoorLockClusterSetHolidayScheduleParams +@implementation MTRDoorLockClusterSetUserParams - (instancetype)init { if (self = [super init]) { - _holidayIndex = @(0); + _operationType = @(0); - _localStartTime = @(0); + _userIndex = @(0); - _localEndTime = @(0); + _userName = nil; - _operatingMode = @(0); + _userUniqueID = nil; + + _userStatus = nil; + + _userType = nil; + + _credentialRule = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -18618,12 +18598,15 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDoorLockClusterSetHolidayScheduleParams alloc] init]; + auto other = [[MTRDoorLockClusterSetUserParams alloc] init]; - other.holidayIndex = self.holidayIndex; - other.localStartTime = self.localStartTime; - other.localEndTime = self.localEndTime; - other.operatingMode = self.operatingMode; + other.operationType = self.operationType; + other.userIndex = self.userIndex; + other.userName = self.userName; + other.userUniqueID = self.userUniqueID; + other.userStatus = self.userStatus; + other.userType = self.userType; + other.credentialRule = self.credentialRule; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -18632,29 +18615,63 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: holidayIndex:%@; localStartTime:%@; localEndTime:%@; operatingMode:%@; >", NSStringFromClass([self class]), _holidayIndex, _localStartTime, _localEndTime, _operatingMode]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: operationType:%@; userIndex:%@; userName:%@; userUniqueID:%@; userStatus:%@; userType:%@; credentialRule:%@; >", NSStringFromClass([self class]), _operationType, _userIndex, _userName, _userUniqueID, _userStatus, _userType, _credentialRule]; return descriptionString; } @end -@implementation MTRDoorLockClusterSetHolidayScheduleParams (InternalMethods) +@implementation MTRDoorLockClusterSetUserParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DoorLock::Commands::SetHolidaySchedule::Type encodableStruct; + chip::app::Clusters::DoorLock::Commands::SetUser::Type encodableStruct; ListFreer listFreer; { - encodableStruct.holidayIndex = self.holidayIndex.unsignedCharValue; + encodableStruct.operationType = static_cast>(self.operationType.unsignedCharValue); } { - encodableStruct.localStartTime = self.localStartTime.unsignedIntValue; + encodableStruct.userIndex = self.userIndex.unsignedShortValue; } { - encodableStruct.localEndTime = self.localEndTime.unsignedIntValue; + if (self.userName == nil) { + encodableStruct.userName.SetNull(); + } else { + auto & nonNullValue_0 = encodableStruct.userName.SetNonNull(); + nonNullValue_0 = AsCharSpan(self.userName); + } } { - encodableStruct.operatingMode = static_cast>(self.operatingMode.unsignedCharValue); + if (self.userUniqueID == nil) { + encodableStruct.userUniqueID.SetNull(); + } else { + auto & nonNullValue_0 = encodableStruct.userUniqueID.SetNonNull(); + nonNullValue_0 = self.userUniqueID.unsignedIntValue; + } + } + { + if (self.userStatus == nil) { + encodableStruct.userStatus.SetNull(); + } else { + auto & nonNullValue_0 = encodableStruct.userStatus.SetNonNull(); + nonNullValue_0 = static_cast>(self.userStatus.unsignedCharValue); + } + } + { + if (self.userType == nil) { + encodableStruct.userType.SetNull(); + } else { + auto & nonNullValue_0 = encodableStruct.userType.SetNonNull(); + nonNullValue_0 = static_cast>(self.userType.unsignedCharValue); + } + } + { + if (self.credentialRule == nil) { + encodableStruct.credentialRule.SetNull(); + } else { + auto & nonNullValue_0 = encodableStruct.credentialRule.SetNonNull(); + nonNullValue_0 = static_cast>(self.credentialRule.unsignedCharValue); + } } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -18695,12 +18712,24 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDoorLockClusterGetHolidayScheduleParams +@implementation MTRDoorLockClusterSetUserParams (Deprecated) + +- (void)setUserUniqueId:(NSNumber * _Nullable)userUniqueId +{ + self.userUniqueID = userUniqueId; +} + +- (NSNumber * _Nullable)userUniqueId +{ + return self.userUniqueID; +} +@end +@implementation MTRDoorLockClusterGetUserParams - (instancetype)init { if (self = [super init]) { - _holidayIndex = @(0); + _userIndex = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -18709,9 +18738,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDoorLockClusterGetHolidayScheduleParams alloc] init]; + auto other = [[MTRDoorLockClusterGetUserParams alloc] init]; - other.holidayIndex = self.holidayIndex; + other.userIndex = self.userIndex; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -18720,20 +18749,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: holidayIndex:%@; >", NSStringFromClass([self class]), _holidayIndex]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: userIndex:%@; >", NSStringFromClass([self class]), _userIndex]; return descriptionString; } @end -@implementation MTRDoorLockClusterGetHolidayScheduleParams (InternalMethods) +@implementation MTRDoorLockClusterGetUserParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DoorLock::Commands::GetHolidaySchedule::Type encodableStruct; + chip::app::Clusters::DoorLock::Commands::GetUser::Type encodableStruct; ListFreer listFreer; { - encodableStruct.holidayIndex = self.holidayIndex.unsignedCharValue; + encodableStruct.userIndex = self.userIndex.unsignedShortValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -18774,20 +18803,30 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDoorLockClusterGetHolidayScheduleResponseParams +@implementation MTRDoorLockClusterGetUserResponseParams - (instancetype)init { if (self = [super init]) { - _holidayIndex = @(0); + _userIndex = @(0); - _status = @(0); + _userName = nil; - _localStartTime = nil; + _userUniqueID = nil; - _localEndTime = nil; + _userStatus = nil; - _operatingMode = nil; + _userType = nil; + + _credentialRule = nil; + + _credentials = nil; + + _creatorFabricIndex = nil; + + _lastModifiedFabricIndex = nil; + + _nextUserIndex = nil; _timedInvokeTimeoutMs = nil; } return self; @@ -18795,13 +18834,18 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDoorLockClusterGetHolidayScheduleResponseParams alloc] init]; + auto other = [[MTRDoorLockClusterGetUserResponseParams alloc] init]; - other.holidayIndex = self.holidayIndex; - other.status = self.status; - other.localStartTime = self.localStartTime; - other.localEndTime = self.localEndTime; - other.operatingMode = self.operatingMode; + other.userIndex = self.userIndex; + other.userName = self.userName; + other.userUniqueID = self.userUniqueID; + other.userStatus = self.userStatus; + other.userType = self.userType; + other.credentialRule = self.credentialRule; + other.credentials = self.credentials; + other.creatorFabricIndex = self.creatorFabricIndex; + other.lastModifiedFabricIndex = self.lastModifiedFabricIndex; + other.nextUserIndex = self.nextUserIndex; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; return other; @@ -18809,7 +18853,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: holidayIndex:%@; status:%@; localStartTime:%@; localEndTime:%@; operatingMode:%@; >", NSStringFromClass([self class]), _holidayIndex, _status, _localStartTime, _localEndTime, _operatingMode]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: userIndex:%@; userName:%@; userUniqueID:%@; userStatus:%@; userType:%@; credentialRule:%@; credentials:%@; creatorFabricIndex:%@; lastModifiedFabricIndex:%@; nextUserIndex:%@; >", NSStringFromClass([self class]), _userIndex, _userName, _userUniqueID, _userStatus, _userType, _credentialRule, _credentials, _creatorFabricIndex, _lastModifiedFabricIndex, _nextUserIndex]; return descriptionString; } @@ -18820,7 +18864,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType; + using DecodableType = chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType; chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue clusterID:DecodableType::GetClusterId() commandID:DecodableType::GetCommandId() @@ -18855,35 +18899,94 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r @end -@implementation MTRDoorLockClusterGetHolidayScheduleResponseParams (InternalMethods) +@implementation MTRDoorLockClusterGetUserResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::DoorLock::Commands::GetHolidayScheduleResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType &)decodableStruct { { - self.holidayIndex = [NSNumber numberWithUnsignedChar:decodableStruct.holidayIndex]; + self.userIndex = [NSNumber numberWithUnsignedShort:decodableStruct.userIndex]; } { - self.status = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.status)]; + if (decodableStruct.userName.IsNull()) { + self.userName = nil; + } else { + self.userName = AsString(decodableStruct.userName.Value()); + if (self.userName == nil) { + CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; + return err; + } + } } { - if (decodableStruct.localStartTime.HasValue()) { - self.localStartTime = [NSNumber numberWithUnsignedInt:decodableStruct.localStartTime.Value()]; + if (decodableStruct.userUniqueID.IsNull()) { + self.userUniqueID = nil; } else { - self.localStartTime = nil; + self.userUniqueID = [NSNumber numberWithUnsignedInt:decodableStruct.userUniqueID.Value()]; } } { - if (decodableStruct.localEndTime.HasValue()) { - self.localEndTime = [NSNumber numberWithUnsignedInt:decodableStruct.localEndTime.Value()]; + if (decodableStruct.userStatus.IsNull()) { + self.userStatus = nil; } else { - self.localEndTime = nil; + self.userStatus = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.userStatus.Value())]; } } { - if (decodableStruct.operatingMode.HasValue()) { - self.operatingMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.operatingMode.Value())]; + if (decodableStruct.userType.IsNull()) { + self.userType = nil; } else { - self.operatingMode = nil; + self.userType = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.userType.Value())]; + } + } + { + if (decodableStruct.credentialRule.IsNull()) { + self.credentialRule = nil; + } else { + self.credentialRule = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.credentialRule.Value())]; + } + } + { + if (decodableStruct.credentials.IsNull()) { + self.credentials = nil; + } else { + { // Scope for our temporary variables + auto * array_1 = [NSMutableArray new]; + auto iter_1 = decodableStruct.credentials.Value().begin(); + while (iter_1.Next()) { + auto & entry_1 = iter_1.GetValue(); + MTRDoorLockClusterCredentialStruct * newElement_1; + newElement_1 = [MTRDoorLockClusterCredentialStruct new]; + newElement_1.credentialType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_1.credentialType)]; + newElement_1.credentialIndex = [NSNumber numberWithUnsignedShort:entry_1.credentialIndex]; + [array_1 addObject:newElement_1]; + } + CHIP_ERROR err = iter_1.GetStatus(); + if (err != CHIP_NO_ERROR) { + return err; + } + self.credentials = array_1; + } + } + } + { + if (decodableStruct.creatorFabricIndex.IsNull()) { + self.creatorFabricIndex = nil; + } else { + self.creatorFabricIndex = [NSNumber numberWithUnsignedChar:decodableStruct.creatorFabricIndex.Value()]; + } + } + { + if (decodableStruct.lastModifiedFabricIndex.IsNull()) { + self.lastModifiedFabricIndex = nil; + } else { + self.lastModifiedFabricIndex = [NSNumber numberWithUnsignedChar:decodableStruct.lastModifiedFabricIndex.Value()]; + } + } + { + if (decodableStruct.nextUserIndex.IsNull()) { + self.nextUserIndex = nil; + } else { + self.nextUserIndex = [NSNumber numberWithUnsignedShort:decodableStruct.nextUserIndex.Value()]; } } return CHIP_NO_ERROR; @@ -18891,12 +18994,24 @@ - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::DoorLock @end -@implementation MTRDoorLockClusterClearHolidayScheduleParams +@implementation MTRDoorLockClusterGetUserResponseParams (Deprecated) + +- (void)setUserUniqueId:(NSNumber * _Nullable)userUniqueId +{ + self.userUniqueID = userUniqueId; +} + +- (NSNumber * _Nullable)userUniqueId +{ + return self.userUniqueID; +} +@end +@implementation MTRDoorLockClusterClearUserParams - (instancetype)init { if (self = [super init]) { - _holidayIndex = @(0); + _userIndex = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -18905,9 +19020,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDoorLockClusterClearHolidayScheduleParams alloc] init]; + auto other = [[MTRDoorLockClusterClearUserParams alloc] init]; - other.holidayIndex = self.holidayIndex; + other.userIndex = self.userIndex; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -18916,20 +19031,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: holidayIndex:%@; >", NSStringFromClass([self class]), _holidayIndex]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: userIndex:%@; >", NSStringFromClass([self class]), _userIndex]; return descriptionString; } @end -@implementation MTRDoorLockClusterClearHolidayScheduleParams (InternalMethods) +@implementation MTRDoorLockClusterClearUserParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DoorLock::Commands::ClearHolidaySchedule::Type encodableStruct; + chip::app::Clusters::DoorLock::Commands::ClearUser::Type encodableStruct; ListFreer listFreer; { - encodableStruct.holidayIndex = self.holidayIndex.unsignedCharValue; + encodableStruct.userIndex = self.userIndex.unsignedShortValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -18970,24 +19085,22 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDoorLockClusterSetUserParams +@implementation MTRDoorLockClusterSetCredentialParams - (instancetype)init { if (self = [super init]) { _operationType = @(0); - _userIndex = @(0); + _credential = [MTRDoorLockClusterCredentialStruct new]; - _userName = nil; + _credentialData = [NSData data]; - _userUniqueID = nil; + _userIndex = nil; _userStatus = nil; _userType = nil; - - _credentialRule = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -18996,15 +19109,14 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDoorLockClusterSetUserParams alloc] init]; + auto other = [[MTRDoorLockClusterSetCredentialParams alloc] init]; other.operationType = self.operationType; + other.credential = self.credential; + other.credentialData = self.credentialData; other.userIndex = self.userIndex; - other.userName = self.userName; - other.userUniqueID = self.userUniqueID; other.userStatus = self.userStatus; other.userType = self.userType; - other.credentialRule = self.credentialRule; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -19013,38 +19125,34 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: operationType:%@; userIndex:%@; userName:%@; userUniqueID:%@; userStatus:%@; userType:%@; credentialRule:%@; >", NSStringFromClass([self class]), _operationType, _userIndex, _userName, _userUniqueID, _userStatus, _userType, _credentialRule]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: operationType:%@; credential:%@; credentialData:%@; userIndex:%@; userStatus:%@; userType:%@; >", NSStringFromClass([self class]), _operationType, _credential, [_credentialData base64EncodedStringWithOptions:0], _userIndex, _userStatus, _userType]; return descriptionString; } @end -@implementation MTRDoorLockClusterSetUserParams (InternalMethods) +@implementation MTRDoorLockClusterSetCredentialParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DoorLock::Commands::SetUser::Type encodableStruct; + chip::app::Clusters::DoorLock::Commands::SetCredential::Type encodableStruct; ListFreer listFreer; { encodableStruct.operationType = static_cast>(self.operationType.unsignedCharValue); } { - encodableStruct.userIndex = self.userIndex.unsignedShortValue; + encodableStruct.credential.credentialType = static_cast>(self.credential.credentialType.unsignedCharValue); + encodableStruct.credential.credentialIndex = self.credential.credentialIndex.unsignedShortValue; } { - if (self.userName == nil) { - encodableStruct.userName.SetNull(); - } else { - auto & nonNullValue_0 = encodableStruct.userName.SetNonNull(); - nonNullValue_0 = AsCharSpan(self.userName); - } + encodableStruct.credentialData = AsByteSpan(self.credentialData); } { - if (self.userUniqueID == nil) { - encodableStruct.userUniqueID.SetNull(); + if (self.userIndex == nil) { + encodableStruct.userIndex.SetNull(); } else { - auto & nonNullValue_0 = encodableStruct.userUniqueID.SetNonNull(); - nonNullValue_0 = self.userUniqueID.unsignedIntValue; + auto & nonNullValue_0 = encodableStruct.userIndex.SetNonNull(); + nonNullValue_0 = self.userIndex.unsignedShortValue; } } { @@ -19063,71 +19171,152 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader nonNullValue_0 = static_cast>(self.userType.unsignedCharValue); } } - { - if (self.credentialRule == nil) { - encodableStruct.credentialRule.SetNull(); - } else { - auto & nonNullValue_0 = encodableStruct.credentialRule.SetNonNull(); - nonNullValue_0 = static_cast>(self.credentialRule.unsignedCharValue); + + 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 MTRDoorLockClusterSetCredentialResponseParams +- (instancetype)init +{ + if (self = [super init]) { + + _status = @(0); + + _userIndex = nil; + + _nextCredentialIndex = nil; + _timedInvokeTimeoutMs = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRDoorLockClusterSetCredentialResponseParams alloc] init]; + + other.status = self.status; + other.userIndex = self.userIndex; + other.nextCredentialIndex = self.nextCredentialIndex; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; userIndex:%@; nextCredentialIndex:%@; >", NSStringFromClass([self class]), _status, _userIndex, _nextCredentialIndex]; + return descriptionString; +} + +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error +{ + if (!(self = [super init])) { + return nil; + } - auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + using DecodableType = chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::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 decodedObj; + return nil; } + @end -@implementation MTRDoorLockClusterSetUserParams (Deprecated) +@implementation MTRDoorLockClusterSetCredentialResponseParams (InternalMethods) -- (void)setUserUniqueId:(NSNumber * _Nullable)userUniqueId +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType &)decodableStruct { - self.userUniqueID = userUniqueId; + { + self.status = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.status)]; + } + { + if (decodableStruct.userIndex.IsNull()) { + self.userIndex = nil; + } else { + self.userIndex = [NSNumber numberWithUnsignedShort:decodableStruct.userIndex.Value()]; + } + } + { + if (decodableStruct.nextCredentialIndex.IsNull()) { + self.nextCredentialIndex = nil; + } else { + self.nextCredentialIndex = [NSNumber numberWithUnsignedShort:decodableStruct.nextCredentialIndex.Value()]; + } + } + return CHIP_NO_ERROR; } -- (NSNumber * _Nullable)userUniqueId -{ - return self.userUniqueID; -} @end -@implementation MTRDoorLockClusterGetUserParams + +@implementation MTRDoorLockClusterGetCredentialStatusParams - (instancetype)init { if (self = [super init]) { - _userIndex = @(0); + _credential = [MTRDoorLockClusterCredentialStruct new]; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -19136,9 +19325,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDoorLockClusterGetUserParams alloc] init]; + auto other = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; - other.userIndex = self.userIndex; + other.credential = self.credential; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -19147,20 +19336,21 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: userIndex:%@; >", NSStringFromClass([self class]), _userIndex]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: credential:%@; >", NSStringFromClass([self class]), _credential]; return descriptionString; } @end -@implementation MTRDoorLockClusterGetUserParams (InternalMethods) +@implementation MTRDoorLockClusterGetCredentialStatusParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DoorLock::Commands::GetUser::Type encodableStruct; + chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type encodableStruct; ListFreer listFreer; { - encodableStruct.userIndex = self.userIndex.unsignedShortValue; + encodableStruct.credential.credentialType = static_cast>(self.credential.credentialType.unsignedCharValue); + encodableStruct.credential.credentialIndex = self.credential.credentialIndex.unsignedShortValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -19201,30 +19391,20 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDoorLockClusterGetUserResponseParams +@implementation MTRDoorLockClusterGetCredentialStatusResponseParams - (instancetype)init { if (self = [super init]) { - _userIndex = @(0); - - _userName = nil; - - _userUniqueID = nil; - - _userStatus = nil; - - _userType = nil; - - _credentialRule = nil; + _credentialExists = @(0); - _credentials = nil; + _userIndex = nil; _creatorFabricIndex = nil; _lastModifiedFabricIndex = nil; - _nextUserIndex = nil; + _nextCredentialIndex = nil; _timedInvokeTimeoutMs = nil; } return self; @@ -19232,18 +19412,13 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDoorLockClusterGetUserResponseParams alloc] init]; + auto other = [[MTRDoorLockClusterGetCredentialStatusResponseParams alloc] init]; + other.credentialExists = self.credentialExists; other.userIndex = self.userIndex; - other.userName = self.userName; - other.userUniqueID = self.userUniqueID; - other.userStatus = self.userStatus; - other.userType = self.userType; - other.credentialRule = self.credentialRule; - other.credentials = self.credentials; other.creatorFabricIndex = self.creatorFabricIndex; other.lastModifiedFabricIndex = self.lastModifiedFabricIndex; - other.nextUserIndex = self.nextUserIndex; + other.nextCredentialIndex = self.nextCredentialIndex; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; return other; @@ -19251,7 +19426,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: userIndex:%@; userName:%@; userUniqueID:%@; userStatus:%@; userType:%@; credentialRule:%@; credentials:%@; creatorFabricIndex:%@; lastModifiedFabricIndex:%@; nextUserIndex:%@; >", NSStringFromClass([self class]), _userIndex, _userName, _userUniqueID, _userStatus, _userType, _credentialRule, _credentials, _creatorFabricIndex, _lastModifiedFabricIndex, _nextUserIndex]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: credentialExists:%@; userIndex:%@; creatorFabricIndex:%@; lastModifiedFabricIndex:%@; nextCredentialIndex:%@; >", NSStringFromClass([self class]), _credentialExists, _userIndex, _creatorFabricIndex, _lastModifiedFabricIndex, _nextCredentialIndex]; return descriptionString; } @@ -19262,7 +19437,7 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r return nil; } - using DecodableType = chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType; + using DecodableType = chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType; chip::System::PacketBufferHandle buffer = [MTRBaseDevice _responseDataForCommand:responseValue clusterID:DecodableType::GetClusterId() commandID:DecodableType::GetCommandId() @@ -19297,73 +19472,18 @@ - (nullable instancetype)initWithResponseValue:(NSDictionary *)r @end -@implementation MTRDoorLockClusterGetUserResponseParams (InternalMethods) +@implementation MTRDoorLockClusterGetCredentialStatusResponseParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::DoorLock::Commands::GetUserResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType &)decodableStruct { { - self.userIndex = [NSNumber numberWithUnsignedShort:decodableStruct.userIndex]; - } - { - if (decodableStruct.userName.IsNull()) { - self.userName = nil; - } else { - self.userName = AsString(decodableStruct.userName.Value()); - if (self.userName == nil) { - CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; - return err; - } - } - } - { - if (decodableStruct.userUniqueID.IsNull()) { - self.userUniqueID = nil; - } else { - self.userUniqueID = [NSNumber numberWithUnsignedInt:decodableStruct.userUniqueID.Value()]; - } - } - { - if (decodableStruct.userStatus.IsNull()) { - self.userStatus = nil; - } else { - self.userStatus = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.userStatus.Value())]; - } - } - { - if (decodableStruct.userType.IsNull()) { - self.userType = nil; - } else { - self.userType = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.userType.Value())]; - } - } - { - if (decodableStruct.credentialRule.IsNull()) { - self.credentialRule = nil; - } else { - self.credentialRule = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.credentialRule.Value())]; - } + self.credentialExists = [NSNumber numberWithBool:decodableStruct.credentialExists]; } { - if (decodableStruct.credentials.IsNull()) { - self.credentials = nil; + if (decodableStruct.userIndex.IsNull()) { + self.userIndex = nil; } else { - { // Scope for our temporary variables - auto * array_1 = [NSMutableArray new]; - auto iter_1 = decodableStruct.credentials.Value().begin(); - while (iter_1.Next()) { - auto & entry_1 = iter_1.GetValue(); - MTRDoorLockClusterCredentialStruct * newElement_1; - newElement_1 = [MTRDoorLockClusterCredentialStruct new]; - newElement_1.credentialType = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_1.credentialType)]; - newElement_1.credentialIndex = [NSNumber numberWithUnsignedShort:entry_1.credentialIndex]; - [array_1 addObject:newElement_1]; - } - CHIP_ERROR err = iter_1.GetStatus(); - if (err != CHIP_NO_ERROR) { - return err; - } - self.credentials = array_1; - } + self.userIndex = [NSNumber numberWithUnsignedShort:decodableStruct.userIndex.Value()]; } } { @@ -19381,35 +19501,108 @@ - (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::DoorLock } } { - if (decodableStruct.nextUserIndex.IsNull()) { - self.nextUserIndex = nil; + if (decodableStruct.nextCredentialIndex.IsNull()) { + self.nextCredentialIndex = nil; } else { - self.nextUserIndex = [NSNumber numberWithUnsignedShort:decodableStruct.nextUserIndex.Value()]; + self.nextCredentialIndex = [NSNumber numberWithUnsignedShort:decodableStruct.nextCredentialIndex.Value()]; + } + } + return CHIP_NO_ERROR; +} + +@end + +@implementation MTRDoorLockClusterClearCredentialParams +- (instancetype)init +{ + if (self = [super init]) { + + _credential = nil; + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRDoorLockClusterClearCredentialParams alloc] init]; + + other.credential = self.credential; + other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: credential:%@; >", NSStringFromClass([self class]), _credential]; + return descriptionString; +} + +@end + +@implementation MTRDoorLockClusterClearCredentialParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +{ + chip::app::Clusters::DoorLock::Commands::ClearCredential::Type encodableStruct; + ListFreer listFreer; + { + if (self.credential == nil) { + encodableStruct.credential.SetNull(); + } else { + auto & nonNullValue_0 = encodableStruct.credential.SetNonNull(); + nonNullValue_0.credentialType = static_cast>(self.credential.credentialType.unsignedCharValue); + nonNullValue_0.credentialIndex = self.credential.credentialIndex.unsignedShortValue; } } - return CHIP_NO_ERROR; -} -@end + 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); -@implementation MTRDoorLockClusterGetUserResponseParams (Deprecated) + ReturnErrorOnFailure(chip::app::DataModel::Encode(writer, chip::TLV::AnonymousTag(), encodableStruct)); -- (void)setUserUniqueId:(NSNumber * _Nullable)userUniqueId -{ - self.userUniqueID = userUniqueId; + ReturnErrorOnFailure(writer.Finalize(&buffer)); + + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); } -- (NSNumber * _Nullable)userUniqueId +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error { - return self.userUniqueID; + 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 MTRDoorLockClusterClearUserParams + +@implementation MTRDoorLockClusterUnboltDoorParams - (instancetype)init { if (self = [super init]) { - _userIndex = @(0); + _pinCode = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -19418,9 +19611,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDoorLockClusterClearUserParams alloc] init]; + auto other = [[MTRDoorLockClusterUnboltDoorParams alloc] init]; - other.userIndex = self.userIndex; + other.pinCode = self.pinCode; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -19429,20 +19622,23 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: userIndex:%@; >", NSStringFromClass([self class]), _userIndex]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: pinCode:%@; >", NSStringFromClass([self class]), [_pinCode base64EncodedStringWithOptions:0]]; return descriptionString; } @end -@implementation MTRDoorLockClusterClearUserParams (InternalMethods) +@implementation MTRDoorLockClusterUnboltDoorParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DoorLock::Commands::ClearUser::Type encodableStruct; + chip::app::Clusters::DoorLock::Commands::UnboltDoor::Type encodableStruct; ListFreer listFreer; { - encodableStruct.userIndex = self.userIndex.unsignedShortValue; + if (self.pinCode != nil) { + auto & definedValue_0 = encodableStruct.PINCode.Emplace(); + definedValue_0 = AsByteSpan(self.pinCode); + } } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -19483,22 +19679,18 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDoorLockClusterSetCredentialParams +@implementation MTRDoorLockClusterSetAliroReaderConfigParams - (instancetype)init { if (self = [super init]) { - _operationType = @(0); - - _credential = [MTRDoorLockClusterCredentialStruct new]; - - _credentialData = [NSData data]; + _signingKey = [NSData data]; - _userIndex = nil; + _verificationKey = [NSData data]; - _userStatus = nil; + _groupIdentifier = [NSData data]; - _userType = nil; + _groupResolvingKey = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -19507,14 +19699,12 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDoorLockClusterSetCredentialParams alloc] init]; + auto other = [[MTRDoorLockClusterSetAliroReaderConfigParams alloc] init]; - other.operationType = self.operationType; - other.credential = self.credential; - other.credentialData = self.credentialData; - other.userIndex = self.userIndex; - other.userStatus = self.userStatus; - other.userType = self.userType; + other.signingKey = self.signingKey; + other.verificationKey = self.verificationKey; + other.groupIdentifier = self.groupIdentifier; + other.groupResolvingKey = self.groupResolvingKey; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -19523,50 +19713,31 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: operationType:%@; credential:%@; credentialData:%@; userIndex:%@; userStatus:%@; userType:%@; >", NSStringFromClass([self class]), _operationType, _credential, [_credentialData base64EncodedStringWithOptions:0], _userIndex, _userStatus, _userType]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: signingKey:%@; verificationKey:%@; groupIdentifier:%@; groupResolvingKey:%@; >", NSStringFromClass([self class]), [_signingKey base64EncodedStringWithOptions:0], [_verificationKey base64EncodedStringWithOptions:0], [_groupIdentifier base64EncodedStringWithOptions:0], [_groupResolvingKey base64EncodedStringWithOptions:0]]; return descriptionString; } @end -@implementation MTRDoorLockClusterSetCredentialParams (InternalMethods) +@implementation MTRDoorLockClusterSetAliroReaderConfigParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DoorLock::Commands::SetCredential::Type encodableStruct; + chip::app::Clusters::DoorLock::Commands::SetAliroReaderConfig::Type encodableStruct; ListFreer listFreer; { - encodableStruct.operationType = static_cast>(self.operationType.unsignedCharValue); - } - { - encodableStruct.credential.credentialType = static_cast>(self.credential.credentialType.unsignedCharValue); - encodableStruct.credential.credentialIndex = self.credential.credentialIndex.unsignedShortValue; - } - { - encodableStruct.credentialData = AsByteSpan(self.credentialData); + encodableStruct.signingKey = AsByteSpan(self.signingKey); } { - if (self.userIndex == nil) { - encodableStruct.userIndex.SetNull(); - } else { - auto & nonNullValue_0 = encodableStruct.userIndex.SetNonNull(); - nonNullValue_0 = self.userIndex.unsignedShortValue; - } + encodableStruct.verificationKey = AsByteSpan(self.verificationKey); } { - if (self.userStatus == nil) { - encodableStruct.userStatus.SetNull(); - } else { - auto & nonNullValue_0 = encodableStruct.userStatus.SetNonNull(); - nonNullValue_0 = static_cast>(self.userStatus.unsignedCharValue); - } + encodableStruct.groupIdentifier = AsByteSpan(self.groupIdentifier); } { - if (self.userType == nil) { - encodableStruct.userType.SetNull(); - } else { - auto & nonNullValue_0 = encodableStruct.userType.SetNonNull(); - nonNullValue_0 = static_cast>(self.userType.unsignedCharValue); + if (self.groupResolvingKey != nil) { + auto & definedValue_0 = encodableStruct.groupResolvingKey.Emplace(); + definedValue_0 = AsByteSpan(self.groupResolvingKey); } } @@ -19608,113 +19779,156 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDoorLockClusterSetCredentialResponseParams +@implementation MTRDoorLockClusterClearAliroReaderConfigParams - (instancetype)init { if (self = [super init]) { - - _status = @(0); - - _userIndex = nil; - - _nextCredentialIndex = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDoorLockClusterSetCredentialResponseParams alloc] init]; + auto other = [[MTRDoorLockClusterClearAliroReaderConfigParams alloc] init]; - other.status = self.status; - other.userIndex = self.userIndex; - other.nextCredentialIndex = self.nextCredentialIndex; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; userIndex:%@; nextCredentialIndex:%@; >", NSStringFromClass([self class]), _status, _userIndex, _nextCredentialIndex]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error +@end + +@implementation MTRDoorLockClusterClearAliroReaderConfigParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - if (!(self = [super init])) { - return nil; - } + chip::app::Clusters::DoorLock::Commands::ClearAliroReaderConfig::Type encodableStruct; + ListFreer listFreer; - using DecodableType = chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::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 MTRWindowCoveringClusterUpOrOpenParams +- (instancetype)init +{ + if (self = [super init]) { + _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone; +{ + auto other = [[MTRWindowCoveringClusterUpOrOpenParams 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 MTRDoorLockClusterSetCredentialResponseParams (InternalMethods) +@implementation MTRWindowCoveringClusterUpOrOpenParams (InternalMethods) -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType &)decodableStruct +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - { - self.status = [NSNumber numberWithUnsignedChar:chip::to_underlying(decodableStruct.status)]; + chip::app::Clusters::WindowCovering::Commands::UpOrOpen::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.userIndex.IsNull()) { - self.userIndex = nil; - } else { - self.userIndex = [NSNumber numberWithUnsignedShort:decodableStruct.userIndex.Value()]; + + 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; } - { - if (decodableStruct.nextCredentialIndex.IsNull()) { - self.nextCredentialIndex = nil; - } else { - self.nextCredentialIndex = [NSNumber numberWithUnsignedShort:decodableStruct.nextCredentialIndex.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 MTRDoorLockClusterGetCredentialStatusParams +@implementation MTRWindowCoveringClusterDownOrCloseParams - (instancetype)init { if (self = [super init]) { - - _credential = [MTRDoorLockClusterCredentialStruct new]; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -19723,9 +19937,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDoorLockClusterGetCredentialStatusParams alloc] init]; + auto other = [[MTRWindowCoveringClusterDownOrCloseParams alloc] init]; - other.credential = self.credential; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -19734,22 +19947,18 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: credential:%@; >", NSStringFromClass([self class]), _credential]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } @end -@implementation MTRDoorLockClusterGetCredentialStatusParams (InternalMethods) +@implementation MTRWindowCoveringClusterDownOrCloseParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type encodableStruct; + chip::app::Clusters::WindowCovering::Commands::DownOrClose::Type encodableStruct; ListFreer listFreer; - { - encodableStruct.credential.credentialType = static_cast>(self.credential.credentialType.unsignedCharValue); - encodableStruct.credential.credentialIndex = self.credential.credentialIndex.unsignedShortValue; - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -19789,133 +19998,85 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDoorLockClusterGetCredentialStatusResponseParams +@implementation MTRWindowCoveringClusterStopMotionParams - (instancetype)init { if (self = [super init]) { - - _credentialExists = @(0); - - _userIndex = nil; - - _creatorFabricIndex = nil; - - _lastModifiedFabricIndex = nil; - - _nextCredentialIndex = nil; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDoorLockClusterGetCredentialStatusResponseParams alloc] init]; + auto other = [[MTRWindowCoveringClusterStopMotionParams alloc] init]; - other.credentialExists = self.credentialExists; - other.userIndex = self.userIndex; - other.creatorFabricIndex = self.creatorFabricIndex; - other.lastModifiedFabricIndex = self.lastModifiedFabricIndex; - other.nextCredentialIndex = self.nextCredentialIndex; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: credentialExists:%@; userIndex:%@; creatorFabricIndex:%@; lastModifiedFabricIndex:%@; nextCredentialIndex:%@; >", NSStringFromClass([self class]), _credentialExists, _userIndex, _creatorFabricIndex, _lastModifiedFabricIndex, _nextCredentialIndex]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error +@end + +@implementation MTRWindowCoveringClusterStopMotionParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - if (!(self = [super init])) { - return nil; - } + chip::app::Clusters::WindowCovering::Commands::StopMotion::Type encodableStruct; + ListFreer listFreer; - using DecodableType = chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::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 MTRDoorLockClusterGetCredentialStatusResponseParams (InternalMethods) + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType &)decodableStruct +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error { - { - self.credentialExists = [NSNumber numberWithBool:decodableStruct.credentialExists]; - } - { - if (decodableStruct.userIndex.IsNull()) { - self.userIndex = nil; - } else { - self.userIndex = [NSNumber numberWithUnsignedShort:decodableStruct.userIndex.Value()]; - } - } - { - if (decodableStruct.creatorFabricIndex.IsNull()) { - self.creatorFabricIndex = nil; - } else { - self.creatorFabricIndex = [NSNumber numberWithUnsignedChar:decodableStruct.creatorFabricIndex.Value()]; - } - } - { - if (decodableStruct.lastModifiedFabricIndex.IsNull()) { - self.lastModifiedFabricIndex = nil; - } else { - self.lastModifiedFabricIndex = [NSNumber numberWithUnsignedChar:decodableStruct.lastModifiedFabricIndex.Value()]; + 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.nextCredentialIndex.IsNull()) { - self.nextCredentialIndex = nil; - } else { - self.nextCredentialIndex = [NSNumber numberWithUnsignedShort:decodableStruct.nextCredentialIndex.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 MTRDoorLockClusterClearCredentialParams +@implementation MTRWindowCoveringClusterGoToLiftValueParams - (instancetype)init { if (self = [super init]) { - _credential = nil; + _liftValue = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -19924,9 +20085,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDoorLockClusterClearCredentialParams alloc] init]; + auto other = [[MTRWindowCoveringClusterGoToLiftValueParams alloc] init]; - other.credential = self.credential; + other.liftValue = self.liftValue; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -19935,26 +20096,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: credential:%@; >", NSStringFromClass([self class]), _credential]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: liftValue:%@; >", NSStringFromClass([self class]), _liftValue]; return descriptionString; } @end -@implementation MTRDoorLockClusterClearCredentialParams (InternalMethods) +@implementation MTRWindowCoveringClusterGoToLiftValueParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DoorLock::Commands::ClearCredential::Type encodableStruct; + chip::app::Clusters::WindowCovering::Commands::GoToLiftValue::Type encodableStruct; ListFreer listFreer; { - if (self.credential == nil) { - encodableStruct.credential.SetNull(); - } else { - auto & nonNullValue_0 = encodableStruct.credential.SetNonNull(); - nonNullValue_0.credentialType = static_cast>(self.credential.credentialType.unsignedCharValue); - nonNullValue_0.credentialIndex = self.credential.credentialIndex.unsignedShortValue; - } + encodableStruct.liftValue = self.liftValue.unsignedShortValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -19995,12 +20150,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDoorLockClusterUnboltDoorParams +@implementation MTRWindowCoveringClusterGoToLiftPercentageParams - (instancetype)init { if (self = [super init]) { - _pinCode = nil; + _liftPercent100thsValue = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -20009,9 +20164,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDoorLockClusterUnboltDoorParams alloc] init]; + auto other = [[MTRWindowCoveringClusterGoToLiftPercentageParams alloc] init]; - other.pinCode = self.pinCode; + other.liftPercent100thsValue = self.liftPercent100thsValue; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -20020,23 +20175,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: pinCode:%@; >", NSStringFromClass([self class]), [_pinCode base64EncodedStringWithOptions:0]]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: liftPercent100thsValue:%@; >", NSStringFromClass([self class]), _liftPercent100thsValue]; return descriptionString; } @end -@implementation MTRDoorLockClusterUnboltDoorParams (InternalMethods) +@implementation MTRWindowCoveringClusterGoToLiftPercentageParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DoorLock::Commands::UnboltDoor::Type encodableStruct; + chip::app::Clusters::WindowCovering::Commands::GoToLiftPercentage::Type encodableStruct; ListFreer listFreer; { - if (self.pinCode != nil) { - auto & definedValue_0 = encodableStruct.PINCode.Emplace(); - definedValue_0 = AsByteSpan(self.pinCode); - } + encodableStruct.liftPercent100thsValue = self.liftPercent100thsValue.unsignedShortValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -20077,18 +20229,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDoorLockClusterSetAliroReaderConfigParams +@implementation MTRWindowCoveringClusterGoToTiltValueParams - (instancetype)init { if (self = [super init]) { - _signingKey = [NSData data]; - - _verificationKey = [NSData data]; - - _groupIdentifier = [NSData data]; - - _groupResolvingKey = nil; + _tiltValue = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -20097,12 +20243,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDoorLockClusterSetAliroReaderConfigParams alloc] init]; + auto other = [[MTRWindowCoveringClusterGoToTiltValueParams alloc] init]; - other.signingKey = self.signingKey; - other.verificationKey = self.verificationKey; - other.groupIdentifier = self.groupIdentifier; - other.groupResolvingKey = self.groupResolvingKey; + other.tiltValue = self.tiltValue; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -20111,32 +20254,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: signingKey:%@; verificationKey:%@; groupIdentifier:%@; groupResolvingKey:%@; >", NSStringFromClass([self class]), [_signingKey base64EncodedStringWithOptions:0], [_verificationKey base64EncodedStringWithOptions:0], [_groupIdentifier base64EncodedStringWithOptions:0], [_groupResolvingKey base64EncodedStringWithOptions:0]]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: tiltValue:%@; >", NSStringFromClass([self class]), _tiltValue]; return descriptionString; } @end -@implementation MTRDoorLockClusterSetAliroReaderConfigParams (InternalMethods) +@implementation MTRWindowCoveringClusterGoToTiltValueParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DoorLock::Commands::SetAliroReaderConfig::Type encodableStruct; + chip::app::Clusters::WindowCovering::Commands::GoToTiltValue::Type encodableStruct; ListFreer listFreer; { - encodableStruct.signingKey = AsByteSpan(self.signingKey); - } - { - encodableStruct.verificationKey = AsByteSpan(self.verificationKey); - } - { - encodableStruct.groupIdentifier = AsByteSpan(self.groupIdentifier); - } - { - if (self.groupResolvingKey != nil) { - auto & definedValue_0 = encodableStruct.groupResolvingKey.Emplace(); - definedValue_0 = AsByteSpan(self.groupResolvingKey); - } + encodableStruct.tiltValue = self.tiltValue.unsignedShortValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -20177,10 +20308,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRDoorLockClusterClearAliroReaderConfigParams +@implementation MTRWindowCoveringClusterGoToTiltPercentageParams - (instancetype)init { if (self = [super init]) { + + _tiltPercent100thsValue = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -20189,8 +20322,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRDoorLockClusterClearAliroReaderConfigParams alloc] init]; + auto other = [[MTRWindowCoveringClusterGoToTiltPercentageParams alloc] init]; + other.tiltPercent100thsValue = self.tiltPercent100thsValue; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -20199,18 +20333,21 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: tiltPercent100thsValue:%@; >", NSStringFromClass([self class]), _tiltPercent100thsValue]; return descriptionString; } @end -@implementation MTRDoorLockClusterClearAliroReaderConfigParams (InternalMethods) +@implementation MTRWindowCoveringClusterGoToTiltPercentageParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::DoorLock::Commands::ClearAliroReaderConfig::Type encodableStruct; + chip::app::Clusters::WindowCovering::Commands::GoToTiltPercentage::Type encodableStruct; ListFreer listFreer; + { + encodableStruct.tiltPercent100thsValue = self.tiltPercent100thsValue.unsignedShortValue; + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -20250,10 +20387,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRWindowCoveringClusterUpOrOpenParams +@implementation MTRBarrierControlClusterBarrierControlGoToPercentParams - (instancetype)init { if (self = [super init]) { + + _percentOpen = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -20262,8 +20401,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRWindowCoveringClusterUpOrOpenParams alloc] init]; + auto other = [[MTRBarrierControlClusterBarrierControlGoToPercentParams alloc] init]; + other.percentOpen = self.percentOpen; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -20272,18 +20412,21 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: percentOpen:%@; >", NSStringFromClass([self class]), _percentOpen]; return descriptionString; } @end -@implementation MTRWindowCoveringClusterUpOrOpenParams (InternalMethods) +@implementation MTRBarrierControlClusterBarrierControlGoToPercentParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::WindowCovering::Commands::UpOrOpen::Type encodableStruct; + chip::app::Clusters::BarrierControl::Commands::BarrierControlGoToPercent::Type encodableStruct; ListFreer listFreer; + { + encodableStruct.percentOpen = self.percentOpen.unsignedCharValue; + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -20323,7 +20466,7 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRWindowCoveringClusterDownOrCloseParams +@implementation MTRBarrierControlClusterBarrierControlStopParams - (instancetype)init { if (self = [super init]) { @@ -20335,7 +20478,7 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRWindowCoveringClusterDownOrCloseParams alloc] init]; + auto other = [[MTRBarrierControlClusterBarrierControlStopParams alloc] init]; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -20351,11 +20494,11 @@ - (NSString *)description @end -@implementation MTRWindowCoveringClusterDownOrCloseParams (InternalMethods) +@implementation MTRBarrierControlClusterBarrierControlStopParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::WindowCovering::Commands::DownOrClose::Type encodableStruct; + chip::app::Clusters::BarrierControl::Commands::BarrierControlStop::Type encodableStruct; ListFreer listFreer; auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -20396,10 +20539,14 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRWindowCoveringClusterStopMotionParams +@implementation MTRThermostatClusterSetpointRaiseLowerParams - (instancetype)init { if (self = [super init]) { + + _mode = @(0); + + _amount = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -20408,8 +20555,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRWindowCoveringClusterStopMotionParams alloc] init]; + auto other = [[MTRThermostatClusterSetpointRaiseLowerParams alloc] init]; + other.mode = self.mode; + other.amount = self.amount; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -20418,18 +20567,24 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: mode:%@; amount:%@; >", NSStringFromClass([self class]), _mode, _amount]; return descriptionString; } @end -@implementation MTRWindowCoveringClusterStopMotionParams (InternalMethods) +@implementation MTRThermostatClusterSetpointRaiseLowerParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::WindowCovering::Commands::StopMotion::Type encodableStruct; + chip::app::Clusters::Thermostat::Commands::SetpointRaiseLower::Type encodableStruct; ListFreer listFreer; + { + encodableStruct.mode = static_cast>(self.mode.unsignedCharValue); + } + { + encodableStruct.amount = self.amount.charValue; + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -20469,91 +20624,142 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRWindowCoveringClusterGoToLiftValueParams +@implementation MTRThermostatClusterGetWeeklyScheduleResponseParams - (instancetype)init { if (self = [super init]) { - _liftValue = @(0); + _numberOfTransitionsForSequence = @(0); + + _dayOfWeekForSequence = @(0); + + _modeForSequence = @(0); + + _transitions = [NSArray array]; _timedInvokeTimeoutMs = nil; - _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRWindowCoveringClusterGoToLiftValueParams alloc] init]; + auto other = [[MTRThermostatClusterGetWeeklyScheduleResponseParams alloc] init]; - other.liftValue = self.liftValue; + other.numberOfTransitionsForSequence = self.numberOfTransitionsForSequence; + other.dayOfWeekForSequence = self.dayOfWeekForSequence; + other.modeForSequence = self.modeForSequence; + other.transitions = self.transitions; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; - other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: liftValue:%@; >", NSStringFromClass([self class]), _liftValue]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: numberOfTransitionsForSequence:%@; dayOfWeekForSequence:%@; modeForSequence:%@; transitions:%@; >", NSStringFromClass([self class]), _numberOfTransitionsForSequence, _dayOfWeekForSequence, _modeForSequence, _transitions]; return descriptionString; } -@end - -@implementation MTRWindowCoveringClusterGoToLiftValueParams (InternalMethods) - -- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader +- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue + error:(NSError * __autoreleasing *)error { - chip::app::Clusters::WindowCovering::Commands::GoToLiftValue::Type encodableStruct; - ListFreer listFreer; - { - encodableStruct.liftValue = self.liftValue.unsignedShortValue; + if (!(self = [super init])) { + return nil; } - auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); + using DecodableType = chip::app::Clusters::Thermostat::Commands::GetWeeklyScheduleResponse::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 MTRThermostatClusterGetWeeklyScheduleResponseParams (InternalMethods) + +- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::Thermostat::Commands::GetWeeklyScheduleResponse::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.numberOfTransitionsForSequence = [NSNumber numberWithUnsignedChar:decodableStruct.numberOfTransitionsForSequence]; } - - auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); - if (decodedObj == nil) { - if (error) { - *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; + { + self.dayOfWeekForSequence = [NSNumber numberWithUnsignedChar:decodableStruct.dayOfWeekForSequence.Raw()]; + } + { + self.modeForSequence = [NSNumber numberWithUnsignedChar:decodableStruct.modeForSequence.Raw()]; + } + { + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + auto iter_0 = decodableStruct.transitions.begin(); + while (iter_0.Next()) { + auto & entry_0 = iter_0.GetValue(); + MTRThermostatClusterWeeklyScheduleTransitionStruct * newElement_0; + newElement_0 = [MTRThermostatClusterWeeklyScheduleTransitionStruct new]; + newElement_0.transitionTime = [NSNumber numberWithUnsignedShort:entry_0.transitionTime]; + if (entry_0.heatSetpoint.IsNull()) { + newElement_0.heatSetpoint = nil; + } else { + newElement_0.heatSetpoint = [NSNumber numberWithShort:entry_0.heatSetpoint.Value()]; + } + if (entry_0.coolSetpoint.IsNull()) { + newElement_0.coolSetpoint = nil; + } else { + newElement_0.coolSetpoint = [NSNumber numberWithShort:entry_0.coolSetpoint.Value()]; + } + [array_0 addObject:newElement_0]; + } + CHIP_ERROR err = iter_0.GetStatus(); + if (err != CHIP_NO_ERROR) { + return err; + } + self.transitions = array_0; } } - return decodedObj; + return CHIP_NO_ERROR; } + @end -@implementation MTRWindowCoveringClusterGoToLiftPercentageParams +@implementation MTRThermostatClusterSetWeeklyScheduleParams - (instancetype)init { if (self = [super init]) { - _liftPercent100thsValue = @(0); + _numberOfTransitionsForSequence = @(0); + + _dayOfWeekForSequence = @(0); + + _modeForSequence = @(0); + + _transitions = [NSArray array]; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -20562,9 +20768,12 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRWindowCoveringClusterGoToLiftPercentageParams alloc] init]; + auto other = [[MTRThermostatClusterSetWeeklyScheduleParams alloc] init]; - other.liftPercent100thsValue = self.liftPercent100thsValue; + other.numberOfTransitionsForSequence = self.numberOfTransitionsForSequence; + other.dayOfWeekForSequence = self.dayOfWeekForSequence; + other.modeForSequence = self.modeForSequence; + other.transitions = self.transitions; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -20573,20 +20782,62 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: liftPercent100thsValue:%@; >", NSStringFromClass([self class]), _liftPercent100thsValue]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: numberOfTransitionsForSequence:%@; dayOfWeekForSequence:%@; modeForSequence:%@; transitions:%@; >", NSStringFromClass([self class]), _numberOfTransitionsForSequence, _dayOfWeekForSequence, _modeForSequence, _transitions]; return descriptionString; } @end -@implementation MTRWindowCoveringClusterGoToLiftPercentageParams (InternalMethods) +@implementation MTRThermostatClusterSetWeeklyScheduleParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::WindowCovering::Commands::GoToLiftPercentage::Type encodableStruct; + chip::app::Clusters::Thermostat::Commands::SetWeeklySchedule::Type encodableStruct; ListFreer listFreer; { - encodableStruct.liftPercent100thsValue = self.liftPercent100thsValue.unsignedShortValue; + encodableStruct.numberOfTransitionsForSequence = self.numberOfTransitionsForSequence.unsignedCharValue; + } + { + encodableStruct.dayOfWeekForSequence = static_cast>(self.dayOfWeekForSequence.unsignedCharValue); + } + { + encodableStruct.modeForSequence = static_cast>(self.modeForSequence.unsignedCharValue); + } + { + { + using ListType_0 = std::remove_reference_t; + using ListMemberType_0 = ListMemberTypeGetter::Type; + if (self.transitions.count != 0) { + auto * listHolder_0 = new ListHolder(self.transitions.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.transitions.count; ++i_0) { + if (![self.transitions[i_0] isKindOfClass:[MTRThermostatClusterWeeklyScheduleTransitionStruct class]]) { + // Wrong kind of value. + return CHIP_ERROR_INVALID_ARGUMENT; + } + auto element_0 = (MTRThermostatClusterWeeklyScheduleTransitionStruct *) self.transitions[i_0]; + listHolder_0->mList[i_0].transitionTime = element_0.transitionTime.unsignedShortValue; + if (element_0.heatSetpoint == nil) { + listHolder_0->mList[i_0].heatSetpoint.SetNull(); + } else { + auto & nonNullValue_2 = listHolder_0->mList[i_0].heatSetpoint.SetNonNull(); + nonNullValue_2 = element_0.heatSetpoint.shortValue; + } + if (element_0.coolSetpoint == nil) { + listHolder_0->mList[i_0].coolSetpoint.SetNull(); + } else { + auto & nonNullValue_2 = listHolder_0->mList[i_0].coolSetpoint.SetNonNull(); + nonNullValue_2 = element_0.coolSetpoint.shortValue; + } + } + encodableStruct.transitions = ListType_0(listHolder_0->mList, self.transitions.count); + } else { + encodableStruct.transitions = ListType_0(); + } + } } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -20627,12 +20878,14 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRWindowCoveringClusterGoToTiltValueParams +@implementation MTRThermostatClusterGetWeeklyScheduleParams - (instancetype)init { if (self = [super init]) { - _tiltValue = @(0); + _daysToReturn = @(0); + + _modeToReturn = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -20641,9 +20894,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRWindowCoveringClusterGoToTiltValueParams alloc] init]; + auto other = [[MTRThermostatClusterGetWeeklyScheduleParams alloc] init]; - other.tiltValue = self.tiltValue; + other.daysToReturn = self.daysToReturn; + other.modeToReturn = self.modeToReturn; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -20652,20 +20906,23 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: tiltValue:%@; >", NSStringFromClass([self class]), _tiltValue]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: daysToReturn:%@; modeToReturn:%@; >", NSStringFromClass([self class]), _daysToReturn, _modeToReturn]; return descriptionString; } @end -@implementation MTRWindowCoveringClusterGoToTiltValueParams (InternalMethods) +@implementation MTRThermostatClusterGetWeeklyScheduleParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::WindowCovering::Commands::GoToTiltValue::Type encodableStruct; + chip::app::Clusters::Thermostat::Commands::GetWeeklySchedule::Type encodableStruct; ListFreer listFreer; { - encodableStruct.tiltValue = self.tiltValue.unsignedShortValue; + encodableStruct.daysToReturn = static_cast>(self.daysToReturn.unsignedCharValue); + } + { + encodableStruct.modeToReturn = static_cast>(self.modeToReturn.unsignedCharValue); } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -20706,12 +20963,10 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRWindowCoveringClusterGoToTiltPercentageParams +@implementation MTRThermostatClusterClearWeeklyScheduleParams - (instancetype)init { if (self = [super init]) { - - _tiltPercent100thsValue = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -20720,9 +20975,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRWindowCoveringClusterGoToTiltPercentageParams alloc] init]; + auto other = [[MTRThermostatClusterClearWeeklyScheduleParams alloc] init]; - other.tiltPercent100thsValue = self.tiltPercent100thsValue; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -20731,21 +20985,18 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: tiltPercent100thsValue:%@; >", NSStringFromClass([self class]), _tiltPercent100thsValue]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } @end -@implementation MTRWindowCoveringClusterGoToTiltPercentageParams (InternalMethods) +@implementation MTRThermostatClusterClearWeeklyScheduleParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::WindowCovering::Commands::GoToTiltPercentage::Type encodableStruct; + chip::app::Clusters::Thermostat::Commands::ClearWeeklySchedule::Type encodableStruct; ListFreer listFreer; - { - encodableStruct.tiltPercent100thsValue = self.tiltPercent100thsValue.unsignedShortValue; - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -20785,12 +21036,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRBarrierControlClusterBarrierControlGoToPercentParams +@implementation MTRThermostatClusterSetActiveScheduleRequestParams - (instancetype)init { if (self = [super init]) { - _percentOpen = @(0); + _scheduleHandle = [NSData data]; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -20799,9 +21050,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRBarrierControlClusterBarrierControlGoToPercentParams alloc] init]; + auto other = [[MTRThermostatClusterSetActiveScheduleRequestParams alloc] init]; - other.percentOpen = self.percentOpen; + other.scheduleHandle = self.scheduleHandle; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -20810,20 +21061,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: percentOpen:%@; >", NSStringFromClass([self class]), _percentOpen]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: scheduleHandle:%@; >", NSStringFromClass([self class]), [_scheduleHandle base64EncodedStringWithOptions:0]]; return descriptionString; } @end -@implementation MTRBarrierControlClusterBarrierControlGoToPercentParams (InternalMethods) +@implementation MTRThermostatClusterSetActiveScheduleRequestParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::BarrierControl::Commands::BarrierControlGoToPercent::Type encodableStruct; + chip::app::Clusters::Thermostat::Commands::SetActiveScheduleRequest::Type encodableStruct; ListFreer listFreer; { - encodableStruct.percentOpen = self.percentOpen.unsignedCharValue; + encodableStruct.scheduleHandle = AsByteSpan(self.scheduleHandle); } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -20864,10 +21115,14 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRBarrierControlClusterBarrierControlStopParams +@implementation MTRThermostatClusterSetActivePresetRequestParams - (instancetype)init { if (self = [super init]) { + + _presetHandle = [NSData data]; + + _delayMinutes = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -20876,8 +21131,10 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRBarrierControlClusterBarrierControlStopParams alloc] init]; + auto other = [[MTRThermostatClusterSetActivePresetRequestParams alloc] init]; + other.presetHandle = self.presetHandle; + other.delayMinutes = self.delayMinutes; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -20886,18 +21143,27 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: presetHandle:%@; delayMinutes:%@; >", NSStringFromClass([self class]), [_presetHandle base64EncodedStringWithOptions:0], _delayMinutes]; return descriptionString; } @end -@implementation MTRBarrierControlClusterBarrierControlStopParams (InternalMethods) +@implementation MTRThermostatClusterSetActivePresetRequestParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::BarrierControl::Commands::BarrierControlStop::Type encodableStruct; + chip::app::Clusters::Thermostat::Commands::SetActivePresetRequest::Type encodableStruct; ListFreer listFreer; + { + encodableStruct.presetHandle = AsByteSpan(self.presetHandle); + } + { + if (self.delayMinutes != nil) { + auto & definedValue_0 = encodableStruct.delayMinutes.Emplace(); + definedValue_0 = self.delayMinutes.unsignedShortValue; + } + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -20937,14 +21203,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRThermostatClusterSetpointRaiseLowerParams +@implementation MTRThermostatClusterStartPresetsSchedulesEditRequestParams - (instancetype)init { if (self = [super init]) { - _mode = @(0); - - _amount = @(0); + _timeoutSeconds = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -20953,10 +21217,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRThermostatClusterSetpointRaiseLowerParams alloc] init]; + auto other = [[MTRThermostatClusterStartPresetsSchedulesEditRequestParams alloc] init]; - other.mode = self.mode; - other.amount = self.amount; + other.timeoutSeconds = self.timeoutSeconds; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -20965,23 +21228,20 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: mode:%@; amount:%@; >", NSStringFromClass([self class]), _mode, _amount]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: timeoutSeconds:%@; >", NSStringFromClass([self class]), _timeoutSeconds]; return descriptionString; } @end -@implementation MTRThermostatClusterSetpointRaiseLowerParams (InternalMethods) +@implementation MTRThermostatClusterStartPresetsSchedulesEditRequestParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::Thermostat::Commands::SetpointRaiseLower::Type encodableStruct; + chip::app::Clusters::Thermostat::Commands::StartPresetsSchedulesEditRequest::Type encodableStruct; ListFreer listFreer; { - encodableStruct.mode = static_cast>(self.mode.unsignedCharValue); - } - { - encodableStruct.amount = self.amount.charValue; + encodableStruct.timeoutSeconds = self.timeoutSeconds.unsignedShortValue; } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); @@ -21022,142 +21282,83 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRThermostatClusterGetWeeklyScheduleResponseParams +@implementation MTRThermostatClusterCancelPresetsSchedulesEditRequestParams - (instancetype)init { if (self = [super init]) { - - _numberOfTransitionsForSequence = @(0); - - _dayOfWeekForSequence = @(0); - - _modeForSequence = @(0); - - _transitions = [NSArray array]; _timedInvokeTimeoutMs = nil; + _serverSideProcessingTimeout = nil; } return self; } - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRThermostatClusterGetWeeklyScheduleResponseParams alloc] init]; + auto other = [[MTRThermostatClusterCancelPresetsSchedulesEditRequestParams alloc] init]; - other.numberOfTransitionsForSequence = self.numberOfTransitionsForSequence; - other.dayOfWeekForSequence = self.dayOfWeekForSequence; - other.modeForSequence = self.modeForSequence; - other.transitions = self.transitions; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; + other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; return other; } - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: numberOfTransitionsForSequence:%@; dayOfWeekForSequence:%@; modeForSequence:%@; transitions:%@; >", NSStringFromClass([self class]), _numberOfTransitionsForSequence, _dayOfWeekForSequence, _modeForSequence, _transitions]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } -- (nullable instancetype)initWithResponseValue:(NSDictionary *)responseValue - error:(NSError * __autoreleasing *)error +@end + +@implementation MTRThermostatClusterCancelPresetsSchedulesEditRequestParams (InternalMethods) + +- (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - if (!(self = [super init])) { - return nil; - } + chip::app::Clusters::Thermostat::Commands::CancelPresetsSchedulesEditRequest::Type encodableStruct; + ListFreer listFreer; - using DecodableType = chip::app::Clusters::Thermostat::Commands::GetWeeklyScheduleResponse::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 MTRThermostatClusterGetWeeklyScheduleResponseParams (InternalMethods) + reader.Init(std::move(buffer)); + return reader.Next(chip::TLV::kTLVType_Structure, chip::TLV::AnonymousTag()); +} -- (CHIP_ERROR)_setFieldsFromDecodableStruct:(const chip::app::Clusters::Thermostat::Commands::GetWeeklyScheduleResponse::DecodableType &)decodableStruct +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error { - { - self.numberOfTransitionsForSequence = [NSNumber numberWithUnsignedChar:decodableStruct.numberOfTransitionsForSequence]; - } - { - self.dayOfWeekForSequence = [NSNumber numberWithUnsignedChar:decodableStruct.dayOfWeekForSequence.Raw()]; - } - { - self.modeForSequence = [NSNumber numberWithUnsignedChar:decodableStruct.modeForSequence.Raw()]; + chip::System::PacketBufferTLVReader reader; + CHIP_ERROR err = [self _encodeToTLVReader:reader]; + if (err != CHIP_NO_ERROR) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:err]; + } + return nil; } - { - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - auto iter_0 = decodableStruct.transitions.begin(); - while (iter_0.Next()) { - auto & entry_0 = iter_0.GetValue(); - MTRThermostatClusterWeeklyScheduleTransitionStruct * newElement_0; - newElement_0 = [MTRThermostatClusterWeeklyScheduleTransitionStruct new]; - newElement_0.transitionTime = [NSNumber numberWithUnsignedShort:entry_0.transitionTime]; - if (entry_0.heatSetpoint.IsNull()) { - newElement_0.heatSetpoint = nil; - } else { - newElement_0.heatSetpoint = [NSNumber numberWithShort:entry_0.heatSetpoint.Value()]; - } - if (entry_0.coolSetpoint.IsNull()) { - newElement_0.coolSetpoint = nil; - } else { - newElement_0.coolSetpoint = [NSNumber numberWithShort:entry_0.coolSetpoint.Value()]; - } - [array_0 addObject:newElement_0]; - } - CHIP_ERROR err = iter_0.GetStatus(); - if (err != CHIP_NO_ERROR) { - return err; - } - self.transitions = array_0; + + auto decodedObj = MTRDecodeDataValueDictionaryFromCHIPTLV(&reader); + if (decodedObj == nil) { + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE]; } } - return CHIP_NO_ERROR; + return decodedObj; } - @end -@implementation MTRThermostatClusterSetWeeklyScheduleParams +@implementation MTRThermostatClusterCommitPresetsSchedulesRequestParams - (instancetype)init { if (self = [super init]) { - - _numberOfTransitionsForSequence = @(0); - - _dayOfWeekForSequence = @(0); - - _modeForSequence = @(0); - - _transitions = [NSArray array]; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -21166,12 +21367,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRThermostatClusterSetWeeklyScheduleParams alloc] init]; + auto other = [[MTRThermostatClusterCommitPresetsSchedulesRequestParams alloc] init]; - other.numberOfTransitionsForSequence = self.numberOfTransitionsForSequence; - other.dayOfWeekForSequence = self.dayOfWeekForSequence; - other.modeForSequence = self.modeForSequence; - other.transitions = self.transitions; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -21180,63 +21377,18 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: numberOfTransitionsForSequence:%@; dayOfWeekForSequence:%@; modeForSequence:%@; transitions:%@; >", NSStringFromClass([self class]), _numberOfTransitionsForSequence, _dayOfWeekForSequence, _modeForSequence, _transitions]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } @end -@implementation MTRThermostatClusterSetWeeklyScheduleParams (InternalMethods) +@implementation MTRThermostatClusterCommitPresetsSchedulesRequestParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::Thermostat::Commands::SetWeeklySchedule::Type encodableStruct; + chip::app::Clusters::Thermostat::Commands::CommitPresetsSchedulesRequest::Type encodableStruct; ListFreer listFreer; - { - encodableStruct.numberOfTransitionsForSequence = self.numberOfTransitionsForSequence.unsignedCharValue; - } - { - encodableStruct.dayOfWeekForSequence = static_cast>(self.dayOfWeekForSequence.unsignedCharValue); - } - { - encodableStruct.modeForSequence = static_cast>(self.modeForSequence.unsignedCharValue); - } - { - { - using ListType_0 = std::remove_reference_t; - using ListMemberType_0 = ListMemberTypeGetter::Type; - if (self.transitions.count != 0) { - auto * listHolder_0 = new ListHolder(self.transitions.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.transitions.count; ++i_0) { - if (![self.transitions[i_0] isKindOfClass:[MTRThermostatClusterWeeklyScheduleTransitionStruct class]]) { - // Wrong kind of value. - return CHIP_ERROR_INVALID_ARGUMENT; - } - auto element_0 = (MTRThermostatClusterWeeklyScheduleTransitionStruct *) self.transitions[i_0]; - listHolder_0->mList[i_0].transitionTime = element_0.transitionTime.unsignedShortValue; - if (element_0.heatSetpoint == nil) { - listHolder_0->mList[i_0].heatSetpoint.SetNull(); - } else { - auto & nonNullValue_2 = listHolder_0->mList[i_0].heatSetpoint.SetNonNull(); - nonNullValue_2 = element_0.heatSetpoint.shortValue; - } - if (element_0.coolSetpoint == nil) { - listHolder_0->mList[i_0].coolSetpoint.SetNull(); - } else { - auto & nonNullValue_2 = listHolder_0->mList[i_0].coolSetpoint.SetNonNull(); - nonNullValue_2 = element_0.coolSetpoint.shortValue; - } - } - encodableStruct.transitions = ListType_0(listHolder_0->mList, self.transitions.count); - } else { - encodableStruct.transitions = ListType_0(); - } - } - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -21276,14 +21428,10 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRThermostatClusterGetWeeklyScheduleParams +@implementation MTRThermostatClusterCancelSetActivePresetRequestParams - (instancetype)init { if (self = [super init]) { - - _daysToReturn = @(0); - - _modeToReturn = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -21292,10 +21440,8 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRThermostatClusterGetWeeklyScheduleParams alloc] init]; + auto other = [[MTRThermostatClusterCancelSetActivePresetRequestParams alloc] init]; - other.daysToReturn = self.daysToReturn; - other.modeToReturn = self.modeToReturn; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -21304,24 +21450,18 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: daysToReturn:%@; modeToReturn:%@; >", NSStringFromClass([self class]), _daysToReturn, _modeToReturn]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; return descriptionString; } @end -@implementation MTRThermostatClusterGetWeeklyScheduleParams (InternalMethods) +@implementation MTRThermostatClusterCancelSetActivePresetRequestParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::Thermostat::Commands::GetWeeklySchedule::Type encodableStruct; + chip::app::Clusters::Thermostat::Commands::CancelSetActivePresetRequest::Type encodableStruct; ListFreer listFreer; - { - encodableStruct.daysToReturn = static_cast>(self.daysToReturn.unsignedCharValue); - } - { - encodableStruct.modeToReturn = static_cast>(self.modeToReturn.unsignedCharValue); - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -21361,10 +21501,12 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader } @end -@implementation MTRThermostatClusterClearWeeklyScheduleParams +@implementation MTRThermostatClusterSetTemperatureSetpointHoldPolicyParams - (instancetype)init { if (self = [super init]) { + + _temperatureSetpointHoldPolicy = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -21373,8 +21515,9 @@ - (instancetype)init - (id)copyWithZone:(NSZone * _Nullable)zone; { - auto other = [[MTRThermostatClusterClearWeeklyScheduleParams alloc] init]; + auto other = [[MTRThermostatClusterSetTemperatureSetpointHoldPolicyParams alloc] init]; + other.temperatureSetpointHoldPolicy = self.temperatureSetpointHoldPolicy; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -21383,18 +21526,21 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: >", NSStringFromClass([self class])]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: temperatureSetpointHoldPolicy:%@; >", NSStringFromClass([self class]), _temperatureSetpointHoldPolicy]; return descriptionString; } @end -@implementation MTRThermostatClusterClearWeeklyScheduleParams (InternalMethods) +@implementation MTRThermostatClusterSetTemperatureSetpointHoldPolicyParams (InternalMethods) - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { - chip::app::Clusters::Thermostat::Commands::ClearWeeklySchedule::Type encodableStruct; + chip::app::Clusters::Thermostat::Commands::SetTemperatureSetpointHoldPolicy::Type encodableStruct; ListFreer listFreer; + { + encodableStruct.temperatureSetpointHoldPolicy = static_cast>(self.temperatureSetpointHoldPolicy.unsignedCharValue); + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloads_Internal.h index f2f3b125a44afd..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; @@ -1384,6 +1384,48 @@ NS_ASSUME_NONNULL_BEGIN @end +@interface MTRThermostatClusterSetActiveScheduleRequestParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRThermostatClusterSetActivePresetRequestParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRThermostatClusterStartPresetsSchedulesEditRequestParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRThermostatClusterCancelPresetsSchedulesEditRequestParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRThermostatClusterCommitPresetsSchedulesRequestParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRThermostatClusterCancelSetActivePresetRequestParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + +@interface MTRThermostatClusterSetTemperatureSetpointHoldPolicyParams (InternalMethods) + +- (NSDictionary * _Nullable)_encodeAsDataValue:(NSError * __autoreleasing *)error; + +@end + @interface MTRFanControlClusterStepParams (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 c952dc3da5faa2..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; @@ -1455,6 +1453,56 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRPumpConfigurationAndControlClusterTurbineOperationEvent : NSObject @end +MTR_PROVISIONALLY_AVAILABLE +@interface MTRThermostatClusterScheduleTransitionStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull dayOfWeek MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull transitionTime MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSData * _Nullable presetHandle MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable systemMode MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable coolingSetpoint MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable heatingSetpoint MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRThermostatClusterScheduleStruct : NSObject +@property (nonatomic, copy) NSData * _Nullable scheduleHandle MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull systemMode MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nullable name MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSData * _Nullable presetHandle MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSArray * _Nonnull transitions MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable builtIn MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRThermostatClusterPresetStruct : NSObject +@property (nonatomic, copy) NSData * _Nullable presetHandle MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull presetScenario MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nullable name MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable coolingSetpoint MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable heatingSetpoint MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable builtIn MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRThermostatClusterPresetTypeStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull presetScenario MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull numberOfPresets MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull presetTypeFeatures MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRThermostatClusterQueuedPresetStruct : NSObject +@property (nonatomic, copy) NSData * _Nullable presetHandle MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable transitionTimestamp MTR_PROVISIONALLY_AVAILABLE; +@end + +MTR_PROVISIONALLY_AVAILABLE +@interface MTRThermostatClusterScheduleTypeStruct : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull systemMode MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull numberOfSchedules MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull scheduleTypeFeatures MTR_PROVISIONALLY_AVAILABLE; +@end + MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) @interface MTRThermostatClusterWeeklyScheduleTransitionStruct : NSObject @property (nonatomic, copy) NSNumber * _Nonnull transitionTime MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm index 9324a04d612704..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 { @@ -6101,6 +6081,228 @@ - (NSString *)description @end +@implementation MTRThermostatClusterScheduleTransitionStruct +- (instancetype)init +{ + if (self = [super init]) { + + _dayOfWeek = @(0); + + _transitionTime = @(0); + + _presetHandle = nil; + + _systemMode = nil; + + _coolingSetpoint = nil; + + _heatingSetpoint = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRThermostatClusterScheduleTransitionStruct alloc] init]; + + other.dayOfWeek = self.dayOfWeek; + other.transitionTime = self.transitionTime; + other.presetHandle = self.presetHandle; + other.systemMode = self.systemMode; + other.coolingSetpoint = self.coolingSetpoint; + other.heatingSetpoint = self.heatingSetpoint; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: dayOfWeek:%@; transitionTime:%@; presetHandle:%@; systemMode:%@; coolingSetpoint:%@; heatingSetpoint:%@; >", NSStringFromClass([self class]), _dayOfWeek, _transitionTime, [_presetHandle base64EncodedStringWithOptions:0], _systemMode, _coolingSetpoint, _heatingSetpoint]; + return descriptionString; +} + +@end + +@implementation MTRThermostatClusterScheduleStruct +- (instancetype)init +{ + if (self = [super init]) { + + _scheduleHandle = nil; + + _systemMode = @(0); + + _name = nil; + + _presetHandle = nil; + + _transitions = [NSArray array]; + + _builtIn = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRThermostatClusterScheduleStruct alloc] init]; + + other.scheduleHandle = self.scheduleHandle; + other.systemMode = self.systemMode; + other.name = self.name; + other.presetHandle = self.presetHandle; + other.transitions = self.transitions; + other.builtIn = self.builtIn; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: scheduleHandle:%@; systemMode:%@; name:%@; presetHandle:%@; transitions:%@; builtIn:%@; >", NSStringFromClass([self class]), [_scheduleHandle base64EncodedStringWithOptions:0], _systemMode, _name, [_presetHandle base64EncodedStringWithOptions:0], _transitions, _builtIn]; + return descriptionString; +} + +@end + +@implementation MTRThermostatClusterPresetStruct +- (instancetype)init +{ + if (self = [super init]) { + + _presetHandle = nil; + + _presetScenario = @(0); + + _name = nil; + + _coolingSetpoint = nil; + + _heatingSetpoint = nil; + + _builtIn = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRThermostatClusterPresetStruct alloc] init]; + + other.presetHandle = self.presetHandle; + other.presetScenario = self.presetScenario; + other.name = self.name; + other.coolingSetpoint = self.coolingSetpoint; + other.heatingSetpoint = self.heatingSetpoint; + other.builtIn = self.builtIn; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: presetHandle:%@; presetScenario:%@; name:%@; coolingSetpoint:%@; heatingSetpoint:%@; builtIn:%@; >", NSStringFromClass([self class]), [_presetHandle base64EncodedStringWithOptions:0], _presetScenario, _name, _coolingSetpoint, _heatingSetpoint, _builtIn]; + return descriptionString; +} + +@end + +@implementation MTRThermostatClusterPresetTypeStruct +- (instancetype)init +{ + if (self = [super init]) { + + _presetScenario = @(0); + + _numberOfPresets = @(0); + + _presetTypeFeatures = @(0); + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRThermostatClusterPresetTypeStruct alloc] init]; + + other.presetScenario = self.presetScenario; + other.numberOfPresets = self.numberOfPresets; + other.presetTypeFeatures = self.presetTypeFeatures; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: presetScenario:%@; numberOfPresets:%@; presetTypeFeatures:%@; >", NSStringFromClass([self class]), _presetScenario, _numberOfPresets, _presetTypeFeatures]; + return descriptionString; +} + +@end + +@implementation MTRThermostatClusterQueuedPresetStruct +- (instancetype)init +{ + if (self = [super init]) { + + _presetHandle = nil; + + _transitionTimestamp = nil; + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRThermostatClusterQueuedPresetStruct alloc] init]; + + other.presetHandle = self.presetHandle; + other.transitionTimestamp = self.transitionTimestamp; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: presetHandle:%@; transitionTimestamp:%@; >", NSStringFromClass([self class]), [_presetHandle base64EncodedStringWithOptions:0], _transitionTimestamp]; + return descriptionString; +} + +@end + +@implementation MTRThermostatClusterScheduleTypeStruct +- (instancetype)init +{ + if (self = [super init]) { + + _systemMode = @(0); + + _numberOfSchedules = @(0); + + _scheduleTypeFeatures = @(0); + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTRThermostatClusterScheduleTypeStruct alloc] init]; + + other.systemMode = self.systemMode; + other.numberOfSchedules = self.numberOfSchedules; + other.scheduleTypeFeatures = self.scheduleTypeFeatures; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: systemMode:%@; numberOfSchedules:%@; scheduleTypeFeatures:%@; >", NSStringFromClass([self class]), _systemMode, _numberOfSchedules, _scheduleTypeFeatures]; + return descriptionString; +} + +@end + @implementation MTRThermostatClusterWeeklyScheduleTransitionStruct - (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/src/platform/ESP32/ESP32Utils.cpp b/src/platform/ESP32/ESP32Utils.cpp index 9d2fcfc4845a03..ffa45ee72241dd 100644 --- a/src/platform/ESP32/ESP32Utils.cpp +++ b/src/platform/ESP32/ESP32Utils.cpp @@ -82,7 +82,7 @@ bool ESP32Utils::IsStationProvisioned(void) CHIP_ERROR ESP32Utils::IsStationConnected(bool & connected) { wifi_ap_record_t apInfo; - connected = (esp_wifi_sta_get_ap_info(&apInfo) == ESP_OK); + connected = (esp_wifi_sta_get_ap_info(&apInfo) == ESP_OK && apInfo.ssid[0] != 0); return CHIP_NO_ERROR; } diff --git a/src/platform/ESP32/NetworkCommissioningDriver.cpp b/src/platform/ESP32/NetworkCommissioningDriver.cpp index 80e54d74803e7e..2871c4c3f2031d 100644 --- a/src/platform/ESP32/NetworkCommissioningDriver.cpp +++ b/src/platform/ESP32/NetworkCommissioningDriver.cpp @@ -433,6 +433,12 @@ void ESPWiFiDriver::ScanNetworks(ByteSpan ssid, WiFiDriver::ScanCallback * callb } } +uint32_t ESPWiFiDriver::GetSupportedWiFiBandsMask() const +{ + uint32_t bands = static_cast(1UL << chip::to_underlying(WiFiBandEnum::k2g4)); + return bands; +} + CHIP_ERROR ESPWiFiDriver::SetLastDisconnectReason(const ChipDeviceEvent * event) { VerifyOrReturnError(event->Type == DeviceEventType::kESPSystemEvent && event->Platform.ESPSystemEvent.Base == WIFI_EVENT && diff --git a/src/platform/ESP32/NetworkCommissioningDriver.h b/src/platform/ESP32/NetworkCommissioningDriver.h index 5a2ca8f44d61c1..447d6346dcbd1c 100644 --- a/src/platform/ESP32/NetworkCommissioningDriver.h +++ b/src/platform/ESP32/NetworkCommissioningDriver.h @@ -112,6 +112,7 @@ class ESPWiFiDriver final : public WiFiDriver Status AddOrUpdateNetwork(ByteSpan ssid, ByteSpan credentials, MutableCharSpan & outDebugText, uint8_t & outNetworkIndex) override; void ScanNetworks(ByteSpan ssid, ScanCallback * callback) override; + uint32_t GetSupportedWiFiBandsMask() const override; CHIP_ERROR ConnectWiFiNetwork(const char * ssid, uint8_t ssidLen, const char * key, uint8_t keyLen); void OnConnectWiFiNetwork(); diff --git a/src/platform/Tizen/NetworkCommissioningDriver.h b/src/platform/Tizen/NetworkCommissioningDriver.h index 64db40b2d5ce23..0e08269fa82830 100644 --- a/src/platform/Tizen/NetworkCommissioningDriver.h +++ b/src/platform/Tizen/NetworkCommissioningDriver.h @@ -101,6 +101,7 @@ class TizenWiFiDriver final : public WiFiDriver Status AddOrUpdateNetwork(ByteSpan ssid, ByteSpan credentials, MutableCharSpan & outDebugText, uint8_t & outNetworkIndex) override; void ScanNetworks(ByteSpan ssid, ScanCallback * callback) override; + uint32_t GetSupportedWiFiBandsMask() const override; private: bool NetworkMatch(const WiFiNetwork & network, ByteSpan networkId); diff --git a/src/platform/Tizen/NetworkCommissioningWiFiDriver.cpp b/src/platform/Tizen/NetworkCommissioningWiFiDriver.cpp index a92ead9764c203..4bb57a823d0cdf 100644 --- a/src/platform/Tizen/NetworkCommissioningWiFiDriver.cpp +++ b/src/platform/Tizen/NetworkCommissioningWiFiDriver.cpp @@ -168,6 +168,12 @@ void TizenWiFiDriver::ScanNetworks(ByteSpan ssid, WiFiDriver::ScanCallback * cal } } +uint32_t TizenWiFiDriver::GetSupportedWiFiBandsMask() const +{ + return static_cast((1UL << chip::to_underlying(WiFiBandEnum::k2g4)) | + (1UL << chip::to_underlying(WiFiBandEnum::k5g))); +} + size_t TizenWiFiDriver::WiFiNetworkIterator::Count() { return driver->mStagingNetwork.ssidLen == 0 ? 0 : 1; diff --git a/src/platform/telink/BLEManagerImpl.h b/src/platform/telink/BLEManagerImpl.h index 63e501eadaae7a..1e1c4c94d67638 100644 --- a/src/platform/telink/BLEManagerImpl.h +++ b/src/platform/telink/BLEManagerImpl.h @@ -33,10 +33,6 @@ #include #include -#ifdef CONFIG_BOOTLOADER_MCUBOOT -#include "OTAUtil.h" -#endif /* CONFIG_BOOTLOADER_MCUBOOT */ - namespace chip { namespace DeviceLayer { namespace Internal { @@ -186,9 +182,6 @@ class InternalScanCallback : public DeviceLayer::NetworkCommissioning::ThreadDri NetworkCommissioning::ThreadScanResponseIterator * networks) { mBLEManagerImpl->StartAdvertisingProcess(); -#ifdef CONFIG_BOOTLOADER_MCUBOOT - OtaConfirmNewImage(); -#endif /* CONFIG_BOOTLOADER_MCUBOOT */ }; private: diff --git a/src/platform/telink/BUILD.gn b/src/platform/telink/BUILD.gn index ec645d1773ce9f..5561fb4e906ac9 100644 --- a/src/platform/telink/BUILD.gn +++ b/src/platform/telink/BUILD.gn @@ -60,8 +60,6 @@ static_library("telink") { public_deps = [ "${chip_root}/src/platform:platform_base" ] deps = [ "${chip_root}/src/platform/logging:headers" ] - defines = [ "CHIP_ADDRESS_RESOLVE_IMPL_INCLUDE_HEADER=" ] - if (chip_enable_factory_data) { sources += [ "FactoryDataParser.c", @@ -94,11 +92,4 @@ static_library("telink") { "OTAImageProcessorImpl.h", ] } - - if (chip_enable_bootloader_mcuboot) { - sources += [ - "OTAUtil.cpp", - "OTAUtil.h", - ] - } } diff --git a/src/platform/telink/args.gni b/src/platform/telink/args.gni index 82197d9cecdbd4..8a0a79b3a59761 100644 --- a/src/platform/telink/args.gni +++ b/src/platform/telink/args.gni @@ -19,7 +19,4 @@ chip_inet_config_enable_ipv4 = false declare_args() { # Enable factory data support chip_enable_factory_data = false - - # Enable Zephyr application to be booted by MCUboot - chip_enable_bootloader_mcuboot = false } diff --git a/src/python_testing/TC_BOOLCFG_2_1.py b/src/python_testing/TC_BOOLCFG_2_1.py new file mode 100644 index 00000000000000..d6ed97540056db --- /dev/null +++ b/src/python_testing/TC_BOOLCFG_2_1.py @@ -0,0 +1,134 @@ +# +# Copyright (c) 2023 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import functools +import logging +from operator import ior + +import chip.clusters as Clusters +from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from mobly import asserts + + +class TC_BOOLCFG_2_1(MatterBaseTest): + async def read_boolcfg_attribute_expect_success(self, endpoint, attribute): + cluster = Clusters.Objects.BooleanStateConfiguration + return await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attribute) + + def desc_TC_BOOLCFG_2_1(self) -> str: + return "[TC-BOOLCFG-2.1] Attributes with DUT as Server" + + def steps_TC_BOOLCFG_2_1(self) -> list[TestStep]: + steps = [ + TestStep(1, "Commissioning, already done", is_commissioning=True), + TestStep(2, "Read attribute list to determine supported attributes"), + TestStep(3, "Read SupportedSensitivityLevels attribute, if supported"), + TestStep(4, "Read CurrentSensitivityLevel attribute, if supported"), + TestStep(5, "Read DefaultSensitivityLevel attribute, if supported"), + TestStep(6, "Read AlarmsActive attribute, if supported"), + TestStep(7, "Read AlarmsSuppressed attribute, if supported"), + TestStep(8, "Read AlarmsEnabled attribute, if supported"), + TestStep(9, "Read AlarmsSupported attribute, if supported"), + TestStep(10, "Read SensorFault attribute, if supported"), + ] + return steps + + def pics_TC_BOOLCFG_2_1(self) -> list[str]: + pics = [ + "BOOLCFG.S", + ] + return pics + + @async_test_body + async def test_TC_BOOLCFG_2_1(self): + + endpoint = self.user_params.get("endpoint", 1) + all_alarm_mode_bitmap_bits = functools.reduce( + ior, [b.value for b in Clusters.BooleanStateConfiguration.Bitmaps.AlarmModeBitmap]) + all_sensor_fault_bitmap_bits = functools.reduce( + ior, [b.value for b in Clusters.BooleanStateConfiguration.Bitmaps.SensorFaultBitmap]) + + self.step(1) + attributes = Clusters.BooleanStateConfiguration.Attributes + + self.step(2) + attribute_list = await self.read_boolcfg_attribute_expect_success(endpoint=endpoint, attribute=attributes.AttributeList) + + number_of_supported_levels = 0 + + self.step(3) + if attributes.SupportedSensitivityLevels.attribute_id in attribute_list: + number_of_supported_levels = await self.read_boolcfg_attribute_expect_success(endpoint=endpoint, attribute=attributes.SupportedSensitivityLevels) + asserts.assert_less_equal(number_of_supported_levels, 10, "SupportedSensitivityLevels attribute is out of range") + asserts.assert_greater_equal(number_of_supported_levels, 2, "SupportedSensitivityLevels attribute is out of range") + else: + logging.info("Test step skipped") + + self.step(4) + if attributes.CurrentSensitivityLevel.attribute_id in attribute_list: + current_sensitivity_level_dut = await self.read_boolcfg_attribute_expect_success(endpoint=endpoint, attribute=attributes.CurrentSensitivityLevel) + asserts.assert_less_equal(current_sensitivity_level_dut, number_of_supported_levels, + "CurrentSensitivityLevel is not in valid range") + else: + logging.info("Test step skipped") + + self.step(5) + if attributes.DefaultSensitivityLevel.attribute_id in attribute_list: + default_sensitivity_level_dut = await self.read_boolcfg_attribute_expect_success(endpoint=endpoint, attribute=attributes.DefaultSensitivityLevel) + asserts.assert_less_equal(default_sensitivity_level_dut, number_of_supported_levels, + "DefaultSensitivityLevel is not in valid range") + else: + logging.info("Test step skipped") + + self.step(6) + if attributes.AlarmsActive.attribute_id in attribute_list: + alarms_active_dut = await self.read_boolcfg_attribute_expect_success(endpoint=endpoint, attribute=attributes.AlarmsActive) + asserts.assert_equal(alarms_active_dut & ~all_alarm_mode_bitmap_bits, 0, "AlarmsActive is not in valid range") + else: + logging.info("Test step skipped") + + self.step(7) + if attributes.AlarmsSuppressed.attribute_id in attribute_list: + alarms_suppressed_dut = await self.read_boolcfg_attribute_expect_success(endpoint=endpoint, attribute=attributes.AlarmsSuppressed) + asserts.assert_equal(alarms_suppressed_dut & ~all_alarm_mode_bitmap_bits, 0, "AlarmsSuppressed is not in valid range") + else: + logging.info("Test step skipped") + + self.step(8) + if attributes.AlarmsEnabled.attribute_id in attribute_list: + alarms_enabled_dut = await self.read_boolcfg_attribute_expect_success(endpoint=endpoint, attribute=attributes.AlarmsEnabled) + asserts.assert_equal(alarms_enabled_dut & ~all_alarm_mode_bitmap_bits, 0, "AlarmsEnabled is not in valid range") + else: + logging.info("Test step skipped") + + self.step(9) + if attributes.AlarmsSupported.attribute_id in attribute_list: + alarms_supported_dut = await self.read_boolcfg_attribute_expect_success(endpoint=endpoint, attribute=attributes.AlarmsSupported) + asserts.assert_equal(alarms_supported_dut & ~all_alarm_mode_bitmap_bits, 0, "AlarmsSupported is not in valid range") + else: + logging.info("Test step skipped") + + self.step(10) + if attributes.SensorFault.attribute_id in attribute_list: + sensor_fault_dut = await self.read_boolcfg_attribute_expect_success(endpoint=endpoint, attribute=attributes.SensorFault) + asserts.assert_equal(sensor_fault_dut & ~all_sensor_fault_bitmap_bits, 0, "SensorFault is not in valid range") + else: + logging.info("Test step skipped") + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/TC_BOOLCFG_3_1.py b/src/python_testing/TC_BOOLCFG_3_1.py new file mode 100644 index 00000000000000..ceeeba33c6ee2d --- /dev/null +++ b/src/python_testing/TC_BOOLCFG_3_1.py @@ -0,0 +1,135 @@ +# +# Copyright (c) 2023 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import logging +from random import choice + +import chip.clusters as Clusters +from chip.interaction_model import Status +from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from mobly import asserts + + +class TC_BOOLCFG_3_1(MatterBaseTest): + async def read_boolcfg_attribute_expect_success(self, endpoint, attribute): + cluster = Clusters.Objects.BooleanStateConfiguration + return await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attribute) + + def desc_TC_BOOLCFG_3_1(self) -> str: + return "[TC-BOOLCFG-3.1] SensitivityLevel with DUT as Server" + + def steps_TC_BOOLCFG_3_1(self) -> list[TestStep]: + steps = [ + TestStep(1, "Commissioning, already done", is_commissioning=True), + TestStep("2a", "Read FeatureMap attribute"), + TestStep("2b", "Read AttributeList attribute"), + TestStep(3, "Read SupportedSensitivityLevels attribute"), + TestStep(4, "Read DefaultSensitivityLevel attribute, if supported"), + TestStep(5, "Read CurrentSensitivityLevel attribute"), + TestStep(6, "TH loops through the number of supported sensitivity levels"), + TestStep(7, "Write CurrentSensitivityLevel attribute to non-default value"), + TestStep(8, "Write CurrentSensitivityLevel attribute to default value"), + TestStep(9, "Write CurrentSensitivityLevel attribute to 10"), + TestStep(10, "Write CurrentSensitivityLevel attribute to 255"), + TestStep(11, "Write CurrentSensitivityLevel attribute to the initial current value"), + ] + return steps + + def pics_TC_BOOLCFG_3_1(self) -> list[str]: + pics = [ + "BOOLCFG.S", + ] + return pics + + @async_test_body + async def test_TC_BOOLCFG_3_1(self): + + endpoint = self.user_params.get("endpoint", 1) + + self.step(1) + attributes = Clusters.BooleanStateConfiguration.Attributes + + self.step("2a") + feature_map = await self.read_boolcfg_attribute_expect_success(endpoint=endpoint, attribute=attributes.FeatureMap) + + self.step("2b") + attribute_list = await self.read_boolcfg_attribute_expect_success(endpoint=endpoint, attribute=attributes.AttributeList) + + is_sens_level_feature_supported = feature_map & Clusters.BooleanStateConfiguration.Bitmaps.Feature.kSensitivityLevel + + self.step(3) + if is_sens_level_feature_supported: + numberOfSupportedLevels = await self.read_boolcfg_attribute_expect_success(endpoint=endpoint, attribute=attributes.SupportedSensitivityLevels) + else: + logging.info("Test step skipped") + + default_level = 0 + + self.step(4) + if attributes.DefaultSensitivityLevel.attribute_id in attribute_list: + default_level = await self.read_boolcfg_attribute_expect_success(endpoint=endpoint, attribute=attributes.DefaultSensitivityLevel) + else: + logging.info("Test step skipped") + + current_level = 0 + + self.step(5) + if is_sens_level_feature_supported: + current_level = await self.read_boolcfg_attribute_expect_success(endpoint=endpoint, attribute=attributes.CurrentSensitivityLevel) + else: + logging.info("Test step skipped") + + self.step(6) + if is_sens_level_feature_supported: + for sens_level in range(numberOfSupportedLevels): + logging.info(f"Write sensitivity level ({sens_level}) to CurrentSensitivityLevel)") + result = await self.default_controller.WriteAttribute(self.dut_node_id, [(endpoint, attributes.CurrentSensitivityLevel(sens_level))]) + asserts.assert_equal(result[0].Status, Status.Success, "CurrentSensitivityLevel write failed") + + self.step(7) + if attributes.DefaultSensitivityLevel.attribute_id in attribute_list: + selected_non_default_level = choice([i for i in range(numberOfSupportedLevels) if i not in [default_level]]) + logging.info(f"Write non-default sensitivity level ({selected_non_default_level}) to CurrentSensitivityLevel)") + result = await self.default_controller.WriteAttribute(self.dut_node_id, [(endpoint, attributes.CurrentSensitivityLevel(selected_non_default_level))]) + asserts.assert_equal(result[0].Status, Status.Success, "CurrentSensitivityLevel write failed") + + self.step(8) + if attributes.DefaultSensitivityLevel.attribute_id in attribute_list: + logging.info(f"Write default sensitivity level ({default_level}) to CurrentSensitivityLevel)") + result = await self.default_controller.WriteAttribute(self.dut_node_id, [(endpoint, attributes.CurrentSensitivityLevel(default_level))]) + asserts.assert_equal(result[0].Status, Status.Success, "CurrentSensitivityLevel write failed") + + self.step(9) + if is_sens_level_feature_supported: + result = await self.default_controller.WriteAttribute(self.dut_node_id, [(endpoint, attributes.CurrentSensitivityLevel(numberOfSupportedLevels))]) + asserts.assert_equal(result[0].Status, Status.ConstraintError, + "CurrentSensitivityLevel did not return CONSTRAINT_ERROR") + + self.step(10) + if is_sens_level_feature_supported: + result = await self.default_controller.WriteAttribute(self.dut_node_id, [(endpoint, attributes.CurrentSensitivityLevel(255))]) + asserts.assert_equal(result[0].Status, Status.ConstraintError, + "CurrentSensitivityLevel did not return CONSTRAINT_ERROR") + + self.step(11) + if is_sens_level_feature_supported: + result = await self.default_controller.WriteAttribute(self.dut_node_id, [(endpoint, attributes.CurrentSensitivityLevel(current_level))]) + asserts.assert_equal(result[0].Status, Status.Success, "CurrentSensitivityLevel write failed") + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/TC_BOOLCFG_4_1.py b/src/python_testing/TC_BOOLCFG_4_1.py new file mode 100644 index 00000000000000..74f81b7bfd79bd --- /dev/null +++ b/src/python_testing/TC_BOOLCFG_4_1.py @@ -0,0 +1,101 @@ +# +# Copyright (c) 2023 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import logging + +import chip.clusters as Clusters +from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from mobly import asserts + + +class TC_BOOLCFG_4_1(MatterBaseTest): + async def read_boolcfg_attribute_expect_success(self, endpoint, attribute): + cluster = Clusters.Objects.BooleanStateConfiguration + return await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attribute) + + def desc_TC_BOOLCFG_4_1(self) -> str: + return "[TC-BOOLCFG-4.1] AlarmsSupported attribute with DUT as Server" + + def steps_TC_BOOLCFG_4_1(self) -> list[TestStep]: + steps = [ + TestStep(1, "Commissioning, already done", is_commissioning=True), + TestStep(2, "Read FeatureMap attribute"), + TestStep(3, "Read AlarmsSupported attribute"), + TestStep("4a", "Verify AlarmsSupported attribute bit 0"), + TestStep("4b", "Verify AlarmsSupported attribute bit 0"), + TestStep("5a", "Verify AlarmsSupported attribute bit 1"), + TestStep("5b", "Verify AlarmsSupported attribute bit 1"), + ] + return steps + + def pics_TC_BOOLCFG_4_1(self) -> list[str]: + pics = [ + "BOOLCFG.S", + ] + return pics + + @async_test_body + async def test_TC_BOOLCFG_4_1(self): + + endpoint = self.user_params.get("endpoint", 1) + + self.step(1) + attributes = Clusters.BooleanStateConfiguration.Attributes + + self.step(2) + feature_map = await self.read_boolcfg_attribute_expect_success(endpoint=endpoint, attribute=attributes.FeatureMap) + + is_vis_feature_supported = feature_map & Clusters.BooleanStateConfiguration.Bitmaps.Feature.kVisual + is_aud_feature_supported = feature_map & Clusters.BooleanStateConfiguration.Bitmaps.Feature.kAudible + + self.step(3) + if is_vis_feature_supported or is_aud_feature_supported: + supportedAlarms = await self.read_boolcfg_attribute_expect_success(endpoint=endpoint, attribute=attributes.AlarmsSupported) + else: + logging.info("Test step skipped") + + self.step("4a") + if is_vis_feature_supported: + asserts.assert_not_equal((supportedAlarms & Clusters.BooleanStateConfiguration.Bitmaps.AlarmModeBitmap.kVisual), 0, + "Bit 0 in AlarmsSupported does not match feature map value") + else: + logging.info("Test step skipped") + + self.step("4b") + if not is_vis_feature_supported: + asserts.assert_equal((supportedAlarms & Clusters.BooleanStateConfiguration.Bitmaps.AlarmModeBitmap.kVisual), 0, + "Bit 0 in AlarmsSupported does not match feature map value") + else: + logging.info("Test step skipped") + + self.step("5a") + if is_aud_feature_supported: + asserts.assert_not_equal((supportedAlarms & Clusters.BooleanStateConfiguration.Bitmaps.AlarmModeBitmap.kAudible), 0, + "Bit 1 in AlarmsSupported does not match feature map value") + else: + logging.info("Test step skipped") + + self.step("5b") + if not is_aud_feature_supported: + asserts.assert_equal((supportedAlarms & Clusters.BooleanStateConfiguration.Bitmaps.AlarmModeBitmap.kAudible), 0, + "Bit 1 in AlarmsSupported does not match feature map value") + else: + logging.info("Test step skipped") + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/TC_BOOLCFG_4_2.py b/src/python_testing/TC_BOOLCFG_4_2.py new file mode 100644 index 00000000000000..06f5ecad6adbad --- /dev/null +++ b/src/python_testing/TC_BOOLCFG_4_2.py @@ -0,0 +1,176 @@ +# +# Copyright (c) 2023 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import logging + +import chip.clusters as Clusters +from chip.interaction_model import InteractionModelError, Status +from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from mobly import asserts + +sensorTrigger = 0x0080_0000_0000_0000 +sensorUntrigger = 0x0080_0000_0000_0001 + + +class TC_BOOLCFG_4_2(MatterBaseTest): + async def read_boolcfg_attribute_expect_success(self, endpoint, attribute): + cluster = Clusters.Objects.BooleanStateConfiguration + return await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attribute) + + def desc_TC_BOOLCFG_4_2(self) -> str: + return "[TC-BOOLCFG-4.2] AlarmsActive attribute with DUT as Server" + + def steps_TC_BOOLCFG_4_2(self) -> list[TestStep]: + steps = [ + TestStep(1, "Commissioning, already done", is_commissioning=True), + TestStep("2a", "Read FeatureMap attribute"), + TestStep("2b", "Read AttributeList attribute"), + TestStep("3a", "Create variable named enabledAlarms"), + TestStep("3b", "If VIS is supported, set bit 0 to 1"), + TestStep("3c", "If AUD is supported, set bit 1 to 1"), + TestStep("3d", "Set AlarmsEnabled attribute to value of enabledAlarms using EnableDisableAlarm command"), + TestStep(4, "Send TestEventTrigger with SensorTrigger event"), + TestStep(5, "Read AlarmsActive attribute"), + TestStep("6a", "Verify VIS alarm is active, if supported"), + TestStep("6b", "Verify VIS alarm is not active, if not supported"), + TestStep("7a", "Verify AUD alarm is active, if supported"), + TestStep("7b", "Verify AUD alarm is not active, if not supported"), + TestStep(8, "Send TestEventTrigger with SensorUntrigger event"), + TestStep(9, "Read AlarmsActive attribute"), + ] + return steps + + def pics_TC_BOOLCFG_4_2(self) -> list[str]: + pics = [ + "BOOLCFG.S", + ] + return pics + + @async_test_body + async def test_TC_BOOLCFG_4_2(self): + + asserts.assert_true('PIXIT.BOOLCFG.TEST_EVENT_TRIGGER_KEY' in self.matter_test_config.global_test_params, + "PIXIT.BOOLCFG.TEST_EVENT_TRIGGER_KEY must be included on the command line in " + "the --int-arg flag as PIXIT.BOOLCFG.TEST_EVENT_TRIGGER_KEY:") + + endpoint = self.user_params.get("endpoint", 1) + enableKey = self.matter_test_config.global_test_params['PIXIT.BOOLCFG.TEST_EVENT_TRIGGER_KEY'].to_bytes(16, byteorder='big') + + self.step(1) + attributes = Clusters.BooleanStateConfiguration.Attributes + + self.step("2a") + feature_map = await self.read_boolcfg_attribute_expect_success(endpoint=endpoint, attribute=attributes.FeatureMap) + + is_vis_feature_supported = feature_map & Clusters.BooleanStateConfiguration.Bitmaps.Feature.kVisual + is_aud_feature_supported = feature_map & Clusters.BooleanStateConfiguration.Bitmaps.Feature.kAudible + + self.step("2b") + attribute_list = await self.read_boolcfg_attribute_expect_success(endpoint=endpoint, attribute=attributes.AttributeList) + + self.step("3a") + enabledAlarms = 0 + + self.step("3b") + if attributes.AlarmsEnabled.attribute_id in attribute_list and is_vis_feature_supported: + enabledAlarms |= Clusters.BooleanStateConfiguration.Bitmaps.AlarmModeBitmap.kVisual + else: + logging.info("Test step skipped") + + self.step("3c") + if attributes.AlarmsEnabled.attribute_id in attribute_list and is_aud_feature_supported: + enabledAlarms |= Clusters.BooleanStateConfiguration.Bitmaps.AlarmModeBitmap.kAudible + else: + logging.info("Test step skipped") + + self.step("3d") + if attributes.AlarmsEnabled.attribute_id in attribute_list: + try: + await self.send_single_cmd(cmd=Clusters.Objects.BooleanStateConfiguration.Commands.EnableDisableAlarm(alarmsToEnableDisable=enabledAlarms), endpoint=endpoint) + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.Success, "Unexpected error returned") + pass + else: + logging.info("Test step skipped") + + self.step(4) + if is_vis_feature_supported or is_aud_feature_supported: + try: + await self.send_single_cmd(cmd=Clusters.Objects.GeneralDiagnostics.Commands.TestEventTrigger(enableKey=enableKey, eventTrigger=sensorTrigger), endpoint=0) + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.Success, "Unexpected error returned") + pass + else: + logging.info("Test step skipped") + + self.step(5) + activeAlarms = 0 + + if is_vis_feature_supported or is_aud_feature_supported: + activeAlarms = await self.read_boolcfg_attribute_expect_success(endpoint=endpoint, attribute=attributes.AlarmsActive) + asserts.assert_not_equal(activeAlarms, 0, "AlarmsActive is 0") + else: + logging.info("Test step skipped") + + self.step("6a") + if is_vis_feature_supported: + asserts.assert_not_equal( + (activeAlarms & Clusters.BooleanStateConfiguration.Bitmaps.AlarmModeBitmap.kVisual), 0, "Bit 0 in AlarmsActive is not 1") + else: + logging.info("Test step skipped") + + self.step("6b") + if not is_vis_feature_supported: + asserts.assert_equal((activeAlarms & Clusters.BooleanStateConfiguration.Bitmaps.AlarmModeBitmap.kVisual), + 0, "Bit 0 in AlarmsActive is not 0") + else: + logging.info("Test step skipped") + + self.step("7a") + if is_aud_feature_supported: + asserts.assert_not_equal( + (activeAlarms & Clusters.BooleanStateConfiguration.Bitmaps.AlarmModeBitmap.kAudible), 0, "Bit 1 in AlarmsActive is not 1") + else: + logging.info("Test step skipped") + + self.step("7b") + if not is_aud_feature_supported: + asserts.assert_equal((activeAlarms & Clusters.BooleanStateConfiguration.Bitmaps.AlarmModeBitmap.kAudible), + 0, "Bit 1 in AlarmsActive is not 0") + else: + logging.info("Test step skipped") + + self.step(8) + if is_vis_feature_supported or is_aud_feature_supported: + try: + await self.send_single_cmd(cmd=Clusters.Objects.GeneralDiagnostics.Commands.TestEventTrigger(enableKey=enableKey, eventTrigger=sensorUntrigger), endpoint=0) + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.Success, "Unexpected error returned") + pass + else: + logging.info("Test step skipped") + + self.step(9) + if is_vis_feature_supported or is_aud_feature_supported: + activeAlarms = await self.read_boolcfg_attribute_expect_success(endpoint=endpoint, attribute=attributes.AlarmsActive) + asserts.assert_equal(activeAlarms, 0, "AlarmsActive is not 0") + else: + logging.info("Test step skipped") + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/TC_BOOLCFG_4_3.py b/src/python_testing/TC_BOOLCFG_4_3.py new file mode 100644 index 00000000000000..40a44a004a67e5 --- /dev/null +++ b/src/python_testing/TC_BOOLCFG_4_3.py @@ -0,0 +1,285 @@ +# +# Copyright (c) 2023 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import logging + +import chip.clusters as Clusters +from chip.interaction_model import InteractionModelError, Status +from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from mobly import asserts + +sensorTrigger = 0x0080_0000_0000_0000 +sensorUntrigger = 0x0080_0000_0000_0001 + + +class TC_BOOLCFG_4_3(MatterBaseTest): + async def read_boolcfg_attribute_expect_success(self, endpoint, attribute): + cluster = Clusters.Objects.BooleanStateConfiguration + return await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attribute) + + def desc_TC_BOOLCFG_4_3(self) -> str: + return "[TC-BOOLCFG-4.3] AlarmsEnabled functionality for inactive alarms with DUT as Server" + + def steps_TC_BOOLCFG_4_3(self) -> list[TestStep]: + steps = [ + TestStep(1, "Commissioning, already done", is_commissioning=True), + TestStep("2a", "Read FeatureMap attribute"), + TestStep("2b", "Read AttributeList attribute"), + TestStep(3, "Verify AlarmsEnabled is supported"), + TestStep(4, "Create enabledAlarms and set to 0"), + TestStep("5a", "Enable VIS alarm in enabledAlarms"), + TestStep("5b", "Set AlarmsEnabled attribute to value of enabledAlarms using AlarmsToEnableDisable command"), + TestStep(6, "Send TestEventTrigger with SensorTrigger event"), + TestStep(7, "Read AlarmsActive attribute"), + TestStep(8, "Send TestEventTrigger with SensorUntrigger event"), + TestStep(9, "Read AlarmsActive attribute"), + TestStep(10, "Set enabledAlarms to 0"), + TestStep(11, "Set AlarmsEnabled attribute to value of enabledAlarms using AlarmsToEnableDisable command"), + TestStep(12, "Send TestEventTrigger with SensorTrigger event"), + TestStep(13, "Read AlarmsActive attribute"), + TestStep(14, "Send TestEventTrigger with SensorUntrigger event"), + TestStep("15a", "Enable AUD alarm in enabledAlarms"), + TestStep("15b", "Set AlarmsEnabled attribute to value of enabledAlarms using AlarmsToEnableDisable command"), + TestStep(16, "Send TestEventTrigger with SensorTrigger event"), + TestStep(17, "Read AlarmsActive attribute"), + TestStep(18, "Send TestEventTrigger with SensorUntrigger event"), + TestStep(19, "Read AlarmsActive attribute"), + TestStep(20, "Set enabledAlarms to 0"), + TestStep(21, "Set AlarmsEnabled attribute to value of enabledAlarms using AlarmsToEnableDisable command"), + TestStep(22, "Send TestEventTrigger with SensorTrigger event"), + TestStep(23, "Read AlarmsActive attribute"), + TestStep(24, "Send TestEventTrigger with SensorUntrigger event"), + ] + return steps + + def pics_TC_BOOLCFG_4_3(self) -> list[str]: + pics = [ + "BOOLCFG.S", + ] + return pics + + @async_test_body + async def test_TC_BOOLCFG_4_3(self): + + asserts.assert_true('PIXIT.BOOLCFG.TEST_EVENT_TRIGGER_KEY' in self.matter_test_config.global_test_params, + "PIXIT.BOOLCFG.TEST_EVENT_TRIGGER_KEY must be included on the command line in " + "the --int-arg flag as PIXIT.BOOLCFG.TEST_EVENT_TRIGGER_KEY:") + + endpoint = self.user_params.get("endpoint", 1) + enableKey = self.matter_test_config.global_test_params['PIXIT.BOOLCFG.TEST_EVENT_TRIGGER_KEY'].to_bytes(16, byteorder='big') + + self.step(1) + attributes = Clusters.BooleanStateConfiguration.Attributes + + self.step("2a") + feature_map = await self.read_boolcfg_attribute_expect_success(endpoint=endpoint, attribute=attributes.FeatureMap) + + is_vis_feature_supported = feature_map & Clusters.BooleanStateConfiguration.Bitmaps.Feature.kVisual + is_aud_feature_supported = feature_map & Clusters.BooleanStateConfiguration.Bitmaps.Feature.kAudible + + self.step("2b") + attribute_list = await self.read_boolcfg_attribute_expect_success(endpoint=endpoint, attribute=attributes.AttributeList) + + self.step(3) + if attributes.AlarmsEnabled.attribute_id not in attribute_list: + logging.info("AlarmsEnabled not supported skipping test case") + + # Skipping all remainig steps + for step in self.get_test_steps(self.current_test_info.name)[self.current_step_index:]: + self.step(step.test_plan_number) + logging.info("Test step skipped") + + return + else: + logging.info("Test step skipped") + + self.step(4) + enabledAlarms = 0 + + self.step("5a") + if is_vis_feature_supported: + enabledAlarms |= Clusters.BooleanStateConfiguration.Bitmaps.AlarmModeBitmap.kVisual + else: + logging.info("Test step skipped") + + self.step("5b") + try: + await self.send_single_cmd(cmd=Clusters.Objects.BooleanStateConfiguration.Commands.EnableDisableAlarm(alarmsToEnableDisable=enabledAlarms), endpoint=endpoint) + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.Success, "Unexpected error returned") + pass + + self.step(6) + if is_vis_feature_supported: + try: + await self.send_single_cmd(cmd=Clusters.Objects.GeneralDiagnostics.Commands.TestEventTrigger(enableKey=enableKey, eventTrigger=sensorTrigger), endpoint=0) + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.Success, "Unexpected error returned") + pass + else: + logging.info("Test step skipped") + + self.step(7) + if is_vis_feature_supported: + activeAlarms = await self.read_boolcfg_attribute_expect_success(endpoint=endpoint, attribute=attributes.AlarmsActive) + asserts.assert_equal(activeAlarms, Clusters.BooleanStateConfiguration.Bitmaps.AlarmModeBitmap.kVisual, + "AlarmsActive does not match expected value") + else: + logging.info("Test step skipped") + + self.step(8) + if is_vis_feature_supported: + try: + await self.send_single_cmd(cmd=Clusters.Objects.GeneralDiagnostics.Commands.TestEventTrigger(enableKey=enableKey, eventTrigger=sensorUntrigger), endpoint=0) + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.Success, "Unexpected error returned") + pass + else: + logging.info("Test step skipped") + + self.step(9) + if is_vis_feature_supported: + activeAlarms = await self.read_boolcfg_attribute_expect_success(endpoint=endpoint, attribute=attributes.AlarmsActive) + asserts.assert_equal(activeAlarms, 0, "AlarmsActive does not match expected value") + else: + logging.info("Test step skipped") + + self.step(10) + enabledAlarms = 0 + + self.step(11) + try: + await self.send_single_cmd(cmd=Clusters.Objects.BooleanStateConfiguration.Commands.EnableDisableAlarm(alarmsToEnableDisable=enabledAlarms), endpoint=endpoint) + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.Success, "Unexpected error returned") + pass + + self.step(12) + if is_vis_feature_supported: + try: + await self.send_single_cmd(cmd=Clusters.Objects.GeneralDiagnostics.Commands.TestEventTrigger(enableKey=enableKey, eventTrigger=sensorTrigger), endpoint=0) + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.Success, "Unexpected error returned") + pass + else: + logging.info("Test step skipped") + + self.step(13) + if is_vis_feature_supported: + activeAlarms = await self.read_boolcfg_attribute_expect_success(endpoint=endpoint, attribute=attributes.AlarmsActive) + asserts.assert_equal(activeAlarms, 0, "AlarmsActive does not match expected value") + else: + logging.info("Test step skipped") + + self.step(14) + if is_vis_feature_supported: + try: + await self.send_single_cmd(cmd=Clusters.Objects.GeneralDiagnostics.Commands.TestEventTrigger(enableKey=enableKey, eventTrigger=sensorUntrigger), endpoint=0) + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.Success, "Unexpected error returned") + pass + else: + logging.info("Test step skipped") + + self.step("15a") + if is_aud_feature_supported: + enabledAlarms |= Clusters.BooleanStateConfiguration.Bitmaps.AlarmModeBitmap.kAudible + else: + logging.info("Test step skipped") + + self.step("15b") + try: + await self.send_single_cmd(cmd=Clusters.Objects.BooleanStateConfiguration.Commands.EnableDisableAlarm(alarmsToEnableDisable=enabledAlarms), endpoint=endpoint) + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.Success, "Unexpected error returned") + pass + + self.step(16) + if is_aud_feature_supported: + try: + await self.send_single_cmd(cmd=Clusters.Objects.GeneralDiagnostics.Commands.TestEventTrigger(enableKey=enableKey, eventTrigger=sensorTrigger), endpoint=0) + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.Success, "Unexpected error returned") + pass + else: + logging.info("Test step skipped") + + self.step(17) + if is_aud_feature_supported: + activeAlarms = await self.read_boolcfg_attribute_expect_success(endpoint=endpoint, attribute=attributes.AlarmsActive) + asserts.assert_equal(activeAlarms, Clusters.BooleanStateConfiguration.Bitmaps.AlarmModeBitmap.kAudible, + "AlarmsActive does not match expected value") + else: + logging.info("Test step skipped") + + self.step(18) + if is_aud_feature_supported: + try: + await self.send_single_cmd(cmd=Clusters.Objects.GeneralDiagnostics.Commands.TestEventTrigger(enableKey=enableKey, eventTrigger=sensorUntrigger), endpoint=0) + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.Success, "Unexpected error returned") + pass + else: + logging.info("Test step skipped") + + self.step(19) + if is_aud_feature_supported: + activeAlarms = await self.read_boolcfg_attribute_expect_success(endpoint=endpoint, attribute=attributes.AlarmsActive) + asserts.assert_equal(activeAlarms, 0, "AlarmsActive does not match expected value") + else: + logging.info("Test step skipped") + + self.step(20) + enabledAlarms = 0 + + self.step(21) + try: + await self.send_single_cmd(cmd=Clusters.Objects.BooleanStateConfiguration.Commands.EnableDisableAlarm(alarmsToEnableDisable=enabledAlarms), endpoint=endpoint) + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.Success, "Unexpected error returned") + pass + + self.step(22) + if is_aud_feature_supported: + try: + await self.send_single_cmd(cmd=Clusters.Objects.GeneralDiagnostics.Commands.TestEventTrigger(enableKey=enableKey, eventTrigger=sensorTrigger), endpoint=0) + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.Success, "Unexpected error returned") + pass + else: + logging.info("Test step skipped") + + self.step(23) + if is_aud_feature_supported: + activeAlarms = await self.read_boolcfg_attribute_expect_success(endpoint=endpoint, attribute=attributes.AlarmsActive) + asserts.assert_equal(activeAlarms, 0, "AlarmsActive does not match expected value") + else: + logging.info("Test step skipped") + + self.step(24) + if is_aud_feature_supported: + try: + await self.send_single_cmd(cmd=Clusters.Objects.GeneralDiagnostics.Commands.TestEventTrigger(enableKey=enableKey, eventTrigger=sensorUntrigger), endpoint=0) + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.Success, "Unexpected error returned") + pass + else: + logging.info("Test step skipped") + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/TC_BOOLCFG_4_4.py b/src/python_testing/TC_BOOLCFG_4_4.py new file mode 100644 index 00000000000000..cd76848d59e801 --- /dev/null +++ b/src/python_testing/TC_BOOLCFG_4_4.py @@ -0,0 +1,207 @@ +# +# Copyright (c) 2023 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import logging + +import chip.clusters as Clusters +from chip.interaction_model import InteractionModelError, Status +from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from mobly import asserts + +sensorTrigger = 0x0080_0000_0000_0000 +sensorUntrigger = 0x0080_0000_0000_0001 + + +class TC_BOOLCFG_4_4(MatterBaseTest): + async def read_boolcfg_attribute_expect_success(self, endpoint, attribute): + cluster = Clusters.Objects.BooleanStateConfiguration + return await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attribute) + + def desc_TC_BOOLCFG_4_4(self) -> str: + return "[TC-BOOLCFG-4.4] AlarmsEnabled functionality for active alarms with DUT as Server" + + def steps_TC_BOOLCFG_4_4(self) -> list[TestStep]: + steps = [ + TestStep(1, "Commissioning, already done", is_commissioning=True), + TestStep("2a", "Read FeatureMap attribute"), + TestStep("2b", "Read AttributeList attribute"), + TestStep(3, "Verify AlarmsEnabled is supported"), + TestStep(4, "Create enabledAlarms and set to 0"), + TestStep("5a", "Enable VIS alarm in enabledAlarms"), + TestStep("5b", "Enable AUD alarm in enabledAlarms"), + TestStep("5c", "Set AlarmsEnabled attribute to value of enabledAlarms using AlarmsToEnableDisable command"), + TestStep(6, "Send TestEventTrigger with SensorTrigger event"), + TestStep(7, "Read AlarmsActive attribute"), + TestStep(8, "Verify VIS alarm is active"), + TestStep("9a", "Disable VIS alarm in enabledAlarms"), + TestStep("9b", "Set AlarmsEnabled attribute to value of enabledAlarms using AlarmsToEnableDisable command"), + TestStep(10, "Read AlarmsActive attribute"), + TestStep(11, "Verify AUD alarm is active"), + TestStep("12a", "Disable VIS alarm in enabledAlarms"), + TestStep("12b", "Set AlarmsEnabled attribute to value of enabledAlarms using AlarmsToEnableDisable command"), + TestStep(13, "Read AlarmsActive attribute"), + TestStep(14, "Send TestEventTrigger with SensorUntrigger event"), + ] + return steps + + def pics_TC_BOOLCFG_4_4(self) -> list[str]: + pics = [ + "BOOLCFG.S", + ] + return pics + + @async_test_body + async def test_TC_BOOLCFG_4_4(self): + + asserts.assert_true('PIXIT.BOOLCFG.TEST_EVENT_TRIGGER_KEY' in self.matter_test_config.global_test_params, + "PIXIT.BOOLCFG.TEST_EVENT_TRIGGER_KEY must be included on the command line in " + "the --int-arg flag as PIXIT.BOOLCFG.TEST_EVENT_TRIGGER_KEY:") + + endpoint = self.user_params.get("endpoint", 1) + enableKey = self.matter_test_config.global_test_params['PIXIT.BOOLCFG.TEST_EVENT_TRIGGER_KEY'].to_bytes(16, byteorder='big') + + self.step(1) + attributes = Clusters.BooleanStateConfiguration.Attributes + + self.step("2a") + feature_map = await self.read_boolcfg_attribute_expect_success(endpoint=endpoint, attribute=attributes.FeatureMap) + + is_vis_feature_supported = feature_map & Clusters.BooleanStateConfiguration.Bitmaps.Feature.kVisual + is_aud_feature_supported = feature_map & Clusters.BooleanStateConfiguration.Bitmaps.Feature.kAudible + + self.step("2b") + attribute_list = await self.read_boolcfg_attribute_expect_success(endpoint=endpoint, attribute=attributes.AttributeList) + + self.step(3) + if attributes.AlarmsEnabled.attribute_id not in attribute_list: + logging.info("AlarmsEnabled not supported skipping test case") + + # Skipping all remainig steps + for step in self.get_test_steps(self.current_test_info.name)[self.current_step_index:]: + self.step(step.test_plan_number) + logging.info("Test step skipped") + + return + else: + logging.info("Test step skipped") + + self.step(4) + enabledAlarms = 0 + + self.step("5a") + if is_vis_feature_supported: + enabledAlarms |= Clusters.BooleanStateConfiguration.Bitmaps.AlarmModeBitmap.kVisual + else: + logging.info("Test step skipped") + + self.step("5b") + if is_vis_feature_supported: + enabledAlarms |= Clusters.BooleanStateConfiguration.Bitmaps.AlarmModeBitmap.kAudible + else: + logging.info("Test step skipped") + + self.step("5c") + try: + await self.send_single_cmd(cmd=Clusters.Objects.BooleanStateConfiguration.Commands.EnableDisableAlarm(alarmsToEnableDisable=enabledAlarms), endpoint=endpoint) + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.Success, "Unexpected error returned") + pass + + self.step(6) + if is_vis_feature_supported or is_aud_feature_supported: + try: + await self.send_single_cmd(cmd=Clusters.Objects.GeneralDiagnostics.Commands.TestEventTrigger(enableKey=enableKey, eventTrigger=sensorTrigger), endpoint=0) + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.Success, "Unexpected error returned") + pass + else: + logging.info("Test step skipped") + + self.step(7) + activeAlarms = 0 + + if is_vis_feature_supported or is_aud_feature_supported: + activeAlarms = await self.read_boolcfg_attribute_expect_success(endpoint=endpoint, attribute=attributes.AlarmsActive) + asserts.assert_not_equal(activeAlarms, 0, "AlarmsActive does not match expected value") + else: + logging.info("Test step skipped") + + self.step(8) + if is_vis_feature_supported: + asserts.assert_not_equal((activeAlarms & 0b01), 0, "Bit 0 in AlarmsActive is not 1") + else: + logging.info("Test step skipped") + + self.step("9a") + if is_vis_feature_supported: + enabledAlarms &= ~(Clusters.BooleanStateConfiguration.Bitmaps.AlarmModeBitmap.kVisual) + else: + logging.info("Test step skipped") + + self.step("9b") + try: + await self.send_single_cmd(cmd=Clusters.Objects.BooleanStateConfiguration.Commands.EnableDisableAlarm(alarmsToEnableDisable=enabledAlarms), endpoint=endpoint) + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.Success, "Unexpected error returned") + pass + + self.step(10) + if is_vis_feature_supported: + activeAlarms = await self.read_boolcfg_attribute_expect_success(endpoint=endpoint, attribute=attributes.AlarmsActive) + asserts.assert_equal((activeAlarms & 0b01), 0, "Bit 0 in AlarmsActive is not 0") + else: + logging.info("Test step skipped") + + self.step(11) + if is_aud_feature_supported: + asserts.assert_not_equal((activeAlarms & 0b10), 0, "Bit 1 in AlarmsActive is not 1") + else: + logging.info("Test step skipped") + + self.step("12a") + if is_aud_feature_supported: + enabledAlarms &= ~(Clusters.BooleanStateConfiguration.Bitmaps.AlarmModeBitmap.kAudible) + else: + logging.info("Test step skipped") + + self.step("12b") + try: + await self.send_single_cmd(cmd=Clusters.Objects.BooleanStateConfiguration.Commands.EnableDisableAlarm(alarmsToEnableDisable=enabledAlarms), endpoint=endpoint) + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.Success, "Unexpected error returned") + pass + + self.step(13) + if is_aud_feature_supported: + activeAlarms = await self.read_boolcfg_attribute_expect_success(endpoint=endpoint, attribute=attributes.AlarmsActive) + asserts.assert_equal((activeAlarms & 0b10), 0, "Bit 1 in AlarmsActive is not 0") + else: + logging.info("Test step skipped") + + self.step(14) + if is_vis_feature_supported or is_aud_feature_supported: + try: + await self.send_single_cmd(cmd=Clusters.Objects.GeneralDiagnostics.Commands.TestEventTrigger(enableKey=enableKey, eventTrigger=sensorUntrigger), endpoint=0) + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.Success, "Unexpected error returned") + pass + else: + logging.info("Test step skipped") + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/TC_BOOLCFG_5_1.py b/src/python_testing/TC_BOOLCFG_5_1.py new file mode 100644 index 00000000000000..7e7dac0e1e8adf --- /dev/null +++ b/src/python_testing/TC_BOOLCFG_5_1.py @@ -0,0 +1,177 @@ +# +# Copyright (c) 2023 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import logging + +import chip.clusters as Clusters +from chip.interaction_model import InteractionModelError, Status +from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from mobly import asserts + +sensorTrigger = 0x0080_0000_0000_0000 +sensorUntrigger = 0x0080_0000_0000_0001 + + +class TC_BOOLCFG_5_1(MatterBaseTest): + async def read_boolcfg_attribute_expect_success(self, endpoint, attribute): + cluster = Clusters.Objects.BooleanStateConfiguration + return await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attribute) + + def desc_TC_BOOLCFG_5_1(self) -> str: + return "[TC-BOOLCFG-5.1] SuppressAlarm functionality for inactive alarms with DUT as Server" + + def steps_TC_BOOLCFG_5_1(self) -> list[TestStep]: + steps = [ + TestStep(1, "Commissioning, already done", is_commissioning=True), + TestStep(2, "Read FeatureMap attribute"), + TestStep(3, "Verify SPRS feature is supported"), + TestStep(4, "Create enabledAlarms and set to 0"), + TestStep("5a", "Enable VIS alarm in enabledAlarms"), + TestStep("5b", "Enable AUD alarm in enabledAlarms"), + TestStep("5c", "Set AlarmsEnabled attribute to value of enabledAlarms using AlarmsToEnableDisable command"), + TestStep(6, "Send TestEventTrigger with SensorUntrigger event"), + TestStep("7a", "Suppress VIS alarm using SuppressAlarm command"), + TestStep("7b", "Suppress VIS alarm using SuppressAlarm command"), + TestStep(8, "Read AlarmsSuppressed attribute"), + TestStep("9a", "Suppress AUD alarm using SuppressAlarm command"), + TestStep("9b", "Suppress AUD alarm using SuppressAlarm command"), + TestStep(10, "Read AlarmsSuppressed attribute"), + ] + return steps + + def pics_TC_BOOLCFG_5_1(self) -> list[str]: + pics = [ + "BOOLCFG.S", + ] + return pics + + @async_test_body + async def test_TC_BOOLCFG_5_1(self): + + asserts.assert_true('PIXIT.BOOLCFG.TEST_EVENT_TRIGGER_KEY' in self.matter_test_config.global_test_params, + "PIXIT.BOOLCFG.TEST_EVENT_TRIGGER_KEY must be included on the command line in " + "the --int-arg flag as PIXIT.BOOLCFG.TEST_EVENT_TRIGGER_KEY:") + + endpoint = self.user_params.get("endpoint", 1) + enableKey = self.matter_test_config.global_test_params['PIXIT.BOOLCFG.TEST_EVENT_TRIGGER_KEY'].to_bytes(16, byteorder='big') + + self.step(1) + attributes = Clusters.BooleanStateConfiguration.Attributes + + self.step(2) + feature_map = await self.read_boolcfg_attribute_expect_success(endpoint=endpoint, attribute=attributes.FeatureMap) + + is_sprs_feature_supported = feature_map & Clusters.BooleanStateConfiguration.Bitmaps.Feature.kAlarmSuppress + is_vis_feature_supported = feature_map & Clusters.BooleanStateConfiguration.Bitmaps.Feature.kVisual + is_aud_feature_supported = feature_map & Clusters.BooleanStateConfiguration.Bitmaps.Feature.kAudible + + self.step(3) + if not is_sprs_feature_supported: + logging.info("AlarmSuppress feature not supported skipping test case") + + # Skipping all remainig steps + for step in self.get_test_steps(self.current_test_info.name)[self.current_step_index:]: + self.step(step.test_plan_number) + logging.info("Test step skipped") + + return + else: + logging.info("Test step skipped") + + self.step(4) + enabledAlarms = 0 + + self.step("5a") + if is_vis_feature_supported: + enabledAlarms |= Clusters.BooleanStateConfiguration.Bitmaps.AlarmModeBitmap.kVisual + else: + logging.info("Test step skipped") + + self.step("5b") + if is_vis_feature_supported: + enabledAlarms |= Clusters.BooleanStateConfiguration.Bitmaps.AlarmModeBitmap.kAudible + else: + logging.info("Test step skipped") + + self.step("5c") + try: + await self.send_single_cmd(cmd=Clusters.Objects.BooleanStateConfiguration.Commands.EnableDisableAlarm(alarmsToEnableDisable=enabledAlarms), endpoint=endpoint) + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.Success, "Unexpected error returned") + pass + + self.step(6) + if is_vis_feature_supported or is_aud_feature_supported: + try: + await self.send_single_cmd(cmd=Clusters.Objects.GeneralDiagnostics.Commands.TestEventTrigger(enableKey=enableKey, eventTrigger=sensorUntrigger), endpoint=0) + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.Success, "Unexpected error returned") + pass + + self.step("7a") + if is_vis_feature_supported: + try: + await self.send_single_cmd(cmd=Clusters.Objects.BooleanStateConfiguration.Commands.SuppressAlarm(alarmsToSuppress=Clusters.BooleanStateConfiguration.Bitmaps.AlarmModeBitmap.kVisual), endpoint=endpoint) + asserts.fail("Received Success response when an INVALID_IN_STATE was expected") + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.InvalidInState, "Unexpected error returned") + pass + else: + logging.info("Test step skipped") + + self.step("7b") + if not is_vis_feature_supported: + try: + await self.send_single_cmd(cmd=Clusters.Objects.BooleanStateConfiguration.Commands.SuppressAlarm(alarmsToSuppress=Clusters.BooleanStateConfiguration.Bitmaps.AlarmModeBitmap.kVisual), endpoint=endpoint) + asserts.fail("Received Success response when an CONSTRAINT_ERROR was expected") + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.ConstraintError, "Unexpected error returned") + pass + else: + logging.info("Test step skipped") + + self.step(8) + alarms_suppressed_dut = await self.read_boolcfg_attribute_expect_success(endpoint=endpoint, attribute=attributes.AlarmsSuppressed) + asserts.assert_equal(alarms_suppressed_dut, 0, "AlarmsSuppressed is not the expected value") + + self.step("9a") + if is_aud_feature_supported: + try: + await self.send_single_cmd(cmd=Clusters.Objects.BooleanStateConfiguration.Commands.SuppressAlarm(alarmsToSuppress=Clusters.BooleanStateConfiguration.Bitmaps.AlarmModeBitmap.kAudible), endpoint=endpoint) + asserts.fail("Received Success response when an INVALID_IN_STATE was expected") + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.InvalidInState, "Unexpected error returned") + pass + + self.step("9b") + if not is_aud_feature_supported: + try: + await self.send_single_cmd(cmd=Clusters.Objects.BooleanStateConfiguration.Commands.SuppressAlarm(alarmsToSuppress=Clusters.BooleanStateConfiguration.Bitmaps.AlarmModeBitmap.kVisual), endpoint=endpoint) + asserts.fail("Received Success response when an CONSTRAINT_ERROR was expected") + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.ConstraintError, "Unexpected error returned") + pass + else: + logging.info("Test step skipped") + + self.step(10) + alarms_suppressed_dut = await self.read_boolcfg_attribute_expect_success(endpoint=endpoint, attribute=attributes.AlarmsSuppressed) + asserts.assert_equal(alarms_suppressed_dut, 0, "AlarmsSuppressed is not the expected value") + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/TC_BOOLCFG_5_2.py b/src/python_testing/TC_BOOLCFG_5_2.py new file mode 100644 index 00000000000000..3a4dd41b46bbf0 --- /dev/null +++ b/src/python_testing/TC_BOOLCFG_5_2.py @@ -0,0 +1,170 @@ +# +# Copyright (c) 2023 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import logging + +import chip.clusters as Clusters +from chip.interaction_model import InteractionModelError, Status +from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from mobly import asserts + +sensorTrigger = 0x0080_0000_0000_0000 +sensorUntrigger = 0x0080_0000_0000_0001 + + +class TC_BOOLCFG_5_2(MatterBaseTest): + async def read_boolcfg_attribute_expect_success(self, endpoint, attribute): + cluster = Clusters.Objects.BooleanStateConfiguration + return await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attribute) + + def desc_TC_BOOLCFG_5_2(self) -> str: + return "[TC-BOOLCFG-5.2] SuppressAlarm functionality for active alarms with DUT as Server" + + def steps_TC_BOOLCFG_5_2(self) -> list[TestStep]: + steps = [ + TestStep(1, "Commissioning, already done", is_commissioning=True), + TestStep(2, "Read FeatureMap attribute"), + TestStep(3, "Verify SPRS feature is supported"), + TestStep(4, "Create enabledAlarms and set to 0"), + TestStep("5a", "Enable VIS alarm in enabledAlarms"), + TestStep("5b", "Enable AUD alarm in enabledAlarms"), + TestStep("5c", "Set AlarmsEnabled attribute to value of enabledAlarms using AlarmsToEnableDisable command"), + TestStep(6, "Send TestEventTrigger with SensorTrigger event"), + TestStep(7, "Suppress VIS alarm using SuppressAlarm command"), + TestStep(8, "Read AlarmsSuppressed attribute"), + TestStep(9, "Suppress AUD alarm using SuppressAlarm command"), + TestStep(10, "Read AlarmsActive attribute"), + TestStep(11, "Send TestEventTrigger with SensorUntrigger event") + ] + return steps + + def pics_TC_BOOLCFG_5_2(self) -> list[str]: + pics = [ + "BOOLCFG.S", + ] + return pics + + @async_test_body + async def test_TC_BOOLCFG_5_2(self): + + asserts.assert_true('PIXIT.BOOLCFG.TEST_EVENT_TRIGGER_KEY' in self.matter_test_config.global_test_params, + "PIXIT.BOOLCFG.TEST_EVENT_TRIGGER_KEY must be included on the command line in " + "the --int-arg flag as PIXIT.BOOLCFG.TEST_EVENT_TRIGGER_KEY:") + + endpoint = self.user_params.get("endpoint", 1) + enableKey = self.matter_test_config.global_test_params['PIXIT.BOOLCFG.TEST_EVENT_TRIGGER_KEY'].to_bytes(16, byteorder='big') + + self.step(1) + attributes = Clusters.BooleanStateConfiguration.Attributes + + self.step(2) + feature_map = await self.read_boolcfg_attribute_expect_success(endpoint=endpoint, attribute=attributes.FeatureMap) + + is_sprs_feature_supported = feature_map & Clusters.BooleanStateConfiguration.Bitmaps.Feature.kAlarmSuppress + is_vis_feature_supported = feature_map & Clusters.BooleanStateConfiguration.Bitmaps.Feature.kVisual + is_aud_feature_supported = feature_map & Clusters.BooleanStateConfiguration.Bitmaps.Feature.kAudible + + self.step(3) + if not is_sprs_feature_supported: + logging.info("AlarmSuppress feature not supported skipping test case") + + # Skipping all remainig steps + for step in self.get_test_steps(self.current_test_info.name)[self.current_step_index:]: + self.step(step.test_plan_number) + logging.info("Test step skipped") + + return + else: + logging.info("Test step skipped") + + self.step(4) + enabledAlarms = 0 + + self.step("5a") + if is_vis_feature_supported: + enabledAlarms |= Clusters.BooleanStateConfiguration.Bitmaps.AlarmModeBitmap.kVisual + else: + logging.info("Test step skipped") + + self.step("5b") + if is_vis_feature_supported: + enabledAlarms |= Clusters.BooleanStateConfiguration.Bitmaps.AlarmModeBitmap.kAudible + else: + logging.info("Test step skipped") + + self.step("5c") + try: + await self.send_single_cmd(cmd=Clusters.Objects.BooleanStateConfiguration.Commands.EnableDisableAlarm(alarmsToEnableDisable=enabledAlarms), endpoint=endpoint) + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.Success, "Unexpected error returned") + pass + + self.step(6) + if is_vis_feature_supported or is_aud_feature_supported: + try: + await self.send_single_cmd(cmd=Clusters.Objects.GeneralDiagnostics.Commands.TestEventTrigger(enableKey=enableKey, eventTrigger=sensorTrigger), endpoint=0) + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.Success, "Unexpected error returned") + pass + else: + logging.info("Test step skipped") + + self.step(7) + if is_vis_feature_supported: + try: + await self.send_single_cmd(cmd=Clusters.Objects.BooleanStateConfiguration.Commands.SuppressAlarm(alarmsToSuppress=Clusters.BooleanStateConfiguration.Bitmaps.AlarmModeBitmap.kVisual), endpoint=endpoint) + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.Success, "Unexpected error returned") + pass + else: + logging.info("Test step skipped") + + self.step(8) + if is_vis_feature_supported: + alarms_suppressed_dut = await self.read_boolcfg_attribute_expect_success(endpoint=endpoint, attribute=attributes.AlarmsSuppressed) + asserts.assert_not_equal((alarms_suppressed_dut & 0b01), 0, "Bit 0 in AlarmsSuppressed is not 1") + else: + logging.info("Test step skipped") + + self.step(9) + if is_aud_feature_supported: + try: + await self.send_single_cmd(cmd=Clusters.Objects.BooleanStateConfiguration.Commands.SuppressAlarm(alarmsToSuppress=Clusters.BooleanStateConfiguration.Bitmaps.AlarmModeBitmap.kAudible), endpoint=endpoint) + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.Success, "Unexpected error returned") + pass + else: + logging.info("Test step skipped") + + self.step(10) + if is_aud_feature_supported: + alarms_suppressed_dut = await self.read_boolcfg_attribute_expect_success(endpoint=endpoint, attribute=attributes.AlarmsSuppressed) + asserts.assert_not_equal((alarms_suppressed_dut & 0b10), 0, "Bit 1 in AlarmsSuppressed is not 1") + else: + logging.info("Test step skipped") + + self.step(11) + if is_vis_feature_supported or is_aud_feature_supported: + try: + await self.send_single_cmd(cmd=Clusters.Objects.GeneralDiagnostics.Commands.TestEventTrigger(enableKey=enableKey, eventTrigger=sensorUntrigger), endpoint=0) + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.Success, "Unexpected error returned") + pass + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/TC_BSENCFG_2_1.py b/src/python_testing/TC_BSENCFG_2_1.py deleted file mode 100644 index 0312b131a77590..00000000000000 --- a/src/python_testing/TC_BSENCFG_2_1.py +++ /dev/null @@ -1,72 +0,0 @@ -# -# Copyright (c) 2023 Project CHIP Authors -# All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import logging - -import chip.clusters as Clusters -from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main -from mobly import asserts - - -class TC_BSENCFG_2_1(MatterBaseTest): - async def read_ts_attribute_expect_success(self, endpoint, attribute): - cluster = Clusters.Objects.BooleanStateConfiguration - return await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attribute) - - @async_test_body - async def test_TC_BSENCFG_2_1(self): - - endpoint = self.user_params.get("endpoint", 1) - - self.print_step(1, "Commissioning, already done") - attributes = Clusters.BooleanStateConfiguration.Attributes - - self.print_step(2, "Read attribute list to determine supported attributes") - attribute_list = await self.read_ts_attribute_expect_success(endpoint=endpoint, attribute=attributes.AttributeList) - - self.print_step(3, "Read SensitivityLevel attribute, if supported") - if attributes.SensitivityLevel.attribute_id in attribute_list: - sensitivity_level_dut = await self.read_ts_attribute_expect_success(endpoint=endpoint, attribute=attributes.SensitivityLevel) - asserts.assert_less(sensitivity_level_dut, Clusters.Objects.BooleanStateConfiguration.Enums.SensitivityEnum.kUnknownEnumValue, - "SensitivityLevel is not in valid range") - else: - logging.info("Test step skipped") - - self.print_step(4, "Read AlarmsActive attribute, if supported") - if attributes.AlarmsActive.attribute_id in attribute_list: - alarms_active_dut = await self.read_ts_attribute_expect_success(endpoint=endpoint, attribute=attributes.AlarmsActive) - asserts.assert_less_equal(alarms_active_dut, 0b00000011, "AlarmsActive is not in valid range") - else: - logging.info("Test step skipped") - - self.print_step(5, "Read AlarmsSuppressed attribute, if supported") - if attributes.AlarmsSuppressed.attribute_id in attribute_list: - alarms_suppressed_dut = await self.read_ts_attribute_expect_success(endpoint=endpoint, attribute=attributes.AlarmsSuppressed) - asserts.assert_less_equal(alarms_suppressed_dut, 0b00000011, "AlarmsSuppressed is not in valid range") - else: - logging.info("Test step skipped") - - self.print_step(5, "Read AlarmsEnabled attribute, if supported") - if attributes.AlarmsEnabled.attribute_id in attribute_list: - alarms_enabled_dut = await self.read_ts_attribute_expect_success(endpoint=endpoint, attribute=attributes.AlarmsEnabled) - asserts.assert_less_equal(alarms_enabled_dut, 0b00000011, "AlarmsEnabled is not in valid range") - else: - logging.info("Test step skipped") - - -if __name__ == "__main__": - default_matter_test_main() diff --git a/src/python_testing/TC_EEVSE_2_2.py b/src/python_testing/TC_EEVSE_2_2.py new file mode 100644 index 00000000000000..8ebc78a22e94cd --- /dev/null +++ b/src/python_testing/TC_EEVSE_2_2.py @@ -0,0 +1,319 @@ +# +# Copyright (c) 2023 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import logging +import time +from datetime import datetime, timedelta, timezone + +import chip.clusters as Clusters +from chip.clusters.Types import NullValue +from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from mobly import asserts +from TC_EEVSE_Utils import EEVSEBaseTestHelper, EventChangeCallback + +logger = logging.getLogger(__name__) + + +class TC_EEVSE_2_2(MatterBaseTest, EEVSEBaseTestHelper): + + def desc_TC_EEVSE_2_2(self) -> str: + """Returns a description of this test""" + return "5.1.3. [TC-EEVSE-2.2] Primary functionality with DUT as Server" + + def pics_TC_EEVSE_2_2(self): + """ This function returns a list of PICS for this test case that must be True for the test to be run""" + # In this case - there is no feature flags needed to run this test case + return None + + def steps_TC_EEVSE_2_2(self) -> list[TestStep]: + steps = [ + TestStep("1", "Commissioning, already done", is_commissioning=True), + TestStep("2", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster. Verify that TestEventTriggersEnabled attribute has a value of 1 (True)"), + TestStep("3", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for Basic Functionality Test Event"), + TestStep("3a", "After a few seconds TH reads from the DUT the State attribute. Verify value is 0x00 (NotPluggedIn)"), + TestStep("3b", "TH reads from the DUT the SupplyState attribute. Verify value is 0x00 (Disabled)"), + TestStep("3c", "TH reads from the DUT the FaultState attribute. Verify value is 0x00 (NoError)"), + TestStep("4", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Plugged-in Test Event. Verify Event EEVSE.S.E00(EVConnected) sent"), + TestStep("4a", "TH reads from the DUT the State attribute. Verify value is 0x01 (PluggedInNoDemand)"), + TestStep("4b", "TH reads from the DUT the SessionID attribute. Value is noted for later"), + TestStep("5", "TH sends command EnableCharging with ChargingEnabledUntil=2 minutes in the future, minimumChargeCurrent=6000, maximumChargeCurrent=60000"), + TestStep("6", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Charge Demand Test Event. Verify Event EEVSE.S.E02(EnergyTransferStarted) sent."), + TestStep("6a", "TH reads from the DUT the State attribute. Verify value is 0x3 (PluggedInCharging)"), + TestStep("6b", "TH reads from the DUT the SupplyState attribute. Verify value is 0x1 (ChargingEnabled)"), + TestStep("6c", "TH reads from the DUT the ChargingEnabledUntil attribute. Verify value is the commanded value"), + TestStep("6d", "TH reads from the DUT the MinimumChargeCurrent attribute. Verify value is the commanded value (6000)"), + TestStep("6e", "TH reads from the DUT the MaximumChargeCurrent attribute. Verify value is the min(command value (60000), CircuitCapacity)"), + TestStep("7", "Wait 2 minutes. Verify Event EEVSE.S.E03(EnergyTransferStopped) sent with reason EvseStopped"), + TestStep("7a", "TH reads from the DUT the State attribute. Verify value is 0x02 (PluggedInDemand)"), + TestStep("7b", "TH reads from the DUT the SupplyState attribute. Verify value is 0x00 (Disabled)"), + TestStep("8", "TH sends command EnableCharging with ChargingEnabledUntil=NULL, minimumChargeCurrent = 6000, maximumChargeCurrent=12000"), + TestStep("8a", "TH reads from the DUT the State attribute. Verify value is 0x03 (PluggedInCharging)"), + TestStep("8b", "TH reads from the DUT the SupplyState attribute. Verify value is 1 (ChargingEnabled)"), + TestStep("8c", "TH reads from the DUT the ChargingEnabledUntil attribute. Verify value is the commanded value (NULL)"), + TestStep("8d", "TH reads from the DUT the MinimumChargeCurrent attribute. Verify value is the commanded value (6000)"), + TestStep("8e", "TH reads from the DUT the MaximumChargeCurrent attribute. Verify value is the MIN(command value (60000), CircuitCapacity)"), + TestStep("9", "If the optional attribute is supported TH writes to the DUT UserMaximumChargeCurrent=6000"), + TestStep("9a", "After a few seconds TH reads from the DUT the MaximumChargeCurrent. Verify value is UserMaximumChargeCurrent value (6000)"), + TestStep("10", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Charge Demand Test Event Clear. Verify Event EEVSE.S.E03(EnergyTransferStopped) sent with reason EvStopped"), + TestStep("10a", "TH reads from the DUT the State attribute. Verify value is 0x01 (PluggedInNoDemand)"), + TestStep("11", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Charge Demand Test Event. Verify Event EEVSE.S.E02(EnergyTransferStarted) sent."), + TestStep("11a", "TH reads from the DUT the State attribute. Verify value is 0x03 (PluggedInCharging)"), + TestStep("12", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Charge Demand Test Event Clear. Verify Event EEVSE.S.E03(EnergyTransferStopped) sent with reason EvStopped"), + TestStep("12a", "TH reads from the DUT the State attribute. Verify value is 0x01 (PluggedInNoDemand)"), + TestStep("13", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Plugged-in Test Event Clear. Verify Event EEVSE.S.E01(EVNotDetected) sent"), + TestStep("13a", "TH reads from the DUT the State attribute. Verify value is 0x00 (NotPluggedIn)"), + TestStep("13b", "TH reads from the DUT the SupplyState attribute. Verify value is 0x01 (ChargingEnabled)"), + TestStep("13c", "TH reads from the DUT the SessionID attribute. Verify value is the same value noted in 4b"), + TestStep("13d", "TH reads from the DUT the SessionDuration attribute. Verify value is greater than 120 (and match the time taken for the tests from step 4 to step 13)"), + TestStep("14", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Plugged-in Test Event. Verify Event EEVSE.S.E00(EVConnected) sent"), + TestStep("14a", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Charge Demand Test Event. Verify Event EEVSE.S.E02(EnergyTransferStarted) sent."), + TestStep("14b", "TH reads from the DUT the SessionID attribute. Verify value is 1 more than the value noted in 4b"), + TestStep("15", "TH sends command Disable. Verify Event EEVSE.S.E03(EnergyTransferStopped) sent with reason EvseStopped"), + TestStep("15a", "TH reads from the DUT the SupplyState attribute. Verify value is 0x00 (Disabled)"), + TestStep("16", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Charge Demand Test Event Clear."), + TestStep("17", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Plugged-in Test Event Clear. Verify Event EEVSE.S.E01(EVNotDetected) sent"), + TestStep("18", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for Basic Functionality Test Event Clear."), + ] + + return steps + + @async_test_body + async def test_TC_EEVSE_2_2(self): + + self.step("1") + # Commission DUT - already done + + # Subscribe to Events and when they are sent push them to a queue for checking later + events_callback = EventChangeCallback(Clusters.EnergyEvse) + await events_callback.start(self.default_controller, + self.dut_node_id, + self.matter_test_config.endpoint) + + self.step("2") + await self.check_test_event_triggers_enabled() + + self.step("3") + await self.send_test_event_trigger_basic() + + # After a few seconds... + time.sleep(1) + + self.step("3a") + await self.check_evse_attribute("State", Clusters.EnergyEvse.Enums.StateEnum.kNotPluggedIn) + + self.step("3b") + await self.check_evse_attribute("SupplyState", Clusters.EnergyEvse.Enums.SupplyStateEnum.kDisabled) + + self.step("3c") + await self.check_evse_attribute("FaultState", Clusters.EnergyEvse.Enums.FaultStateEnum.kNoError) + + self.step("4") + await self.send_test_event_trigger_pluggedin() + event_data = events_callback.WaitForEventReport(Clusters.EnergyEvse.Events.EVConnected) + + self.step("4a") + await self.check_evse_attribute("State", Clusters.EnergyEvse.Enums.StateEnum.kPluggedInNoDemand) + + self.step("4b") + # Save Session ID for later and check it against the value in the event + session_id = await self.read_evse_attribute_expect_success(attribute="SessionID") + self.validate_ev_connected_event(event_data, session_id) + + self.step("5") + charging_duration = 5 # TODO test plan spec says 120s - reduced for now + min_charge_current = 6000 + max_charge_current = 60000 + expected_state = Clusters.EnergyEvse.Enums.StateEnum.kPluggedInCharging + # get epoch time for ChargeUntil variable (2 minutes from now) + utc_time_charging_end = datetime.now(tz=timezone.utc) + timedelta(seconds=charging_duration) + + # Matter epoch is 0 hours, 0 minutes, 0 seconds on Jan 1, 2000 UTC + epoch_time = int((utc_time_charging_end - datetime(2000, 1, 1, 0, 0, 0, 0, timezone.utc)).total_seconds()) + await self.send_enable_charge_command(endpoint=1, charge_until=epoch_time, min_charge=min_charge_current, max_charge=max_charge_current) + + self.step("6") + await self.send_test_event_trigger_charge_demand() + event_data = events_callback.WaitForEventReport(Clusters.EnergyEvse.Events.EnergyTransferStarted) + + self.step("6a") + await self.check_evse_attribute("State", expected_state) + + self.step("6b") + await self.check_evse_attribute("SupplyState", Clusters.EnergyEvse.Enums.SupplyStateEnum.kChargingEnabled) + + self.step("6c") + await self.check_evse_attribute("ChargingEnabledUntil", epoch_time) + + self.step("6d") + await self.check_evse_attribute("MinimumChargeCurrent", min_charge_current) + + self.step("6e") + circuit_capacity = await self.read_evse_attribute_expect_success(attribute="CircuitCapacity") + expected_max_charge = min(max_charge_current, circuit_capacity) + await self.check_evse_attribute("MaximumChargeCurrent", expected_max_charge) + + self.validate_energy_transfer_started_event(event_data, session_id, expected_state, expected_max_charge) + + self.step("7") + # Sleep for the charging duration plus a couple of seconds to check it has stopped + time.sleep(charging_duration + 2) + # check EnergyTransferredStoped (EvseStopped) + event_data = events_callback.WaitForEventReport(Clusters.EnergyEvse.Events.EnergyTransferStopped) + expected_reason = Clusters.EnergyEvse.Enums.EnergyTransferStoppedReasonEnum.kEVSEStopped + self.validate_energy_transfer_stopped_event(event_data, session_id, expected_state, expected_reason) + + self.step("7a") + await self.check_evse_attribute("State", Clusters.EnergyEvse.Enums.StateEnum.kPluggedInDemand) + + self.step("7b") + await self.check_evse_attribute("SupplyState", Clusters.EnergyEvse.Enums.SupplyStateEnum.kDisabled) + + self.step("8") + charge_until = NullValue + min_charge_current = 6000 + max_charge_current = 12000 + + await self.send_enable_charge_command(charge_until=charge_until, min_charge=min_charge_current, max_charge=max_charge_current) + event_data = events_callback.WaitForEventReport(Clusters.EnergyEvse.Events.EnergyTransferStarted) + + self.step("8a") + await self.check_evse_attribute("State", Clusters.EnergyEvse.Enums.StateEnum.kPluggedInCharging) + + self.step("8b") + await self.check_evse_attribute("SupplyState", Clusters.EnergyEvse.Enums.SupplyStateEnum.kChargingEnabled) + + self.step("8c") + await self.check_evse_attribute("ChargingEnabledUntil", charge_until) + + self.step("8d") + await self.check_evse_attribute("MinimumChargeCurrent", min_charge_current) + + self.step("8e") + circuit_capacity = await self.read_evse_attribute_expect_success(attribute="CircuitCapacity") + expected_max_charge = min(max_charge_current, circuit_capacity) + await self.check_evse_attribute("MaximumChargeCurrent", expected_max_charge) + + # from step 8 above - validate event + self.validate_energy_transfer_started_event(event_data, session_id, expected_state, expected_max_charge) + + self.step("9") + # This will only work if the optional UserMaximumChargeCurrent attribute is supported + supported_attributes = await self.get_supported_energy_evse_attributes() + if Clusters.EnergyEvse.Attributes.UserMaximumChargeCurrent.attribute_id in supported_attributes: + logging.info("UserMaximumChargeCurrent is supported...") + user_max_charge_current = 6000 + await self.write_user_max_charge(1, user_max_charge_current) + + self.step("9a") + time.sleep(3) + + expected_max_charge = min(user_max_charge_current, circuit_capacity) + await self.check_evse_attribute("MaximumChargeCurrent", expected_max_charge) + else: + logging.info("UserMaximumChargeCurrent is NOT supported... skipping.") + + self.step("10") + await self.send_test_event_trigger_charge_demand_clear() + event_data = events_callback.WaitForEventReport(Clusters.EnergyEvse.Events.EnergyTransferStopped) + expected_reason = Clusters.EnergyEvse.Enums.EnergyTransferStoppedReasonEnum.kEVStopped + self.validate_energy_transfer_stopped_event(event_data, session_id, expected_state, expected_reason) + + self.step("10a") + await self.check_evse_attribute("State", Clusters.EnergyEvse.Enums.StateEnum.kPluggedInNoDemand) + + self.step("11") + await self.send_test_event_trigger_charge_demand() + # Check we get EnergyTransferStarted again + await self.send_enable_charge_command(charge_until=charge_until, min_charge=min_charge_current, max_charge=max_charge_current) + event_data = events_callback.WaitForEventReport(Clusters.EnergyEvse.Events.EnergyTransferStarted) + self.validate_energy_transfer_started_event(event_data, session_id, expected_state, expected_max_charge) + + self.step("11a") + await self.check_evse_attribute("State", Clusters.EnergyEvse.Enums.StateEnum.kPluggedInCharging) + + self.step("12") + await self.send_test_event_trigger_charge_demand_clear() + event_data = events_callback.WaitForEventReport(Clusters.EnergyEvse.Events.EnergyTransferStopped) + expected_reason = Clusters.EnergyEvse.Enums.EnergyTransferStoppedReasonEnum.kEVStopped + self.validate_energy_transfer_stopped_event(event_data, session_id, expected_state, expected_reason) + + self.step("12a") + await self.check_evse_attribute("State", Clusters.EnergyEvse.Enums.StateEnum.kPluggedInNoDemand) + + self.step("13") + await self.send_test_event_trigger_pluggedin_clear() + event_data = events_callback.WaitForEventReport(Clusters.EnergyEvse.Events.EVNotDetected) + expected_state = Clusters.EnergyEvse.Enums.StateEnum.kPluggedInNoDemand + self.validate_ev_not_detected_event(event_data, session_id, expected_state, expected_duration=0, expected_charged=0) + + self.step("13a") + await self.check_evse_attribute("State", Clusters.EnergyEvse.Enums.StateEnum.kNotPluggedIn) + + self.step("13b") + await self.check_evse_attribute("SupplyState", Clusters.EnergyEvse.Enums.SupplyStateEnum.kChargingEnabled) + + self.step("13c") + await self.check_evse_attribute("SessionID", session_id) + + self.step("13d") + session_duration = await self.read_evse_attribute_expect_success(attribute="SessionDuration") + asserts.assert_greater_equal(session_duration, charging_duration, + f"Unexpected 'SessionDuration' value - expected >= {charging_duration}, was {session_duration}") + + self.step("14") + await self.send_test_event_trigger_pluggedin() + # New plug in means session ID should increase by 1 + session_id = session_id + 1 + + # Check we get a new EVConnected event with updated session ID + event_data = events_callback.WaitForEventReport(Clusters.EnergyEvse.Events.EVConnected) + self.validate_ev_connected_event(event_data, session_id) + + self.step("14a") + await self.send_test_event_trigger_charge_demand() + expected_state = Clusters.EnergyEvse.Enums.StateEnum.kPluggedInCharging # This is the value at the event time + event_data = events_callback.WaitForEventReport(Clusters.EnergyEvse.Events.EnergyTransferStarted) + self.validate_energy_transfer_started_event(event_data, session_id, expected_state, expected_max_charge) + + self.step("14b") + await self.check_evse_attribute("SessionID", session_id) + + self.step("15") + await self.send_disable_command() + expected_state = Clusters.EnergyEvse.Enums.StateEnum.kPluggedInCharging # This is the value prior to stopping + event_data = events_callback.WaitForEventReport(Clusters.EnergyEvse.Events.EnergyTransferStopped) + expected_reason = Clusters.EnergyEvse.Enums.EnergyTransferStoppedReasonEnum.kEVSEStopped + self.validate_energy_transfer_stopped_event(event_data, session_id, expected_state, expected_reason) + + self.step("15a") + await self.check_evse_attribute("SupplyState", Clusters.EnergyEvse.Enums.SupplyStateEnum.kDisabled) + + self.step("16") + await self.send_test_event_trigger_charge_demand_clear() + + self.step("17") + await self.send_test_event_trigger_pluggedin_clear() + event_data = events_callback.WaitForEventReport(Clusters.EnergyEvse.Events.EVNotDetected) + expected_state = Clusters.EnergyEvse.Enums.StateEnum.kPluggedInNoDemand + self.validate_ev_not_detected_event(event_data, session_id, expected_state, expected_duration=0, expected_charged=0) + + self.step("18") + await self.send_test_event_trigger_basic_clear() + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/TC_EEVSE_2_4.py b/src/python_testing/TC_EEVSE_2_4.py new file mode 100644 index 00000000000000..9379e23332e813 --- /dev/null +++ b/src/python_testing/TC_EEVSE_2_4.py @@ -0,0 +1,185 @@ +# +# Copyright (c) 2023 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import logging +import time + +import chip.clusters as Clusters +from chip.clusters.Types import NullValue +from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from TC_EEVSE_Utils import EEVSEBaseTestHelper, EventChangeCallback + +logger = logging.getLogger(__name__) + + +class TC_EEVSE_2_4(MatterBaseTest, EEVSEBaseTestHelper): + + def desc_TC_EEVSE_2_4(self) -> str: + """Returns a description of this test""" + return "5.1.XXX. [TC-EEVSE-2.4] Fault test functionality with DUT as Server" + + def pics_TC_EEVSE_2_4(self): + """ This function returns a list of PICS for this test case that must be True for the test to be run""" + # In this case - there is no feature flags needed to run this test case + return None + + def steps_TC_EEVSE_2_4(self) -> list[TestStep]: + steps = [ + TestStep("1", "Commissioning, already done", is_commissioning=True), + TestStep("2", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster. Verify that TestEventTriggersEnabled attribute has a value of 1 (True)"), + TestStep("3", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for Basic Functionality Test Event"), + TestStep("3a", "After a few seconds TH reads from the DUT the State attribute. Verify value is 0x00 (NotPluggedIn)"), + TestStep("3b", "TH reads from the DUT the SupplyState attribute. Verify value is 0x00 (Disabled)"), + TestStep("3c", "TH reads from the DUT the FaultState attribute. Verify value is 0x00 (NoError)"), + TestStep("4", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Plugged-in Test Event. Verify Event EEVSE.S.E00(EVConnected) sent"), + TestStep("4a", "TH reads from the DUT the State attribute. Verify value is 0x01 (PluggedInNoDemand)"), + TestStep("4b", "TH reads from the DUT the SessionID attribute. Value is saved for later"), + TestStep("5", "TH sends command EnableCharging with ChargingEnabledUntil=Null, minimumChargeCurrent=6000, maximumChargeCurrent=60000"), + TestStep("6", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Charge Demand Test Event. Verify Event EEVSE.S.E02(EnergyTransferStarted) sent."), + TestStep("6a", "TH reads from the DUT the State attribute. Verify value is 0x3 (PluggedInCharging)"), + TestStep("6b", "TH reads from the DUT the SupplyState attribute. Verify value is 0x1 (ChargingEnabled)"), + TestStep("7", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EVSE Ground Fault Test Event. Verify Event EEVSE.S.E04(Fault) sent with SessionID matching value in step 4b, FaultStatePreviousFaultState = 0x00 (NoError), FaultStateCurrentFaultState = 0x07 (GroundFault)"), + TestStep("7a", "TH reads from the DUT the State attribute. Verify value is 0x6 (Fault)"), + TestStep("7b", "TH reads from the DUT the SupplyState attribute. Verify value is 0x4 (DisabledError)"), + TestStep("8", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EVSE Over Temperature Fault Test Event. Verify Event EEVSE.S.E04(Fault) sent with SessionID matching value in step 4b, FaultStatePreviousFaultState = 0x07 (GroundFault), FaultStateCurrentFaultState = 0x0F (OverTemperature)"), + TestStep("8a", "TH reads from the DUT the State attribute. Verify value is 0x6 (Fault)"), + TestStep("8b", "TH reads from the DUT the SupplyState attribute. Verify value is 0x4 (DisabledError)"), + TestStep("9", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EVSE Fault Test Event Clear. Verify Event EEVSE.S.E04(Fault) sent with SessionID matching value in step 4b, FaultStatePreviousFaultState = 0x0F (OverTemperature), FaultStateCurrentFaultState = 0x00 (NoError)"), + TestStep("9a", "TH reads from the DUT the State attribute. Verify value is 0x3 (PluggedInCharging)"), + TestStep("9b", "TH reads from the DUT the SupplyState attribute. Verify value is 0x1 (ChargingEnabled)"), + TestStep("10", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Charge Demand Test Event Clear."), + TestStep("11", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Plugged-in Test Event Clear. Verify Event EEVSE.S.E01(EVNotDetected) sent"), + TestStep("12", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for Basic Functionality Test Event Clear."), + ] + + return steps + + @async_test_body + async def test_TC_EEVSE_2_4(self): + self.step("1") + # Commission DUT - already done + + # Subscribe to Events and when they are sent push them to a queue for checking later + events_callback = EventChangeCallback(Clusters.EnergyEvse) + await events_callback.start(self.default_controller, + self.dut_node_id, + self.matter_test_config.endpoint) + + self.step("2") + await self.check_test_event_triggers_enabled() + + self.step("3") + await self.send_test_event_trigger_basic() + + # After a few seconds... + time.sleep(3) + + self.step("3a") + await self.check_evse_attribute("State", Clusters.EnergyEvse.Enums.StateEnum.kNotPluggedIn) + + self.step("3b") + await self.check_evse_attribute("SupplyState", Clusters.EnergyEvse.Enums.SupplyStateEnum.kDisabled) + + self.step("3c") + await self.check_evse_attribute("FaultState", Clusters.EnergyEvse.Enums.FaultStateEnum.kNoError) + + self.step("4") + await self.send_test_event_trigger_pluggedin() + event_data = events_callback.WaitForEventReport(Clusters.EnergyEvse.Events.EVConnected) + + self.step("4a") + await self.check_evse_attribute("State", Clusters.EnergyEvse.Enums.StateEnum.kPluggedInNoDemand) + + self.step("4b") + # Save Session ID for later and check it against the value in the event + session_id = await self.read_evse_attribute_expect_success(attribute="SessionID") + self.validate_ev_connected_event(event_data, session_id) + + self.step("5") + charge_until = NullValue + min_charge_current = 6000 + max_charge_current = 60000 + await self.send_enable_charge_command(charge_until=charge_until, min_charge=min_charge_current, max_charge=max_charge_current) + + self.step("6") + await self.send_test_event_trigger_charge_demand() + event_data = events_callback.WaitForEventReport(Clusters.EnergyEvse.Events.EnergyTransferStarted) + + self.step("6a") + await self.check_evse_attribute("State", Clusters.EnergyEvse.Enums.StateEnum.kPluggedInCharging) + + self.step("6b") + await self.check_evse_attribute("SupplyState", Clusters.EnergyEvse.Enums.SupplyStateEnum.kChargingEnabled) + + self.step("7") + await self.send_test_event_trigger_evse_ground_fault() + event_data = events_callback.WaitForEventReport(Clusters.EnergyEvse.Events.Fault) + expected_state = Clusters.EnergyEvse.Enums.StateEnum.kPluggedInCharging + previous_fault = Clusters.EnergyEvse.Enums.FaultStateEnum.kNoError + current_fault = Clusters.EnergyEvse.Enums.FaultStateEnum.kGroundFault + self.validate_evse_fault_event(event_data, session_id, expected_state, previous_fault, current_fault) + + self.step("7a") + await self.check_evse_attribute("State", Clusters.EnergyEvse.Enums.StateEnum.kFault) + + self.step("7b") + await self.check_evse_attribute("SupplyState", Clusters.EnergyEvse.Enums.SupplyStateEnum.kDisabledError) + + self.step("8") + await self.send_test_event_trigger_evse_over_temperature_fault() + event_data = events_callback.WaitForEventReport(Clusters.EnergyEvse.Events.Fault) + expected_state = Clusters.EnergyEvse.Enums.StateEnum.kFault + previous_fault = Clusters.EnergyEvse.Enums.FaultStateEnum.kGroundFault + current_fault = Clusters.EnergyEvse.Enums.FaultStateEnum.kOverTemperature + self.validate_evse_fault_event(event_data, session_id, expected_state, previous_fault, current_fault) + + self.step("8a") + await self.check_evse_attribute("State", Clusters.EnergyEvse.Enums.StateEnum.kFault) + + self.step("8b") + await self.check_evse_attribute("SupplyState", Clusters.EnergyEvse.Enums.SupplyStateEnum.kDisabledError) + + self.step("9") + await self.send_test_event_trigger_evse_fault_clear() + event_data = events_callback.WaitForEventReport(Clusters.EnergyEvse.Events.Fault) + expected_state = Clusters.EnergyEvse.Enums.StateEnum.kFault + previous_fault = Clusters.EnergyEvse.Enums.FaultStateEnum.kOverTemperature + current_fault = Clusters.EnergyEvse.Enums.FaultStateEnum.kNoError + self.validate_evse_fault_event(event_data, session_id, expected_state, previous_fault, current_fault) + + self.step("9a") + await self.check_evse_attribute("State", Clusters.EnergyEvse.Enums.StateEnum.kPluggedInCharging) + + self.step("9b") + await self.check_evse_attribute("SupplyState", Clusters.EnergyEvse.Enums.SupplyStateEnum.kChargingEnabled) + + self.step("10") + await self.send_test_event_trigger_charge_demand_clear() + event_data = events_callback.WaitForEventReport(Clusters.EnergyEvse.Events.EnergyTransferStopped) + + self.step("11") + await self.send_test_event_trigger_pluggedin_clear() + event_data = events_callback.WaitForEventReport(Clusters.EnergyEvse.Events.EVNotDetected) + expected_state = Clusters.EnergyEvse.Enums.StateEnum.kPluggedInNoDemand + self.validate_ev_not_detected_event(event_data, session_id, expected_state, expected_duration=0, expected_charged=0) + + self.step("12") + await self.send_test_event_trigger_basic_clear() + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/TC_EEVSE_2_5.py b/src/python_testing/TC_EEVSE_2_5.py new file mode 100644 index 00000000000000..34ca0151935f93 --- /dev/null +++ b/src/python_testing/TC_EEVSE_2_5.py @@ -0,0 +1,137 @@ +# +# Copyright (c) 2023 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import logging + +import chip.clusters as Clusters +from chip.clusters.Types import NullValue +from chip.interaction_model import Status +from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from TC_EEVSE_Utils import EEVSEBaseTestHelper, EventChangeCallback + +logger = logging.getLogger(__name__) + + +class TC_EEVSE_2_5(MatterBaseTest, EEVSEBaseTestHelper): + + def desc_TC_EEVSE_2_5(self) -> str: + """Returns a description of this test""" + return "5.1.XXX. [TC-EEVSE-2.4] Fault test functionality with DUT as Server" + + def pics_TC_EEVSE_2_5(self): + """ This function returns a list of PICS for this test case that must be True for the test to be run""" + # In this case - there is no feature flags needed to run this test case + return None + + def steps_TC_EEVSE_2_5(self) -> list[TestStep]: + steps = [ + TestStep("1", "Commissioning, already done", is_commissioning=True), + TestStep("2", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster. Verify that TestEventTriggersEnabled attribute has a value of 1 (True)"), + TestStep("3", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for Basic Functionality Test Event"), + TestStep("3a", "TH reads from the DUT the State attribute. Verify value is 0x00 (NotPluggedIn)"), + TestStep("3b", "TH reads from the DUT the SupplyState attribute. Verify value is 0x00 (Disabled)"), + TestStep("3c", "TH reads from the DUT the FaultState attribute. Verify value is 0x00 (NoError)"), + TestStep("4", "TH sends command EnableCharging with ChargingEnabledUntil=Null, minimumChargeCurrent=6000, maximumChargeCurrent=60000"), + TestStep("4a", "TH reads from the DUT the State attribute. Verify value is 0x00 (NotPluggedIn)"), + TestStep("4b", "TH reads from the DUT the SupplyState attribute. Verify value is 0x01 (ChargingEnabled)"), + TestStep("5", "TH sends command StartDiagnostics. Verify that command is rejected with Failure"), + TestStep("6", "TH sends command Disable."), + TestStep("6a", "TH reads from the DUT the State attribute. Verify value is 0x00 (NotPluggedIn)"), + TestStep("6b", "TH reads from the DUT the SupplyState attribute. Verify value is 0x00 (Disabled)"), + TestStep("7", "TH sends command StartDiagnostics. Verify that command is accepted with Success"), + TestStep("7a", "TH reads from the DUT the SupplyState attribute. Verify value is 0x04 (DisabledDiagnostics)"), + TestStep("8", "A few seconds later TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EVSE Diagnostics Complete Event"), + TestStep("8a", "TH reads from the DUT the State attribute. Verify value is 0x00 (NotPluggedIn)"), + TestStep("8b", "TH reads from the DUT the SupplyState attribute. Verify value is 0x00 (Disabled)"), + TestStep("9", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for Basic Functionality Test Event Clear."), + ] + + return steps + + @async_test_body + async def test_TC_EEVSE_2_5(self): + self.step("1") + # Commission DUT - already done + + # Subscribe to Events and when they are sent push them to a queue for checking later + events_callback = EventChangeCallback(Clusters.EnergyEvse) + await events_callback.start(self.default_controller, + self.dut_node_id, + self.matter_test_config.endpoint) + + self.step("2") + await self.check_test_event_triggers_enabled() + + self.step("3") + await self.send_test_event_trigger_basic() + + self.step("3a") + await self.check_evse_attribute("State", Clusters.EnergyEvse.Enums.StateEnum.kNotPluggedIn) + + self.step("3b") + await self.check_evse_attribute("SupplyState", Clusters.EnergyEvse.Enums.SupplyStateEnum.kDisabled) + + self.step("3c") + await self.check_evse_attribute("FaultState", Clusters.EnergyEvse.Enums.FaultStateEnum.kNoError) + + self.step("4") + charge_until = NullValue + min_charge_current = 6000 + max_charge_current = 60000 + await self.send_enable_charge_command(charge_until=charge_until, min_charge=min_charge_current, max_charge=max_charge_current) + + self.step("4a") + await self.check_evse_attribute("State", Clusters.EnergyEvse.Enums.StateEnum.kNotPluggedIn) + + self.step("4b") + await self.check_evse_attribute("SupplyState", Clusters.EnergyEvse.Enums.SupplyStateEnum.kChargingEnabled) + + self.step("5") + # Check we get a failure because the state needs to be Disabled to run a Diagnostic + await self.send_start_diagnostics_command(expected_status=Status.Failure) + + self.step("6") + await self.send_disable_command() + + self.step("6a") + await self.check_evse_attribute("State", Clusters.EnergyEvse.Enums.StateEnum.kNotPluggedIn) + + self.step("6b") + await self.check_evse_attribute("SupplyState", Clusters.EnergyEvse.Enums.SupplyStateEnum.kDisabled) + + self.step("7") + await self.send_start_diagnostics_command() + + self.step("7a") + await self.check_evse_attribute("SupplyState", Clusters.EnergyEvse.Enums.SupplyStateEnum.kDisabledDiagnostics) + + self.step("8") + await self.send_test_event_trigger_evse_diagnostics_complete() + + self.step("8a") + await self.check_evse_attribute("State", Clusters.EnergyEvse.Enums.StateEnum.kNotPluggedIn) + + self.step("8b") + # It should stay disabled after a diagnostics session + await self.check_evse_attribute("SupplyState", Clusters.EnergyEvse.Enums.SupplyStateEnum.kDisabled) + + self.step("9") + await self.send_test_event_trigger_basic_clear() + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/TC_EEVSE_Utils.py b/src/python_testing/TC_EEVSE_Utils.py new file mode 100644 index 00000000000000..fb6bfa1f714d13 --- /dev/null +++ b/src/python_testing/TC_EEVSE_Utils.py @@ -0,0 +1,209 @@ +# +# Copyright (c) 2023 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + + +import logging +import queue + +import chip.clusters as Clusters +from chip.clusters import ClusterObjects as ClusterObjects +from chip.clusters.Attribute import EventReadResult, SubscriptionTransaction +from chip.interaction_model import InteractionModelError, Status +from mobly import asserts + +logger = logging.getLogger(__name__) + + +class EventChangeCallback: + def __init__(self, expected_cluster: ClusterObjects): + self._q = queue.Queue() + self._expected_cluster = expected_cluster + + async def start(self, dev_ctrl, node_id: int, endpoint: int): + self._subscription = await dev_ctrl.ReadEvent(node_id, + events=[(endpoint, self._expected_cluster, True)], reportInterval=(1, 5), + fabricFiltered=False, keepSubscriptions=True, autoResubscribe=False) + self._subscription.SetEventUpdateCallback(self.__call__) + + def __call__(self, res: EventReadResult, transaction: SubscriptionTransaction): + if res.Status == Status.Success and res.Header.ClusterId == self._expected_cluster.id: + logging.info( + f'Got subscription report for event on cluster {self._expected_cluster}: {res.Data}') + self._q.put(res) + + def WaitForEventReport(self, expected_event: ClusterObjects.ClusterEvent): + try: + res = self._q.get(block=True, timeout=10) + except queue.Empty: + asserts.fail("Failed to receive a report for the event {}".format(expected_event)) + + asserts.assert_equal(res.Header.ClusterId, expected_event.cluster_id, "Expected cluster ID not found in event report") + asserts.assert_equal(res.Header.EventId, expected_event.event_id, "Expected event ID not found in event report") + return res.Data + + +class EEVSEBaseTestHelper: + + async def read_evse_attribute_expect_success(self, endpoint: int = None, attribute: str = ""): + full_attr = getattr(Clusters.EnergyEvse.Attributes, attribute) + cluster = Clusters.Objects.EnergyEvse + return await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=full_attr) + + async def check_evse_attribute(self, attribute, expected_value, endpoint: int = None): + value = await self.read_evse_attribute_expect_success(endpoint=endpoint, attribute=attribute) + asserts.assert_equal(value, expected_value, + f"Unexpected '{attribute}' value - expected {expected_value}, was {value}") + + async def get_supported_energy_evse_attributes(self, endpoint: int = None): + return await self.read_evse_attribute_expect_success(endpoint, "AttributeList") + + async def write_user_max_charge(self, endpoint: int = None, user_max_charge: int = 0): + if endpoint is None: + endpoint = self.matter_test_config.endpoint + result = await self.default_controller.WriteAttribute(self.dut_node_id, + [(endpoint, + Clusters.EnergyEvse.Attributes.UserMaximumChargeCurrent(user_max_charge))]) + asserts.assert_equal(result[0].Status, Status.Success, "UserMaximumChargeCurrent write failed") + + async def send_enable_charge_command(self, endpoint: int = None, charge_until: int = None, timedRequestTimeoutMs: int = 3000, + min_charge: int = None, max_charge: int = None, expected_status: Status = Status.Success): + try: + await self.send_single_cmd(cmd=Clusters.EnergyEvse.Commands.EnableCharging( + chargingEnabledUntil=charge_until, + minimumChargeCurrent=min_charge, + maximumChargeCurrent=max_charge), + endpoint=endpoint, + timedRequestTimeoutMs=timedRequestTimeoutMs) + + except InteractionModelError as e: + asserts.assert_equal(e.status, expected_status, "Unexpected error returned") + + async def send_disable_command(self, endpoint: int = None, timedRequestTimeoutMs: int = 3000, expected_status: Status = Status.Success): + try: + await self.send_single_cmd(cmd=Clusters.EnergyEvse.Commands.Disable(), + endpoint=endpoint, + timedRequestTimeoutMs=timedRequestTimeoutMs) + + except InteractionModelError as e: + asserts.assert_equal(e.status, expected_status, "Unexpected error returned") + + async def send_start_diagnostics_command(self, endpoint: int = None, timedRequestTimeoutMs: int = 3000, + expected_status: Status = Status.Success): + try: + await self.send_single_cmd(cmd=Clusters.EnergyEvse.Commands.StartDiagnostics(), + endpoint=endpoint, + timedRequestTimeoutMs=timedRequestTimeoutMs) + + except InteractionModelError as e: + asserts.assert_equal(e.status, expected_status, "Unexpected error returned") + + async def send_test_event_triggers(self, enableKey: bytes = None, eventTrigger=0x0099000000000000): + # get the test event enable key or assume the default + # This can be passed in on command line using + # --hex-arg enableKey:000102030405060708090a0b0c0d0e0f + if enableKey is None: + if 'enableKey' not in self.matter_test_config.global_test_params: + enableKey = bytes([b for b in range(16)]) + else: + enableKey = self.matter_test_config.global_test_params['enableKey'] + + try: + # GeneralDiagnosics cluster is meant to be on Endpoint 0 (Root) + await self.send_single_cmd(endpoint=0, + cmd=Clusters.GeneralDiagnostics.Commands.TestEventTrigger( + enableKey, + eventTrigger) + ) + + except InteractionModelError as e: + asserts.fail(f"Unexpected error returned - {e.status}") + + async def check_test_event_triggers_enabled(self): + full_attr = Clusters.GeneralDiagnostics.Attributes.TestEventTriggersEnabled + cluster = Clusters.Objects.GeneralDiagnostics + # GeneralDiagnosics cluster is meant to be on Endpoint 0 (Root) + test_event_enabled = await self.read_single_attribute_check_success(endpoint=0, cluster=cluster, attribute=full_attr) + asserts.assert_equal(test_event_enabled, True, "TestEventTriggersEnabled is False") + + async def send_test_event_trigger_basic(self): + await self.send_test_event_triggers(eventTrigger=0x0099000000000000) + + async def send_test_event_trigger_basic_clear(self): + await self.send_test_event_triggers(eventTrigger=0x0099000000000001) + + async def send_test_event_trigger_pluggedin(self): + await self.send_test_event_triggers(eventTrigger=0x0099000000000002) + + async def send_test_event_trigger_pluggedin_clear(self): + await self.send_test_event_triggers(eventTrigger=0x0099000000000003) + + async def send_test_event_trigger_charge_demand(self): + await self.send_test_event_triggers(eventTrigger=0x0099000000000004) + + async def send_test_event_trigger_charge_demand_clear(self): + await self.send_test_event_triggers(eventTrigger=0x0099000000000005) + + async def send_test_event_trigger_evse_ground_fault(self): + await self.send_test_event_triggers(eventTrigger=0x0099000000000010) + + async def send_test_event_trigger_evse_over_temperature_fault(self): + await self.send_test_event_triggers(eventTrigger=0x0099000000000011) + + async def send_test_event_trigger_evse_fault_clear(self): + await self.send_test_event_triggers(eventTrigger=0x0099000000000012) + + async def send_test_event_trigger_evse_diagnostics_complete(self): + await self.send_test_event_triggers(eventTrigger=0x0099000000000020) + + def validate_energy_transfer_started_event(self, event_data, session_id, expected_state, expected_max_charge): + asserts.assert_equal(session_id, event_data.sessionID, + f"EnergyTransferStarted event session ID was {event_data.sessionID}, expected {session_id}") + asserts.assert_equal(expected_state, event_data.state, + f"EnergyTransferStarted event State was {event_data.state} expected {expected_state}") + asserts.assert_equal(expected_max_charge, event_data.maximumCurrent, + f"EnergyTransferStarted event maximumCurrent was {event_data.maximumCurrent}, expected {expected_max_charge}") + + def validate_energy_transfer_stopped_event(self, event_data, session_id, expected_state, expected_reason): + asserts.assert_equal(session_id, event_data.sessionID, + f"EnergyTransferStopped event session ID was {event_data.sessionID}, expected {session_id}") + asserts.assert_equal(expected_state, event_data.state, + f"EnergyTransferStopped event State was {event_data.state} expected {expected_state}") + asserts.assert_equal(expected_reason, event_data.reason, + f"EnergyTransferStopped event reason was {event_data.reason}, expected {expected_reason}") + + def validate_ev_connected_event(self, event_data, session_id): + asserts.assert_equal(session_id, event_data.sessionID, + f"EvConnected event session ID was {event_data.sessionID}, expected {session_id}") + + def validate_ev_not_detected_event(self, event_data, session_id, expected_state, expected_duration, expected_charged): + asserts.assert_equal(session_id, event_data.sessionID, + f"EvNotDetected event session ID was {event_data.sessionID}, expected {session_id}") + asserts.assert_equal(expected_state, event_data.state, + f"EvNotDetected event event State was {event_data.state} expected {expected_state}") + asserts.assert_greater_equal(event_data.sessionDuration, expected_duration, + f"EvNotDetected event sessionDuration was {event_data.sessionDuration}, expected >= {expected_duration}") + asserts.assert_greater_equal(event_data.sessionEnergyCharged, expected_charged, + f"EvNotDetected event sessionEnergyCharged was {event_data.sessionEnergyCharged}, expected >= {expected_charged}") + + def validate_evse_fault_event(self, event_data, session_id, expected_state, previous_fault, current_fault): + asserts.assert_equal(session_id, event_data.sessionID, + f"Fault event session ID was {event_data.sessionID}, expected {session_id}") + asserts.assert_equal(expected_state, event_data.state, + f"Fault event State was {event_data.state} expected {expected_state}") + asserts.assert_equal(event_data.faultStatePreviousState, previous_fault, + f"Fault event faultStatePreviousState was {event_data.faultStatePreviousState}, expected {previous_fault}") + asserts.assert_equal(event_data.faultStateCurrentState, current_fault, + f"Fault event faultStateCurrentState was {event_data.faultStateCurrentState}, expected {current_fault}") diff --git a/src/python_testing/TC_OPCREDS_3_1.py b/src/python_testing/TC_OPCREDS_3_1.py new file mode 100644 index 00000000000000..661c3b0b9cd8fb --- /dev/null +++ b/src/python_testing/TC_OPCREDS_3_1.py @@ -0,0 +1,626 @@ +# +# Copyright (c) 2023 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import copy +import logging +import random + +import chip.clusters as Clusters +import chip.discovery as Discovery +from chip import ChipDeviceCtrl +from chip.exceptions import ChipStackError +from chip.interaction_model import InteractionModelError, Status +from chip.tlv import TLVReader, TLVWriter +from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main +from mobly import asserts + + +class TC_OPCREDS_3_1(MatterBaseTest): + def FindAndEstablishPase(self, longDiscriminator: int, setupPinCode: int, nodeid: int, dev_ctrl: ChipDeviceCtrl = None): + if dev_ctrl is None: + dev_ctrl = self.default_controller + + devices = dev_ctrl.DiscoverCommissionableNodes( + filterType=Discovery.FilterType.LONG_DISCRIMINATOR, filter=longDiscriminator, stopOnFirst=False) + # For some reason, the devices returned here aren't filtered, so filter ourselves + device = next(filter(lambda d: d.commissioningMode == + Discovery.FilterType.LONG_DISCRIMINATOR and d.longDiscriminator == longDiscriminator, devices)) + for a in device.addresses: + try: + dev_ctrl.EstablishPASESessionIP(ipaddr=a, setupPinCode=setupPinCode, + nodeid=nodeid, port=device.port) + break + except ChipStackError: + continue + try: + dev_ctrl.GetConnectedDeviceSync(nodeid=nodeid, allowPASE=True, timeoutMs=1000) + except TimeoutError: + asserts.fail("Unable to establish a PASE session to the device") + + def OpenCommissioningWindow(self, dev_ctrl: ChipDeviceCtrl, node_id: int): + # TODO: abstract this in the base layer? Do we do this a lot? + longDiscriminator = random.randint(0, 4095) + try: + params = dev_ctrl.OpenCommissioningWindow( + nodeid=node_id, timeout=600, iteration=10000, discriminator=longDiscriminator, option=ChipDeviceCtrl.ChipDeviceControllerBase.CommissioningWindowPasscode.kTokenWithRandomPin) + except Exception as e: + logging.exception('Error running OpenCommissioningWindow %s', e) + asserts.assert_true(False, 'Failed to open commissioning window') + return (longDiscriminator, params) + + @async_test_body + async def test_TC_OPCREDS_3_1(self): + opcreds = Clusters.OperationalCredentials + # Create TH1 + # Maximize cert chains so we can use this below + TH1_CA_real = self.certificate_authority_manager.NewCertificateAuthority(maximizeCertChains=True) + TH1_vid = 0xFFF2 + TH1_fabric_admin_real = TH1_CA_real.NewFabricAdmin(vendorId=TH1_vid, fabricId=2) + TH1_nodeid = self.default_controller.nodeId+1 + TH1 = TH1_fabric_admin_real.NewController(nodeId=TH1_nodeid) + + commissioned_fabric_count = await self.read_single_attribute_check_success( + cluster=opcreds, attribute=opcreds.Attributes.CommissionedFabrics) + + supported_fabric_count = await self.read_single_attribute_check_success( + cluster=opcreds, attribute=opcreds.Attributes.SupportedFabrics) + + # Make sure we have space + # TODO: Add step here to just remove extra fabrics if required. + asserts.assert_less(commissioned_fabric_count, supported_fabric_count, + "Device fabric table is full - please remove one fabric and retry") + + self.print_step(1, "TH0 opens a commissioning window on the DUT") + longDiscriminator, params = self.OpenCommissioningWindow(self.default_controller, self.dut_node_id) + + self.print_step( + 2, "TH0 reads the BasicCommissioningInfo field from the General commissioning cluster saves MaxCumulativeFailsafeSeconds as `failsafe_max`") + basic_commissioning_info = await self.read_single_attribute_check_success(cluster=Clusters.GeneralCommissioning, attribute=Clusters.GeneralCommissioning.Attributes.BasicCommissioningInfo) + failsafe_max = basic_commissioning_info.maxCumulativeFailsafeSeconds + + self.print_step(3, "TH1 opens a PASE connection to the DUT") + newNodeId = self.dut_node_id + 1 + self.FindAndEstablishPase(dev_ctrl=TH1, longDiscriminator=longDiscriminator, + setupPinCode=params.setupPinCode, nodeid=newNodeId) + + self.print_step(4, "TH1 sends ArmFailSafe command to the DUT with the ExpiryLengthSeconds field set to failsafe_max") + resp = await self.send_single_cmd(dev_ctrl=TH1, node_id=newNodeId, cmd=Clusters.GeneralCommissioning.Commands.ArmFailSafe(failsafe_max)) + asserts.assert_equal(resp.errorCode, Clusters.GeneralCommissioning.Enums.CommissioningErrorEnum.kOk, + "Failure status returned from arm failsafe") + + self.print_step(5, "TH1 Sends CSRRequest command with a random 32-byte nonce and saves the response as`csrResponse") + nonce = random.randbytes(32) + csrResponse = await self.send_single_cmd(dev_ctrl=TH1, node_id=newNodeId, cmd=opcreds.Commands.CSRRequest(CSRNonce=nonce, isForUpdateNOC=False)) + + self.print_step(6, "TH1 obtains or generates the NOC, the Root CA Certificate and ICAC using csrResponse and selects an IPK. The certificates shall have their subjects padded with additional data such that they are each the maximum certificate size of 400 bytes when encoded in the MatterCertificateEncoding.") + # Our CA is set up to maximize cert chains already + # Extract the RCAC public key and save as `Root_Public_Key_TH1` + TH1_certs_real = TH1.IssueNOCChain(csrResponse, newNodeId) + if (TH1_certs_real.rcacBytes is None or + TH1_certs_real.icacBytes is None or + TH1_certs_real.nocBytes is None or TH1_certs_real.ipkBytes is None): + # Expiring the failsafe timer in an attempt to clean up. + await TH1.SendCommand(newNodeId, 0, Clusters.GeneralCommissioning.Commands.ArmFailSafe(0)) + asserts.fail("Unable to generate NOC chain for DUT - this is a script failure, please report this as a bug") + th1_rcac_decoded = TLVReader(TH1_certs_real.rcacBytes).get()["Any"] + # public key is field 9 + root_public_key_th1 = th1_rcac_decoded[9] + + self.print_step( + 7, "TH1 obtains or generates Root Certificate with a different Root CA ID and the corresponding ICAC, NOC and IPK using csrResponse") + TH1_CA_fake = self.certificate_authority_manager.NewCertificateAuthority() + TH1_fabric_admin_fake = TH1_CA_fake.NewFabricAdmin(vendorId=0xFFF1, fabricId=2) + TH1_fake = TH1_fabric_admin_fake.NewController(nodeId=self.default_controller.nodeId) + TH1_certs_fake = TH1_fake.IssueNOCChain(csrResponse, newNodeId) + if (TH1_certs_fake.rcacBytes is None or + TH1_certs_fake.icacBytes is None or + TH1_certs_fake.nocBytes is None or TH1_certs_real.ipkBytes is None): + # Expiring the failsafe timer in an attempt to clean up. + await TH1.SendCommand(newNodeId, 0, Clusters.GeneralCommissioning.Commands.ArmFailSafe(0)) + asserts.fail("Unable to generate NOC chain for DUT - this is a script failure, please report this as a bug") + + self.print_step( + 8, "TH1 generates an INVALID Root Certificate where the signature does not match the public key and saves it as `Root_CA_Malformed`") + TH1_root_CA_malformed_decoded = copy.deepcopy(th1_rcac_decoded) + # signature is field 11 + print(TH1_root_CA_malformed_decoded[11]) + malformed_sig_int = int.from_bytes(TH1_root_CA_malformed_decoded[11], 'big') + 1 + malformed_sig = malformed_sig_int.to_bytes(len(TH1_root_CA_malformed_decoded[11]), 'big') + TH1_root_CA_malformed_decoded[11] = malformed_sig + + writer = TLVWriter(bytearray()) + writer.startStructure(None) + for tag, val in TH1_root_CA_malformed_decoded.items(): + TH1_root_CA_malformed = writer.put(tag, val) + writer.endContainer() + TH1_root_CA_malformed = writer.encoding + + self.print_step(9, "TH1 reads the trusted root cert list from the DUT. Save the list size as trusted_root_original_size") + trusted_root_list = await self.read_single_attribute_check_success(dev_ctrl=TH1, node_id=newNodeId, cluster=opcreds, attribute=opcreds.Attributes.TrustedRootCertificates) + trusted_root_original_size = len(trusted_root_list) + + self.print_step( + 10, "TH1 reads the NOCs attribute from the DUT using a non-fabric-filtered read. Save the list size as nocs_original_size") + nocs = await self.read_single_attribute_check_success(dev_ctrl=TH1, node_id=newNodeId, cluster=opcreds, attribute=opcreds.Attributes.NOCs, fabric_filtered=False) + nocs_original_size = len(nocs) + + self.print_step(11, "TH1 reads the fabrics attribute from the DUT. Save the list size as fabrics_original_size") + fabrics = await self.read_single_attribute_check_success(dev_ctrl=TH1, node_id=newNodeId, cluster=opcreds, attribute=opcreds.Attributes.Fabrics, fabric_filtered=False) + fabrics_original_size = len(fabrics) + + self.print_step( + 12, "TH1 sends AddTrustedRootCertificate command to DUT to install `Root_CA_Malformed` and verifies INVALID_COMMAND is returned") + cmd = opcreds.Commands.AddTrustedRootCertificate(TH1_root_CA_malformed) + try: + await self.send_single_cmd(dev_ctrl=TH1, node_id=newNodeId, cmd=cmd) + asserts.fail("Unexpected success adding trusted root cert with malformed signature") + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.InvalidCommand, + "Unexpected error adding trusted root cert with malformed signature") + self.print_step( + 13, "TH1 reads the TrustedRootCertificate attribute and confirm it contains only trusted_root_original_size entries") + ret = await self.read_single_attribute_check_success(dev_ctrl=TH1, node_id=newNodeId, cluster=opcreds, attribute=opcreds.Attributes.TrustedRootCertificates) + asserts.assert_equal(len(ret), trusted_root_original_size, + "Unexpected number of entries in the TrustedRootCertificates table") + + self.print_step( + 14, "TH1 sends AddTrustedRootCertificate command to DUT with RootCACertificate set to `Root_CA_Certificate_TH1`, verify SUCCESS") + cmd = opcreds.Commands.AddTrustedRootCertificate(TH1_certs_real.rcacBytes) + await self.send_single_cmd(dev_ctrl=TH1, node_id=newNodeId, cmd=cmd) + + self.print_step( + 15, "TH1 reads the TrustedRootCertificate attribute and confirms it contains trusted_root_original_size + 1 entries") + ret = await self.read_single_attribute_check_success(dev_ctrl=TH1, node_id=newNodeId, cluster=opcreds, attribute=opcreds.Attributes.TrustedRootCertificates) + asserts.assert_equal(len(ret), trusted_root_original_size + 1, + "Unexpected number of entries in the TrustedRootCertificates table") + + self.print_step( + 16, "TH1 sends AddTrustedRootCertificate command to DUT again with the RootCACertificate field set to `Root_CA_Certificate_TH1`, verify SUCCESS") + # TODO: This currently fails - bug in the SDK? See #30798 + # await self.send_single_cmd(dev_ctrl=TH1, node_id=newNodeId, cmd=cmd) + + self.print_step( + 17, "TH1 reads the TrustedRootCertificate attribute and confirms it contains trusted_root_original_size + 1 entries") + ret = await self.read_single_attribute_check_success(dev_ctrl=TH1, node_id=newNodeId, cluster=opcreds, attribute=opcreds.Attributes.TrustedRootCertificates) + asserts.assert_equal(len(ret), trusted_root_original_size + 1, + "Unexpected number of entries in the TrustedRootCertificates table") + + self.print_step( + 18, "TH1 sends AddTrustedRootCertificate command to DUT again with the RootCACertificate field set to `Root_CA_Certificate_TH1_2`, verify CONSTRAINT_ERROR") + try: + cmd = opcreds.Commands.AddTrustedRootCertificate(TH1_certs_fake.rcacBytes) + await self.send_single_cmd(dev_ctrl=TH1, node_id=newNodeId, cmd=cmd) + asserts.fail("Unexpected success when adding second trusted root certificate") + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.ConstraintError, "Unexpected error when adding second trusted root certificate") + + self.print_step( + 19, "TH1 reads the TrustedRootCertificate attribute and confirms it contains trusted_root_original_size + 1 entries") + ret = await self.read_single_attribute_check_success(dev_ctrl=TH1, node_id=newNodeId, cluster=opcreds, attribute=opcreds.Attributes.TrustedRootCertificates) + asserts.assert_equal(len(ret), trusted_root_original_size + 1, + "Unexpected number of entries in the TrustedRootCertificates table") + + self.print_step( + 20, "TH1 appends `Root_CA_Certificate_TH1_2` to `TrustedRootsList` and writes the TrustedRootCertificates attribute with that value, Verify UNSUPPORTED_WRITE") + trusted_root_list.append(TH1_certs_fake.rcacBytes) + attr = opcreds.Attributes.TrustedRootCertificates(trusted_root_list) + err = await TH1.WriteAttribute(nodeid=newNodeId, attributes=[(0, attr)]) + asserts.assert_equal(err[0].Status, Status.UnsupportedWrite, + "Unexpected error trying to write TrustedRootCertificate attribute") + + self.print_step(21, "TH1 reads the TrustedRootCertificates list from DUT | Verify that there is only one instance of Root CA Certificate in the list and that its content matches `Root_CA_Certificate_TH1`") + ret = await self.read_single_attribute_check_success(dev_ctrl=TH1, node_id=newNodeId, cluster=opcreds, attribute=opcreds.Attributes.TrustedRootCertificates) + asserts.assert_equal(len(ret), trusted_root_original_size + 1, + "Unexpected number of entries in the TrustedRootCertificates table") + + self.print_step(22, "TH1 sends the AddNOC Command to DUT for the certs generated with the second trusted root cert") + # Node_Operational_Certificate_TH1_2` + # ICACValue as `Intermediate_Certificate_TH1_2` + # IpkValue as `IPK_TH1_2` + # CaseAdminSubject as the NodeID of TH1 + # AdminVendorId as the Vendor ID of TH1 a|* Verify that DUT responds with NOCResponse command with status code InvalidNOC + cmd = opcreds.Commands.AddNOC(NOCValue=TH1_certs_fake.nocBytes, ICACValue=TH1_certs_fake.icacBytes, + IPKValue=TH1_certs_fake.ipkBytes, caseAdminSubject=TH1_nodeid, adminVendorId=TH1_vid) + resp = await self.send_single_cmd(dev_ctrl=TH1, node_id=newNodeId, cmd=cmd) + asserts.assert_equal(resp.statusCode, opcreds.Enums.NodeOperationalCertStatusEnum.kInvalidNOC, + "Unexpected error when adding Invalid NOC") + + self.print_step(23, "TH1 sends the AddNOC Command to DUT with an invalid node ID") + # NOCValue as `Node_Operational_Certificate_TH1` + # ICACValue as `Intermediate_Certificate_TH1` + # IpkValue as `IPK_TH1` + # CaseAdminSubject is an invalid NodeID (not an operational Node ID or Case Authenticated Tag - ex. 0) + # AdminVendorId as the Vendor ID of TH1 a|* Verify that DUT responds with NOCResponse command with status code InvalidAdminSubject + cmd = opcreds.Commands.AddNOC(NOCValue=TH1_certs_real.nocBytes, ICACValue=TH1_certs_real.icacBytes, + IPKValue=TH1_certs_real.ipkBytes, caseAdminSubject=0, adminVendorId=TH1_vid) + resp = await self.send_single_cmd(dev_ctrl=TH1, node_id=newNodeId, cmd=cmd) + asserts.assert_equal(resp.statusCode, opcreds.Enums.NodeOperationalCertStatusEnum.kInvalidAdminSubject, + "Unexpected error when adding NOC with invalid case admin subject") + + self.print_step(24, "TH1 sends the AddNOC Command to DUT a valid NOC") + # NOCValue as `Node_Operational_Certificate_TH1` + # ICACValue as `Intermediate_Certificate_TH1` + # IpkValue as `IPK_TH1` + # CaseAdminSubject as the NodeID of TH1 + # AdminVendorId as the Vendor ID of TH1 a|* Verify that DUT responds with NOCResponse command with status code OK + # Verify that FabricIndex has a size of 1 byte + # save the fabric index. + cmd = opcreds.Commands.AddNOC(NOCValue=TH1_certs_real.nocBytes, ICACValue=TH1_certs_real.icacBytes, + IPKValue=TH1_certs_real.ipkBytes, caseAdminSubject=TH1_nodeid, adminVendorId=TH1_vid) + resp = await self.send_single_cmd(dev_ctrl=TH1, node_id=newNodeId, cmd=cmd) + asserts.assert_equal( + resp.statusCode, opcreds.Enums.NodeOperationalCertStatusEnum.kOk, "Failure when adding NOC") + + self.print_step(25, "TH1 re-sends the AddNOC Command to DUT and verifies CONSTRAINT_ERROR") + # NOCValue as `Node_Operational_Certificate_TH1_1` + # ICACValue as `Intermediate_Certificate_TH1_1` + # IpkValue as `IPK_TH1_1` + # CaseAdminSubject as the NodeID of TH1 + # AdminVendorId as the Vendor ID of TH1 | Verify that DUT responds with status code CONSTRAINT_ERROR + try: + await self.send_single_cmd(dev_ctrl=TH1, node_id=newNodeId, cmd=cmd) + asserts.fail("Unexpected success adding NOC for a second time") + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.ConstraintError, "Unexpected error when adding NOC for a second time") + + self.print_step(26, "TH1 reads the NOCs attribute from DUT using a fabric-filtered read and saves the list as `NOCList`") + noc_list = await self.read_single_attribute_check_success(dev_ctrl=TH1, node_id=newNodeId, cluster=opcreds, attribute=opcreds.Attributes.NOCs) + asserts.assert_equal(len(noc_list), 1, "More than one NOC entry found for TH1") + asserts.assert_equal(noc_list[0].noc, TH1_certs_real.nocBytes, "NOC for TH1 does not match supplied NOC") + asserts.assert_equal(noc_list[0].icac, TH1_certs_real.icacBytes, "ICAC for TH1 does not match supplied ICAC") + + self.print_step( + 27, "TH1 modified the TH1 NOC and ICAC to be from the Root_CA_Certificate_TH1_2 and writes that value to the NOCs attribute. Verify UNSUPPORTED_WRITE") + noc_list[0].noc = TH1_certs_fake.nocBytes + noc_list[0].icac = TH1_certs_fake.icacBytes + attr = opcreds.Attributes.NOCs(noc_list) + resp = await TH1.WriteAttribute(nodeid=newNodeId, attributes=[(0, attr)]) + asserts.assert_equal(resp[0].Status, Status.UnsupportedWrite, "Write to NOC attribute did not fail with UnsupportedWrite") + + self.print_step( + 28, "TH1 reads the NOCs attribute from DUT. Verify the NOC has not been updated.") + noc_list = await self.read_single_attribute_check_success(dev_ctrl=TH1, node_id=newNodeId, cluster=opcreds, attribute=opcreds.Attributes.NOCs) + asserts.assert_equal(len(noc_list), 1, "More than one NOC entry found for TH1") + asserts.assert_equal(noc_list[0].noc, TH1_certs_real.nocBytes, "NOC for TH1 does not match supplied NOC") + asserts.assert_equal(noc_list[0].icac, TH1_certs_real.icacBytes, "ICAC for TH1 does not match supplied ICAC") + + self.print_step(29, "TH1 sends UpdateFabricLabel command with 'Label 1' as Label field to DUT, verify status OK") + cmd = opcreds.Commands.UpdateFabricLabel(label="Label 1") + resp = await self.send_single_cmd(cmd=cmd, dev_ctrl=TH1, node_id=newNodeId) + asserts.assert_equal( + resp.statusCode, opcreds.Enums.NodeOperationalCertStatusEnum.kOk, "Failure on UpdateFabricLabel") + + self.print_step(30, "TH1 reads the Fabrics Attribute from DUT") + fabrics = await self.read_single_attribute_check_success( + dev_ctrl=TH1, node_id=newNodeId, cluster=opcreds, attribute=opcreds.Attributes.Fabrics) + asserts.assert_equal(len(fabrics), 1, "Unexpected number of fabrics returned") + + self.print_step(31, "Read the other fields from FabricDescriptorStruct") + # 1. RootPublicKey + # 2. VendorID + # 3. FabricID + # 4. NodeID + # 5. Label + # Verify that the size of RootPublicKey is exactly 65 bytes + # Verify that the RootPublicKey matches `Root_Public_Key_TH1` + # Verify that the NodeID is the same as the matter-node-id field in the NOC sent with AddNOC Command + # Verify that the VendorID is the same as the AdminVendorID sent with AddNOC Command + # Verify that the FabricID is the same as the matter-fabric-id field in the NOC sent with AddNOC Command + # Verify that the Label field has value "Label 1" + asserts.assert_equal(len(fabrics[0].rootPublicKey), 65, "Root public key is not exactly 65 bytes") + asserts.assert_equal(fabrics[0].rootPublicKey, root_public_key_th1, + "Root public key in fabrics table does not match supplied key") + asserts.assert_equal(fabrics[0].nodeID, newNodeId, "NodeID in the fabrics table does not match the supplied node ID") + asserts.assert_equal(fabrics[0].vendorID, TH1_vid, + "VendorID in the fabrics table does not match the supplied vendor ID") + th1_noc_decoded = TLVReader(TH1_certs_real.nocBytes).get()["Any"] + # subject is field 6 + noc_subject = th1_noc_decoded[6] + # noc_subject is a TLVList, so it can be accessed by key. Fabric ID is dn-attribute 21. + asserts.assert_equal(fabrics[0].fabricID, noc_subject[21], + "Fabric ID in the fabric table does not match the fabric ID in the NOC") + + self.print_step(32, "TH1 sends ArmFailSafe command to the DUT with ExpiryLengthSeconds field set to 0") + cmd = Clusters.GeneralCommissioning.Commands.ArmFailSafe(expiryLengthSeconds=0, breadcrumb=0) + resp = await self.send_single_cmd(dev_ctrl=TH1, cmd=cmd, node_id=newNodeId) + asserts.assert_equal(resp.errorCode, Clusters.GeneralCommissioning.Enums.CommissioningErrorEnum.kOk, + "Failure status returned from arm failsafe") + + self.print_step(33, "TH1 reconnects to the DUT over PASE") + TH1.ExpireSessions(newNodeId) + self.FindAndEstablishPase(dev_ctrl=TH1, longDiscriminator=longDiscriminator, + setupPinCode=params.setupPinCode, nodeid=newNodeId) + + self.print_step(34, "TH1 reads the TrustedRootCertificates list from DUT and verifies the TH1 root is not present") + trusted_root_list = await self.read_single_attribute_check_success(dev_ctrl=TH1, node_id=newNodeId, cluster=opcreds, attribute=opcreds.Attributes.TrustedRootCertificates) + asserts.assert_equal(len(trusted_root_list), trusted_root_original_size, + "TrustedRootCertificate was not properly removed from the list on ArmFailSafe expiration") + + self.print_step( + 35, "TH1 reads the NOCs attribute from DUT using a non-fabric-filtered read and verifies that the list contains only nocs_original_size entries") + nocs = await self.read_single_attribute_check_success(dev_ctrl=TH1, node_id=newNodeId, cluster=opcreds, attribute=opcreds.Attributes.NOCs, fabric_filtered=False) + asserts.assert_equal(len(nocs), nocs_original_size, "NOC list size does not match original") + + self.print_step( + 36, "TH1 reads the Fabrics attribute from the DUT using a non-fabric-filtered read and verifies that the list contains only fabric_original_size entries") + fabrics = await self.read_single_attribute_check_success(dev_ctrl=TH1, node_id=newNodeId, cluster=opcreds, attribute=opcreds.Attributes.Fabrics, fabric_filtered=False) + asserts.assert_equal(len(fabrics), fabrics_original_size, "Fabric list size does not match original") + + self.print_step(37, "TH1 fully commissions DUT onto the fabric using a set of valid certificates") + TH1.Commission(newNodeId) + + self.print_step( + 38, "TH1 reads the TrustedRootCertificates list from DUT and verify that there are trusted_root_original_size + 1 entries") + trusted_root_list = await self.read_single_attribute_check_success(dev_ctrl=TH1, node_id=newNodeId, cluster=opcreds, attribute=opcreds.Attributes.TrustedRootCertificates) + asserts.assert_equal(len(trusted_root_list), trusted_root_original_size + 1, "Unexpected number of root certificates") + + self.print_step( + 39, "TH1 reads the NOCs attribute from DUT using a non-fabric-filtered read and verifies that there are nocs_original_size + 1 entries") + nocs = await self.read_single_attribute_check_success(dev_ctrl=TH1, node_id=newNodeId, cluster=opcreds, attribute=opcreds.Attributes.NOCs, fabric_filtered=False) + asserts.assert_equal(len(nocs), nocs_original_size+1, "Unexpected number of NOCs") + + self.print_step( + 40, "TH1 reads the Fabrics attribute from DUT using a non-fabric-filtered read and verifies that there are fabrics_original_size + 1 entries") + fabrics = await self.read_single_attribute_check_success(dev_ctrl=TH1, node_id=newNodeId, cluster=opcreds, attribute=opcreds.Attributes.Fabrics, fabric_filtered=False) + asserts.assert_equal(len(fabrics), fabrics_original_size+1, "Fabric list size is incorrect") + + self.print_step(41, "TH1 reads the ACL attribute from the Access Control cluster using a fabric-filtered read") + th1_fabric_index = await self.read_single_attribute_check_success(dev_ctrl=TH1, node_id=newNodeId, cluster=opcreds, attribute=opcreds.Attributes.CurrentFabricIndex) + acl = await self.read_single_attribute_check_success(dev_ctrl=TH1, node_id=newNodeId, cluster=Clusters.AccessControl, attribute=Clusters.AccessControl.Attributes.Acl) + # a| * Verify that the returned list includes an entry with: + # Fabric index of `FabricIndex_TH1` + # Administer privilege (5) + # CASE AuthMode (2) + # Includes the NodeID of TH1 in the list of subjects + th1_acl = [x for x in acl if x.fabricIndex == th1_fabric_index and x.privilege == + Clusters.AccessControl.Enums.AccessControlEntryPrivilegeEnum.kAdminister and x.authMode == Clusters.AccessControl.Enums.AccessControlEntryAuthModeEnum.kCase] + # There should be exactly one ACL for this fabric since we JUST commissioned it and didn't add any extra + asserts.assert_equal(len(th1_acl), 1, "Unexpected number of ACL entries for TH1") + asserts.assert_equal(th1_acl[0].subjects, [TH1_nodeid], "Unexpected subject list in ACL") + + self.print_step(42, "TH1 issues a KeySetRead command to the DUT for GroupKeySetID 0") + cmd = Clusters.GroupKeyManagement.Commands.KeySetRead(groupKeySetID=0) + ret = await self.send_single_cmd(dev_ctrl=TH1, node_id=newNodeId, cmd=cmd) + asserts.assert_equal(ret.groupKeySet.groupKeySetID, 0, "Unexpected response from KeySetRead") + + self.print_step(43, "TH1 sends UpdateFabricLabel command with 'Label 1' as Label field to DUT, verify status OK") + cmd = opcreds.Commands.UpdateFabricLabel(label="Label 1") + resp = await self.send_single_cmd(cmd=cmd, dev_ctrl=TH1, node_id=newNodeId) + asserts.assert_equal( + resp.statusCode, opcreds.Enums.NodeOperationalCertStatusEnum.kOk, "Failure on UpdateFabricLabel") + + self.print_step(44, "TH1 sends an OpenCommissioningWindow command to the Administrator Commissioning cluster") + longDiscriminator, params = self.OpenCommissioningWindow(TH1, newNodeId) + + self.print_step(45, "TH2 commissions the DUT") + TH2_CA = self.certificate_authority_manager.NewCertificateAuthority(maximizeCertChains=True) + TH2_vid = 0xFFF3 + TH2_fabric_admin = TH2_CA.NewFabricAdmin(vendorId=TH2_vid, fabricId=3) + TH2_nodeid = self.default_controller.nodeId+2 + TH2 = TH2_fabric_admin.NewController(nodeId=TH2_nodeid) + TH2_dut_nodeid = self.dut_node_id+2 + TH2.CommissionOnNetwork( + nodeId=TH2_dut_nodeid, setupPinCode=params.setupPinCode, + filterType=ChipDeviceCtrl.DiscoveryFilterType.LONG_DISCRIMINATOR, filter=longDiscriminator) + + self.print_step( + 46, "TH2 sends UpdateFabricLabel command with 'Label 2' as Label field to DUT and verify status OK") + cmd = opcreds.Commands.UpdateFabricLabel(label="Label 2") + resp = await self.send_single_cmd(cmd=cmd, dev_ctrl=TH2, node_id=TH2_dut_nodeid) + asserts.assert_equal( + resp.statusCode, opcreds.Enums.NodeOperationalCertStatusEnum.kOk, "Failure on UpdateFabricLabel") + + self.print_step( + 47, "TH2 sends UpdateFabricLabel command with 'Label 1' as Label field to DUT and verify status is LabelConflict") + cmd = opcreds.Commands.UpdateFabricLabel(label="Label 1") + resp = await self.send_single_cmd(cmd=cmd, dev_ctrl=TH2, node_id=TH2_dut_nodeid) + asserts.assert_equal( + resp.statusCode, opcreds.Enums.NodeOperationalCertStatusEnum.kLabelConflict, "Unexpected error code on UpdateFabricLabel") + + self.print_step(48, "Read the Fabrics List from DUT using a non-fabric-filtered read, verify fabrics_original_size + 2, check labels") + fabrics = await self.read_single_attribute_check_success( + dev_ctrl=TH1, node_id=newNodeId, cluster=opcreds, attribute=opcreds.Attributes.Fabrics, fabric_filtered=False) + asserts.assert_equal(len(fabrics), fabrics_original_size + 2, "Unexpected number of fabrics") + th1_fabric = [x for x in fabrics if x.vendorID == TH1_vid] + th2_fabric = [x for x in fabrics if x.vendorID == TH2_vid] + asserts.assert_equal(len(th1_fabric), 1, "Unexpected number of fabrics with TH1 vendor ID") + asserts.assert_equal(len(th2_fabric), 1, "Unexpected number of fabrics with TH2 vendor ID") + asserts.assert_equal(th1_fabric[0].label, "Label 1", "Unexpected label for TH1 fabric") + asserts.assert_equal(th2_fabric[0].label, "Label 2", "Unexpected label for TH2 fabric") + + self.print_step(49, "TH1 sends ArmFailSafe command to the DUT with the ExpiryLengthSeconds field set to failsafe_max| Verify that the DUT sends ArmFailSafeResponse Command to TH1 with field ErrorCode as 'OK'(0)") + resp = await self.send_single_cmd(dev_ctrl=TH1, node_id=newNodeId, cmd=Clusters.GeneralCommissioning.Commands.ArmFailSafe(failsafe_max)) + asserts.assert_equal(resp.errorCode, Clusters.GeneralCommissioning.Enums.CommissioningErrorEnum.kOk, + "Failure status returned from arm failsafe") + + self.print_step(50, "TH1 sends AddTrustedRootCertificate command to DUT with RootCACertificate set to `Root_CA_Certificate_TH1_1` |Verify that AddTrustedRootCertificate Command succeeds by sending the status code as SUCCESS") + cmd = opcreds.Commands.AddTrustedRootCertificate(TH1_certs_real.rcacBytes) + await self.send_single_cmd(dev_ctrl=TH1, node_id=newNodeId, cmd=cmd) + + self.print_step(51, "TH1 sends the AddNOC Command to DUT with the following fields:") + # NOCValue as `Node_Operational_Certificate_TH1_2` + # ICACValue as `Intermediate_Certificate_TH1_2` + # IpkValue as `IPK_TH1_2` + # CaseAdminSubject as the NodeID of TH1 + # AdminVendorId as the Vendor ID of TH1 | Verify that DUT responds with status code MissingCsr + cmd = opcreds.Commands.AddNOC(NOCValue=TH1_certs_real.nocBytes, ICACValue=TH1_certs_real.icacBytes, + IPKValue=TH1_certs_real.ipkBytes, caseAdminSubject=TH1_nodeid, adminVendorId=TH1_vid) + resp = await self.send_single_cmd(dev_ctrl=TH1, node_id=newNodeId, cmd=cmd) + asserts.assert_equal( + resp.statusCode, opcreds.Enums.NodeOperationalCertStatusEnum.kMissingCsr, "Unexpected error code on AddNOC with no CSR") + + self.print_step(52, "TH1 sends ArmFailSafe command to the DUT with ExpiryLengthSeconds set to 0") + cmd = Clusters.GeneralCommissioning.Commands.ArmFailSafe(expiryLengthSeconds=0, breadcrumb=0) + resp = await self.send_single_cmd(dev_ctrl=TH1, node_id=newNodeId, cmd=cmd) + asserts.assert_equal(resp.errorCode, Clusters.GeneralCommissioning.Enums.CommissioningErrorEnum.kOk, + "Failure status returned from arm failsafe") + + self.print_step(53, "TH1 sends ArmFailSafe command to the DUT with ExpiryLengthSeconds set to failsafe_max") + cmd = Clusters.GeneralCommissioning.Commands.ArmFailSafe(expiryLengthSeconds=failsafe_max, breadcrumb=0) + resp = await self.send_single_cmd(dev_ctrl=TH1, node_id=newNodeId, cmd=cmd) + asserts.assert_equal(resp.errorCode, Clusters.GeneralCommissioning.Enums.CommissioningErrorEnum.kOk, + "Failure status returned from arm failsafe") + + self.print_step(54, "TH1 Sends CSRRequest command with a random 32-byte nonce") + nonce = random.randbytes(32) + csrResponse_new = await self.send_single_cmd(dev_ctrl=TH1, node_id=newNodeId, cmd=opcreds.Commands.CSRRequest(CSRNonce=nonce, isForUpdateNOC=False)) + + self.print_step( + 55, "TH1 generates a new RCAC, ICAC and NOC using the csr returned in step 4 (ie, NOT the most recent CSR)") + temp_CA = self.certificate_authority_manager.NewCertificateAuthority() + temp_fabric_admin = temp_CA.NewFabricAdmin(vendorId=0xFFF1, fabricId=3) + temp_controller = temp_fabric_admin.NewController(nodeId=self.default_controller.nodeId) + temp_certs = temp_controller.IssueNOCChain(csrResponse, newNodeId) + if (temp_certs.rcacBytes is None or + temp_certs.icacBytes is None or + temp_certs.nocBytes is None or temp_certs.ipkBytes is None): + # Expiring the failsafe timer in an attempt to clean up. + await TH1.SendCommand(newNodeId, 0, Clusters.GeneralCommissioning.Commands.ArmFailSafe(0)) + asserts.fail("Unable to generate NOC chain for DUT - this is a script failure, please report this as a bug") + + self.print_step(56, "TH1 sends the AddTrustedRootCert command using the certs generated in step 54") + cmd = opcreds.Commands.AddTrustedRootCertificate(temp_certs.rcacBytes) + await self.send_single_cmd(cmd=cmd, dev_ctrl=TH1, node_id=newNodeId) + + self.print_step(57, "TH1 sends the AddNOC Command to DUT using the certs generated in step 54") + cmd = opcreds.Commands.AddNOC(NOCValue=temp_certs.nocBytes, ICACValue=temp_certs.icacBytes, + IPKValue=temp_certs.ipkBytes, caseAdminSubject=TH1_nodeid, adminVendorId=TH1_vid) + resp = await self.send_single_cmd(dev_ctrl=TH1, node_id=newNodeId, cmd=cmd) + asserts.assert_equal( + resp.statusCode, opcreds.Enums.NodeOperationalCertStatusEnum.kInvalidPublicKey, "Unexpected error code on AddNOC with mismatched CSR") + + self.print_step(58, "TH1 sends ArmFailSafe command to the DUT with ExpiryLengthSeconds set to 0") + cmd = Clusters.GeneralCommissioning.Commands.ArmFailSafe(expiryLengthSeconds=0, breadcrumb=0) + resp = await self.send_single_cmd(dev_ctrl=TH1, node_id=newNodeId, cmd=cmd) + asserts.assert_equal(resp.errorCode, Clusters.GeneralCommissioning.Enums.CommissioningErrorEnum.kOk, + "Failure status returned from arm failsafe") + + self.print_step(59, "TH1 sends ArmFailSafe command to the DUT with ExpiryLengthSeconds set to failsafe_max") + cmd = Clusters.GeneralCommissioning.Commands.ArmFailSafe(expiryLengthSeconds=failsafe_max, breadcrumb=0) + resp = await self.send_single_cmd(dev_ctrl=TH1, node_id=newNodeId, cmd=cmd) + asserts.assert_equal(resp.errorCode, Clusters.GeneralCommissioning.Enums.CommissioningErrorEnum.kOk, + "Failure status returned from arm failsafe") + + self.print_step(60, "TH1 Sends CSRRequest command with a random 32-byte nonce") + nonce = random.randbytes(32) + csrResponse_new = await self.send_single_cmd(dev_ctrl=TH1, node_id=newNodeId, cmd=opcreds.Commands.CSRRequest(CSRNonce=nonce, isForUpdateNOC=False)) + + self.print_step(61, "TH1 obtains or generates a NOC and ICAC using the CSR elements from the previous step with a different NodeID, but the same Root CA Certificate and fabric ID as step <>. Save as `Node_Operational_Certificates_TH1_fabric_conflict` and `Intermediate_Certificate_TH1_fabric_conflict`|") + anotherNodeId = newNodeId + 1 + TH1_certs_fabric_conflict = TH1.IssueNOCChain(csrResponse_new, anotherNodeId) + if (TH1_certs_fabric_conflict.rcacBytes is None or + TH1_certs_fabric_conflict.icacBytes is None or + TH1_certs_fabric_conflict.nocBytes is None or TH1_certs_fabric_conflict.ipkBytes is None): + # Expiring the failsafe timer in an attempt to clean up. + await TH1.SendCommand(newNodeId, 0, Clusters.GeneralCommissioning.Commands.ArmFailSafe(0)) + asserts.fail("Unable to generate NOC chain for DUT - this is a script failure, please report this as a bug") + + self.print_step(62, "TH1 sends the AddTrustedRootCert command using the certs generated in step 60") + cmd = opcreds.Commands.AddTrustedRootCertificate(TH1_certs_fabric_conflict.rcacBytes) + await self.send_single_cmd(cmd=cmd, dev_ctrl=TH1, node_id=newNodeId) + + self.print_step(63, "TH1 sends the AddNOC Command to DUT with the fabric conflict certs") + cmd = opcreds.Commands.AddNOC(NOCValue=TH1_certs_fabric_conflict.nocBytes, ICACValue=TH1_certs_fabric_conflict.icacBytes, + IPKValue=TH1_certs_fabric_conflict.ipkBytes, caseAdminSubject=TH1_nodeid, adminVendorId=TH1_vid) + resp = await self.send_single_cmd(dev_ctrl=TH1, node_id=newNodeId, cmd=cmd) + asserts.assert_equal( + resp.statusCode, opcreds.Enums.NodeOperationalCertStatusEnum.kFabricConflict, "Unexpected error code on AddNOC with mismatched CSR") + + self.print_step(64, "TH1 sends ArmFailSafe command to the DUT with ExpiryLengthSeconds set to 0| Verify that the DUT sends ArmFailSafeResponse Command to TH1 with field ErrorCode as 'OK'(0)") + cmd = Clusters.GeneralCommissioning.Commands.ArmFailSafe(expiryLengthSeconds=0, breadcrumb=0) + resp = await self.send_single_cmd(dev_ctrl=TH1, node_id=newNodeId, cmd=cmd) + asserts.assert_equal(resp.errorCode, Clusters.GeneralCommissioning.Enums.CommissioningErrorEnum.kOk, + "Failure status returned from arm failsafe") + + self.print_step( + 65, "TH1 reads the TrustedRootCertificates list from DUT | Verify the list contains `trusted_root_original_size` + 2 entries") + resp = await self.read_single_attribute_check_success(cluster=Clusters.OperationalCredentials, attribute=Clusters.OperationalCredentials.Attributes.TrustedRootCertificates, dev_ctrl=TH1, node_id=newNodeId) + asserts.assert_equal(len(resp), trusted_root_original_size + 2, "Unexpected number of trusted roots") + + self.print_step(66, "TH1 sends ArmFailSafe command to the DUT with the ExpiryLengthSeconds field set to failsafe_max| Verify that the DUT sends ArmFailSafeResponse Command to TH1 with field ErrorCode as 'OK'(0)") + cmd = Clusters.GeneralCommissioning.Commands.ArmFailSafe(expiryLengthSeconds=failsafe_max, breadcrumb=0) + resp = await self.send_single_cmd(dev_ctrl=TH1, node_id=newNodeId, cmd=cmd) + asserts.assert_equal(resp.errorCode, Clusters.GeneralCommissioning.Enums.CommissioningErrorEnum.kOk, + "Failure status returned from arm failsafe") + + self.print_step( + 67, "TH1 Sends CSRRequest command with a random 32-byte nonce and the IsForUpdateNOC field set to true a|* Verify that the DUT responds with the CSRResponse Command") + nonce = random.randbytes(32) + csrResponse = await self.send_single_cmd(dev_ctrl=TH1, node_id=newNodeId, cmd=opcreds.Commands.CSRRequest(CSRNonce=nonce, isForUpdateNOC=True)) + asserts.assert_true(isinstance(csrResponse, opcreds.Commands.CSRResponse), + "Unexpected response type for UpdateNOC csr request") + + self.print_step(68, "TH1 obtains or generates a NOC, Root CA Certificate, ICAC using the CSR elements from the previous step") + TH1_certs_3 = TH1.IssueNOCChain(csrResponse, anotherNodeId) + if (TH1_certs_3.rcacBytes is None or + TH1_certs_3.icacBytes is None or + TH1_certs_3.nocBytes is None or TH1_certs_3.ipkBytes is None): + # Expiring the failsafe timer in an attempt to clean up. + await TH1.SendCommand(newNodeId, 0, Clusters.GeneralCommissioning.Commands.ArmFailSafe(0)) + asserts.fail("Unable to generate NOC chain for DUT - this is a script failure, please report this as a bug") + # Save RCAC as `Root_CA_Certificate_TH1_3` + # Save ICAC as `Intermediate_Certificate_TH1_3` + # Save NOC as `Node_Operational_Certificate_TH1_3` | + + self.print_step(69, "TH1 sends AddTrustedRootCertificate command to DUT with RootCACertificate set to `Root_CA_Certificate_TH1_3` |Verify that AddTrustedRootCertificate Command succeeds by sending the status code as SUCCESS") + # TODO(#3126): This currently fails. This failure actually makes sense, though, and we should backport this to the spec and expect a failure here. + # cmd = opcreds.Commands.AddTrustedRootCertificate(TH1_certs_3.rcacBytes) + # await self.send_single_cmd(cmd=cmd, dev_ctrl=TH1, node_id=newNodeId) + + self.print_step(70, "TH1 sends the AddNOC Command to DUT with the following fields:") + # TODO(#3126) - consider removing this when we adjust the spec to expect a failure on the above. + # cmd = opcreds.Commands.UpdateNOC(NOCValue=TH1_certs_3.nocBytes, ICACValue=TH1_certs_3.icacBytes) + # resp = await self.send_single_cmd(cmd=cmd, dev_ctrl=TH1, node_id=newNodeId) + + self.print_step(71, "TH1 sends ArmFailSafe command to the DUT with ExpiryLengthSeconds set to 0| Verify that the DUT sends ArmFailSafeResponse Command to TH1 with field ErrorCode as 'OK'(0)") + cmd = Clusters.GeneralCommissioning.Commands.ArmFailSafe(expiryLengthSeconds=0, breadcrumb=0) + resp = await self.send_single_cmd(dev_ctrl=TH1, node_id=newNodeId, cmd=cmd) + asserts.assert_equal(resp.errorCode, Clusters.GeneralCommissioning.Enums.CommissioningErrorEnum.kOk, + "Failure status returned from arm failsafe") + + self.print_step(72, "TH2 reads its fabric index from the CurrentFabricIndex attribute and saves as FabricIndex_TH2") + fabric_index_th2 = await self.read_single_attribute_check_success( + cluster=opcreds, attribute=opcreds.Attributes.CurrentFabricIndex, dev_ctrl=TH2, node_id=TH2_dut_nodeid) + + self.print_step(73, "TH2 sends RemoveFabric command with Fabric Index as FabricIndexTH2 + 5 (Invalid Fabric Index) to DUT | Verify that DUT sends NOCResponse Command with StatusCode of InvalidFabricIndex") + cmd = opcreds.Commands.RemoveFabric(fabric_index_th2 + 5) + resp = await self.send_single_cmd(dev_ctrl=TH2, node_id=TH2_dut_nodeid, cmd=cmd) + asserts.assert_equal(resp.statusCode, opcreds.Enums.NodeOperationalCertStatusEnum.kInvalidFabricIndex) + + self.print_step(74, "TH2 reads the Fabrics List from DUT using a non-fabric-filtered read") + resp = await self.read_single_attribute_check_success(cluster=opcreds, attribute=opcreds.Attributes.Fabrics, dev_ctrl=TH2, node_id=TH2_dut_nodeid, fabric_filtered=False) + asserts.assert_equal(len(resp), fabrics_original_size + 2, "Unexpected number of fabrics on device") + + self.print_step(75, "TH1 reads its fabric index from the CurrentFabricIndex attribute and saves as FabricIndex_TH1") + fabric_index_th1 = await self.read_single_attribute_check_success( + cluster=opcreds, attribute=opcreds.Attributes.CurrentFabricIndex, dev_ctrl=TH1, node_id=newNodeId) + + self.print_step( + 76, "TH0 sends RemoveFabric command with Fabric Index as FabricIndex_TH1") + cmd = opcreds.Commands.RemoveFabric(fabric_index_th1) + resp = await self.send_single_cmd(cmd=cmd) + asserts.assert_equal(resp.statusCode, opcreds.Enums.NodeOperationalCertStatusEnum.kOk) + + self.print_step( + 77, "TH0 sends RemoveFabric command with Fabric Index as FabricIndex_TH2") + cmd = opcreds.Commands.RemoveFabric(fabric_index_th2) + resp = await self.send_single_cmd(cmd=cmd) + asserts.assert_equal(resp.statusCode, opcreds.Enums.NodeOperationalCertStatusEnum.kOk) + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/TC_VALCC_2_1.py b/src/python_testing/TC_VALCC_2_1.py new file mode 100644 index 00000000000000..c9f40d34694432 --- /dev/null +++ b/src/python_testing/TC_VALCC_2_1.py @@ -0,0 +1,177 @@ +# +# Copyright (c) 2023 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import logging + +import chip.clusters as Clusters +from chip.clusters.Types import NullValue +from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from mobly import asserts + + +class TC_VALCC_2_1(MatterBaseTest): + async def read_valcc_attribute_expect_success(self, endpoint, attribute): + cluster = Clusters.Objects.ValveConfigurationAndControl + return await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attribute) + + def desc_TC_VALCC_2_1(self) -> str: + return "[TC-VALCC-2.1] Attributes with DUT as Server" + + def steps_TC_VALCC_2_1(self) -> list[TestStep]: + steps = [ + TestStep(1, "Commissioning, already done", is_commissioning=True), + TestStep(2, "Read attribute list to determine supported attributes"), + TestStep(3, "Read OpenDuration attribute, if supported"), + TestStep(4, "Read DefaultOpenDuration attribute, if supported"), + TestStep(5, "Read AutoCloseTime attribute, if supported"), + TestStep(6, "Read RemainingDuration attribute, if supported"), + TestStep(7, "Read CurrentState attribute, if supported"), + TestStep(8, "Read TargetState attribute, if supported"), + TestStep(9, "Read CurrentLevel attribute, if supported"), + TestStep(10, "Read TargetLevel attribute, if supported"), + TestStep(11, "Read DefaultOpenLevel attribute, if supported"), + TestStep(12, "Read ValveFault attribute, if supported"), + TestStep(13, "Read LevelStep attribute, if supported") + ] + return steps + + def pics_TC_VALCC_2_1(self) -> list[str]: + pics = [ + "VALCC.S", + ] + return pics + + @async_test_body + async def test_TC_VALCC_2_1(self): + + endpoint = self.user_params.get("endpoint", 1) + + self.step(1) + attributes = Clusters.ValveConfigurationAndControl.Attributes + + self.step(2) + attribute_list = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.AttributeList) + + self.step(3) + if attributes.OpenDuration.attribute_id in attribute_list: + open_duration_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.OpenDuration) + + if open_duration_dut is not NullValue: + asserts.assert_less_equal(open_duration_dut, 0xFFFFFFFE, "OpenDuration attribute is out of range") + asserts.assert_greater_equal(open_duration_dut, 1, "OpenDuration attribute is out of range") + else: + logging.info("Test step skipped") + + self.step(4) + if attributes.DefaultOpenDuration.attribute_id in attribute_list: + default_open_duration_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.DefaultOpenDuration) + + if default_open_duration_dut is not NullValue: + asserts.assert_less_equal(default_open_duration_dut, 0xFFFFFFFE, "DefaultOpenDuration attribute is out of range") + asserts.assert_greater_equal(default_open_duration_dut, 1, "DefaultOpenDuration attribute is out of range") + else: + logging.info("Test step skipped") + + self.step(5) + if attributes.AutoCloseTime.attribute_id in attribute_list: + auto_close_time_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.AutoCloseTime) + + if auto_close_time_dut is not NullValue: + asserts.assert_less_equal(auto_close_time_dut, 0xFFFFFFFFFFFFFFFE, "OpenDuration attribute is out of range") + else: + logging.info("Test step skipped") + + self.step(6) + if attributes.RemainingDuration.attribute_id in attribute_list: + remaining_duration_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.RemainingDuration) + + if remaining_duration_dut is not NullValue: + asserts.assert_less_equal(remaining_duration_dut, 0xFFFFFFFE, "RemainingDuration attribute is out of range") + asserts.assert_greater_equal(remaining_duration_dut, 1, "RemainingDuration attribute is out of range") + else: + logging.info("Test step skipped") + + self.step(7) + if attributes.CurrentState.attribute_id in attribute_list: + current_state_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.CurrentState) + + if current_state_dut is not NullValue: + asserts.assert_less(current_state_dut, Clusters.Objects.ValveConfigurationAndControl.Enums.ValveStateEnum.kUnknownEnumValue, + "CurrentState is not in valid range") + else: + logging.info("Test step skipped") + + self.step(8) + if attributes.TargetState.attribute_id in attribute_list: + target_state_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.TargetState) + + if target_state_dut is not NullValue: + asserts.assert_less(target_state_dut, Clusters.Objects.ValveConfigurationAndControl.Enums.ValveStateEnum.kUnknownEnumValue, + "TargetState is not in valid range") + else: + logging.info("Test step skipped") + + self.step(9) + if attributes.CurrentLevel.attribute_id in attribute_list: + current_level_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.CurrentLevel) + + if current_level_dut is not NullValue: + asserts.assert_less_equal(current_level_dut, 100, "CurrentLevel attribute is out of range") + asserts.assert_greater_equal(current_level_dut, 0, "CurrentLevel attribute is out of range") + else: + logging.info("Test step skipped") + + self.step(10) + if attributes.TargetLevel.attribute_id in attribute_list: + target_level_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.TargetLevel) + + if target_level_dut is not NullValue: + asserts.assert_less_equal(target_level_dut, 100, "TargetLevel attribute is out of range") + asserts.assert_greater_equal(target_level_dut, 0, "TargetLevel attribute is out of range") + else: + logging.info("Test step skipped") + + self.step(11) + if attributes.DefaultOpenLevel.attribute_id in attribute_list: + default_open_level_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.DefaultOpenLevel) + + if default_open_level_dut is not NullValue: + asserts.assert_less_equal(default_open_level_dut, 100, "DefaultOpenLevel attribute is out of range") + asserts.assert_greater_equal(default_open_level_dut, 1, "DefaultOpenLevel attribute is out of range") + else: + logging.info("Test step skipped") + + self.step(12) + if attributes.ValveFault.attribute_id in attribute_list: + valve_fault_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.ValveFault) + + asserts.assert_less_equal(valve_fault_dut, 0b00000111, "ValveFault is not in valid range") + else: + logging.info("Test step skipped") + + self.step(13) + if attributes.LevelStep.attribute_id in attribute_list: + level_step_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.LevelStep) + + asserts.assert_less_equal(level_step_dut, 50, "LevelStep attribute is out of range") + asserts.assert_greater_equal(level_step_dut, 1, "LevelStep attribute is out of range") + else: + logging.info("Test step skipped") + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/TC_VALCC_3_1.py b/src/python_testing/TC_VALCC_3_1.py new file mode 100644 index 00000000000000..1b73976bdd9aae --- /dev/null +++ b/src/python_testing/TC_VALCC_3_1.py @@ -0,0 +1,117 @@ +# +# Copyright (c) 2023 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import time + +import chip.clusters as Clusters +from chip.clusters.Types import NullValue +from chip.interaction_model import InteractionModelError, Status +from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from mobly import asserts + + +class TC_VALCC_3_1(MatterBaseTest): + async def read_valcc_attribute_expect_success(self, endpoint, attribute): + cluster = Clusters.Objects.ValveConfigurationAndControl + return await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attribute) + + def desc_TC_VALCC_3_1(self) -> str: + return "[TC-VALCC-3.1] Basic state functionality with DUT as Server" + + def steps_TC_VALCC_3_1(self) -> list[TestStep]: + steps = [ + TestStep(1, "Commissioning, already done", is_commissioning=True), + TestStep(2, "Send Open command"), + TestStep(3, "Read TargetState attribute"), + TestStep(4, "Read CurrentState attribute"), + TestStep(5, "Send Close command"), + TestStep(6, "Read TargetState attribute"), + TestStep(7, "Read CurrentState attribute"), + ] + return steps + + def pics_TC_VALCC_3_1(self) -> list[str]: + pics = [ + "VALCC.S", + ] + return pics + + @async_test_body + async def test_TC_VALCC_3_1(self): + + endpoint = self.user_params.get("endpoint", 1) + + self.step(1) + attributes = Clusters.ValveConfigurationAndControl.Attributes + + self.step(2) + try: + await self.send_single_cmd(cmd=Clusters.Objects.ValveConfigurationAndControl.Commands.Open(), endpoint=endpoint) + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.Success, "Unexpected error returned") + pass + + self.step(3) + target_state_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.TargetState) + + asserts.assert_true(target_state_dut is not NullValue, "TargetState is null") + asserts.assert_equal(target_state_dut, Clusters.Objects.ValveConfigurationAndControl.Enums.ValveStateEnum.kOpen, + "TargetState is not the expected value") + + self.step(4) + current_state_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.CurrentState) + asserts.assert_true(current_state_dut is not NullValue, "CurrentState is null") + + while current_state_dut is Clusters.Objects.ValveConfigurationAndControl.Enums.ValveStateEnum.kTransitioning: + time.sleep(1) + + current_state_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.CurrentState) + asserts.assert_true(current_state_dut is not NullValue, "CurrentState is null") + + asserts.assert_equal(current_state_dut, Clusters.Objects.ValveConfigurationAndControl.Enums.ValveStateEnum.kOpen, + "CurrentState is not the expected value") + + self.step(5) + try: + await self.send_single_cmd(cmd=Clusters.Objects.ValveConfigurationAndControl.Commands.Close(), endpoint=endpoint) + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.Success, "Unexpected error returned") + pass + + self.step(6) + target_state_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.TargetState) + + asserts.assert_true(target_state_dut is not NullValue, "TargetState is null") + asserts.assert_equal(target_state_dut, Clusters.Objects.ValveConfigurationAndControl.Enums.ValveStateEnum.kClosed, + "TargetState is not the expected value") + + self.step(7) + current_state_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.CurrentState) + asserts.assert_true(current_state_dut is not NullValue, "CurrentState is null") + + while current_state_dut is Clusters.Objects.ValveConfigurationAndControl.Enums.ValveStateEnum.kTransitioning: + time.sleep(1) + + current_state_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.CurrentState) + asserts.assert_true(current_state_dut is not NullValue, "CurrentState is null") + + asserts.assert_equal(current_state_dut, Clusters.Objects.ValveConfigurationAndControl.Enums.ValveStateEnum.kClosed, + "CurrentState is not the expected value") + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/TC_VALCC_3_2.py b/src/python_testing/TC_VALCC_3_2.py new file mode 100644 index 00000000000000..1cd672f6a3ee2c --- /dev/null +++ b/src/python_testing/TC_VALCC_3_2.py @@ -0,0 +1,138 @@ +# +# Copyright (c) 2023 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import logging +import time + +import chip.clusters as Clusters +from chip.clusters.Types import NullValue +from chip.interaction_model import InteractionModelError, Status +from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from mobly import asserts + + +class TC_VALCC_3_2(MatterBaseTest): + async def read_valcc_attribute_expect_success(self, endpoint, attribute): + cluster = Clusters.Objects.ValveConfigurationAndControl + return await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attribute) + + def desc_TC_VALCC_3_2(self) -> str: + return "[TC-VALCC-3.2] Basic level functionality with DUT as Server" + + def steps_TC_VALCC_3_2(self) -> list[TestStep]: + steps = [ + TestStep(1, "Commissioning, already done", is_commissioning=True), + TestStep(2, "Read FeatureMap attribute"), + TestStep(3, "Send Open command with TargetLevel set to 100"), + TestStep(4, "Read TargetLevel attribute"), + TestStep(5, "Read CurrentLevel attribute"), + TestStep(6, "Send Close command"), + TestStep(7, "Read TargetLevel attribute"), + TestStep(8, "Read CurrentLevel attribute"), + ] + return steps + + def pics_TC_VALCC_3_2(self) -> list[str]: + pics = [ + "VALCC.S", + ] + return pics + + @async_test_body + async def test_TC_VALCC_3_2(self): + + endpoint = self.user_params.get("endpoint", 1) + + self.step(1) + attributes = Clusters.ValveConfigurationAndControl.Attributes + + self.step(2) + feature_map = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.FeatureMap) + + is_lvl_feature_supported = feature_map & Clusters.ValveConfigurationAndControl.Bitmaps.Feature.kLevel + + self.step(3) + if is_lvl_feature_supported: + try: + await self.send_single_cmd(cmd=Clusters.Objects.ValveConfigurationAndControl.Commands.Open(targetLevel=100), endpoint=endpoint) + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.Success, "Unexpected error returned") + pass + else: + logging.info("Test step skipped") + + self.step(4) + if is_lvl_feature_supported: + target_level_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.TargetLevel) + + asserts.assert_true(target_level_dut is not NullValue, "TargetLevel is null") + asserts.assert_equal(target_level_dut, 100, "TargetLevel is not the expected value") + else: + logging.info("Test step skipped") + + self.step(5) + if is_lvl_feature_supported: + current_level_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.CurrentLevel) + asserts.assert_true(current_level_dut is not NullValue, "CurrentLevel is null") + + while current_level_dut != 100: + time.sleep(1) + + current_level_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.CurrentLevel) + asserts.assert_true(current_level_dut is not NullValue, "CurrentLevel is null") + + asserts.assert_equal(current_level_dut, 100, "CurrentLevel is not the expected value") + else: + logging.info("Test step skipped") + + self.step(6) + if is_lvl_feature_supported: + try: + await self.send_single_cmd(cmd=Clusters.Objects.ValveConfigurationAndControl.Commands.Close(), endpoint=endpoint) + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.Success, "Unexpected error returned") + pass + else: + logging.info("Test step skipped") + + self.step(7) + if is_lvl_feature_supported: + target_level_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.TargetLevel) + + asserts.assert_true(target_level_dut is not NullValue, "TargetLevel is null") + asserts.assert_equal(target_level_dut, 0, "TargetLevel is not the expected value") + else: + logging.info("Test step skipped") + + self.step(8) + if is_lvl_feature_supported: + current_level_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.CurrentLevel) + asserts.assert_true(current_level_dut is not NullValue, "CurrentLevel is null") + + while current_level_dut is Clusters.Objects.ValveConfigurationAndControl.Enums.ValveStateEnum.kTransitioning: + time.sleep(1) + + current_level_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.CurrentLevel) + asserts.assert_true(current_level_dut is not NullValue, "CurrentLevel is null") + + asserts.assert_equal(current_level_dut, 0, "CurrentLevel is not the expected value") + else: + logging.info("Test step skipped") + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/TC_VALCC_3_3.py b/src/python_testing/TC_VALCC_3_3.py new file mode 100644 index 00000000000000..d987516e67ccaa --- /dev/null +++ b/src/python_testing/TC_VALCC_3_3.py @@ -0,0 +1,143 @@ +# +# Copyright (c) 2023 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import logging +import time + +import chip.clusters as Clusters +from chip.clusters.Types import NullValue +from chip.interaction_model import InteractionModelError, Status +from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from mobly import asserts + + +class TC_VALCC_3_3(MatterBaseTest): + async def read_valcc_attribute_expect_success(self, endpoint, attribute): + cluster = Clusters.Objects.ValveConfigurationAndControl + return await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attribute) + + def desc_TC_VALCC_3_3(self) -> str: + return "[TC-VALCC-3.3] DefaultOpenLevel functionality with DUT as Server" + + def steps_TC_VALCC_3_3(self) -> list[TestStep]: + steps = [ + TestStep(1, "Commissioning, already done", is_commissioning=True), + TestStep(2, "Read AttributeList attribute"), + TestStep(3, "Read DefaultOpenLevel attribute, if supported"), + TestStep(4, "Send Open command"), + TestStep(5, "Read TargetLevel attribute"), + TestStep(6, "Read CurrentLevel attribute"), + TestStep(7, "Send Close command"), + TestStep(8, "Read TargetLevel attribute"), + TestStep(9, "Read CurrentLevel attribute"), + ] + return steps + + def pics_TC_VALCC_3_3(self) -> list[str]: + pics = [ + "VALCC.S", + ] + return pics + + @async_test_body + async def test_TC_VALCC_3_3(self): + + endpoint = self.user_params.get("endpoint", 1) + + self.step(1) + attributes = Clusters.ValveConfigurationAndControl.Attributes + + self.step(2) + attribute_list = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.AttributeList) + + self.step(3) + if attributes.DefaultOpenLevel.attribute_id in attribute_list: + defaultOpenLevel = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.DefaultOpenLevel) + else: + logging.info("Test step skipped") + + self.step(4) + if attributes.DefaultOpenLevel.attribute_id in attribute_list: + try: + await self.send_single_cmd(cmd=Clusters.Objects.ValveConfigurationAndControl.Commands.Open(), endpoint=endpoint) + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.Success, "Unexpected error returned") + pass + else: + logging.info("Test step skipped") + + self.step(5) + if attributes.DefaultOpenLevel.attribute_id in attribute_list: + target_level_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.TargetLevel) + + asserts.assert_true(target_level_dut is not NullValue, "TargetLevel is null") + asserts.assert_equal(target_level_dut, defaultOpenLevel, "TargetLevel is not the expected value") + else: + logging.info("Test step skipped") + + self.step(6) + if attributes.DefaultOpenLevel.attribute_id in attribute_list: + current_level_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.CurrentLevel) + asserts.assert_true(current_level_dut is not NullValue, "CurrentLevel is null") + + while current_level_dut != defaultOpenLevel: + time.sleep(1) + + current_level_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.CurrentLevel) + asserts.assert_true(current_level_dut is not NullValue, "CurrentLevel is null") + + asserts.assert_equal(current_level_dut, defaultOpenLevel, "CurrentLevel is not the expected value") + else: + logging.info("Test step skipped") + + self.step(7) + if attributes.DefaultOpenLevel.attribute_id in attribute_list: + try: + await self.send_single_cmd(cmd=Clusters.Objects.ValveConfigurationAndControl.Commands.Close(), endpoint=endpoint) + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.Success, "Unexpected error returned") + pass + else: + logging.info("Test step skipped") + + self.step(8) + if attributes.DefaultOpenLevel.attribute_id in attribute_list: + target_level_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.TargetLevel) + + asserts.assert_true(target_level_dut is not NullValue, "TargetLevel is null") + asserts.assert_equal(target_level_dut, 0, "TargetLevel is not the expected value") + else: + logging.info("Test step skipped") + + self.step(9) + if attributes.DefaultOpenLevel.attribute_id in attribute_list: + current_level_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.CurrentLevel) + asserts.assert_true(current_level_dut is not NullValue, "CurrentLevel is null") + + while current_level_dut is Clusters.Objects.ValveConfigurationAndControl.Enums.ValveStateEnum.kTransitioning: + time.sleep(1) + + current_level_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.CurrentLevel) + asserts.assert_true(current_level_dut is not NullValue, "CurrentLevel is null") + + asserts.assert_equal(current_level_dut, 0, "CurrentLevel is not the expected value") + else: + logging.info("Test step skipped") + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/TC_VALCC_3_4.py b/src/python_testing/TC_VALCC_3_4.py new file mode 100644 index 00000000000000..cef6bb81ee5ff0 --- /dev/null +++ b/src/python_testing/TC_VALCC_3_4.py @@ -0,0 +1,105 @@ +# +# Copyright (c) 2023 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import logging + +import chip.clusters as Clusters +from chip.interaction_model import InteractionModelError, Status +from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from mobly import asserts + + +class TC_VALCC_3_4(MatterBaseTest): + async def read_valcc_attribute_expect_success(self, endpoint, attribute): + cluster = Clusters.Objects.ValveConfigurationAndControl + return await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attribute) + + def desc_TC_VALCC_3_4(self) -> str: + return "[TC-VALCC-3.4] LevelStep behavior with DUT as Server" + + def steps_TC_VALCC_3_4(self) -> list[TestStep]: + steps = [ + TestStep(1, "Commissioning, already done", is_commissioning=True), + TestStep(2, "Read AttributeList attribute"), + TestStep(3, "Verify LevelStep is supported"), + TestStep(4, "Read LevelStep attribute"), + TestStep(5, "Verify the supported level values using Open Command"), + TestStep(6, "Send Close command"), + ] + return steps + + def pics_TC_VALCC_3_4(self) -> list[str]: + pics = [ + "VALCC.S", + ] + return pics + + @async_test_body + async def test_TC_VALCC_3_4(self): + + endpoint = self.user_params.get("endpoint", 1) + + self.step(1) + attributes = Clusters.ValveConfigurationAndControl.Attributes + + self.step(2) + attribute_list = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.AttributeList) + + self.step(3) + if attributes.LevelStep.attribute_id not in attribute_list: + logging.info("LevelStep not supported skipping test case") + + # Skipping all remainig steps + for step in self.get_test_steps(self.current_test_info.name)[self.current_step_index:]: + self.step(step.test_plan_number) + logging.info("Test step skipped") + + return + + else: + logging.info("Test step skipped") + + self.step(4) + levelStep = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.LevelStep) + + self.step(5) + + for levelValue in range(1, 100): + try: + await self.send_single_cmd(cmd=Clusters.Objects.ValveConfigurationAndControl.Commands.Open(targetLevel=levelValue), endpoint=endpoint) + + if levelValue % levelStep != 0: + asserts.fail("Received Success response when an CONSTRAINT_ERROR was expected") + + except InteractionModelError as e: + if levelValue % levelStep != 0: + asserts.assert_equal(e.status, Status.ConstraintError, + "Unexpected error returned when an CONSTRAINT_ERROR was expected") + else: + asserts.fail("Unexpected error returned") + pass + + self.step(6) + try: + await self.send_single_cmd(cmd=Clusters.Objects.ValveConfigurationAndControl.Commands.Close(), endpoint=endpoint) + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.Success, "Unexpected error returned") + pass + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/TC_VALCC_4_1.py b/src/python_testing/TC_VALCC_4_1.py new file mode 100644 index 00000000000000..f9a1488ddf754d --- /dev/null +++ b/src/python_testing/TC_VALCC_4_1.py @@ -0,0 +1,107 @@ +# +# Copyright (c) 2023 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import time + +import chip.clusters as Clusters +from chip.clusters.Types import NullValue +from chip.interaction_model import InteractionModelError, Status +from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from mobly import asserts + + +class TC_VALCC_4_1(MatterBaseTest): + async def read_valcc_attribute_expect_success(self, endpoint, attribute): + cluster = Clusters.Objects.ValveConfigurationAndControl + return await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attribute) + + def desc_TC_VALCC_4_1(self) -> str: + return "[TC-VALCC-4.1] Duration functionality with DUT as Server" + + def steps_TC_VALCC_4_1(self) -> list[TestStep]: + steps = [ + TestStep(1, "Commissioning, already done", is_commissioning=True), + TestStep(2, "Send Open command with duration set to 60"), + TestStep(3, "Read OpenDuration attribute"), + TestStep(4, "Read RemainingDuration attribute"), + TestStep(5, "Wait for 5 seconds"), + TestStep(6, "Read RemainingDuration attribute"), + TestStep(7, "Send Close command"), + TestStep(8, "Read OpenDuration attribute"), + TestStep(9, "Read RemainingDuration attribute"), + ] + return steps + + def pics_TC_VALCC_4_1(self) -> list[str]: + pics = [ + "VALCC.S", + ] + return pics + + @async_test_body + async def test_TC_VALCC_4_1(self): + + endpoint = self.user_params.get("endpoint", 1) + + self.step(1) + attributes = Clusters.ValveConfigurationAndControl.Attributes + + self.step(2) + try: + await self.send_single_cmd(cmd=Clusters.Objects.ValveConfigurationAndControl.Commands.Open(openDuration=60), endpoint=endpoint) + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.Success, "Unexpected error returned") + pass + + self.step(3) + open_duration_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.OpenDuration) + asserts.assert_true(open_duration_dut is not NullValue, "OpenDuration is null") + asserts.assert_equal(open_duration_dut, 60, "OpenDuration is not the expected value") + + self.step(4) + remaining_duration_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.RemainingDuration) + asserts.assert_true(remaining_duration_dut is not NullValue, "RemainingDuration is null") + asserts.assert_greater_equal(remaining_duration_dut, 55, "RemainingDuration is not in the expected range") + asserts.assert_less_equal(remaining_duration_dut, 60, "RemainingDuration is not in the expected range") + + self.step(5) + time.sleep(5) + + self.step(6) + remaining_duration_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.RemainingDuration) + asserts.assert_true(remaining_duration_dut is not NullValue, "RemainingDuration is null") + asserts.assert_greater_equal(remaining_duration_dut, 50, "RemainingDuration is not in the expected range") + asserts.assert_less_equal(remaining_duration_dut, 55, "RemainingDuration is not in the expected range") + + self.step(7) + try: + await self.send_single_cmd(cmd=Clusters.Objects.ValveConfigurationAndControl.Commands.Close(), endpoint=endpoint) + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.Success, "Unexpected error returned") + pass + + self.step(8) + open_duration_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.OpenDuration) + asserts.assert_true(open_duration_dut is NullValue, "OpenDuration is not null") + + self.step(9) + remaining_duration_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.RemainingDuration) + asserts.assert_true(remaining_duration_dut is NullValue, "RemainingDuration is not null") + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/TC_VALCC_4_2.py b/src/python_testing/TC_VALCC_4_2.py new file mode 100644 index 00000000000000..85ee4f8d4d34ec --- /dev/null +++ b/src/python_testing/TC_VALCC_4_2.py @@ -0,0 +1,125 @@ +# +# Copyright (c) 2023 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import logging +import time + +import chip.clusters as Clusters +from chip.clusters.Types import NullValue +from chip.interaction_model import InteractionModelError, Status +from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from mobly import asserts + + +class TC_VALCC_4_2(MatterBaseTest): + async def read_valcc_attribute_expect_success(self, endpoint, attribute): + cluster = Clusters.Objects.ValveConfigurationAndControl + return await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attribute) + + def desc_TC_VALCC_4_2(self) -> str: + return "[TC-VALCC-4.2] DefaultOpenDuration functionality with DUT as Server" + + def steps_TC_VALCC_4_2(self) -> list[TestStep]: + steps = [ + TestStep(1, "Commissioning, already done", is_commissioning=True), + TestStep("2a", "Read DefaultOpenDuration attribute"), + TestStep("2b", "Write DefaultOpenDuration attribute"), + TestStep(3, "Send Open command"), + TestStep(4, "Read OpenDuration attribute"), + TestStep(5, "Read RemainingDuration attribute"), + TestStep(6, "Wait for 5 seconds"), + TestStep(7, "Read RemainingDuration attribute"), + TestStep(8, "Send Close command"), + TestStep(9, "Read OpenDuration attribute"), + TestStep(10, "Read RemainingDuration attribute"), + ] + return steps + + def pics_TC_VALCC_4_2(self) -> list[str]: + pics = [ + "VALCC.S", + ] + return pics + + @async_test_body + async def test_TC_VALCC_4_2(self): + + endpoint = self.user_params.get("endpoint", 1) + + self.step(1) + attributes = Clusters.ValveConfigurationAndControl.Attributes + + self.step("2a") + defaultOpenDuration = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.DefaultOpenDuration) + + self.step("2b") + if defaultOpenDuration is NullValue: + defaultOpenDuration = 60 + + result = await self.default_controller.WriteAttribute(self.dut_node_id, [(endpoint, attributes.DefaultOpenDuration(defaultOpenDuration))]) + asserts.assert_equal(result[0].Status, Status.Success, "DefaultOpenDuration write failed") + else: + logging.info("Test step skipped") + + self.step(3) + try: + await self.send_single_cmd(cmd=Clusters.Objects.ValveConfigurationAndControl.Commands.Open(), endpoint=endpoint) + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.Success, "Unexpected error returned") + pass + + self.step(4) + open_duration_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.OpenDuration) + asserts.assert_true(open_duration_dut is not NullValue, "OpenDuration is null") + asserts.assert_equal(open_duration_dut, defaultOpenDuration, "OpenDuration is not the expected value") + + self.step(5) + remaining_duration_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.RemainingDuration) + asserts.assert_true(remaining_duration_dut is not NullValue, "RemainingDuration is null") + asserts.assert_greater_equal(remaining_duration_dut, (defaultOpenDuration - 5), + "RemainingDuration is not in the expected range") + asserts.assert_less_equal(remaining_duration_dut, defaultOpenDuration, "RemainingDuration is not in the expected range") + + self.step(6) + time.sleep(5) + + self.step(7) + remaining_duration_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.RemainingDuration) + asserts.assert_true(remaining_duration_dut is not NullValue, "RemainingDuration is null") + asserts.assert_greater_equal(remaining_duration_dut, (defaultOpenDuration - 10), + "RemainingDuration is not in the expected range") + asserts.assert_less_equal(remaining_duration_dut, (defaultOpenDuration - 5), + "RemainingDuration is not in the expected range") + + self.step(8) + try: + await self.send_single_cmd(cmd=Clusters.Objects.ValveConfigurationAndControl.Commands.Close(), endpoint=endpoint) + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.Success, "Unexpected error returned") + pass + + self.step(9) + open_duration_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.OpenDuration) + asserts.assert_true(open_duration_dut is NullValue, "OpenDuration is not null") + + self.step(10) + remaining_duration_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.RemainingDuration) + asserts.assert_true(remaining_duration_dut is NullValue, "RemainingDuration is not null") + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/TC_VALCC_4_3.py b/src/python_testing/TC_VALCC_4_3.py new file mode 100644 index 00000000000000..5869328958f64a --- /dev/null +++ b/src/python_testing/TC_VALCC_4_3.py @@ -0,0 +1,168 @@ +# +# Copyright (c) 2023 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import logging + +import chip.clusters as Clusters +from chip.clusters.Types import NullValue +from chip.interaction_model import InteractionModelError, Status +from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from mobly import asserts + + +class TC_VALCC_4_3(MatterBaseTest): + async def read_valcc_attribute_expect_success(self, endpoint, attribute): + cluster = Clusters.Objects.ValveConfigurationAndControl + return await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attribute) + + def desc_TC_VALCC_4_3(self) -> str: + return "[TC-VALCC-4.3] AutoCloseTime functionality with DUT as Server" + + def steps_TC_VALCC_4_3(self) -> list[TestStep]: + steps = [ + TestStep(1, "Commissioning, already done", is_commissioning=True), + TestStep(2, "Read FeatureMap attribute"), + TestStep(3, "Verify TimeSync feature is supported"), + TestStep(4, "Send Open command with duration set to 60"), + TestStep(5, "Read UTCTime attribute from TimeSync cluster"), + TestStep(6, "Read AutoCloseTime attribute"), + TestStep(7, "Send Close command"), + TestStep(8, "Read AutoCloseTime attribute"), + TestStep("9a", "Read DefaultOpenDuration attribute"), + TestStep("9b", "Write DefaultOpenDuration attribute"), + TestStep(10, "Send Open command"), + TestStep(11, "Read UTCTime attribute from TimeSync cluster"), + TestStep(12, "Read AutoCloseTime attribute"), + TestStep(13, "Send Close command"), + TestStep(14, "Read AutoCloseTime attribute"), + ] + return steps + + def pics_TC_VALCC_4_3(self) -> list[str]: + pics = [ + "VALCC.S", + ] + return pics + + @async_test_body + async def test_TC_VALCC_4_3(self): + + endpoint = self.user_params.get("endpoint", 1) + + self.step(1) + attributes = Clusters.ValveConfigurationAndControl.Attributes + + self.step(2) + feature_map = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.FeatureMap) + + is_ts_feature_supported = feature_map & Clusters.ValveConfigurationAndControl.Bitmaps.Feature.kTimeSync + + self.step(3) + if not is_ts_feature_supported: + logging.info("TimeSync feature not supported skipping test case") + + # Skipping all remainig steps + for step in self.get_test_steps(self.current_test_info.name)[self.current_step_index:]: + self.step(step.test_plan_number) + logging.info("Test step skipped") + + return + + else: + logging.info("Test step skipped") + + self.step(4) + try: + await self.send_single_cmd(cmd=Clusters.Objects.ValveConfigurationAndControl.Commands.Open(openDuration=60), endpoint=endpoint) + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.Success, "Unexpected error returned") + pass + + self.step(5) + utcTime = await self.read_single_attribute_check_success(endpoint=0, cluster=Clusters.Objects.TimeSynchronization, attribute=Clusters.TimeSynchronization.Attributes.UTCTime) + asserts.assert_true(utcTime is not NullValue, "OpenDuration is null") + + self.step(6) + auto_close_time_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.AutoCloseTime) + + asserts.assert_true(auto_close_time_dut is not NullValue, "AutoCloseTime is null") + asserts.assert_greater_equal(auto_close_time_dut, (utcTime + 55000000), + "AutoCloseTime is not in the expected range") + asserts.assert_less_equal(auto_close_time_dut, (utcTime + 60000000), "AutoCloseTime is not in the expected range") + + self.step(7) + try: + await self.send_single_cmd(cmd=Clusters.Objects.ValveConfigurationAndControl.Commands.Close(), endpoint=endpoint) + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.Success, "Unexpected error returned") + pass + + self.step(8) + auto_close_time_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.AutoCloseTime) + + asserts.assert_true(auto_close_time_dut is NullValue, "AutoCloseTime is not null") + + self.step("9a") + defaultOpenDuration = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.OpenDuration) + + asserts.assert_true(auto_close_time_dut is NullValue, "AutoCloseTime is not null") + + self.step("9b") + if defaultOpenDuration is NullValue: + defaultOpenDuration = 60 + + result = await self.default_controller.WriteAttribute(self.dut_node_id, [(endpoint, attributes.DefaultOpenDuration(defaultOpenDuration))]) + asserts.assert_equal(result[0].Status, Status.Success, "DefaultOpenDuration write failed") + else: + logging.info("Test step skipped") + + self.step(10) + try: + await self.send_single_cmd(cmd=Clusters.Objects.ValveConfigurationAndControl.Commands.Open(), endpoint=endpoint) + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.Success, "Unexpected error returned") + pass + + self.step(11) + utcTime = await self.read_single_attribute_check_success(endpoint=0, cluster=Clusters.Objects.TimeSynchronization, attribute=Clusters.TimeSynchronization.Attributes.UTCTime) + + asserts.assert_true(utcTime is not NullValue, "OpenDuration is null") + + self.step(12) + auto_close_time_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.AutoCloseTime) + + asserts.assert_true(auto_close_time_dut is not NullValue, "AutoCloseTime is null") + asserts.assert_greater_equal(auto_close_time_dut, (utcTime + ((defaultOpenDuration - 5) * 1000000)), + "AutoCloseTime is not in the expected range") + asserts.assert_less_equal(auto_close_time_dut, (utcTime + (defaultOpenDuration * 1000000)), + "AutoCloseTime is not in the expected range") + + self.step(13) + try: + await self.send_single_cmd(cmd=Clusters.Objects.ValveConfigurationAndControl.Commands.Close(), endpoint=endpoint) + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.Success, "Unexpected error returned") + pass + + self.step(14) + auto_close_time_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.AutoCloseTime) + + asserts.assert_true(auto_close_time_dut is NullValue, "AutoCloseTime is not null") + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/TC_VALCC_4_4.py b/src/python_testing/TC_VALCC_4_4.py new file mode 100644 index 00000000000000..0d7d1184dbcda3 --- /dev/null +++ b/src/python_testing/TC_VALCC_4_4.py @@ -0,0 +1,113 @@ +# +# Copyright (c) 2023 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +import time + +import chip.clusters as Clusters +from chip.clusters.Types import NullValue +from chip.interaction_model import InteractionModelError, Status +from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from mobly import asserts + + +class TC_VALCC_4_4(MatterBaseTest): + async def read_valcc_attribute_expect_success(self, endpoint, attribute): + cluster = Clusters.Objects.ValveConfigurationAndControl + return await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attribute) + + def desc_TC_VALCC_4_4(self) -> str: + return "[TC-VALCC-4.4] Auto close functionality with DUT as Server" + + def steps_TC_VALCC_4_4(self) -> list[TestStep]: + steps = [ + TestStep(1, "Commissioning, already done", is_commissioning=True), + TestStep(2, "Send Open command with duration set to 5"), + TestStep(3, "Read OpenDuration attribute"), + TestStep(4, "Read RemainingDuration attribute"), + TestStep(5, "Read CurrentState attribute"), + TestStep(6, "Wait 6 seconds"), + TestStep(7, "Read OpenDuration attribute"), + TestStep(8, "Read RemainingDuration attribute"), + TestStep(9, "Read CurrentState attribute"), + ] + return steps + + def pics_TC_VALCC_4_4(self) -> list[str]: + pics = [ + "VALCC.S", + ] + return pics + + @async_test_body + async def test_TC_VALCC_4_4(self): + + endpoint = self.user_params.get("endpoint", 1) + + self.step(1) + attributes = Clusters.ValveConfigurationAndControl.Attributes + + self.step(2) + try: + await self.send_single_cmd(cmd=Clusters.Objects.ValveConfigurationAndControl.Commands.Open(openDuration=5), endpoint=endpoint) + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.Success, "Unexpected error returned") + pass + + self.step(3) + open_duration_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.OpenDuration) + asserts.assert_true(open_duration_dut is not NullValue, "OpenDuration is null") + asserts.assert_equal(open_duration_dut, 5, "OpenDuration is not the expected value") + + self.step(4) + remaining_duration_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.RemainingDuration) + asserts.assert_true(remaining_duration_dut is not NullValue, "RemainingDuration is null") + asserts.assert_greater_equal(remaining_duration_dut, 1, "RemainingDuration is not in the expected range") + asserts.assert_less_equal(remaining_duration_dut, 5, "RemainingDuration is not in the expected range") + + self.step(5) + current_state_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.CurrentState) + asserts.assert_true(current_state_dut is not NullValue, "CurrentState is null") + + while current_state_dut is Clusters.Objects.ValveConfigurationAndControl.Enums.ValveStateEnum.kTransitioning: + time.sleep(1) + + current_state_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.CurrentState) + asserts.assert_true(current_state_dut is not NullValue, "CurrentState is null") + + asserts.assert_equal(current_state_dut, Clusters.Objects.ValveConfigurationAndControl.Enums.ValveStateEnum.kOpen, + "CurrentState is not the expected value") + + self.step(6) + time.sleep(6) + + self.step(7) + open_duration_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.OpenDuration) + asserts.assert_true(open_duration_dut is NullValue, "OpenDuration is not null") + + self.step(8) + remaining_duration_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.RemainingDuration) + asserts.assert_true(remaining_duration_dut is NullValue, "RemainingDuration is not null") + + self.step(9) + current_state_dut = await self.read_valcc_attribute_expect_success(endpoint=endpoint, attribute=attributes.CurrentState) + asserts.assert_true(current_state_dut is not NullValue, "CurrentState is null") + asserts.assert_equal(current_state_dut, Clusters.Objects.ValveConfigurationAndControl.Enums.ValveStateEnum.kClosed, + "CurrentState is not the expected value") + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/TC_VCC_2_1.py b/src/python_testing/TC_VCC_2_1.py deleted file mode 100644 index 9d976e377e7e57..00000000000000 --- a/src/python_testing/TC_VCC_2_1.py +++ /dev/null @@ -1,142 +0,0 @@ -# -# Copyright (c) 2023 Project CHIP Authors -# All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import logging - -import chip.clusters as Clusters -from chip.clusters.Types import NullValue -from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main -from mobly import asserts - - -class TC_VCC_2_1(MatterBaseTest): - async def read_ts_attribute_expect_success(self, endpoint, attribute): - cluster = Clusters.Objects.ValveConfigurationAndControl - return await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attribute) - - @async_test_body - async def test_TC_VCC_2_1(self): - - endpoint = self.user_params.get("endpoint", 1) - - self.print_step(1, "Commissioning, already done") - attributes = Clusters.ValveConfigurationAndControl.Attributes - - self.print_step(2, "Read attribute list to determine supported attributes") - attribute_list = await self.read_ts_attribute_expect_success(endpoint=endpoint, attribute=attributes.AttributeList) - - print(attribute_list) - - self.print_step(3, "Read OpenDuration attribute, if supported") - if attributes.OpenDuration.attribute_id in attribute_list: - open_duration_dut = await self.read_ts_attribute_expect_success(endpoint=endpoint, attribute=attributes.OpenDuration) - - if open_duration_dut is not NullValue: - asserts.assert_less_equal(open_duration_dut, 0xFFFFFFFE, "OpenDuration attribute is out of range") - asserts.assert_greater_equal(open_duration_dut, 1, "OpenDuration attribute is out of range") - else: - logging.info("Test step skipped") - - self.print_step(4, "Read AutoCloseTime attribute, if supported") - if attributes.AutoCloseTime.attribute_id in attribute_list: - auto_close_time_dut = await self.read_ts_attribute_expect_success(endpoint=endpoint, attribute=attributes.AutoCloseTime) - - if auto_close_time_dut is not NullValue: - asserts.assert_less_equal(auto_close_time_dut, 0xFFFFFFFFFFFFFFFE, "OpenDuration attribute is out of range") - else: - logging.info("Test step skipped") - - self.print_step(5, "Read RemainingDuration attribute, if supported") - if attributes.RemainingDuration.attribute_id in attribute_list: - remaining_duration_dut = await self.read_ts_attribute_expect_success(endpoint=endpoint, attribute=attributes.RemainingDuration) - - if remaining_duration_dut is not NullValue: - asserts.assert_less_equal(remaining_duration_dut, 0xFFFFFFFE, "RemainingDuration attribute is out of range") - asserts.assert_greater_equal(remaining_duration_dut, 1, "RemainingDuration attribute is out of range") - else: - logging.info("Test step skipped") - - self.print_step(6, "Read CurrentState attribute, if supported") - if attributes.CurrentState.attribute_id in attribute_list: - current_state_dut = await self.read_ts_attribute_expect_success(endpoint=endpoint, attribute=attributes.CurrentState) - - if current_state_dut is not NullValue: - asserts.assert_less(current_state_dut, Clusters.Objects.ValveConfigurationAndControl.Enums.ValveStateEnum.kUnknownEnumValue, - "CurrentState is not in valid range") - else: - logging.info("Test step skipped") - - self.print_step(7, "Read TargetState attribute, if supported") - if attributes.TargetState.attribute_id in attribute_list: - target_state_dut = await self.read_ts_attribute_expect_success(endpoint=endpoint, attribute=attributes.TargetState) - - if target_state_dut is not NullValue: - asserts.assert_less(target_state_dut, Clusters.Objects.ValveConfigurationAndControl.Enums.ValveStateEnum.kUnknownEnumValue, - "TargetState is not in valid range") - else: - logging.info("Test step skipped") - - self.print_step(8, "Read StartUpState attribute, if supported") - if attributes.StartUpState.attribute_id in attribute_list: - start_up_state_dut = await self.read_ts_attribute_expect_success(endpoint=endpoint, attribute=attributes.StartUpState) - - asserts.assert_less(start_up_state_dut, Clusters.Objects.ValveConfigurationAndControl.Enums.ValveStateEnum.kUnknownEnumValue, - "StartUpState is not in valid range") - else: - logging.info("Test step skipped") - - self.print_step(9, "Read CurrentLevel attribute, if supported") - if attributes.CurrentLevel.attribute_id in attribute_list: - current_level_dut = await self.read_ts_attribute_expect_success(endpoint=endpoint, attribute=attributes.CurrentLevel) - - if current_level_dut is not NullValue: - asserts.assert_less_equal(current_level_dut, 100, "CurrentLevel attribute is out of range") - asserts.assert_greater_equal(current_level_dut, 0, "CurrentLevel attribute is out of range") - else: - logging.info("Test step skipped") - - self.print_step(10, "Read TargetLevel attribute, if supported") - if attributes.TargetLevel.attribute_id in attribute_list: - target_level_dut = await self.read_ts_attribute_expect_success(endpoint=endpoint, attribute=attributes.TargetLevel) - - if target_level_dut is not NullValue: - asserts.assert_less_equal(target_level_dut, 100, "TargetLevel attribute is out of range") - asserts.assert_greater_equal(target_level_dut, 0, "TargetLevel attribute is out of range") - else: - logging.info("Test step skipped") - - self.print_step(11, "Read OpenLevel attribute, if supported") - if attributes.OpenLevel.attribute_id in attribute_list: - open_level_dut = await self.read_ts_attribute_expect_success(endpoint=endpoint, attribute=attributes.OpenLevel) - - if open_level_dut is not NullValue: - asserts.assert_less_equal(open_level_dut, 100, "OpenLevel attribute is out of range") - asserts.assert_greater_equal(open_level_dut, 1, "OpenLevel attribute is out of range") - else: - logging.info("Test step skipped") - - self.print_step(12, "Read ValveFault attribute, if supported") - if attributes.ValveFault.attribute_id in attribute_list: - valve_fault_dut = await self.read_ts_attribute_expect_success(endpoint=endpoint, attribute=attributes.ValveFault) - - asserts.assert_less_equal(valve_fault_dut, 0b00000111, "ValveFault is not in valid range") - else: - logging.info("Test step skipped") - - -if __name__ == "__main__": - default_matter_test_main() diff --git a/src/python_testing/matter_testing_support.py b/src/python_testing/matter_testing_support.py index 8b6a6007cd5e44..2cc23e41952315 100644 --- a/src/python_testing/matter_testing_support.py +++ b/src/python_testing/matter_testing_support.py @@ -736,7 +736,7 @@ async def read_single_attribute( async def read_single_attribute_check_success( self, cluster: Clusters.ClusterObjects.ClusterCommand, attribute: Clusters.ClusterObjects.ClusterAttributeDescriptor, - dev_ctrl: ChipDeviceCtrl = None, node_id: int = None, endpoint: int = None, assert_on_error: bool = True, test_name: str = "") -> object: + dev_ctrl: ChipDeviceCtrl = None, node_id: int = None, endpoint: int = None, fabric_filtered: bool = True, assert_on_error: bool = True, test_name: str = "") -> object: if dev_ctrl is None: dev_ctrl = self.default_controller if node_id is None: @@ -744,7 +744,7 @@ async def read_single_attribute_check_success( if endpoint is None: endpoint = self.matter_test_config.endpoint - result = await dev_ctrl.ReadAttribute(node_id, [(endpoint, attribute)]) + result = await dev_ctrl.ReadAttribute(node_id, [(endpoint, attribute)], fabricFiltered=fabric_filtered) attr_ret = result[endpoint][cluster][attribute] read_err_msg = f"Error reading {str(cluster)}:{str(attribute)} = {attr_ret}" desired_type = attribute.attribute_type.Type @@ -768,7 +768,7 @@ async def read_single_attribute_check_success( async def read_single_attribute_expect_error( self, cluster: object, attribute: object, error: Status, dev_ctrl: ChipDeviceCtrl = None, node_id: int = None, endpoint: int = None, - assert_on_error: bool = True, test_name: str = "") -> object: + fabric_filtered: bool = True, assert_on_error: bool = True, test_name: str = "") -> object: if dev_ctrl is None: dev_ctrl = self.default_controller if node_id is None: @@ -776,7 +776,7 @@ async def read_single_attribute_expect_error( if endpoint is None: endpoint = self.matter_test_config.endpoint - result = await dev_ctrl.ReadAttribute(node_id, [(endpoint, attribute)]) + result = await dev_ctrl.ReadAttribute(node_id, [(endpoint, attribute)], fabricFiltered=fabric_filtered) attr_ret = result[endpoint][cluster][attribute] err_msg = "Did not see expected error when reading {}:{}".format(str(cluster), str(attribute)) error_type_ok = attr_ret is not None and isinstance( diff --git a/third_party/openthread/repo b/third_party/openthread/repo index d81c6fab98df8f..f1e74a036b5bd2 160000 --- a/third_party/openthread/repo +++ b/third_party/openthread/repo @@ -1 +1 @@ -Subproject commit d81c6fab98df8fbeb0f3611ce5ec4c131c84cbce +Subproject commit f1e74a036b5bd2e9dd6565161ab806cc854dc0b4 diff --git a/third_party/qpg_sdk/BUILD.gn b/third_party/qpg_sdk/BUILD.gn index 7a18cb51dbdf2f..e20c43ddb672a4 100755 --- a/third_party/qpg_sdk/BUILD.gn +++ b/third_party/qpg_sdk/BUILD.gn @@ -220,6 +220,41 @@ static_library("qpg_lock_factorydata_lib") { public_configs = [ ":qpg_retain_factorydata" ] } +qpg_make_build("qpg_switch_factorydata") { + make_sources = [ "${qpg_sdk_root}/Tools/FactoryData" ] + make_output = [ "${target_gen_dir}/${qpg_sdk_lib_dir}/FactoryData_switch_static_pake/libFactoryData_switch_static_pake.a" ] + make_args = [ + "-f", + rebase_path(qpg_sdk_root, root_build_dir) + + "/Libraries/Qorvo/FactoryData/Makefile.FactoryData_switch_static_pake", + "WORKDIR=" + rebase_path(target_gen_dir, root_build_dir) + + "/${qpg_sdk_lib_dir}/FactoryData_switch_static_pake", + ] +} + +static_library("qpg_switch_factorydata_lib") { + deps = [ "${chip_root}/third_party/qpg_sdk:qpg_switch_factorydata" ] + libs = [ "${target_gen_dir}/${qpg_sdk_lib_dir}/FactoryData_switch_static_pake/libFactoryData_switch_static_pake.a" ] + public_configs = [ ":qpg_retain_factorydata" ] +} + +qpg_make_build("qpg_thermostat_factorydata") { + make_sources = [ "${qpg_sdk_root}/Tools/FactoryData" ] + make_output = [ "${target_gen_dir}/${qpg_sdk_lib_dir}/FactoryData_thermostaticRadiatorValve_static_pake/libFactoryData_thermostaticRadiatorValve_static_pake.a" ] + make_args = [ + "-f", + rebase_path(qpg_sdk_root, root_build_dir) + "/Libraries/Qorvo/FactoryData/Makefile.FactoryData_thermostaticRadiatorValve_static_pake", + "WORKDIR=" + rebase_path(target_gen_dir, root_build_dir) + + "/${qpg_sdk_lib_dir}/FactoryData_thermostaticRadiatorValve_static_pake", + ] +} + +static_library("qpg_thermostat_factorydata_lib") { + deps = [ "${chip_root}/third_party/qpg_sdk:qpg_thermostat_factorydata" ] + libs = [ "${target_gen_dir}/${qpg_sdk_lib_dir}/FactoryData_thermostaticRadiatorValve_static_pake/libFactoryData_thermostaticRadiatorValve_static_pake.a" ] + public_configs = [ ":qpg_retain_factorydata" ] +} + config("qpg_retain_factorydata") { ldflags = [ "-Wl,-u_binary_factory_data_bin_start", @@ -258,3 +293,34 @@ static_library("qpg_lock_firmwaredata_lib") { deps = [ "${chip_root}/third_party/qpg_sdk:qpg_lock_firmwaredata" ] libs = [ "${target_gen_dir}/${qpg_sdk_lib_dir}/FirmwareData_lock/libFirmwareData_lock.a" ] } + +qpg_make_build("qpg_switch_firmwaredata") { + make_sources = [ "${qpg_sdk_root}/Tools/FactoryData" ] + make_output = [ "${target_gen_dir}/${qpg_sdk_lib_dir}/FirmwareData_switch/libFirmwareData_switch.a" ] + make_args = [ + "-f", + rebase_path(qpg_sdk_root, root_build_dir) + + "/Libraries/Qorvo/FactoryData/Makefile.FirmwareData_switch", + "WORKDIR=" + rebase_path(target_gen_dir, root_build_dir) + + "/${qpg_sdk_lib_dir}/FirmwareData_switch", + ] +} +static_library("qpg_switch_firmwaredata_lib") { + deps = [ "${chip_root}/third_party/qpg_sdk:qpg_switch_firmwaredata" ] + libs = [ "${target_gen_dir}/${qpg_sdk_lib_dir}/FirmwareData_switch/libFirmwareData_switch.a" ] +} + +qpg_make_build("qpg_thermostat_firmwaredata") { + make_sources = [ "${qpg_sdk_root}/Tools/FactoryData" ] + make_output = [ "${target_gen_dir}/${qpg_sdk_lib_dir}/FirmwareData_thermostaticRadiatorValve/libFirmwareData_thermostaticRadiatorValve.a" ] + make_args = [ + "-f", + rebase_path(qpg_sdk_root, root_build_dir) + "/Libraries/Qorvo/FactoryData/Makefile.FirmwareData_thermostaticRadiatorValve", + "WORKDIR=" + rebase_path(target_gen_dir, root_build_dir) + + "/${qpg_sdk_lib_dir}/FirmwareData_thermostaticRadiatorValve", + ] +} +static_library("qpg_thermostat_firmwaredata_lib") { + deps = [ "${chip_root}/third_party/qpg_sdk:qpg_thermostat_firmwaredata" ] + libs = [ "${target_gen_dir}/${qpg_sdk_lib_dir}/FirmwareData_thermostaticRadiatorValve/libFirmwareData_thermostaticRadiatorValve.a" ] +} diff --git a/third_party/qpg_sdk/repo b/third_party/qpg_sdk/repo index 4c62599844eed5..e47e299445caf8 160000 --- a/third_party/qpg_sdk/repo +++ b/third_party/qpg_sdk/repo @@ -1 +1 @@ -Subproject commit 4c62599844eed5e956b32b8d5d5dfdab5a77778b +Subproject commit e47e299445caf8f139e2270e848e628167dca5cb 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 7f8664022616bb..6f3fba5935f84d 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 { @@ -9037,42 +8730,11 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) namespace MicrowaveOvenControl { namespace Attributes { -namespace FeatureMap { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +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::MicrowaveOvenControl::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::MicrowaveOvenControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); -} - -} // namespace FeatureMap - -namespace ClusterRevision { - -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::MicrowaveOvenControl::Id, Id, readable, sizeof(temp)); @@ -9238,17 +8900,17 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) } // namespace Attributes } // namespace RvcOperationalState -namespace HepaFilterMonitoring { +namespace ScenesManagement { namespace Attributes { -namespace ClusterRevision { +namespace SceneCount { -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::HepaFilterMonitoring::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)) { @@ -9257,9 +8919,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; @@ -9267,26 +8929,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::HepaFilterMonitoring::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ScenesManagement::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace HepaFilterMonitoring - -namespace ActivatedCarbonFilterMonitoring { -namespace Attributes { +} // 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::ActivatedCarbonFilterMonitoring::Id, Id, readable, sizeof(temp)); + uint8_t * readable = Traits::ToAttributeStoreRepresentation(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)) { @@ -9295,9 +8950,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; @@ -9305,25 +8960,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::ActivatedCarbonFilterMonitoring::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ScenesManagement::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace ActivatedCarbonFilterMonitoring - -namespace BooleanStateConfiguration { -namespace Attributes { +} // namespace CurrentScene -namespace SupportedSensitivityLevels { +namespace CurrentGroup { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_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::BooleanStateConfiguration::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)) { @@ -9332,9 +8981,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, chip::GroupId value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -9342,19 +8991,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::BooleanStateConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ScenesManagement::Id, Id, writable, ZCL_GROUP_ID_ATTRIBUTE_TYPE); } -} // namespace SupportedSensitivityLevels +} // namespace CurrentGroup -namespace DefaultSensitivityLevel { +namespace SceneValid { -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::BooleanStateConfiguration::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)) { @@ -9363,9 +9012,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; @@ -9373,19 +9022,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::BooleanStateConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ScenesManagement::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); } -} // namespace DefaultSensitivityLevel +} // namespace SceneValid -namespace AlarmsActive { +namespace NameSupport { -EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * 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::BooleanStateConfiguration::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)) { @@ -9394,9 +9043,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask 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; @@ -9404,50 +9053,72 @@ 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::BooleanStateConfiguration::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, chip::BitMask 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::BooleanStateConfiguration::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ScenesManagement::Id, Id, writable, ZCL_NODE_ID_ATTRIBUTE_TYPE); } -} // namespace AlarmsSuppressed +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 AlarmsEnabled { +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } -EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) + return Set(endpoint, value.Value()); +} + +} // namespace LastConfiguredBy + +namespace SceneTableSize { + +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::BooleanStateConfiguration::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)) { @@ -9456,9 +9127,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; @@ -9466,19 +9137,19 @@ EmberAfStatus Set(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::BooleanStateConfiguration::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)) { @@ -9487,9 +9158,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; @@ -9497,20 +9168,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::BooleanStateConfiguration::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)) { @@ -9519,9 +9189,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(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; @@ -9529,19 +9199,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::BooleanStateConfiguration::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::HepaFilterMonitoring::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -9550,9 +9226,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; @@ -9560,10 +9236,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::BooleanStateConfiguration::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::HepaFilterMonitoring::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace FeatureMap +} // namespace ClusterRevision + +} // namespace Attributes +} // namespace HepaFilterMonitoring + +namespace ActivatedCarbonFilterMonitoring { +namespace Attributes { namespace ClusterRevision { @@ -9571,8 +9253,9 @@ 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::BooleanStateConfiguration::Id, Id, readable, sizeof(temp)); + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = + emberAfReadAttribute(endpoint, Clusters::ActivatedCarbonFilterMonitoring::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -9591,797 +9274,36 @@ 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::BooleanStateConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ActivatedCarbonFilterMonitoring::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } } // namespace ClusterRevision } // namespace Attributes -} // namespace BooleanStateConfiguration +} // namespace ActivatedCarbonFilterMonitoring -namespace ValveConfigurationAndControl { +namespace BooleanStateConfiguration { namespace Attributes { -namespace OpenDuration { +namespace SupportedSensitivityLevels { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & 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::ValveConfigurationAndControl::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { - value.SetNonNull() = Traits::StorageToWorking(temp); + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } + *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; - 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::ValveConfigurationAndControl::Id, Id, writable, ZCL_ELAPSED_S_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::ValveConfigurationAndControl::Id, Id, writable, ZCL_ELAPSED_S_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 OpenDuration - -namespace DefaultOpenDuration { - -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::ValveConfigurationAndControl::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, uint32_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::ValveConfigurationAndControl::Id, Id, writable, ZCL_ELAPSED_S_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::ValveConfigurationAndControl::Id, Id, writable, ZCL_ELAPSED_S_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 DefaultOpenDuration - -namespace AutoCloseTime { - -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::ValveConfigurationAndControl::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, uint64_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::ValveConfigurationAndControl::Id, Id, writable, ZCL_EPOCH_US_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::ValveConfigurationAndControl::Id, Id, writable, ZCL_EPOCH_US_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 AutoCloseTime - -namespace CurrentState { - -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::ValveConfigurationAndControl::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, chip::app::Clusters::ValveConfigurationAndControl::ValveStateEnum 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::ValveConfigurationAndControl::Id, Id, writable, ZCL_ENUM8_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::ValveConfigurationAndControl::Id, Id, writable, ZCL_ENUM8_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 CurrentState - -namespace TargetState { - -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::ValveConfigurationAndControl::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, chip::app::Clusters::ValveConfigurationAndControl::ValveStateEnum 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::ValveConfigurationAndControl::Id, Id, writable, ZCL_ENUM8_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::ValveConfigurationAndControl::Id, Id, writable, ZCL_ENUM8_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 TargetState - -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::ValveConfigurationAndControl::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, chip::Percent 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::ValveConfigurationAndControl::Id, Id, writable, ZCL_PERCENT_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::ValveConfigurationAndControl::Id, Id, writable, ZCL_PERCENT_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 TargetLevel { - -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::ValveConfigurationAndControl::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, chip::Percent 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::ValveConfigurationAndControl::Id, Id, writable, ZCL_PERCENT_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::ValveConfigurationAndControl::Id, Id, writable, ZCL_PERCENT_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 TargetLevel - -namespace DefaultOpenLevel { - -EmberAfStatus Get(chip::EndpointId endpoint, chip::Percent * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ValveConfigurationAndControl::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::Percent 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::ValveConfigurationAndControl::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE); -} - -} // namespace DefaultOpenLevel - -namespace ValveFault { - -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::ValveConfigurationAndControl::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::ValveConfigurationAndControl::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); -} - -} // namespace ValveFault - -namespace LevelStep { - -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::ValveConfigurationAndControl::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::ValveConfigurationAndControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); -} - -} // namespace LevelStep - -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::ValveConfigurationAndControl::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::ValveConfigurationAndControl::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::ValveConfigurationAndControl::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::ValveConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace ValveConfigurationAndControl - -namespace ElectricalEnergyMeasurement { -namespace Attributes { - -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::ElectricalEnergyMeasurement::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::ElectricalEnergyMeasurement::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::ElectricalEnergyMeasurement::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::ElectricalEnergyMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); -} - -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace ElectricalEnergyMeasurement - -namespace DemandResponseLoadControl { -namespace Attributes { - -namespace NumberOfLoadControlPrograms { - -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::DemandResponseLoadControl::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::DemandResponseLoadControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); -} - -} // namespace NumberOfLoadControlPrograms - -namespace NumberOfEventsPerProgram { - -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::DemandResponseLoadControl::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::DemandResponseLoadControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); -} - -} // namespace NumberOfEventsPerProgram - -namespace NumberOfTransitions { - -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::DemandResponseLoadControl::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::DemandResponseLoadControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); -} - -} // namespace NumberOfTransitions - -namespace DefaultRandomStart { - -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::DemandResponseLoadControl::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::DemandResponseLoadControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); -} - -} // namespace DefaultRandomStart - -namespace DefaultRandomDuration { - -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::DemandResponseLoadControl::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::DemandResponseLoadControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); -} - -} // namespace DefaultRandomDuration - -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::DemandResponseLoadControl::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; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -10389,19 +9311,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::DemandResponseLoadControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace FeatureMap +} // namespace SupportedSensitivityLevels -namespace ClusterRevision { +namespace DefaultSensitivityLevel { -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::DemandResponseLoadControl::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -10410,9 +9332,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; @@ -10420,25 +9342,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::DemandResponseLoadControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace ClusterRevision - -} // namespace Attributes -} // namespace DemandResponseLoadControl - -namespace DeviceEnergyManagement { -namespace Attributes { +} // namespace DefaultSensitivityLevel -namespace ESAType { +namespace AlarmsActive { -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::DeviceEnergyManagement::ESATypeEnum * 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::DeviceEnergyManagement::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -10447,9 +9363,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::DeviceEnergyMa *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::DeviceEnergyManagement::ESATypeEnum 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; @@ -10457,19 +9373,19 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::DeviceEnergyMa Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DeviceEnergyManagement::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } -} // namespace ESAType +} // namespace AlarmsActive -namespace ESACanGenerate { +namespace AlarmsSuppressed { -EmberAfStatus Get(chip::EndpointId endpoint, bool * 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::DeviceEnergyManagement::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -10478,9 +9394,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, chip::BitMask value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -10488,19 +9404,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::DeviceEnergyManagement::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } -} // namespace ESACanGenerate +} // namespace AlarmsSuppressed -namespace ESAState { +namespace AlarmsEnabled { -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::DeviceEnergyManagement::ESAStateEnum * 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::DeviceEnergyManagement::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -10509,9 +9425,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::DeviceEnergyMa *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::DeviceEnergyManagement::ESAStateEnum 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; @@ -10519,19 +9435,19 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::DeviceEnergyMa Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DeviceEnergyManagement::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } -} // namespace ESAState +} // namespace AlarmsEnabled -namespace AbsMinPower { +namespace AlarmsSupported { -EmberAfStatus Get(chip::EndpointId endpoint, int64_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::DeviceEnergyManagement::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -10540,9 +9456,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, int64_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, int64_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; @@ -10550,19 +9466,20 @@ EmberAfStatus Set(chip::EndpointId endpoint, int64_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DeviceEnergyManagement::Id, Id, writable, ZCL_POWER_MW_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } -} // namespace AbsMinPower +} // namespace AlarmsSupported -namespace AbsMaxPower { +namespace SensorFault { -EmberAfStatus Get(chip::EndpointId endpoint, int64_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::DeviceEnergyManagement::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -10571,9 +9488,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, int64_t * value) *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, int64_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; @@ -10581,10 +9498,10 @@ EmberAfStatus Set(chip::EndpointId endpoint, int64_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DeviceEnergyManagement::Id, Id, writable, ZCL_POWER_MW_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); } -} // namespace AbsMaxPower +} // namespace SensorFault namespace FeatureMap { @@ -10593,7 +9510,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::DeviceEnergyManagement::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -10612,7 +9529,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::DeviceEnergyManagement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } } // namespace FeatureMap @@ -10624,7 +9541,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::DeviceEnergyManagement::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -10643,25 +9560,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::DeviceEnergyManagement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } } // namespace ClusterRevision } // namespace Attributes -} // namespace DeviceEnergyManagement +} // namespace BooleanStateConfiguration -namespace EnergyEvse { +namespace ValveConfigurationAndControl { namespace Attributes { -namespace State { +namespace OpenDuration { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & 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::EnergyEvse::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (Traits::IsNullValue(temp)) { @@ -10673,9 +9590,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -10683,20 +9600,19 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::EnergyEvse::St Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ELAPSED_S_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::EnergyEvse::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ELAPSED_S_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()) { @@ -10706,78 +9622,69 @@ EmberAfStatus Set(chip::EndpointId endpoint, return Set(endpoint, value.Value()); } -} // namespace State +} // namespace OpenDuration -namespace SupplyState { +namespace DefaultOpenDuration { -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::EnergyEvse::SupplyStateEnum * 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::EnergyEvse::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ValveConfigurationAndControl::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, chip::app::Clusters::EnergyEvse::SupplyStateEnum value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t 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::EnergyEvse::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE); } -} // namespace SupplyState - -namespace FaultState { - -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::EnergyEvse::FaultStateEnum * value) +EmberAfStatus SetNull(chip::EndpointId endpoint) { - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::EnergyEvse::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; + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::EnergyEvse::FaultStateEnum value) + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + if (value.IsNull()) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + return SetNull(endpoint); } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + + return Set(endpoint, value.Value()); } -} // namespace FaultState +} // namespace DefaultOpenDuration -namespace ChargingEnabledUntil { +namespace AutoCloseTime { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & 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::EnergyEvse::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (Traits::IsNullValue(temp)) { @@ -10789,9 +9696,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & val } return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint64_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -10799,19 +9706,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::EnergyEvse::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_EPOCH_US_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::EnergyEvse::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_EPOCH_US_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()) { @@ -10821,16 +9728,17 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl return Set(endpoint, value.Value()); } -} // namespace ChargingEnabledUntil +} // namespace AutoCloseTime -namespace DischargingEnabledUntil { +namespace CurrentState { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & 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::EnergyEvse::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (Traits::IsNullValue(temp)) { @@ -10842,9 +9750,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & val } return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::ValveConfigurationAndControl::ValveStateEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -10852,19 +9760,20 @@ 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::EnergyEvse::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::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::EnergyEvse::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::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()) { @@ -10874,171 +9783,177 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl return Set(endpoint, value.Value()); } -} // namespace DischargingEnabledUntil +} // namespace CurrentState -namespace CircuitCapacity { +namespace TargetState { -EmberAfStatus Get(chip::EndpointId endpoint, int64_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::EnergyEvse::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ValveConfigurationAndControl::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, int64_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::ValveConfigurationAndControl::ValveStateEnum 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::ValveConfigurationAndControl::Id, Id, writable, ZCL_ENUM8_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::ValveConfigurationAndControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); +} + +EmberAfStatus Set(chip::EndpointId endpoint, + const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + return SetNull(endpoint); } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_AMPERAGE_MA_ATTRIBUTE_TYPE); + + return Set(endpoint, value.Value()); } -} // namespace CircuitCapacity +} // namespace TargetState -namespace MinimumChargeCurrent { +namespace CurrentLevel { -EmberAfStatus Get(chip::EndpointId endpoint, int64_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::EnergyEvse::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ValveConfigurationAndControl::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, int64_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::Percent 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::EnergyEvse::Id, Id, writable, ZCL_AMPERAGE_MA_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE); } -} // namespace MinimumChargeCurrent - -namespace MaximumChargeCurrent { - -EmberAfStatus Get(chip::EndpointId endpoint, int64_t * value) +EmberAfStatus SetNull(chip::EndpointId endpoint) { - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::EnergyEvse::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; + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, int64_t value) + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + if (value.IsNull()) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + return SetNull(endpoint); } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_AMPERAGE_MA_ATTRIBUTE_TYPE); + + return Set(endpoint, value.Value()); } -} // namespace MaximumChargeCurrent +} // namespace CurrentLevel -namespace MaximumDischargeCurrent { +namespace TargetLevel { -EmberAfStatus Get(chip::EndpointId endpoint, int64_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::EnergyEvse::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ValveConfigurationAndControl::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, int64_t value) +EmberAfStatus Set(chip::EndpointId endpoint, chip::Percent 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::EnergyEvse::Id, Id, writable, ZCL_AMPERAGE_MA_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE); } -} // namespace MaximumDischargeCurrent - -namespace UserMaximumChargeCurrent { - -EmberAfStatus Get(chip::EndpointId endpoint, int64_t * value) +EmberAfStatus SetNull(chip::EndpointId endpoint) { - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::EnergyEvse::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; + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, int64_t value) + +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) { - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + if (value.IsNull()) { - return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; + return SetNull(endpoint); } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_AMPERAGE_MA_ATTRIBUTE_TYPE); + + return Set(endpoint, value.Value()); } -} // namespace UserMaximumChargeCurrent +} // namespace TargetLevel -namespace RandomizationDelayWindow { +namespace DefaultOpenLevel { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::Percent * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::EnergyEvse::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -11047,9 +9962,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, chip::Percent value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -11057,19 +9972,20 @@ 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::EnergyEvse::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE); } -} // namespace RandomizationDelayWindow +} // namespace DefaultOpenLevel -namespace NumberOfWeeklyTargets { +namespace ValveFault { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_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::EnergyEvse::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -11078,9 +9994,10 @@ 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, + chip::BitMask value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -11088,19 +10005,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::EnergyEvse::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); } -} // namespace NumberOfWeeklyTargets +} // namespace ValveFault -namespace NumberOfDailyTargets { +namespace LevelStep { 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::EnergyEvse::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { @@ -11119,648 +10036,443 @@ 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::EnergyEvse::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace NumberOfDailyTargets +} // namespace LevelStep -namespace NextChargeStartTime { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +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::EnergyEvse::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ValveConfigurationAndControl::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, uint32_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_EPOCH_S_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::EnergyEvse::Id, Id, writable, ZCL_EPOCH_S_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 NextChargeStartTime - -namespace NextChargeTargetTime { - -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::EnergyEvse::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } + *value = Traits::StorageToWorking(temp); return status; } EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) + 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::EnergyEvse::Id, Id, writable, ZCL_EPOCH_S_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::EnergyEvse::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace NextChargeTargetTime +} // namespace FeatureMap -namespace NextChargeRequiredEnergy { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & 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::EnergyEvse::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { - value.SetNonNull() = Traits::StorageToWorking(temp); + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } + *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, int64_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, 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::EnergyEvse::Id, Id, writable, ZCL_ENERGY_MWH_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::EnergyEvse::Id, Id, writable, ZCL_ENERGY_MWH_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } +} // namespace ClusterRevision - return Set(endpoint, value.Value()); -} +} // namespace Attributes +} // namespace ValveConfigurationAndControl -} // namespace NextChargeRequiredEnergy +namespace ElectricalEnergyMeasurement { +namespace Attributes { -namespace NextChargeTargetSoC { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & 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::EnergyEvse::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ElectricalEnergyMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { - value.SetNonNull() = Traits::StorageToWorking(temp); + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } + *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::Percent value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, 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::EnergyEvse::Id, Id, writable, ZCL_PERCENT_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::EnergyEvse::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalEnergyMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -} // namespace NextChargeTargetSoC +} // namespace FeatureMap -namespace ApproximateEVEfficiency { +namespace ClusterRevision { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +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::EnergyEvse::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::ElectricalEnergyMeasurement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { - value.SetNonNull() = Traits::StorageToWorking(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 = */ true, value)) + 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::EnergyEvse::Id, Id, writable, ZCL_INT16U_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::EnergyEvse::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::ElectricalEnergyMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } +} // namespace ClusterRevision - return Set(endpoint, value.Value()); -} +} // namespace Attributes +} // namespace ElectricalEnergyMeasurement -} // namespace ApproximateEVEfficiency +namespace DemandResponseLoadControl { +namespace Attributes { -namespace StateOfCharge { +namespace NumberOfLoadControlPrograms { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & 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::EnergyEvse::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DemandResponseLoadControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { - value.SetNonNull() = Traits::StorageToWorking(temp); + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } + *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::Percent value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, 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::EnergyEvse::Id, Id, writable, ZCL_PERCENT_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::EnergyEvse::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); + return emberAfWriteAttribute(endpoint, Clusters::DemandResponseLoadControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace StateOfCharge +} // namespace NumberOfLoadControlPrograms -namespace BatteryCapacity { +namespace NumberOfEventsPerProgram { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & 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::EnergyEvse::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DemandResponseLoadControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { - value.SetNonNull() = Traits::StorageToWorking(temp); + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } + *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, int64_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, 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::EnergyEvse::Id, Id, writable, ZCL_ENERGY_MWH_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::DemandResponseLoadControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -EmberAfStatus SetNull(chip::EndpointId endpoint) +} // namespace NumberOfEventsPerProgram + +namespace NumberOfTransitions { + +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_ENERGY_MWH_ATTRIBUTE_TYPE); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DemandResponseLoadControl::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, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (value.IsNull()) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { - return SetNull(endpoint); + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - - return Set(endpoint, value.Value()); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DemandResponseLoadControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace BatteryCapacity +} // namespace NumberOfTransitions -namespace VehicleID { +namespace DefaultRandomStart { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) { - uint8_t zclString[32 + 1]; - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::EnergyEvse::Id, Id, zclString, sizeof(zclString)); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DemandResponseLoadControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - size_t length = emberAfStringLength(zclString); - if (length == NumericAttributeTraits::kNullValue) + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { - value.SetNull(); - return EMBER_ZCL_STATUS_SUCCESS; + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - auto & span = value.SetNonNull(); - - VerifyOrReturnError(span.size() == 32, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); - memcpy(span.data(), &zclString[1], 32); - span.reduce_size(length); + *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value) -{ - static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); - VerifyOrReturnError(value.size() <= 32, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); - uint8_t zclString[32 + 1]; - auto length = static_cast(value.size()); - Encoding::Put8(zclString, length); - memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); -} - -EmberAfStatus SetNull(chip::EndpointId endpoint) -{ - uint8_t zclString[1] = { 0xFF }; - return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - if (value.IsNull()) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { - return SetNull(endpoint); + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - - return Set(endpoint, value.Value()); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DemandResponseLoadControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace VehicleID +} // namespace DefaultRandomStart -namespace SessionID { +namespace DefaultRandomDuration { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & 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::EnergyEvse::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DemandResponseLoadControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { - value.SetNonNull() = Traits::StorageToWorking(temp); + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } + *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; - if (!Traits::CanRepresentValue(/* isNullable = */ true, 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::EnergyEvse::Id, Id, writable, ZCL_INT32U_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::EnergyEvse::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); + return emberAfWriteAttribute(endpoint, Clusters::DemandResponseLoadControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace SessionID +} // namespace DefaultRandomDuration -namespace SessionDuration { +namespace FeatureMap { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +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::EnergyEvse::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DemandResponseLoadControl::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { - value.SetNonNull() = Traits::StorageToWorking(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 = */ true, value)) + 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::EnergyEvse::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::DemandResponseLoadControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -EmberAfStatus SetNull(chip::EndpointId endpoint) +} // namespace FeatureMap + +namespace ClusterRevision { + +EmberAfStatus Get(chip::EndpointId endpoint, uint16_t * value) { - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE); + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DemandResponseLoadControl::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, const chip::app::DataModel::Nullable & value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - if (value.IsNull()) + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { - return SetNull(endpoint); + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } - - return Set(endpoint, value.Value()); + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::DemandResponseLoadControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -} // namespace SessionDuration +} // namespace ClusterRevision -namespace SessionEnergyCharged { +} // namespace Attributes +} // namespace DemandResponseLoadControl -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +namespace DeviceEnergyManagement { +namespace Attributes { + +namespace ClusterRevision { + +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::EnergyEvse::Id, Id, readable, sizeof(temp)); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::DeviceEnergyManagement::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { - value.SetNonNull() = Traits::StorageToWorking(temp); + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } + *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, int64_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value) { - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, 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::EnergyEvse::Id, Id, writable, ZCL_ENERGY_MWH_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::EnergyEvse::Id, Id, writable, ZCL_ENERGY_MWH_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::DeviceEnergyManagement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } +} // namespace ClusterRevision - return Set(endpoint, value.Value()); -} +} // namespace Attributes +} // namespace DeviceEnergyManagement -} // namespace SessionEnergyCharged +namespace EnergyEvse { +namespace Attributes { -namespace SessionEnergyDischarged { +namespace NumberOfWeeklyTargets { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & 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::EnergyEvse::Id, Id, readable, sizeof(temp)); VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) { - value.SetNonNull() = Traits::StorageToWorking(temp); + return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; } + *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, int64_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) { - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, 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::EnergyEvse::Id, Id, writable, ZCL_ENERGY_MWH_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::EnergyEvse::Id, Id, writable, ZCL_ENERGY_MWH_ATTRIBUTE_TYPE); -} - -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); + return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace SessionEnergyDischarged +} // namespace NumberOfWeeklyTargets -namespace FeatureMap { +namespace NumberOfDailyTargets { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_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::EnergyEvse::Id, Id, readable, sizeof(temp)); @@ -11772,9 +10484,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; @@ -11782,10 +10494,10 @@ 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::EnergyEvse::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace FeatureMap +} // namespace NumberOfDailyTargets namespace ClusterRevision { @@ -17078,9 +15790,62 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE); } -} // namespace SetpointChangeSourceTimestamp +} // namespace SetpointChangeSourceTimestamp + +namespace OccupiedSetback { + +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::Thermostat::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::Thermostat::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::Thermostat::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 OccupiedSetback -namespace OccupiedSetback { +namespace OccupiedSetbackMin { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { @@ -17131,9 +15896,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl return Set(endpoint, value.Value()); } -} // namespace OccupiedSetback +} // namespace OccupiedSetbackMin -namespace OccupiedSetbackMin { +namespace OccupiedSetbackMax { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { @@ -17184,9 +15949,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl return Set(endpoint, value.Value()); } -} // namespace OccupiedSetbackMin +} // namespace OccupiedSetbackMax -namespace OccupiedSetbackMax { +namespace UnoccupiedSetback { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { @@ -17237,9 +16002,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl return Set(endpoint, value.Value()); } -} // namespace OccupiedSetbackMax +} // namespace UnoccupiedSetback -namespace UnoccupiedSetback { +namespace UnoccupiedSetbackMin { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { @@ -17290,9 +16055,9 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl return Set(endpoint, value.Value()); } -} // namespace UnoccupiedSetback +} // namespace UnoccupiedSetbackMin -namespace UnoccupiedSetbackMin { +namespace UnoccupiedSetbackMax { EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { @@ -17343,13 +16108,230 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl return Set(endpoint, value.Value()); } -} // namespace UnoccupiedSetbackMin +} // namespace UnoccupiedSetbackMax -namespace UnoccupiedSetbackMax { +namespace EmergencyHeatDelta { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +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::Thermostat::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::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace EmergencyHeatDelta + +namespace ACType { + +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACTypeEnum * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::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::app::Clusters::Thermostat::ACTypeEnum 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::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); +} + +} // namespace ACType + +namespace ACCapacity { + +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::Thermostat::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::Thermostat::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); +} + +} // namespace ACCapacity + +namespace ACRefrigerantType { + +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACRefrigerantTypeEnum * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::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::app::Clusters::Thermostat::ACRefrigerantTypeEnum 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::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); +} + +} // namespace ACRefrigerantType + +namespace ACCompressorType { + +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACCompressorTypeEnum * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::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::app::Clusters::Thermostat::ACCompressorTypeEnum 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::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); +} + +} // namespace ACCompressorType + +namespace ACErrorCode { + +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::Thermostat::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::Thermostat::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); +} + +} // namespace ACErrorCode + +namespace ACLouverPosition { + +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACLouverPositionEnum * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::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::app::Clusters::Thermostat::ACLouverPositionEnum 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::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); +} + +} // namespace ACLouverPosition + +namespace ACCoilTemperature { + +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::Thermostat::Id, Id, readable, sizeof(temp)); @@ -17364,9 +16346,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & valu } return status; } -EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value) +EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -17374,19 +16356,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::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_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::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_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()) { @@ -17396,13 +16378,13 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl return Set(endpoint, value.Value()); } -} // namespace UnoccupiedSetbackMax +} // namespace ACCoilTemperature -namespace EmergencyHeatDelta { +namespace ACCapacityformat { -EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value) +EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACCapacityFormatEnum * value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); @@ -17414,9 +16396,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, chip::app::Clusters::Thermostat::ACCapacityFormatEnum value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -17424,16 +16406,16 @@ 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::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -} // namespace EmergencyHeatDelta +} // namespace ACCapacityformat -namespace ACType { +namespace NumberOfPresets { -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACTypeEnum * 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::Thermostat::Id, Id, readable, sizeof(temp)); @@ -17445,9 +16427,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::AC *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACTypeEnum 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; @@ -17455,16 +16437,16 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::AC Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace ACType +} // namespace NumberOfPresets -namespace ACCapacity { +namespace NumberOfSchedules { -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::Thermostat::Id, Id, readable, sizeof(temp)); @@ -17476,9 +16458,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; @@ -17486,16 +16468,16 @@ 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::Thermostat::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace ACCapacity +} // namespace NumberOfSchedules -namespace ACRefrigerantType { +namespace NumberOfScheduleTransitions { -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACRefrigerantTypeEnum * 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::Thermostat::Id, Id, readable, sizeof(temp)); @@ -17507,9 +16489,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::AC *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACRefrigerantTypeEnum 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; @@ -17517,47 +16499,167 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::AC Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace ACRefrigerantType +} // namespace NumberOfScheduleTransitions -namespace ACCompressorType { +namespace NumberOfScheduleTransitionPerDay { -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACCompressorTypeEnum * 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::Thermostat::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, chip::app::Clusters::Thermostat::ACCompressorTypeEnum value) +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t 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::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -} // namespace ACCompressorType +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType value; + Traits::SetNull(value); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} -namespace ACErrorCode { +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +{ + if (value.IsNull()) + { + return SetNull(endpoint); + } -EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask * value) + return Set(endpoint, value.Value()); +} + +} // namespace NumberOfScheduleTransitionPerDay + +namespace ActivePresetHandle { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) { - using Traits = NumericAttributeTraits>; + uint8_t zclString[16 + 1]; + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::Id, Id, zclString, sizeof(zclString)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) + { + value.SetNull(); + return EMBER_ZCL_STATUS_SUCCESS; + } + auto & span = value.SetNonNull(); + + VerifyOrReturnError(span.size() == 16, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(span.data(), &zclString[1], 16); + span.reduce_size(length); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value) +{ + static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 16, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[16 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + uint8_t zclString[1] = { 0xFF }; + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, zclString, ZCL_OCTET_STRING_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 ActivePresetHandle + +namespace ActiveScheduleHandle { + +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value) +{ + uint8_t zclString[16 + 1]; + EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::Id, Id, zclString, sizeof(zclString)); + VerifyOrReturnError(EMBER_ZCL_STATUS_SUCCESS == status, status); + size_t length = emberAfStringLength(zclString); + if (length == NumericAttributeTraits::kNullValue) + { + value.SetNull(); + return EMBER_ZCL_STATUS_SUCCESS; + } + auto & span = value.SetNonNull(); + + VerifyOrReturnError(span.size() == 16, EMBER_ZCL_STATUS_INVALID_DATA_TYPE); + memcpy(span.data(), &zclString[1], 16); + span.reduce_size(length); + return status; +} +EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value) +{ + static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); + VerifyOrReturnError(value.size() <= 16, EMBER_ZCL_STATUS_CONSTRAINT_ERROR); + uint8_t zclString[16 + 1]; + auto length = static_cast(value.size()); + Encoding::Put8(zclString, length); + memcpy(&zclString[1], value.data(), value.size()); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE); +} + +EmberAfStatus SetNull(chip::EndpointId endpoint) +{ + uint8_t zclString[1] = { 0xFF }; + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, zclString, ZCL_OCTET_STRING_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 ActiveScheduleHandle + +namespace PresetsSchedulesEditable { + +EmberAfStatus Get(chip::EndpointId endpoint, bool * value) +{ + using Traits = NumericAttributeTraits; Traits::StorageType temp; uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::Id, Id, readable, sizeof(temp)); @@ -17569,9 +16671,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::BitMask 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; @@ -17579,16 +16681,17 @@ EmberAfStatus Set(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::Thermostat::Id, Id, readable, sizeof(temp)); @@ -17600,9 +16703,10 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::AC *value = Traits::StorageToWorking(temp); return status; } -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACLouverPositionEnum 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; @@ -17610,16 +16714,16 @@ EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::AC Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } -} // namespace ACLouverPosition +} // namespace TemperatureSetpointHoldPolicy -namespace ACCoilTemperature { +namespace SetpointHoldExpiryTimestamp { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & 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::Thermostat::Id, Id, readable, sizeof(temp)); @@ -17634,9 +16738,9 @@ EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & valu } return status; } -EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value) { - using Traits = NumericAttributeTraits; + using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) { return EMBER_ZCL_STATUS_CONSTRAINT_ERROR; @@ -17644,19 +16748,19 @@ EmberAfStatus Set(chip::EndpointId endpoint, int16_t value) Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_EPOCH_S_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::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); + return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_EPOCH_S_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()) { @@ -17666,38 +16770,7 @@ EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullabl return Set(endpoint, value.Value()); } -} // namespace ACCoilTemperature - -namespace ACCapacityformat { - -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACCapacityFormatEnum * value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - EmberAfStatus status = emberAfReadAttribute(endpoint, Clusters::Thermostat::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::app::Clusters::Thermostat::ACCapacityFormatEnum 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::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); -} - -} // namespace ACCapacityformat +} // namespace SetpointHoldExpiryTimestamp namespace FeatureMap { 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 c80c58fe04468c..2fed842607a66e 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 { @@ -1757,11 +1703,6 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); namespace MicrowaveOvenControl { namespace Attributes { -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); @@ -1802,6 +1743,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 { @@ -2027,36 +2022,6 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); namespace DeviceEnergyManagement { namespace Attributes { -namespace ESAType { -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::DeviceEnergyManagement::ESATypeEnum * value); // ESATypeEnum -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::DeviceEnergyManagement::ESATypeEnum value); -} // namespace ESAType - -namespace ESACanGenerate { -EmberAfStatus Get(chip::EndpointId endpoint, bool * value); // boolean -EmberAfStatus Set(chip::EndpointId endpoint, bool value); -} // namespace ESACanGenerate - -namespace ESAState { -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::DeviceEnergyManagement::ESAStateEnum * value); // ESAStateEnum -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::DeviceEnergyManagement::ESAStateEnum value); -} // namespace ESAState - -namespace AbsMinPower { -EmberAfStatus Get(chip::EndpointId endpoint, int64_t * value); // power_mw -EmberAfStatus Set(chip::EndpointId endpoint, int64_t value); -} // namespace AbsMinPower - -namespace AbsMaxPower { -EmberAfStatus Get(chip::EndpointId endpoint, int64_t * value); // power_mw -EmberAfStatus Set(chip::EndpointId endpoint, int64_t value); -} // namespace AbsMaxPower - -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); @@ -2068,68 +2033,6 @@ EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); namespace EnergyEvse { namespace Attributes { -namespace State { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // StateEnum -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::EnergyEvse::StateEnum value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, - const chip::app::DataModel::Nullable & value); -} // namespace State - -namespace SupplyState { -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::EnergyEvse::SupplyStateEnum * value); // SupplyStateEnum -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::EnergyEvse::SupplyStateEnum value); -} // namespace SupplyState - -namespace FaultState { -EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::EnergyEvse::FaultStateEnum * value); // FaultStateEnum -EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::EnergyEvse::FaultStateEnum value); -} // namespace FaultState - -namespace ChargingEnabledUntil { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // epoch_s -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace ChargingEnabledUntil - -namespace DischargingEnabledUntil { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // epoch_s -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace DischargingEnabledUntil - -namespace CircuitCapacity { -EmberAfStatus Get(chip::EndpointId endpoint, int64_t * value); // amperage_ma -EmberAfStatus Set(chip::EndpointId endpoint, int64_t value); -} // namespace CircuitCapacity - -namespace MinimumChargeCurrent { -EmberAfStatus Get(chip::EndpointId endpoint, int64_t * value); // amperage_ma -EmberAfStatus Set(chip::EndpointId endpoint, int64_t value); -} // namespace MinimumChargeCurrent - -namespace MaximumChargeCurrent { -EmberAfStatus Get(chip::EndpointId endpoint, int64_t * value); // amperage_ma -EmberAfStatus Set(chip::EndpointId endpoint, int64_t value); -} // namespace MaximumChargeCurrent - -namespace MaximumDischargeCurrent { -EmberAfStatus Get(chip::EndpointId endpoint, int64_t * value); // amperage_ma -EmberAfStatus Set(chip::EndpointId endpoint, int64_t value); -} // namespace MaximumDischargeCurrent - -namespace UserMaximumChargeCurrent { -EmberAfStatus Get(chip::EndpointId endpoint, int64_t * value); // amperage_ma -EmberAfStatus Set(chip::EndpointId endpoint, int64_t value); -} // namespace UserMaximumChargeCurrent - -namespace RandomizationDelayWindow { -EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // elapsed_s -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); -} // namespace RandomizationDelayWindow - namespace NumberOfWeeklyTargets { EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); @@ -2140,95 +2043,6 @@ EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); } // namespace NumberOfDailyTargets -namespace NextChargeStartTime { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // epoch_s -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace NextChargeStartTime - -namespace NextChargeTargetTime { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // epoch_s -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace NextChargeTargetTime - -namespace NextChargeRequiredEnergy { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // energy_mwh -EmberAfStatus Set(chip::EndpointId endpoint, int64_t value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace NextChargeRequiredEnergy - -namespace NextChargeTargetSoC { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // percent -EmberAfStatus Set(chip::EndpointId endpoint, chip::Percent value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace NextChargeTargetSoC - -namespace ApproximateEVEfficiency { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u -EmberAfStatus Set(chip::EndpointId endpoint, uint16_t value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace ApproximateEVEfficiency - -namespace StateOfCharge { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // percent -EmberAfStatus Set(chip::EndpointId endpoint, chip::Percent value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace StateOfCharge - -namespace BatteryCapacity { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // energy_mwh -EmberAfStatus Set(chip::EndpointId endpoint, int64_t value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace BatteryCapacity - -namespace VehicleID { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // char_string -EmberAfStatus Set(chip::EndpointId endpoint, chip::CharSpan value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace VehicleID - -namespace SessionID { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int32u -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace SessionID - -namespace SessionDuration { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // elapsed_s -EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace SessionDuration - -namespace SessionEnergyCharged { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // energy_mwh -EmberAfStatus Set(chip::EndpointId endpoint, int64_t value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace SessionEnergyCharged - -namespace SessionEnergyDischarged { -EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // energy_mwh -EmberAfStatus Set(chip::EndpointId endpoint, int64_t value); -EmberAfStatus SetNull(chip::EndpointId endpoint); -EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -} // namespace SessionEnergyDischarged - -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); @@ -3177,6 +2991,62 @@ EmberAfStatus Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::AC EmberAfStatus Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACCapacityFormatEnum value); } // namespace ACCapacityformat +namespace NumberOfPresets { +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +} // namespace NumberOfPresets + +namespace NumberOfSchedules { +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +} // namespace NumberOfSchedules + +namespace NumberOfScheduleTransitions { +EmberAfStatus Get(chip::EndpointId endpoint, uint8_t * value); // int8u +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +} // namespace NumberOfScheduleTransitions + +namespace NumberOfScheduleTransitionPerDay { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u +EmberAfStatus Set(chip::EndpointId endpoint, uint8_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace NumberOfScheduleTransitionPerDay + +namespace ActivePresetHandle { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // octet_string +EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace ActivePresetHandle + +namespace ActiveScheduleHandle { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // octet_string +EmberAfStatus Set(chip::EndpointId endpoint, chip::ByteSpan value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace ActiveScheduleHandle + +namespace PresetsSchedulesEditable { +EmberAfStatus Get(chip::EndpointId endpoint, bool * value); // boolean +EmberAfStatus Set(chip::EndpointId endpoint, bool value); +} // namespace PresetsSchedulesEditable + +namespace TemperatureSetpointHoldPolicy { +EmberAfStatus Get(chip::EndpointId endpoint, + chip::BitMask * + value); // TemperatureSetpointHoldPolicyBitmap +EmberAfStatus Set(chip::EndpointId endpoint, + chip::BitMask value); +} // namespace TemperatureSetpointHoldPolicy + +namespace SetpointHoldExpiryTimestamp { +EmberAfStatus Get(chip::EndpointId endpoint, DataModel::Nullable & value); // epoch_s +EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); +EmberAfStatus SetNull(chip::EndpointId endpoint); +EmberAfStatus Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); +} // namespace SetpointHoldExpiryTimestamp + namespace FeatureMap { EmberAfStatus Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 EmberAfStatus Set(chip::EndpointId endpoint, uint32_t value); 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 eaed7122247be7..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 // @@ -5741,6 +5741,48 @@ bool emberAfThermostatClusterGetWeeklyScheduleCallback( bool emberAfThermostatClusterClearWeeklyScheduleCallback( chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, const chip::app::Clusters::Thermostat::Commands::ClearWeeklySchedule::DecodableType & commandData); +/** + * @brief Thermostat Cluster SetActiveScheduleRequest Command callback (from client) + */ +bool emberAfThermostatClusterSetActiveScheduleRequestCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::Thermostat::Commands::SetActiveScheduleRequest::DecodableType & commandData); +/** + * @brief Thermostat Cluster SetActivePresetRequest Command callback (from client) + */ +bool emberAfThermostatClusterSetActivePresetRequestCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::Thermostat::Commands::SetActivePresetRequest::DecodableType & commandData); +/** + * @brief Thermostat Cluster StartPresetsSchedulesEditRequest Command callback (from client) + */ +bool emberAfThermostatClusterStartPresetsSchedulesEditRequestCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::Thermostat::Commands::StartPresetsSchedulesEditRequest::DecodableType & commandData); +/** + * @brief Thermostat Cluster CancelPresetsSchedulesEditRequest Command callback (from client) + */ +bool emberAfThermostatClusterCancelPresetsSchedulesEditRequestCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::Thermostat::Commands::CancelPresetsSchedulesEditRequest::DecodableType & commandData); +/** + * @brief Thermostat Cluster CommitPresetsSchedulesRequest Command callback (from client) + */ +bool emberAfThermostatClusterCommitPresetsSchedulesRequestCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::Thermostat::Commands::CommitPresetsSchedulesRequest::DecodableType & commandData); +/** + * @brief Thermostat Cluster CancelSetActivePresetRequest Command callback (from client) + */ +bool emberAfThermostatClusterCancelSetActivePresetRequestCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::Thermostat::Commands::CancelSetActivePresetRequest::DecodableType & commandData); +/** + * @brief Thermostat Cluster SetTemperatureSetpointHoldPolicy Command callback (from client) + */ +bool emberAfThermostatClusterSetTemperatureSetpointHoldPolicyCallback( + chip::app::CommandHandler * commandObj, const chip::app::ConcreteCommandPath & commandPath, + const chip::app::Clusters::Thermostat::Commands::SetTemperatureSetpointHoldPolicy::DecodableType & commandData); /** * @brief Fan Control Cluster Step Command callback (from client) */ diff --git a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h index 0136ff608c9770..fa83804118b175 100644 --- a/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h +++ b/zzz_generated/app-common/app-common/zap-generated/cluster-enums-check.h @@ -2314,6 +2314,23 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::ControlSequ return static_cast(6); } } +static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::PresetScenarioEnum val) +{ + using EnumType = Thermostat::PresetScenarioEnum; + switch (val) + { + case EnumType::kUnspecified: + case EnumType::kOccupied: + case EnumType::kUnoccupied: + case EnumType::kSleep: + case EnumType::kWake: + case EnumType::kVacation: + case EnumType::kUserDefined: + return val; + default: + return static_cast(7); + } +} static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::SetpointChangeSourceEnum val) { using EnumType = Thermostat::SetpointChangeSourceEnum; 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 7a056869230537..49b66ec661f0eb 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 @@ -1698,6 +1674,7 @@ enum class ModeTag : uint16_t { kIdle = 0x4000, kCleaning = 0x4001, + kMapping = 0x4002, // kUnknownEnumValue intentionally not defined. This enum never goes // through DataModel::Decode, likely because it is a part of a derived // cluster. As a result having kUnknownEnumValue in this enum is error @@ -1968,7 +1945,16 @@ enum class Feature : uint32_t }; } // namespace MicrowaveOvenMode -namespace MicrowaveOvenControl {} // namespace MicrowaveOvenControl +namespace MicrowaveOvenControl { + +// Bitmap for Feature +enum class Feature : uint32_t +{ + kPowerAsNumber = 0x1, + kPowerInWatts = 0x2, + kPowerNumberLimits = 0x4, +}; +} // namespace MicrowaveOvenControl namespace OperationalState { @@ -2035,6 +2021,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 @@ -3366,6 +3376,23 @@ enum class ControlSequenceOfOperationEnum : uint8_t kUnknownEnumValue = 6, }; +// Enum for PresetScenarioEnum +enum class PresetScenarioEnum : uint8_t +{ + kUnspecified = 0x00, + kOccupied = 0x01, + kUnoccupied = 0x02, + kSleep = 0x03, + kWake = 0x04, + kVacation = 0x05, + kUserDefined = 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, +}; + // Enum for SetpointChangeSourceEnum enum class SetpointChangeSourceEnum : uint8_t { @@ -3466,13 +3493,17 @@ enum class ACErrorCodeBitmap : uint32_t // Bitmap for Feature enum class Feature : uint32_t { - kHeating = 0x1, - kCooling = 0x2, - kOccupancy = 0x4, - kScheduleConfiguration = 0x8, - kSetback = 0x10, - kAutoMode = 0x20, - kLocalTemperatureNotExposed = 0x40, + kHeating = 0x1, + kCooling = 0x2, + kOccupancy = 0x4, + kScheduleConfiguration = 0x8, + kSetback = 0x10, + kAutoMode = 0x20, + kLocalTemperatureNotExposed = 0x40, + kMatterScheduleConfiguration = 0x80, + kPresets = 0x100, + kSetpoints = 0x200, + kQueuedPresetsSupported = 0x400, }; // Bitmap for HVACSystemTypeBitmap @@ -3484,6 +3515,13 @@ enum class HVACSystemTypeBitmap : uint8_t kHeatingUsesFuel = 0x20, }; +// Bitmap for PresetTypeFeaturesBitmap +enum class PresetTypeFeaturesBitmap : uint16_t +{ + kAutomatic = 0x1, + kSupportsNames = 0x2, +}; + // Bitmap for ProgrammingOperationModeBitmap enum class ProgrammingOperationModeBitmap : uint8_t { @@ -3531,6 +3569,22 @@ enum class ScheduleModeBitmap : uint8_t kHeatSetpointPresent = 0x1, kCoolSetpointPresent = 0x2, }; + +// Bitmap for ScheduleTypeFeaturesBitmap +enum class ScheduleTypeFeaturesBitmap : uint16_t +{ + kSupportsPresets = 0x1, + kSupportsSetpoints = 0x2, + kSupportsNames = 0x4, + kSupportsOff = 0x8, +}; + +// Bitmap for TemperatureSetpointHoldPolicyBitmap +enum class TemperatureSetpointHoldPolicyBitmap : uint8_t +{ + kHoldDurationElapsed = 0x1, + kHoldDurationElapsedOrPresetChanged = 0x2, +}; } // namespace Thermostat namespace FanControl { 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 834f1faa123612..e4988fdd696cd1 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,136 +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 - { - } - - ReturnErrorOnFailure(err); - } -} - -} // 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 + else { } @@ -7359,204 +7470,48 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } -} // 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 Commands {} // 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::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(): @@ -7576,48 +7531,12 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre } // 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 { +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::kCurrent), current)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kPrevious), previous)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kSoftwareVersion), softwareVersion)); return aWriter.EndContainer(outer); } @@ -7635,13 +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::kCurrent)) - { - err = DataModel::Decode(reader, current); - } - else if (__context_tag == to_underlying(Fields::kPrevious)) + if (__context_tag == to_underlying(Fields::kSoftwareVersion)) { - err = DataModel::Decode(reader, previous); + err = DataModel::Decode(reader, softwareVersion); } else { @@ -7650,127 +7565,33 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) 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 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 Attributes - -namespace Events { -namespace Disconnection { +} // 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::kReasonCode), reasonCode)); 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::kReasonCode)) - { - err = DataModel::Decode(reader, reasonCode); - } - 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 Disconnection. -namespace AssociationFailure { +} // 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::kAssociationFailureCause), associationFailureCause)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStatus), status)); return aWriter.EndContainer(outer); } @@ -7784,32 +7605,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::kAssociationFailureCause)) - { - err = DataModel::Decode(reader, associationFailureCause); - } - else if (__context_tag == to_underlying(Fields::kStatus)) - { - err = DataModel::Decode(reader, status); - } - else - { - } - - 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,20 +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 { +namespace Events { +namespace SwitchLatched { 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(); + 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) @@ -7938,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::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)) + if (__context_tag == to_underlying(Fields::kNewPosition)) { - err = DataModel::Decode(reader, validUntil); + err = DataModel::Decode(reader, newPosition); } else { @@ -7957,16 +7714,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } - -} // namespace DSTOffsetStruct - -namespace FabricScopedTrustedTimeSourceStruct { +} // 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::kNodeID), nodeID); - encoder.Encode(to_underlying(Fields::kEndpoint), endpoint); - 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) @@ -7983,13 +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::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 { @@ -7998,17 +7749,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } - -} // namespace FabricScopedTrustedTimeSourceStruct - -namespace TimeZoneStruct { +} // 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::kOffset), offset); - encoder.Encode(to_underlying(Fields::kValidAt), validAt); - encoder.Encode(to_underlying(Fields::kName), name); - 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) @@ -8025,17 +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::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)) + if (__context_tag == to_underlying(Fields::kNewPosition)) { - err = DataModel::Decode(reader, name); + err = DataModel::Decode(reader, newPosition); } else { @@ -8044,17 +7784,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } - -} // namespace TimeZoneStruct - -namespace TrustedTimeSourceStruct { +} // 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::kFabricIndex), fabricIndex); - encoder.Encode(to_underlying(Fields::kNodeID), nodeID); - encoder.Encode(to_underlying(Fields::kEndpoint), endpoint); - 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) @@ -8071,17 +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::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::kPreviousPosition)) { - err = DataModel::Decode(reader, endpoint); + err = DataModel::Decode(reader, previousPosition); } else { @@ -8090,19 +7819,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } - -} // namespace TrustedTimeSourceStruct -} // namespace Structs - -namespace Commands { -namespace SetUTCTime { +} // 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::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::kPreviousPosition), previousPosition)); + return aWriter.EndContainer(outer); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -8119,17 +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::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::kPreviousPosition)) { - err = DataModel::Decode(reader, timeSource); + err = DataModel::Decode(reader, previousPosition); } else { @@ -8138,13 +7854,16 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace SetUTCTime. -namespace SetTrustedTimeSource { +} // 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::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)); + ReturnErrorOnFailure( + DataModel::Encode(aWriter, TLV::ContextTag(Fields::kCurrentNumberOfPressesCounted), currentNumberOfPressesCounted)); + return aWriter.EndContainer(outer); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -8161,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::kTrustedTimeSource)) + if (__context_tag == to_underlying(Fields::kNewPosition)) { - err = DataModel::Decode(reader, trustedTimeSource); + err = DataModel::Decode(reader, newPosition); + } + else if (__context_tag == to_underlying(Fields::kCurrentNumberOfPressesCounted)) + { + err = DataModel::Decode(reader, currentNumberOfPressesCounted); } else { @@ -8171,14 +7894,17 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } -} -} // namespace SetTrustedTimeSource. -namespace SetTimeZone { +} +} // 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::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)); + ReturnErrorOnFailure( + DataModel::Encode(aWriter, TLV::ContextTag(Fields::kTotalNumberOfPressesCounted), totalNumberOfPressesCounted)); + return aWriter.EndContainer(outer); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -8195,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::kTimeZone)) + if (__context_tag == to_underlying(Fields::kPreviousPosition)) { - err = DataModel::Decode(reader, timeZone); + err = DataModel::Decode(reader, previousPosition); + } + else if (__context_tag == to_underlying(Fields::kTotalNumberOfPressesCounted)) + { + err = DataModel::Decode(reader, totalNumberOfPressesCounted); } else { @@ -8206,12 +7936,22 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace SetTimeZone. -namespace SetTimeZoneResponse { +} // namespace MultiPressComplete. +} // namespace Events + +} // namespace Switch +namespace AdministratorCommissioning { + +namespace Commands { +namespace OpenCommissioningWindow { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kDSTOffsetRequired), DSTOffsetRequired); + 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(); } @@ -8229,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::kDSTOffsetRequired)) + if (__context_tag == to_underlying(Fields::kCommissioningTimeout)) { - err = DataModel::Decode(reader, DSTOffsetRequired); + 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 { @@ -8240,12 +7996,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace SetTimeZoneResponse. -namespace SetDSTOffset { +} // namespace OpenCommissioningWindow. +namespace OpenBasicCommissioningWindow { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kDSTOffset), DSTOffset); + encoder.Encode(to_underlying(Fields::kCommissioningTimeout), commissioningTimeout); return encoder.Finalize(); } @@ -8263,9 +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::kDSTOffset)) + if (__context_tag == to_underlying(Fields::kCommissioningTimeout)) { - err = DataModel::Decode(reader, DSTOffset); + err = DataModel::Decode(reader, commissioningTimeout); } else { @@ -8274,12 +8030,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace SetDSTOffset. -namespace SetDefaultNTP { +} // namespace OpenBasicCommissioningWindow. +namespace RevokeCommissioning { 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(); } @@ -8293,22 +8048,9 @@ 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 SetDefaultNTP. +} // namespace RevokeCommissioning. } // namespace Commands namespace Attributes { @@ -8316,32 +8058,12 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre { 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::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(): @@ -8360,13 +8082,120 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre } } // namespace Attributes -namespace Events { -namespace DSTTableEmpty { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +namespace Events {} // namespace Events + +} // namespace AdministratorCommissioning +namespace OperationalCredentials { +namespace Structs { + +namespace FabricDescriptorStruct { +CHIP_ERROR Type::EncodeForWrite(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - 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 +{ + + 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); + if (aAccessingFabricIndex.HasValue()) + { + encoder.Encode(to_underlying(Fields::kFabricIndex), fabricIndex); + } + + 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::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)) + { + 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 + { + } + + ReturnErrorOnFailure(err); + } +} + +} // namespace FabricDescriptorStruct + +namespace NOCStruct { +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 }; + + 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) @@ -8377,18 +8206,42 @@ 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::kNoc)) + { + 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 + { } + + ReturnErrorOnFailure(err); } } -} // namespace DSTTableEmpty. -namespace DSTStatus { + +} // 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)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kDSTOffsetActive), DSTOffsetActive)); - 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) @@ -8405,9 +8258,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::kDSTOffsetActive)) + if (__context_tag == to_underlying(Fields::kAttestationNonce)) { - err = DataModel::Decode(reader, DSTOffsetActive); + err = DataModel::Decode(reader, attestationNonce); } else { @@ -8416,15 +8269,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace DSTStatus. -namespace TimeZoneStatus { +} // 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::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::kAttestationElements), attestationElements); + encoder.Encode(to_underlying(Fields::kAttestationSignature), attestationSignature); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -8441,13 +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::kOffset)) + if (__context_tag == to_underlying(Fields::kAttestationElements)) { - err = DataModel::Decode(reader, offset); + err = DataModel::Decode(reader, attestationElements); } - else if (__context_tag == to_underlying(Fields::kName)) + else if (__context_tag == to_underlying(Fields::kAttestationSignature)) { - err = DataModel::Decode(reader, name); + err = DataModel::Decode(reader, attestationSignature); } else { @@ -8456,13 +8308,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace TimeZoneStatus. -namespace TimeFailure { +} // 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)); - 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) @@ -8475,15 +8327,28 @@ 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 TimeFailure. -namespace MissingTrustedTimeSource { +} // 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)); - 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) @@ -8496,21 +8361,28 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } - } -} -} // namespace MissingTrustedTimeSource. -} // namespace Events -} // namespace TimeSynchronization -namespace BridgedDeviceBasicInformation { -namespace Structs { + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); -namespace ProductAppearanceStruct { + if (__context_tag == to_underlying(Fields::kCertificate)) + { + err = DataModel::Decode(reader, certificate); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace CertificateChainResponse. +namespace CSRRequest { 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::kCSRNonce), CSRNonce); + encoder.Encode(to_underlying(Fields::kIsForUpdateNOC), isForUpdateNOC); return encoder.Finalize(); } @@ -8528,13 +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::kFinish)) + if (__context_tag == to_underlying(Fields::kCSRNonce)) { - err = DataModel::Decode(reader, finish); + err = DataModel::Decode(reader, CSRNonce); } - else if (__context_tag == to_underlying(Fields::kPrimaryColor)) + else if (__context_tag == to_underlying(Fields::kIsForUpdateNOC)) { - err = DataModel::Decode(reader, primaryColor); + err = DataModel::Decode(reader, isForUpdateNOC); } else { @@ -8543,75 +8415,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } - -} // namespace ProductAppearanceStruct -} // namespace Structs - -namespace Commands {} // namespace Commands - -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) -{ - 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; - } -} -} // namespace Attributes - -namespace Events { -namespace StartUp { +} // 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::kSoftwareVersion), softwareVersion)); - 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) @@ -8628,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::kSoftwareVersion)) + if (__context_tag == to_underlying(Fields::kNOCSRElements)) { - err = DataModel::Decode(reader, softwareVersion); + err = DataModel::Decode(reader, NOCSRElements); + } + else if (__context_tag == to_underlying(Fields::kAttestationSignature)) + { + err = DataModel::Decode(reader, attestationSignature); } else { @@ -8639,13 +8454,17 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace StartUp. -namespace ShutDown { +} // 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)); - 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) @@ -8658,56 +8477,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::kNOCValue)) { - return std::get(__element); + err = DataModel::Decode(reader, NOCValue); } - } -} -} // 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::kReachableNewValue), reachableNewValue)); - 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::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)) { - return std::get(__element); + err = DataModel::Decode(reader, caseAdminSubject); } - - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kReachableNewValue)) + else if (__context_tag == to_underlying(Fields::kAdminVendorId)) { - err = DataModel::Decode(reader, reachableNewValue); + err = DataModel::Decode(reader, adminVendorId); } else { @@ -8716,51 +8508,14 @@ 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 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)); - 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) @@ -8777,9 +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::kICACValue)) + { + err = DataModel::Decode(reader, ICACValue); } else { @@ -8788,14 +8547,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace SwitchLatched. -namespace InitialPress { +} // 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::kNewPosition), newPosition)); - 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) @@ -8812,9 +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::kNewPosition)) + if (__context_tag == to_underlying(Fields::kStatusCode)) { - err = DataModel::Decode(reader, newPosition); + 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)) + { + err = DataModel::Decode(reader, debugText); } else { @@ -8823,14 +8591,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace InitialPress. -namespace LongPress { +} // namespace NOCResponse. +namespace UpdateFabricLabel { 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::kLabel), label); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -8847,9 +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::kNewPosition)) + if (__context_tag == to_underlying(Fields::kLabel)) { - err = DataModel::Decode(reader, newPosition); + err = DataModel::Decode(reader, label); } else { @@ -8858,14 +8625,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace LongPress. -namespace ShortRelease { +} // namespace UpdateFabricLabel. +namespace RemoveFabric { 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::kFabricIndex), fabricIndex); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -8882,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::kPreviousPosition)) + if (__context_tag == to_underlying(Fields::kFabricIndex)) { - err = DataModel::Decode(reader, previousPosition); + err = DataModel::Decode(reader, fabricIndex); } else { @@ -8893,14 +8659,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace ShortRelease. -namespace LongRelease { +} // namespace RemoveFabric. +namespace AddTrustedRootCertificate { 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::kRootCACertificate), rootCACertificate); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -8917,9 +8682,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::kPreviousPosition)) + if (__context_tag == to_underlying(Fields::kRootCACertificate)) { - err = DataModel::Decode(reader, previousPosition); + err = DataModel::Decode(reader, rootCACertificate); } else { @@ -8928,16 +8693,75 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace LongRelease. -namespace MultiPressOngoing { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +} // namespace AddTrustedRootCertificate. +} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) { - 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); + 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::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 OperationalCredentials +namespace GroupKeyManagement { +namespace Structs { + +namespace GroupInfoMapStruct { +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::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); + } + + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -8954,13 +8778,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::kNewPosition)) + if (__context_tag == to_underlying(Fields::kGroupId)) { - err = DataModel::Decode(reader, newPosition); + err = DataModel::Decode(reader, groupId); } - else if (__context_tag == to_underlying(Fields::kCurrentNumberOfPressesCounted)) + else if (__context_tag == to_underlying(Fields::kEndpoints)) { - err = DataModel::Decode(reader, currentNumberOfPressesCounted); + 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)) + { + err = DataModel::Decode(reader, fabricIndex); } else { @@ -8968,17 +8800,34 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } -} -} // namespace MultiPressOngoing. -namespace MultiPressComplete { -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); +} + +} // 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 +{ + + 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(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -8995,13 +8844,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::kGroupId)) { - err = DataModel::Decode(reader, previousPosition); + err = DataModel::Decode(reader, groupId); } - else if (__context_tag == to_underlying(Fields::kTotalNumberOfPressesCounted)) + else if (__context_tag == to_underlying(Fields::kGroupKeySetID)) { - err = DataModel::Decode(reader, totalNumberOfPressesCounted); + err = DataModel::Decode(reader, groupKeySetID); + } + else if (__context_tag == to_underlying(Fields::kFabricIndex)) + { + err = DataModel::Decode(reader, fabricIndex); } else { @@ -9010,22 +8863,21 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace MultiPressComplete. -} // namespace Events -} // namespace Switch -namespace AdministratorCommissioning { +} // namespace GroupKeyMapStruct -namespace Commands { -namespace OpenCommissioningWindow { +namespace GroupKeySetStruct { 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::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(); } @@ -9043,25 +8895,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::kCommissioningTimeout)) + if (__context_tag == to_underlying(Fields::kGroupKeySetID)) { - err = DataModel::Decode(reader, commissioningTimeout); + err = DataModel::Decode(reader, groupKeySetID); } - else if (__context_tag == to_underlying(Fields::kPAKEPasscodeVerifier)) + else if (__context_tag == to_underlying(Fields::kGroupKeySecurityPolicy)) { - err = DataModel::Decode(reader, PAKEPasscodeVerifier); + err = DataModel::Decode(reader, groupKeySecurityPolicy); } - else if (__context_tag == to_underlying(Fields::kDiscriminator)) + else if (__context_tag == to_underlying(Fields::kEpochKey0)) { - err = DataModel::Decode(reader, discriminator); + err = DataModel::Decode(reader, epochKey0); } - else if (__context_tag == to_underlying(Fields::kIterations)) + else if (__context_tag == to_underlying(Fields::kEpochStartTime0)) { - err = DataModel::Decode(reader, iterations); + err = DataModel::Decode(reader, epochStartTime0); } - else if (__context_tag == to_underlying(Fields::kSalt)) + else if (__context_tag == to_underlying(Fields::kEpochKey1)) { - err = DataModel::Decode(reader, salt); + 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 { @@ -9070,12 +8934,16 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace OpenCommissioningWindow. -namespace OpenBasicCommissioningWindow { + +} // namespace GroupKeySetStruct +} // namespace Structs + +namespace Commands { +namespace KeySetWrite { 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::kGroupKeySet), groupKeySet); return encoder.Finalize(); } @@ -9093,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::kCommissioningTimeout)) + if (__context_tag == to_underlying(Fields::kGroupKeySet)) { - err = DataModel::Decode(reader, commissioningTimeout); + err = DataModel::Decode(reader, groupKeySet); } else { @@ -9104,90 +8972,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace OpenBasicCommissioningWindow. -namespace RevokeCommissioning { +} // namespace KeySetWrite. +namespace KeySetRead { 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 RevokeCommissioning. -} // namespace Commands - -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) -{ - 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::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 AdministratorCommissioning -namespace OperationalCredentials { -namespace Structs { - -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::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); - } - + encoder.Encode(to_underlying(Fields::kGroupKeySetID), groupKeySetID); return encoder.Finalize(); } @@ -9205,29 +8995,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::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)) - { - 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)) + if (__context_tag == to_underlying(Fields::kGroupKeySetID)) { - err = DataModel::Decode(reader, fabricIndex); + err = DataModel::Decode(reader, groupKeySetID); } else { @@ -9236,39 +9006,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } - -} // namespace FabricDescriptorStruct - -namespace NOCStruct { -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 KeySetRead. +namespace KeySetReadResponse { +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::kNoc), noc); - } - if (includeSensitive) - { - encoder.Encode(to_underlying(Fields::kIcac), icac); - } - if (aAccessingFabricIndex.HasValue()) - { - encoder.Encode(to_underlying(Fields::kFabricIndex), fabricIndex); - } - + encoder.Encode(to_underlying(Fields::kGroupKeySet), groupKeySet); return encoder.Finalize(); } @@ -9286,17 +9029,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::kNoc)) - { - 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)) + if (__context_tag == to_underlying(Fields::kGroupKeySet)) { - err = DataModel::Decode(reader, fabricIndex); + err = DataModel::Decode(reader, groupKeySet); } else { @@ -9305,16 +9040,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } - -} // namespace NOCStruct -} // namespace Structs - -namespace Commands { -namespace AttestationRequest { +} // 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::kAttestationNonce), attestationNonce); + encoder.Encode(to_underlying(Fields::kGroupKeySetID), groupKeySetID); return encoder.Finalize(); } @@ -9332,9 +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::kAttestationNonce)) + if (__context_tag == to_underlying(Fields::kGroupKeySetID)) { - err = DataModel::Decode(reader, attestationNonce); + err = DataModel::Decode(reader, groupKeySetID); } else { @@ -9343,13 +9074,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace AttestationRequest. -namespace AttestationResponse { +} // 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::kAttestationElements), attestationElements); - encoder.Encode(to_underlying(Fields::kAttestationSignature), attestationSignature); return encoder.Finalize(); } @@ -9363,31 +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::kAttestationElements)) - { - err = DataModel::Decode(reader, attestationElements); - } - else if (__context_tag == to_underlying(Fields::kAttestationSignature)) - { - err = DataModel::Decode(reader, attestationSignature); - } - else - { - } - - ReturnErrorOnFailure(err); } } -} // namespace AttestationResponse. -namespace CertificateChainRequest { +} // 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::kCertificateType), certificateType); + encoder.Encode(to_underlying(Fields::kGroupKeySetIDs), groupKeySetIDs); return encoder.Finalize(); } @@ -9405,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::kCertificateType)) + if (__context_tag == to_underlying(Fields::kGroupKeySetIDs)) { - err = DataModel::Decode(reader, certificateType); + err = DataModel::Decode(reader, groupKeySetIDs); } else { @@ -9416,13 +9128,236 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace CertificateChainRequest. -namespace CertificateChainResponse { +} // 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::kCertificate), certificate); - 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) @@ -9439,9 +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::kCertificate)) + if (__context_tag == to_underlying(Fields::kStateValue)) { - err = DataModel::Decode(reader, certificate); + err = DataModel::Decode(reader, stateValue); } else { @@ -9450,52 +9385,43 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace CertificateChainResponse. -namespace CSRRequest { -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::kCSRNonce), CSRNonce); - encoder.Encode(to_underlying(Fields::kIsForUpdateNOC), isForUpdateNOC); - 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::kCSRNonce)) - { - err = DataModel::Decode(reader, CSRNonce); - } - else if (__context_tag == to_underlying(Fields::kIsForUpdateNOC)) - { - err = DataModel::Decode(reader, isForUpdateNOC); - } - else - { - } + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - ReturnErrorOnFailure(err); + if (includeSensitive) + { + encoder.Encode(to_underlying(Fields::kCheckInNodeID), checkInNodeID); } -} -} // namespace CSRRequest. -namespace CSRResponse { -CHIP_ERROR Type::Encode(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); + if (includeSensitive) + { + encoder.Encode(to_underlying(Fields::kMonitoredSubject), monitoredSubject); + } + if (aAccessingFabricIndex.HasValue()) + { + encoder.Encode(to_underlying(Fields::kFabricIndex), fabricIndex); + } + return encoder.Finalize(); } @@ -9513,13 +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::kNOCSRElements)) + if (__context_tag == to_underlying(Fields::kCheckInNodeID)) { - err = DataModel::Decode(reader, NOCSRElements); + err = DataModel::Decode(reader, checkInNodeID); } - else if (__context_tag == to_underlying(Fields::kAttestationSignature)) + else if (__context_tag == to_underlying(Fields::kMonitoredSubject)) { - err = DataModel::Decode(reader, attestationSignature); + err = DataModel::Decode(reader, monitoredSubject); + } + else if (__context_tag == to_underlying(Fields::kFabricIndex)) + { + err = DataModel::Decode(reader, fabricIndex); } else { @@ -9528,16 +9458,19 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace CSRResponse. -namespace AddNOC { + +} // 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::kIPKValue), IPKValue); - encoder.Encode(to_underlying(Fields::kCaseAdminSubject), caseAdminSubject); - encoder.Encode(to_underlying(Fields::kAdminVendorId), adminVendorId); + 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(); } @@ -9555,25 +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)) - { - err = DataModel::Decode(reader, NOCValue); - } - else if (__context_tag == to_underlying(Fields::kICACValue)) + if (__context_tag == to_underlying(Fields::kCheckInNodeID)) { - err = DataModel::Decode(reader, ICACValue); + err = DataModel::Decode(reader, checkInNodeID); } - else if (__context_tag == to_underlying(Fields::kIPKValue)) + else if (__context_tag == to_underlying(Fields::kMonitoredSubject)) { - err = DataModel::Decode(reader, IPKValue); + err = DataModel::Decode(reader, monitoredSubject); } - else if (__context_tag == to_underlying(Fields::kCaseAdminSubject)) + else if (__context_tag == to_underlying(Fields::kKey)) { - err = DataModel::Decode(reader, caseAdminSubject); + err = DataModel::Decode(reader, key); } - else if (__context_tag == to_underlying(Fields::kAdminVendorId)) + else if (__context_tag == to_underlying(Fields::kVerificationKey)) { - err = DataModel::Decode(reader, adminVendorId); + err = DataModel::Decode(reader, verificationKey); } else { @@ -9582,13 +9511,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace AddNOC. -namespace UpdateNOC { +} // 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::kNOCValue), NOCValue); - encoder.Encode(to_underlying(Fields::kICACValue), ICACValue); + encoder.Encode(to_underlying(Fields::kICDCounter), ICDCounter); return encoder.Finalize(); } @@ -9606,13 +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::kNOCValue)) - { - err = DataModel::Decode(reader, NOCValue); - } - else if (__context_tag == to_underlying(Fields::kICACValue)) + if (__context_tag == to_underlying(Fields::kICDCounter)) { - err = DataModel::Decode(reader, ICACValue); + err = DataModel::Decode(reader, ICDCounter); } else { @@ -9621,14 +9545,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace UpdateNOC. -namespace NOCResponse { +} // 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::kStatusCode), statusCode); - encoder.Encode(to_underlying(Fields::kFabricIndex), fabricIndex); - encoder.Encode(to_underlying(Fields::kDebugText), debugText); + encoder.Encode(to_underlying(Fields::kCheckInNodeID), checkInNodeID); + encoder.Encode(to_underlying(Fields::kVerificationKey), verificationKey); return encoder.Finalize(); } @@ -9646,51 +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::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)) - { - err = DataModel::Decode(reader, debugText); - } - else - { - } - - ReturnErrorOnFailure(err); - } -} -} // 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::kLabel), label); - 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)) + if (__context_tag == to_underlying(Fields::kCheckInNodeID)) { - return std::get(__element); + err = DataModel::Decode(reader, checkInNodeID); } - - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kLabel)) + else if (__context_tag == to_underlying(Fields::kVerificationKey)) { - err = DataModel::Decode(reader, label); + 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,26 +9638,32 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace AddTrustedRootCertificate. -} // namespace Commands - -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) -{ - 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); +} // namespace StayActiveResponse. +} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + 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::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): @@ -9805,36 +9682,39 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre } } // 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 +namespace Events { +namespace OnTransitionToActiveMode { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - return DoEncode(aWriter, aTag, NullOptional); + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + return aWriter.EndContainer(outer); } -CHIP_ERROR Type::EncodeForRead(TLV::TLVWriter & aWriter, TLV::Tag aTag, FabricIndex aAccessingFabricIndex) const +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { - return DoEncode(aWriter, aTag, MakeOptional(aAccessingFabricIndex)); + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + } } +} // namespace OnTransitionToActiveMode. +} // namespace Events -CHIP_ERROR Type::DoEncode(TLV::TLVWriter & aWriter, TLV::Tag aTag, const Optional & aAccessingFabricIndex) const -{ +} // 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::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); - } - + 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(); } @@ -10133,23 +9927,10 @@ 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 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,202 +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::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::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(): @@ -10425,12 +10022,12 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre } // namespace Attributes namespace Events { -namespace StateChange { +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::kStateValue), stateValue)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kErrorState), errorState)); return aWriter.EndContainer(outer); } @@ -10448,9 +10045,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::kStateValue)) + if (__context_tag == to_underlying(Fields::kErrorState)) { - err = DataModel::Decode(reader, stateValue); + err = DataModel::Decode(reader, errorState); } else { @@ -10459,43 +10056,64 @@ 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 +} // namespace OperationalError. +namespace OperationCompletion { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - return DoEncode(aWriter, aTag, NullOptional); + 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 Type::EncodeForRead(TLV::TLVWriter & aWriter, TLV::Tag aTag, FabricIndex aAccessingFabricIndex) const +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { - return DoEncode(aWriter, aTag, MakeOptional(aAccessingFabricIndex)); -} + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } -CHIP_ERROR Type::DoEncode(TLV::TLVWriter & aWriter, TLV::Tag aTag, const Optional & aAccessingFabricIndex) const -{ - bool includeSensitive = !aAccessingFabricIndex.HasValue() || (aAccessingFabricIndex.Value() == fabricIndex); + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); - DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + 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 + { + } - 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); + ReturnErrorOnFailure(err); } +} +} // namespace OperationCompletion. +} // namespace Events + +} // namespace OvenCavityOperationalState +namespace OvenMode { +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(); } @@ -10513,17 +10131,48 @@ 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::kNewMode)) { - err = DataModel::Decode(reader, checkInNodeID); + err = DataModel::Decode(reader, newMode); } - else if (__context_tag == to_underlying(Fields::kMonitoredSubject)) + else { - err = DataModel::Decode(reader, monitoredSubject); } - else if (__context_tag == to_underlying(Fields::kFabricIndex)) + + 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)) { - err = DataModel::Decode(reader, fabricIndex); + 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::kStatusText)) + { + err = DataModel::Decode(reader, statusText); } else { @@ -10532,19 +10181,86 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } +} // namespace ChangeToModeResponse. +} // namespace Commands -} // namespace MonitoringRegistrationStruct -} // namespace Structs +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(): + 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 RegisterClient { +namespace Events {} // namespace Events + +} // namespace OvenMode +namespace LaundryDryerControls { + +namespace Commands {} // 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::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 LaundryDryerControls +namespace ModeSelect { +namespace Structs { + +namespace SemanticTagStruct { 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::kMfgCode), mfgCode); + encoder.Encode(to_underlying(Fields::kValue), value); return encoder.Finalize(); } @@ -10562,21 +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::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)) + if (__context_tag == to_underlying(Fields::kMfgCode)) { - err = DataModel::Decode(reader, key); + err = DataModel::Decode(reader, mfgCode); } - else if (__context_tag == to_underlying(Fields::kVerificationKey)) + else if (__context_tag == to_underlying(Fields::kValue)) { - err = DataModel::Decode(reader, verificationKey); + err = DataModel::Decode(reader, value); } else { @@ -10585,12 +10293,16 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace RegisterClient. -namespace RegisterClientResponse { + +} // namespace SemanticTagStruct + +namespace ModeOptionStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kICDCounter), ICDCounter); + encoder.Encode(to_underlying(Fields::kLabel), label); + encoder.Encode(to_underlying(Fields::kMode), mode); + encoder.Encode(to_underlying(Fields::kSemanticTags), semanticTags); return encoder.Finalize(); } @@ -10608,9 +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::kICDCounter)) + if (__context_tag == to_underlying(Fields::kLabel)) { - err = DataModel::Decode(reader, ICDCounter); + 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)) + { + err = DataModel::Decode(reader, semanticTags); } else { @@ -10619,13 +10339,16 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace RegisterClientResponse. -namespace UnregisterClient { + +} // namespace ModeOptionStruct +} // 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::kCheckInNodeID), checkInNodeID); - encoder.Encode(to_underlying(Fields::kVerificationKey), verificationKey); + encoder.Encode(to_underlying(Fields::kNewMode), newMode); return encoder.Finalize(); } @@ -10643,13 +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::kVerificationKey)) + if (__context_tag == to_underlying(Fields::kNewMode)) { - err = DataModel::Decode(reader, verificationKey); + err = DataModel::Decode(reader, newMode); } else { @@ -10658,11 +10377,56 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace UnregisterClient. -namespace StayActiveRequest { +} // namespace ChangeToMode. +} // namespace Commands + +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + 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 + +namespace Events {} // namespace Events + +} // namespace ModeSelect +namespace LaundryWasherMode { +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(); } @@ -10676,14 +10440,28 @@ 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::kNewMode)) + { + err = DataModel::Decode(reader, newMode); + } + else + { + } + + ReturnErrorOnFailure(err); } } -} // 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,15 +10792,16 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events {} // namespace Events -} // namespace Timer -namespace OvenCavityOperationalState { +} // namespace RvcRunMode +namespace RvcCleanMode { namespace Structs {} // namespace Structs namespace Commands { -namespace Pause { +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(); } @@ -10961,74 +10815,28 @@ 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 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 { -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); -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - detail::StructDecodeIterator __iterator(reader); - while (true) - { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) + if (__context_tag == to_underlying(Fields::kNewMode)) { - return std::get(__element); + err = DataModel::Decode(reader, newMode); } - } -} -} // 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)) + else { - return std::get(__element); } + + 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, active); + } + else if (__context_tag == to_underlying(Fields::kInactive)) { - err = DataModel::Decode(reader, completionErrorCode); + err = DataModel::Decode(reader, inactive); } - else if (__context_tag == to_underlying(Fields::kTotalOperationalTime)) + else if (__context_tag == to_underlying(Fields::kState)) { - err = DataModel::Decode(reader, totalOperationalTime); + err = DataModel::Decode(reader, state); } - else if (__context_tag == to_underlying(Fields::kPausedTime)) + else if (__context_tag == to_underlying(Fields::kMask)) { - err = DataModel::Decode(reader, pausedTime); + 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 { @@ -11291,8 +11185,8 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events {} // namespace Events -} // namespace OvenMode -namespace LaundryDryerControls { +} // namespace DishwasherMode +namespace AirQuality { namespace Commands {} // namespace Commands @@ -11301,10 +11195,8 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre { 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::AirQuality::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, airQuality); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): @@ -11325,16 +11217,14 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre namespace Events {} // namespace Events -} // namespace LaundryDryerControls -namespace ModeSelect { -namespace Structs { +} // namespace AirQuality +namespace SmokeCoAlarm { -namespace SemanticTagStruct { +namespace Commands { +namespace SelfTestRequest { 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(); } @@ -11348,17 +11238,87 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } + } +} +} // namespace SelfTestRequest. +} // namespace Commands - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); +namespace Attributes { +CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) +{ + switch (path.mAttributeId) + { + 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; + } +} +} // namespace Attributes - if (__context_tag == to_underlying(Fields::kMfgCode)) +namespace Events { +namespace SmokeAlarm { +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) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) { - err = DataModel::Decode(reader, mfgCode); + return std::get(__element); } - else if (__context_tag == to_underlying(Fields::kValue)) + + 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, 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,44 @@ 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::kAlarmSeverityLevel)) { - err = DataModel::Decode(reader, label); + err = DataModel::Decode(reader, alarmSeverityLevel); } - else if (__context_tag == to_underlying(Fields::kMode)) + else { - err = DataModel::Decode(reader, mode); } - else if (__context_tag == to_underlying(Fields::kSemanticTags)) + + ReturnErrorOnFailure(err); + } +} +} // namespace COAlarm. +namespace LowBattery { +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) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) { - err = DataModel::Decode(reader, semanticTags); + 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 { @@ -11413,17 +11397,97 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } +} // 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 ModeOptionStruct -} // 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 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 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 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)) + { + 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); +} + +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) @@ -11436,72 +11500,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::kNewMode)) - { - err = DataModel::Decode(reader, newMode); - } - else - { - } - - ReturnErrorOnFailure(err); - } -} -} // namespace ChangeToMode. -} // namespace Commands - -namespace Attributes { -CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path) -{ - switch (path.mAttributeId) - { - 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 - -namespace Events {} // namespace Events - -} // namespace ModeSelect -namespace LaundryWasherMode { -namespace Structs {} // namespace Structs - -namespace Commands { -namespace ChangeToMode { +} // namespace MuteEnded. +namespace InterconnectSmokeAlarm { 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) @@ -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,53 +11572,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) 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(): - 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 LaundryWasherMode -namespace RefrigeratorAndTemperatureControlledCabinetMode { -namespace Structs {} // namespace Structs - -namespace Commands { -namespace ChangeToMode { +} // namespace InterconnectCOAlarm. +namespace AllClear { 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) @@ -11627,28 +11591,20 @@ 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::kNewMode)) - { - err = DataModel::Decode(reader, newMode); - } - else - { - } - - ReturnErrorOnFailure(err); } } -} // namespace ChangeToMode. -namespace ChangeToModeResponse { +} // namespace AllClear. +} // namespace Events + +} // namespace SmokeCoAlarm +namespace DishwasherAlarm { + +namespace Commands { +namespace Reset { 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::kAlarms), alarms); return encoder.Finalize(); } @@ -11666,13 +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::kStatus)) - { - err = DataModel::Decode(reader, status); - } - else if (__context_tag == to_underlying(Fields::kStatusText)) + if (__context_tag == to_underlying(Fields::kAlarms)) { - err = DataModel::Decode(reader, statusText); + err = DataModel::Decode(reader, alarms); } else { @@ -11681,90 +11633,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) 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(): - 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::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 LaundryWasherControls -namespace RvcRunMode { -namespace Structs {} // namespace Structs - -namespace Commands { -namespace ChangeToMode { +} // 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::kNewMode), newMode); + encoder.Encode(to_underlying(Fields::kMask), mask); return encoder.Finalize(); } @@ -11782,9 +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::kNewMode)) + if (__context_tag == to_underlying(Fields::kMask)) { - err = DataModel::Decode(reader, newMode); + err = DataModel::Decode(reader, mask); } else { @@ -11793,14 +11667,51 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace ChangeToMode. -namespace ChangeToModeResponse { +} // 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 { 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::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) @@ -11817,13 +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::kStatus)) + if (__context_tag == to_underlying(Fields::kActive)) { - err = DataModel::Decode(reader, status); + err = DataModel::Decode(reader, active); } - else if (__context_tag == to_underlying(Fields::kStatusText)) + else if (__context_tag == to_underlying(Fields::kInactive)) { - err = DataModel::Decode(reader, statusText); + 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)) + { + 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,19 @@ 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); + encoder.Encode(to_underlying(Fields::kWattSettingIndex), wattSettingIndex); + encoder.Encode(to_underlying(Fields::kStartAfterSetting), startAfterSetting); return encoder.Finalize(); } @@ -11893,9 +11819,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::kNewMode)) + if (__context_tag == to_underlying(Fields::kCookMode)) { - err = DataModel::Decode(reader, newMode); + err = DataModel::Decode(reader, cookMode); + } + else if (__context_tag == to_underlying(Fields::kCookTime)) + { + err = DataModel::Decode(reader, cookTime); + } + else if (__context_tag == to_underlying(Fields::kPowerSetting)) + { + err = DataModel::Decode(reader, powerSetting); + } + else if (__context_tag == to_underlying(Fields::kWattSettingIndex)) + { + err = DataModel::Decode(reader, wattSettingIndex); + } + else if (__context_tag == to_underlying(Fields::kStartAfterSetting)) + { + err = DataModel::Decode(reader, startAfterSetting); } else { @@ -11904,13 +11846,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 +11869,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 +11880,7 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace ChangeToModeResponse. +} // namespace AddMoreTime. } // namespace Commands namespace Attributes { @@ -11951,12 +11888,24 @@ 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::MaxCookTime::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, maxCookTime); + 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::SupportedWatts::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, supportedWatts); + case Attributes::SelectedWattIndex::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, selectedWattIndex); + case Attributes::WattRating::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, wattRating); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): @@ -11977,16 +11926,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,81 +11948,122 @@ 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)) +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, targetTemperatureLevel); + return std::get(__element); } - else + } +} +} // namespace Stop. +namespace Start { +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); } - - ReturnErrorOnFailure(err); } } -} // namespace SetTemperature. -} // 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::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 Resume. +namespace OperationalCommandResponse { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kCommandResponseState), commandResponseState); + 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 TemperatureControl -namespace RefrigeratorAlarm { + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); -namespace Commands {} // namespace Commands + if (__context_tag == to_underlying(Fields::kCommandResponseState)) + { + err = DataModel::Decode(reader, commandResponseState); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace OperationalCommandResponse. +} // 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::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(): @@ -12094,15 +12083,12 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre } // namespace Attributes namespace Events { -namespace Notify { +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::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)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kErrorState), errorState)); return aWriter.EndContainer(outer); } @@ -12120,21 +12106,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::kErrorState)) { - err = DataModel::Decode(reader, mask); + err = DataModel::Decode(reader, errorState); } else { @@ -12143,20 +12117,16 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace Notify. -} // namespace Events - -} // namespace RefrigeratorAlarm -namespace DishwasherMode { -namespace Structs {} // namespace Structs - -namespace Commands { -namespace ChangeToMode { +} // 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::kNewMode), newMode); - 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) @@ -12173,9 +12143,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::kNewMode)) + if (__context_tag == to_underlying(Fields::kCompletionErrorCode)) { - err = DataModel::Decode(reader, newMode); + 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 { @@ -12184,13 +12162,18 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace ChangeToMode. -namespace ChangeToModeResponse { +} // namespace OperationCompletion. +} // namespace Events + +} // namespace OperationalState +namespace RvcOperationalState { +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::kStatus), status); - encoder.Encode(to_underlying(Fields::kStatusText), statusText); return encoder.Finalize(); } @@ -12204,101 +12187,74 @@ 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::kStatus)) - { - err = DataModel::Decode(reader, status); - } - else if (__context_tag == to_underlying(Fields::kStatusText)) - { - err = DataModel::Decode(reader, statusText); - } - 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 ChangeToModeResponse. -} // 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::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 DishwasherMode -namespace AirQuality { - -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::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 Resume. +namespace OperationalCommandResponse { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kCommandResponseState), commandResponseState); return encoder.Finalize(); } @@ -12310,11 +12266,24 @@ 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::kCommandResponseState)) + { + err = DataModel::Decode(reader, commandResponseState); + } + else + { } + + ReturnErrorOnFailure(err); } } -} // namespace SelfTestRequest. +} // namespace OperationalCommandResponse. } // namespace Commands namespace Attributes { @@ -12322,32 +12291,18 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre { switch (path.mAttributeId) { - 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::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(): @@ -12367,12 +12322,12 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre } // namespace Attributes namespace Events { -namespace SmokeAlarm { +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); } @@ -12390,9 +12345,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 { @@ -12401,13 +12356,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace SmokeAlarm. -namespace COAlarm { +} // 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::kAlarmSeverityLevel), alarmSeverityLevel)); + 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); } @@ -12425,9 +12382,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::kAlarmSeverityLevel)) + if (__context_tag == to_underlying(Fields::kCompletionErrorCode)) { - err = DataModel::Decode(reader, alarmSeverityLevel); + 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 { @@ -12436,14 +12401,20 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace COAlarm. -namespace LowBattery { +} // 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)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAlarmSeverityLevel), alarmSeverityLevel)); - 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) @@ -12460,9 +12431,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::kAttributeID)) { - err = DataModel::Decode(reader, alarmSeverityLevel); + err = DataModel::Decode(reader, attributeID); + } + else if (__context_tag == to_underlying(Fields::kAttributeValue)) + { + err = DataModel::Decode(reader, attributeValue); } else { @@ -12471,13 +12446,16 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace LowBattery. -namespace HardwareFault { + +} // 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)); - 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) @@ -12490,78 +12468,65 @@ 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::kClusterID)) { - return std::get(__element); + err = DataModel::Decode(reader, clusterID); + } + else if (__context_tag == to_underlying(Fields::kAttributeValueList)) + { + err = DataModel::Decode(reader, attributeValueList); } + else + { + } + + ReturnErrorOnFailure(err); } } -} // 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) +} // namespace ExtensionFieldSet + +namespace SceneInfoStruct { +CHIP_ERROR Type::EncodeForWrite(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { - detail::StructDecodeIterator __iterator(reader); - while (true) - { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) - { - return std::get(__element); - } - } + return DoEncode(aWriter, aTag, NullOptional); } -} // namespace SelfTestComplete. -namespace AlarmMuted { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const + +CHIP_ERROR Type::EncodeForRead(TLV::TLVWriter & aWriter, TLV::Tag aTag, FabricIndex aAccessingFabricIndex) const { - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - return aWriter.EndContainer(outer); + return DoEncode(aWriter, aTag, MakeOptional(aAccessingFabricIndex)); } -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +CHIP_ERROR Type::DoEncode(TLV::TLVWriter & aWriter, TLV::Tag aTag, const Optional & aAccessingFabricIndex) const { - detail::StructDecodeIterator __iterator(reader); - while (true) + bool includeSensitive = !aAccessingFabricIndex.HasValue() || (aAccessingFabricIndex.Value() == fabricIndex); + + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + + encoder.Encode(to_underlying(Fields::kSceneCount), sceneCount); + if (includeSensitive) { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) - { - return std::get(__element); - } + encoder.Encode(to_underlying(Fields::kCurrentScene), currentScene); } -} -} // 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); + 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) @@ -12574,35 +12539,33 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { 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) -{ - 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::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)) { - return std::get(__element); + err = DataModel::Decode(reader, remainingCapacity); } - - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kAlarmSeverityLevel)) + else if (__context_tag == to_underlying(Fields::kFabricIndex)) { - err = DataModel::Decode(reader, alarmSeverityLevel); + err = DataModel::Decode(reader, fabricIndex); } else { @@ -12611,14 +12574,21 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace InterconnectSmokeAlarm. -namespace InterconnectCOAlarm { + +} // 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)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kAlarmSeverityLevel), alarmSeverityLevel)); - 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) @@ -12635,9 +12605,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::kAlarmSeverityLevel)) + if (__context_tag == to_underlying(Fields::kGroupID)) { - err = DataModel::Decode(reader, alarmSeverityLevel); + 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 { @@ -12646,13 +12632,15 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace InterconnectCOAlarm. -namespace AllClear { +} // namespace AddScene. +namespace AddSceneResponse { 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::kStatus), status); + encoder.Encode(to_underlying(Fields::kGroupID), groupID); + encoder.Encode(to_underlying(Fields::kSceneID), sceneID); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -12665,20 +12653,36 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { return std::get(__element); } - } -} -} // namespace AllClear. -} // namespace Events -} // namespace SmokeCoAlarm -namespace DishwasherAlarm { + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); -namespace Commands { -namespace Reset { + 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 { 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::kGroupID), groupID); + encoder.Encode(to_underlying(Fields::kSceneID), sceneID); return encoder.Finalize(); } @@ -12696,9 +12700,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::kAlarms)) + if (__context_tag == to_underlying(Fields::kGroupID)) { - err = DataModel::Decode(reader, alarms); + err = DataModel::Decode(reader, groupID); + } + else if (__context_tag == to_underlying(Fields::kSceneID)) + { + err = DataModel::Decode(reader, sceneID); } else { @@ -12707,12 +12715,17 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace Reset. -namespace ModifyEnabledAlarms { +} // 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::kMask), mask); + 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(); } @@ -12730,9 +12743,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::kMask)) + if (__context_tag == to_underlying(Fields::kStatus)) { - err = DataModel::Decode(reader, mask); + 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 { @@ -12741,51 +12774,14 @@ 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 ViewSceneResponse. +namespace RemoveScene { 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::kGroupID), groupID); + encoder.Encode(to_underlying(Fields::kSceneID), sceneID); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -12802,21 +12798,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::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)) + if (__context_tag == to_underlying(Fields::kGroupID)) { - err = DataModel::Decode(reader, state); + err = DataModel::Decode(reader, groupID); } - else if (__context_tag == to_underlying(Fields::kMask)) + else if (__context_tag == to_underlying(Fields::kSceneID)) { - err = DataModel::Decode(reader, mask); + err = DataModel::Decode(reader, sceneID); } else { @@ -12825,55 +12813,14 @@ 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 RemoveScene. +namespace RemoveSceneResponse { 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::kStatus), status); + encoder.Encode(to_underlying(Fields::kGroupID), groupID); + encoder.Encode(to_underlying(Fields::kSceneID), sceneID); return encoder.Finalize(); } @@ -12891,17 +12838,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::kCookMode)) + if (__context_tag == to_underlying(Fields::kStatus)) { - err = DataModel::Decode(reader, cookMode); + err = DataModel::Decode(reader, status); } - else if (__context_tag == to_underlying(Fields::kCookTime)) + else 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 +12857,12 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace SetCookingParameters. -namespace AddMoreTime { +} // 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::kTimeToAdd), timeToAdd); + encoder.Encode(to_underlying(Fields::kGroupID), groupID); return encoder.Finalize(); } @@ -12933,9 +12880,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::kTimeToAdd)) + if (__context_tag == to_underlying(Fields::kGroupID)) { - err = DataModel::Decode(reader, timeToAdd); + err = DataModel::Decode(reader, groupID); } else { @@ -12944,53 +12891,13 @@ 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 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(); } @@ -13004,13 +12911,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 Pause. -namespace Stop { +} // 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(); } @@ -13024,13 +12950,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 Stop. -namespace Start { +} // 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(); } @@ -13044,13 +12990,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 Start. -namespace Resume { +} // 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::kGroupID), groupID); + encoder.Encode(to_underlying(Fields::kSceneID), sceneID); + encoder.Encode(to_underlying(Fields::kTransitionTime), transitionTime); return encoder.Finalize(); } @@ -13064,14 +13034,35 @@ 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 + { + } + + ReturnErrorOnFailure(err); } } -} // namespace Resume. -namespace OperationalCommandResponse { +} // namespace RecallScene. +namespace GetSceneMembership { 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); return encoder.Finalize(); } @@ -13089,9 +13080,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::kCommandResponseState)) + if (__context_tag == to_underlying(Fields::kGroupID)) { - err = DataModel::Decode(reader, commandResponseState); + err = DataModel::Decode(reader, groupID); } else { @@ -13100,52 +13091,16 @@ 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 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::kErrorState), errorState)); - 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) @@ -13162,9 +13117,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::kErrorState)) + if (__context_tag == to_underlying(Fields::kStatus)) { - err = DataModel::Decode(reader, errorState); + 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)) + { + err = DataModel::Decode(reader, sceneList); } else { @@ -13173,16 +13140,17 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // 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 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(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -13199,17 +13167,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::kCompletionErrorCode)) + if (__context_tag == to_underlying(Fields::kGroupID)) { - err = DataModel::Decode(reader, completionErrorCode); + err = DataModel::Decode(reader, groupID); } - else if (__context_tag == to_underlying(Fields::kTotalOperationalTime)) + else if (__context_tag == to_underlying(Fields::kSceneID)) { - err = DataModel::Decode(reader, totalOperationalTime); + err = DataModel::Decode(reader, sceneID); } - else if (__context_tag == to_underlying(Fields::kPausedTime)) + else if (__context_tag == to_underlying(Fields::kTransitionTime)) { - err = DataModel::Decode(reader, pausedTime); + 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 { @@ -13218,18 +13194,14 @@ 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 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(); } @@ -13243,33 +13215,36 @@ 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 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::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 { - return std::get(__element); } + + 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 +13258,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 +13305,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 +13336,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 +13363,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 +13390,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 +13415,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 +13434,51 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) ReturnErrorOnFailure(err); } } -} // namespace OperationCompletion. -} // namespace Events +} // namespace CopySceneResponse. +} // namespace Commands + +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 RvcOperationalState +namespace Events {} // namespace Events + +} // namespace ScenesManagement namespace HepaFilterMonitoring { namespace Structs { @@ -18945,13 +18963,291 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } } -} // namespace Leakage. -namespace AirDetection { +} // namespace Leakage. +namespace AirDetection { +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); + } + } +} +} // namespace AirDetection. +namespace TurbineOperation { +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); + } + } +} +} // namespace TurbineOperation. +} // namespace Events + +} // namespace PumpConfigurationAndControl +namespace Thermostat { +namespace Structs { + +namespace ScheduleTransitionStruct { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kDayOfWeek), dayOfWeek); + encoder.Encode(to_underlying(Fields::kTransitionTime), transitionTime); + encoder.Encode(to_underlying(Fields::kPresetHandle), presetHandle); + encoder.Encode(to_underlying(Fields::kSystemMode), systemMode); + encoder.Encode(to_underlying(Fields::kCoolingSetpoint), coolingSetpoint); + encoder.Encode(to_underlying(Fields::kHeatingSetpoint), heatingSetpoint); + 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::kDayOfWeek)) + { + err = DataModel::Decode(reader, dayOfWeek); + } + else if (__context_tag == to_underlying(Fields::kTransitionTime)) + { + err = DataModel::Decode(reader, transitionTime); + } + else if (__context_tag == to_underlying(Fields::kPresetHandle)) + { + err = DataModel::Decode(reader, presetHandle); + } + else if (__context_tag == to_underlying(Fields::kSystemMode)) + { + err = DataModel::Decode(reader, systemMode); + } + else if (__context_tag == to_underlying(Fields::kCoolingSetpoint)) + { + err = DataModel::Decode(reader, coolingSetpoint); + } + else if (__context_tag == to_underlying(Fields::kHeatingSetpoint)) + { + err = DataModel::Decode(reader, heatingSetpoint); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} + +} // namespace ScheduleTransitionStruct + +namespace ScheduleStruct { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kScheduleHandle), scheduleHandle); + encoder.Encode(to_underlying(Fields::kSystemMode), systemMode); + encoder.Encode(to_underlying(Fields::kName), name); + encoder.Encode(to_underlying(Fields::kPresetHandle), presetHandle); + encoder.Encode(to_underlying(Fields::kTransitions), transitions); + encoder.Encode(to_underlying(Fields::kBuiltIn), builtIn); + 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::kScheduleHandle)) + { + err = DataModel::Decode(reader, scheduleHandle); + } + else if (__context_tag == to_underlying(Fields::kSystemMode)) + { + err = DataModel::Decode(reader, systemMode); + } + else if (__context_tag == to_underlying(Fields::kName)) + { + err = DataModel::Decode(reader, name); + } + else if (__context_tag == to_underlying(Fields::kPresetHandle)) + { + err = DataModel::Decode(reader, presetHandle); + } + else if (__context_tag == to_underlying(Fields::kTransitions)) + { + err = DataModel::Decode(reader, transitions); + } + else if (__context_tag == to_underlying(Fields::kBuiltIn)) + { + err = DataModel::Decode(reader, builtIn); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} + +} // namespace ScheduleStruct + +namespace PresetStruct { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kPresetHandle), presetHandle); + encoder.Encode(to_underlying(Fields::kPresetScenario), presetScenario); + encoder.Encode(to_underlying(Fields::kName), name); + encoder.Encode(to_underlying(Fields::kCoolingSetpoint), coolingSetpoint); + encoder.Encode(to_underlying(Fields::kHeatingSetpoint), heatingSetpoint); + encoder.Encode(to_underlying(Fields::kBuiltIn), builtIn); + 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::kPresetHandle)) + { + err = DataModel::Decode(reader, presetHandle); + } + else if (__context_tag == to_underlying(Fields::kPresetScenario)) + { + err = DataModel::Decode(reader, presetScenario); + } + else if (__context_tag == to_underlying(Fields::kName)) + { + err = DataModel::Decode(reader, name); + } + else if (__context_tag == to_underlying(Fields::kCoolingSetpoint)) + { + err = DataModel::Decode(reader, coolingSetpoint); + } + else if (__context_tag == to_underlying(Fields::kHeatingSetpoint)) + { + err = DataModel::Decode(reader, heatingSetpoint); + } + else if (__context_tag == to_underlying(Fields::kBuiltIn)) + { + err = DataModel::Decode(reader, builtIn); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} + +} // namespace PresetStruct + +namespace PresetTypeStruct { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kPresetScenario), presetScenario); + encoder.Encode(to_underlying(Fields::kNumberOfPresets), numberOfPresets); + encoder.Encode(to_underlying(Fields::kPresetTypeFeatures), presetTypeFeatures); + 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::kPresetScenario)) + { + err = DataModel::Decode(reader, presetScenario); + } + else if (__context_tag == to_underlying(Fields::kNumberOfPresets)) + { + err = DataModel::Decode(reader, numberOfPresets); + } + else if (__context_tag == to_underlying(Fields::kPresetTypeFeatures)) + { + err = DataModel::Decode(reader, presetTypeFeatures); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} + +} // namespace PresetTypeStruct + +namespace QueuedPresetStruct { 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::kPresetHandle), presetHandle); + encoder.Encode(to_underlying(Fields::kTransitionTimestamp), transitionTimestamp); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -18964,15 +19260,36 @@ 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::kPresetHandle)) + { + err = DataModel::Decode(reader, presetHandle); + } + else if (__context_tag == to_underlying(Fields::kTransitionTimestamp)) + { + err = DataModel::Decode(reader, transitionTimestamp); + } + else + { + } + + ReturnErrorOnFailure(err); } } -} // namespace AirDetection. -namespace TurbineOperation { + +} // namespace QueuedPresetStruct + +namespace ScheduleTypeStruct { 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::kSystemMode), systemMode); + encoder.Encode(to_underlying(Fields::kNumberOfSchedules), numberOfSchedules); + encoder.Encode(to_underlying(Fields::kScheduleTypeFeatures), scheduleTypeFeatures); + return encoder.Finalize(); } CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) @@ -18985,14 +19302,31 @@ 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::kSystemMode)) + { + err = DataModel::Decode(reader, systemMode); + } + else if (__context_tag == to_underlying(Fields::kNumberOfSchedules)) + { + err = DataModel::Decode(reader, numberOfSchedules); + } + else if (__context_tag == to_underlying(Fields::kScheduleTypeFeatures)) + { + err = DataModel::Decode(reader, scheduleTypeFeatures); + } + else + { + } + + ReturnErrorOnFailure(err); } } -} // namespace TurbineOperation. -} // namespace Events -} // namespace PumpConfigurationAndControl -namespace Thermostat { -namespace Structs { +} // namespace ScheduleTypeStruct namespace WeeklyScheduleTransitionStruct { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const @@ -19238,6 +19572,207 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } } // namespace ClearWeeklySchedule. +namespace SetActiveScheduleRequest { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kScheduleHandle), scheduleHandle); + 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::kScheduleHandle)) + { + err = DataModel::Decode(reader, scheduleHandle); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace SetActiveScheduleRequest. +namespace SetActivePresetRequest { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kPresetHandle), presetHandle); + encoder.Encode(to_underlying(Fields::kDelayMinutes), delayMinutes); + 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::kPresetHandle)) + { + err = DataModel::Decode(reader, presetHandle); + } + else if (__context_tag == to_underlying(Fields::kDelayMinutes)) + { + err = DataModel::Decode(reader, delayMinutes); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace SetActivePresetRequest. +namespace StartPresetsSchedulesEditRequest { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kTimeoutSeconds), timeoutSeconds); + 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::kTimeoutSeconds)) + { + err = DataModel::Decode(reader, timeoutSeconds); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace StartPresetsSchedulesEditRequest. +namespace CancelPresetsSchedulesEditRequest { +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 CancelPresetsSchedulesEditRequest. +namespace CommitPresetsSchedulesRequest { +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 CommitPresetsSchedulesRequest. +namespace CancelSetActivePresetRequest { +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 CancelSetActivePresetRequest. +namespace SetTemperatureSetpointHoldPolicy { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; + encoder.Encode(to_underlying(Fields::kTemperatureSetpointHoldPolicy), temperatureSetpointHoldPolicy); + 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::kTemperatureSetpointHoldPolicy)) + { + err = DataModel::Decode(reader, temperatureSetpointHoldPolicy); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace SetTemperatureSetpointHoldPolicy. } // namespace Commands namespace Attributes { @@ -19343,6 +19878,34 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre return DataModel::Decode(reader, ACCoilTemperature); case Attributes::ACCapacityformat::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, ACCapacityformat); + case Attributes::PresetTypes::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, presetTypes); + case Attributes::ScheduleTypes::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, scheduleTypes); + case Attributes::NumberOfPresets::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, numberOfPresets); + case Attributes::NumberOfSchedules::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, numberOfSchedules); + case Attributes::NumberOfScheduleTransitions::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, numberOfScheduleTransitions); + case Attributes::NumberOfScheduleTransitionPerDay::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, numberOfScheduleTransitionPerDay); + case Attributes::ActivePresetHandle::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, activePresetHandle); + case Attributes::ActiveScheduleHandle::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, activeScheduleHandle); + case Attributes::Presets::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, presets); + case Attributes::Schedules::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, schedules); + case Attributes::PresetsSchedulesEditable::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, presetsSchedulesEditable); + case Attributes::TemperatureSetpointHoldPolicy::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, temperatureSetpointHoldPolicy); + case Attributes::SetpointHoldExpiryTimestamp::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, setpointHoldExpiryTimestamp); + case Attributes::QueuedPreset::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, queuedPreset); case Attributes::GeneratedCommandList::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, generatedCommandList); case Attributes::AcceptedCommandList::TypeInfo::GetAttributeId(): @@ -28447,33 +29010,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) { @@ -28732,6 +29268,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 c4fc5f675fae30..e41a226edfbdaa 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,11 +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 { +} // namespace RxAddressFilteredCount +namespace RxDestAddrFilteredCount { struct TypeInfo { using Type = uint32_t; @@ -9515,11 +8695,11 @@ struct TypeInfo using DecodableArgType = uint32_t; static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TxAckRequestedCount::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::RxDestAddrFilteredCount::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace TxAckRequestedCount -namespace TxAckedCount { +} // namespace RxDestAddrFilteredCount +namespace RxDuplicatedCount { struct TypeInfo { using Type = uint32_t; @@ -9527,11 +8707,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::RxDuplicatedCount::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace TxAckedCount -namespace TxNoAckRequestedCount { +} // namespace RxDuplicatedCount +namespace RxErrNoFrameCount { struct TypeInfo { using Type = uint32_t; @@ -9539,11 +8719,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::RxErrNoFrameCount::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace TxNoAckRequestedCount -namespace TxDataCount { +} // namespace RxErrNoFrameCount +namespace RxErrUnknownNeighborCount { struct TypeInfo { using Type = uint32_t; @@ -9551,11 +8731,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::RxErrUnknownNeighborCount::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace TxDataCount -namespace TxDataPollCount { +} // namespace RxErrUnknownNeighborCount +namespace RxErrInvalidSrcAddrCount { struct TypeInfo { using Type = uint32_t; @@ -9563,11 +8743,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::RxErrInvalidSrcAddrCount::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace TxDataPollCount -namespace TxBeaconCount { +} // namespace RxErrInvalidSrcAddrCount +namespace RxErrSecCount { struct TypeInfo { using Type = uint32_t; @@ -9575,11 +8755,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::RxErrSecCount::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace TxBeaconCount -namespace TxBeaconRequestCount { +} // namespace RxErrSecCount +namespace RxErrFcsCount { struct TypeInfo { using Type = uint32_t; @@ -9587,11 +8767,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::RxErrFcsCount::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace TxBeaconRequestCount -namespace TxOtherCount { +} // namespace RxErrFcsCount +namespace RxErrOtherCount { struct TypeInfo { using Type = uint32_t; @@ -9599,486 +8779,1446 @@ 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::RxErrOtherCount::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace TxOtherCount -namespace TxRetryCount { +} // 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::TxRetryCount::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ActiveTimestamp::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace TxRetryCount -namespace TxDirectMaxRetryExpiryCount { +} // 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::TxDirectMaxRetryExpiryCount::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PendingTimestamp::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace TxDirectMaxRetryExpiryCount -namespace TxIndirectMaxRetryExpiryCount { +} // 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::TxIndirectMaxRetryExpiryCount::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Delay::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace TxIndirectMaxRetryExpiryCount -namespace TxErrCcaCount { +} // 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::TxErrCcaCount::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SecurityPolicy::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace TxErrCcaCount -namespace TxErrAbortCount { +} // 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::TxErrAbortCount::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 TxErrAbortCount -namespace TxErrBusyChannelCount { -struct TypeInfo +} // 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); + + Attributes::Channel::TypeInfo::DecodableType channel; + Attributes::RoutingRole::TypeInfo::DecodableType routingRole; + Attributes::NetworkName::TypeInfo::DecodableType networkName; + Attributes::PanId::TypeInfo::DecodableType panId; + Attributes::ExtendedPanId::TypeInfo::DecodableType extendedPanId; + Attributes::MeshLocalPrefix::TypeInfo::DecodableType meshLocalPrefix; + Attributes::OverrunCount::TypeInfo::DecodableType overrunCount = static_cast(0); + Attributes::NeighborTable::TypeInfo::DecodableType neighborTable; + Attributes::RouteTable::TypeInfo::DecodableType routeTable; + Attributes::PartitionId::TypeInfo::DecodableType partitionId; + Attributes::Weighting::TypeInfo::DecodableType weighting; + Attributes::DataVersion::TypeInfo::DecodableType dataVersion; + Attributes::StableDataVersion::TypeInfo::DecodableType stableDataVersion; + Attributes::LeaderRouterId::TypeInfo::DecodableType leaderRouterId; + Attributes::DetachedRoleCount::TypeInfo::DecodableType detachedRoleCount = static_cast(0); + Attributes::ChildRoleCount::TypeInfo::DecodableType childRoleCount = static_cast(0); + Attributes::RouterRoleCount::TypeInfo::DecodableType routerRoleCount = static_cast(0); + Attributes::LeaderRoleCount::TypeInfo::DecodableType leaderRoleCount = static_cast(0); + Attributes::AttachAttemptCount::TypeInfo::DecodableType attachAttemptCount = static_cast(0); + Attributes::PartitionIdChangeCount::TypeInfo::DecodableType partitionIdChangeCount = static_cast(0); + Attributes::BetterPartitionAttachAttemptCount::TypeInfo::DecodableType betterPartitionAttachAttemptCount = + static_cast(0); + Attributes::ParentChangeCount::TypeInfo::DecodableType parentChangeCount = static_cast(0); + Attributes::TxTotalCount::TypeInfo::DecodableType txTotalCount = static_cast(0); + Attributes::TxUnicastCount::TypeInfo::DecodableType txUnicastCount = static_cast(0); + Attributes::TxBroadcastCount::TypeInfo::DecodableType txBroadcastCount = static_cast(0); + Attributes::TxAckRequestedCount::TypeInfo::DecodableType txAckRequestedCount = static_cast(0); + Attributes::TxAckedCount::TypeInfo::DecodableType txAckedCount = static_cast(0); + Attributes::TxNoAckRequestedCount::TypeInfo::DecodableType txNoAckRequestedCount = static_cast(0); + Attributes::TxDataCount::TypeInfo::DecodableType txDataCount = static_cast(0); + Attributes::TxDataPollCount::TypeInfo::DecodableType txDataPollCount = static_cast(0); + Attributes::TxBeaconCount::TypeInfo::DecodableType txBeaconCount = static_cast(0); + Attributes::TxBeaconRequestCount::TypeInfo::DecodableType txBeaconRequestCount = static_cast(0); + Attributes::TxOtherCount::TypeInfo::DecodableType txOtherCount = static_cast(0); + Attributes::TxRetryCount::TypeInfo::DecodableType txRetryCount = static_cast(0); + Attributes::TxDirectMaxRetryExpiryCount::TypeInfo::DecodableType txDirectMaxRetryExpiryCount = static_cast(0); + Attributes::TxIndirectMaxRetryExpiryCount::TypeInfo::DecodableType txIndirectMaxRetryExpiryCount = static_cast(0); + Attributes::TxErrCcaCount::TypeInfo::DecodableType txErrCcaCount = static_cast(0); + Attributes::TxErrAbortCount::TypeInfo::DecodableType txErrAbortCount = static_cast(0); + Attributes::TxErrBusyChannelCount::TypeInfo::DecodableType txErrBusyChannelCount = static_cast(0); + Attributes::RxTotalCount::TypeInfo::DecodableType rxTotalCount = static_cast(0); + Attributes::RxUnicastCount::TypeInfo::DecodableType rxUnicastCount = static_cast(0); + Attributes::RxBroadcastCount::TypeInfo::DecodableType rxBroadcastCount = static_cast(0); + Attributes::RxDataCount::TypeInfo::DecodableType rxDataCount = static_cast(0); + Attributes::RxDataPollCount::TypeInfo::DecodableType rxDataPollCount = static_cast(0); + Attributes::RxBeaconCount::TypeInfo::DecodableType rxBeaconCount = static_cast(0); + Attributes::RxBeaconRequestCount::TypeInfo::DecodableType rxBeaconRequestCount = static_cast(0); + Attributes::RxOtherCount::TypeInfo::DecodableType rxOtherCount = static_cast(0); + Attributes::RxAddressFilteredCount::TypeInfo::DecodableType rxAddressFilteredCount = static_cast(0); + Attributes::RxDestAddrFilteredCount::TypeInfo::DecodableType rxDestAddrFilteredCount = static_cast(0); + Attributes::RxDuplicatedCount::TypeInfo::DecodableType rxDuplicatedCount = static_cast(0); + Attributes::RxErrNoFrameCount::TypeInfo::DecodableType rxErrNoFrameCount = static_cast(0); + Attributes::RxErrUnknownNeighborCount::TypeInfo::DecodableType rxErrUnknownNeighborCount = static_cast(0); + Attributes::RxErrInvalidSrcAddrCount::TypeInfo::DecodableType rxErrInvalidSrcAddrCount = static_cast(0); + Attributes::RxErrSecCount::TypeInfo::DecodableType rxErrSecCount = static_cast(0); + Attributes::RxErrFcsCount::TypeInfo::DecodableType rxErrFcsCount = static_cast(0); + Attributes::RxErrOtherCount::TypeInfo::DecodableType rxErrOtherCount = static_cast(0); + Attributes::ActiveTimestamp::TypeInfo::DecodableType activeTimestamp; + Attributes::PendingTimestamp::TypeInfo::DecodableType pendingTimestamp; + Attributes::Delay::TypeInfo::DecodableType delay; + Attributes::SecurityPolicy::TypeInfo::DecodableType securityPolicy; + Attributes::ChannelPage0Mask::TypeInfo::DecodableType channelPage0Mask; + Attributes::OperationalDatasetComponents::TypeInfo::DecodableType operationalDatasetComponents; + Attributes::ActiveNetworkFaultsList::TypeInfo::DecodableType activeNetworkFaultsList; + 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 ConnectionStatus { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + +enum class Fields : uint8_t +{ + kConnectionStatus = 0, +}; + +struct Type +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::ConnectionStatus::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } + static constexpr bool kIsFabricScoped = false; + + ConnectionStatusEnum connectionStatus = 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::ConnectionStatus::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } + + ConnectionStatusEnum connectionStatus = static_cast(0); + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +} // namespace ConnectionStatus +namespace NetworkFaultChange { +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::NetworkFaultChange::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::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::NetworkFaultChange::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } + + DataModel::DecodableList current; + DataModel::DecodableList previous; + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +} // namespace NetworkFaultChange +} // namespace Events +} // namespace ThreadNetworkDiagnostics +namespace WiFiNetworkDiagnostics { + +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 +{ +}; + +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::WiFiNetworkDiagnostics::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::ResetCounts::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace ResetCounts +} // namespace Commands + +namespace Attributes { + +namespace Bssid { +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::WiFiNetworkDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Bssid::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 6; } +}; +} // namespace Bssid +namespace SecurityType { +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::WiFiNetworkDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SecurityType::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace SecurityType +namespace WiFiVersion { +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::WiFiNetworkDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::WiFiVersion::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace WiFiVersion +namespace ChannelNumber { +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::WiFiNetworkDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ChannelNumber::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ChannelNumber +namespace Rssi { +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::WiFiNetworkDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Rssi::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Rssi +namespace BeaconLostCount { +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::WiFiNetworkDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::BeaconLostCount::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace BeaconLostCount +namespace BeaconRxCount { +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::WiFiNetworkDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::BeaconRxCount::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace BeaconRxCount +namespace PacketMulticastRxCount { +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::WiFiNetworkDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PacketMulticastRxCount::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace PacketMulticastRxCount +namespace PacketMulticastTxCount { +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::WiFiNetworkDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PacketMulticastTxCount::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace PacketMulticastTxCount +namespace PacketUnicastRxCount { +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::WiFiNetworkDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PacketUnicastRxCount::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace PacketUnicastRxCount +namespace PacketUnicastTxCount { +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::WiFiNetworkDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PacketUnicastTxCount::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace PacketUnicastTxCount +namespace CurrentMaxRate { +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::WiFiNetworkDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentMaxRate::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace CurrentMaxRate +namespace OverrunCount { +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::WiFiNetworkDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OverrunCount::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace OverrunCount +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } +}; +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } +}; +} // namespace ClusterRevision + +struct TypeInfo +{ + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::Bssid::TypeInfo::DecodableType bssid; + Attributes::SecurityType::TypeInfo::DecodableType securityType; + Attributes::WiFiVersion::TypeInfo::DecodableType wiFiVersion; + Attributes::ChannelNumber::TypeInfo::DecodableType channelNumber; + Attributes::Rssi::TypeInfo::DecodableType rssi; + Attributes::BeaconLostCount::TypeInfo::DecodableType beaconLostCount; + Attributes::BeaconRxCount::TypeInfo::DecodableType beaconRxCount; + Attributes::PacketMulticastRxCount::TypeInfo::DecodableType packetMulticastRxCount; + Attributes::PacketMulticastTxCount::TypeInfo::DecodableType packetMulticastTxCount; + Attributes::PacketUnicastRxCount::TypeInfo::DecodableType packetUnicastRxCount; + Attributes::PacketUnicastTxCount::TypeInfo::DecodableType packetUnicastTxCount; + Attributes::CurrentMaxRate::TypeInfo::DecodableType currentMaxRate; + Attributes::OverrunCount::TypeInfo::DecodableType overrunCount; + 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 Disconnection { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + +enum class Fields : uint8_t +{ + kReasonCode = 0, +}; + +struct Type +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::Disconnection::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } + static constexpr bool kIsFabricScoped = false; + + uint16_t reasonCode = 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::Disconnection::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } + + uint16_t reasonCode = static_cast(0); + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +} // namespace Disconnection +namespace AssociationFailure { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + +enum class Fields : uint8_t +{ + kAssociationFailureCause = 0, + kStatus = 1, +}; + +struct Type +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::AssociationFailure::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } + static constexpr bool kIsFabricScoped = false; + + AssociationFailureCauseEnum associationFailureCause = static_cast(0); + uint16_t status = 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::AssociationFailure::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } + + AssociationFailureCauseEnum associationFailureCause = static_cast(0); + uint16_t status = static_cast(0); + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +} // namespace AssociationFailure +namespace ConnectionStatus { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + +enum class Fields : uint8_t +{ + kConnectionStatus = 0, +}; + +struct Type +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::ConnectionStatus::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } + static constexpr bool kIsFabricScoped = false; + + ConnectionStatusEnum connectionStatus = 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::ConnectionStatus::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } + + ConnectionStatusEnum connectionStatus = static_cast(0); + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +} // namespace ConnectionStatus +} // namespace Events +} // namespace WiFiNetworkDiagnostics +namespace EthernetNetworkDiagnostics { + +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 +{ +}; + +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::EthernetNetworkDiagnostics::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::ResetCounts::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::EthernetNetworkDiagnostics::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace ResetCounts +} // namespace Commands + +namespace Attributes { + +namespace PHYRate { +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::EthernetNetworkDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PHYRate::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace PHYRate +namespace FullDuplex { +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::EthernetNetworkDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::FullDuplex::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace FullDuplex +namespace PacketRxCount { +struct TypeInfo +{ + using Type = uint64_t; + using DecodableType = uint64_t; + using DecodableArgType = uint64_t; + + static constexpr ClusterId GetClusterId() { return Clusters::EthernetNetworkDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PacketRxCount::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace PacketRxCount +namespace PacketTxCount { +struct TypeInfo +{ + using Type = uint64_t; + using DecodableType = uint64_t; + using DecodableArgType = uint64_t; + + static constexpr ClusterId GetClusterId() { return Clusters::EthernetNetworkDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PacketTxCount::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace PacketTxCount +namespace TxErrCount { +struct TypeInfo +{ + using Type = uint64_t; + using DecodableType = uint64_t; + using DecodableArgType = uint64_t; + + static constexpr ClusterId GetClusterId() { return Clusters::EthernetNetworkDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TxErrCount::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace TxErrCount +namespace CollisionCount { +struct TypeInfo +{ + using Type = uint64_t; + using DecodableType = uint64_t; + using DecodableArgType = uint64_t; + + static constexpr ClusterId GetClusterId() { return Clusters::EthernetNetworkDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CollisionCount::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace CollisionCount +namespace OverrunCount { +struct TypeInfo +{ + using Type = uint64_t; + using DecodableType = uint64_t; + using DecodableArgType = uint64_t; + + static constexpr ClusterId GetClusterId() { return Clusters::EthernetNetworkDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OverrunCount::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace OverrunCount +namespace CarrierDetect { +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::EthernetNetworkDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CarrierDetect::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace CarrierDetect +namespace TimeSinceReset { +struct TypeInfo +{ + using Type = uint64_t; + using DecodableType = uint64_t; + using DecodableArgType = uint64_t; + + static constexpr ClusterId GetClusterId() { return Clusters::EthernetNetworkDiagnostics::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TimeSinceReset::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace TimeSinceReset +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::EthernetNetworkDiagnostics::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::EthernetNetworkDiagnostics::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::EthernetNetworkDiagnostics::Id; } +}; +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::EthernetNetworkDiagnostics::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::EthernetNetworkDiagnostics::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::EthernetNetworkDiagnostics::Id; } +}; +} // namespace ClusterRevision + +struct TypeInfo +{ + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::EthernetNetworkDiagnostics::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::PHYRate::TypeInfo::DecodableType PHYRate; + Attributes::FullDuplex::TypeInfo::DecodableType fullDuplex; + Attributes::PacketRxCount::TypeInfo::DecodableType packetRxCount = static_cast(0); + Attributes::PacketTxCount::TypeInfo::DecodableType packetTxCount = static_cast(0); + Attributes::TxErrCount::TypeInfo::DecodableType txErrCount = static_cast(0); + Attributes::CollisionCount::TypeInfo::DecodableType collisionCount = static_cast(0); + Attributes::OverrunCount::TypeInfo::DecodableType overrunCount = static_cast(0); + Attributes::CarrierDetect::TypeInfo::DecodableType carrierDetect; + Attributes::TimeSinceReset::TypeInfo::DecodableType timeSinceReset = 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 EthernetNetworkDiagnostics +namespace TimeSynchronization { +namespace Structs { +namespace DSTOffsetStruct { +enum class Fields : uint8_t +{ + kOffset = 0, + kValidStarting = 1, + kValidUntil = 2, +}; + +struct Type +{ +public: + int32_t offset = static_cast(0); + uint64_t validStarting = static_cast(0); + DataModel::Nullable validUntil; + + 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 DSTOffsetStruct +namespace FabricScopedTrustedTimeSourceStruct { +enum class Fields : uint8_t +{ + kNodeID = 0, + kEndpoint = 1, +}; + +struct Type +{ +public: + chip::NodeId nodeID = static_cast(0); + chip::EndpointId endpoint = 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 FabricScopedTrustedTimeSourceStruct +namespace TimeZoneStruct { +enum class Fields : uint8_t +{ + kOffset = 0, + kValidAt = 1, + kName = 2, +}; + +struct Type +{ +public: + int32_t offset = static_cast(0); + uint64_t validAt = static_cast(0); + Optional name; + + 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 TimeZoneStruct +namespace TrustedTimeSourceStruct { +enum class Fields : uint8_t +{ + kFabricIndex = 0, + kNodeID = 1, + kEndpoint = 2, +}; + +struct Type +{ +public: + chip::FabricIndex fabricIndex = static_cast(0); + chip::NodeId nodeID = static_cast(0); + chip::EndpointId endpoint = 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 TrustedTimeSourceStruct +} // namespace Structs + +namespace Commands { +// Forward-declarations so we can reference these later. + +namespace SetUTCTime { +struct Type; +struct DecodableType; +} // namespace SetUTCTime + +namespace SetTrustedTimeSource { +struct Type; +struct DecodableType; +} // namespace SetTrustedTimeSource + +namespace SetTimeZone { +struct Type; +struct DecodableType; +} // namespace SetTimeZone + +namespace SetTimeZoneResponse { +struct Type; +struct DecodableType; +} // namespace SetTimeZoneResponse + +namespace SetDSTOffset { +struct Type; +struct DecodableType; +} // namespace SetDSTOffset + +namespace SetDefaultNTP { +struct Type; +struct DecodableType; +} // namespace SetDefaultNTP + +} // namespace Commands + +namespace Commands { +namespace SetUTCTime { +enum class Fields : uint8_t +{ + kUTCTime = 0, + kGranularity = 1, + kTimeSource = 2, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::SetUTCTime::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + + uint64_t UTCTime = static_cast(0); + GranularityEnum granularity = static_cast(0); + Optional timeSource; + + 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::SetUTCTime::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + + uint64_t UTCTime = static_cast(0); + GranularityEnum granularity = static_cast(0); + Optional timeSource; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace SetUTCTime +namespace SetTrustedTimeSource { +enum class Fields : uint8_t +{ + kTrustedTimeSource = 0, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::SetTrustedTimeSource::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + + DataModel::Nullable trustedTimeSource; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; +public: + static constexpr CommandId GetCommandId() { return Commands::SetTrustedTimeSource::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TxErrBusyChannelCount::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + DataModel::Nullable trustedTimeSource; + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace TxErrBusyChannelCount -namespace RxTotalCount { -struct TypeInfo +}; // namespace SetTrustedTimeSource +namespace SetTimeZone { +enum class Fields : uint8_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::RxTotalCount::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + kTimeZone = 0, }; -} // namespace RxTotalCount -namespace RxUnicastCount { -struct TypeInfo + +struct Type { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::SetTimeZone::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RxUnicastCount::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + DataModel::List timeZone; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = Clusters::TimeSynchronization::Commands::SetTimeZoneResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace RxUnicastCount -namespace RxBroadcastCount { -struct TypeInfo + +struct DecodableType { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; +public: + static constexpr CommandId GetCommandId() { return Commands::SetTimeZone::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RxBroadcastCount::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + DataModel::DecodableList timeZone; + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace RxBroadcastCount -namespace RxDataCount { -struct TypeInfo +}; // namespace SetTimeZone +namespace SetTimeZoneResponse { +enum class Fields : uint8_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::RxDataCount::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + kDSTOffsetRequired = 0, }; -} // namespace RxDataCount -namespace RxDataPollCount { -struct TypeInfo + +struct Type { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; +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 ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RxDataPollCount::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + 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; } }; -} // namespace RxDataPollCount -namespace RxBeaconCount { -struct TypeInfo + +struct DecodableType { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; +public: + static constexpr CommandId GetCommandId() { return Commands::SetTimeZoneResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RxBeaconCount::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + bool DSTOffsetRequired = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace RxBeaconCount -namespace RxBeaconRequestCount { -struct TypeInfo +}; // namespace SetTimeZoneResponse +namespace SetDSTOffset { +enum class Fields : uint8_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::RxBeaconRequestCount::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + kDSTOffset = 0, }; -} // namespace RxBeaconRequestCount -namespace RxOtherCount { -struct TypeInfo + +struct Type { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; +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; } - static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RxOtherCount::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + DataModel::List DSTOffset; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace RxOtherCount -namespace RxAddressFilteredCount { -struct TypeInfo + +struct DecodableType { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; +public: + static constexpr CommandId GetCommandId() { return Commands::SetDSTOffset::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RxAddressFilteredCount::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + DataModel::DecodableList DSTOffset; + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace RxAddressFilteredCount -namespace RxDestAddrFilteredCount { -struct TypeInfo +}; // namespace SetDSTOffset +namespace SetDefaultNTP { +enum class Fields : uint8_t { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; + kDefaultNTP = 0, +}; - static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RxDestAddrFilteredCount::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::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; } }; -} // namespace RxDestAddrFilteredCount -namespace RxDuplicatedCount { -struct TypeInfo + +struct DecodableType { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; +public: + static constexpr CommandId GetCommandId() { return Commands::SetDefaultNTP::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RxDuplicatedCount::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + DataModel::Nullable defaultNTP; + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace RxDuplicatedCount -namespace RxErrNoFrameCount { +}; // namespace SetDefaultNTP +} // namespace Commands + +namespace Attributes { + +namespace UTCTime { 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::RxErrNoFrameCount::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::UTCTime::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace RxErrNoFrameCount -namespace RxErrUnknownNeighborCount { +} // namespace UTCTime +namespace Granularity { struct TypeInfo { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_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::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RxErrUnknownNeighborCount::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Granularity::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace RxErrUnknownNeighborCount -namespace RxErrInvalidSrcAddrCount { +} // namespace Granularity +namespace TimeSource { struct TypeInfo { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; + 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::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RxErrInvalidSrcAddrCount::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TimeSource::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace RxErrInvalidSrcAddrCount -namespace RxErrSecCount { +} // namespace TimeSource +namespace TrustedTimeSource { 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::TimeSynchronization::Structs::TrustedTimeSourceStruct::DecodableType> &; - static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RxErrSecCount::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TrustedTimeSource::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace RxErrSecCount -namespace RxErrFcsCount { +} // namespace TrustedTimeSource +namespace DefaultNTP { 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::RxErrFcsCount::Id; } + 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 RxErrFcsCount -namespace RxErrOtherCount { +} // namespace DefaultNTP +namespace TimeZone { 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< + chip::app::Clusters::TimeSynchronization::Structs::TimeZoneStruct::DecodableType> &; - static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RxErrOtherCount::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TimeZone::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace RxErrOtherCount -namespace ActiveTimestamp { +} // namespace TimeZone +namespace DSTOffset { 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::TimeSynchronization::Structs::DSTOffsetStruct::DecodableType> &; - static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ActiveTimestamp::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::DSTOffset::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace ActiveTimestamp -namespace PendingTimestamp { +} // 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::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PendingTimestamp::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::LocalTime::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace PendingTimestamp -namespace Delay { +} // namespace LocalTime +namespace TimeZoneDatabase { 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::Clusters::TimeSynchronization::TimeZoneDatabaseEnum; + using DecodableType = chip::app::Clusters::TimeSynchronization::TimeZoneDatabaseEnum; + using DecodableArgType = chip::app::Clusters::TimeSynchronization::TimeZoneDatabaseEnum; - static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Delay::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TimeZoneDatabase::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Delay -namespace SecurityPolicy { +} // namespace TimeZoneDatabase +namespace NTPServerAvailable { 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> &; + using Type = bool; + using DecodableType = bool; + using DecodableArgType = bool; - static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SecurityPolicy::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NTPServerAvailable::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace SecurityPolicy -namespace ChannelPage0Mask { +} // namespace NTPServerAvailable +namespace TimeZoneListMaxSize { 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::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ChannelPage0Mask::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TimeZoneListMaxSize::Id; } static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 4; } }; -} // namespace ChannelPage0Mask -namespace OperationalDatasetComponents { +} // namespace TimeZoneListMaxSize +namespace DSTOffsetListMaxSize { 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> &; + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::OperationalDatasetComponents::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::DSTOffsetListMaxSize::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace OperationalDatasetComponents -namespace ActiveNetworkFaultsList { +} // namespace DSTOffsetListMaxSize +namespace SupportsDNSResolve { 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::ThreadNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ActiveNetworkFaultsList::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SupportsDNSResolve::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace ActiveNetworkFaultsList +} // namespace SupportsDNSResolve namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } + 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::ThreadNetworkDiagnostics::Id; } + 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::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); - - Attributes::Channel::TypeInfo::DecodableType channel; - Attributes::RoutingRole::TypeInfo::DecodableType routingRole; - Attributes::NetworkName::TypeInfo::DecodableType networkName; - Attributes::PanId::TypeInfo::DecodableType panId; - Attributes::ExtendedPanId::TypeInfo::DecodableType extendedPanId; - Attributes::MeshLocalPrefix::TypeInfo::DecodableType meshLocalPrefix; - Attributes::OverrunCount::TypeInfo::DecodableType overrunCount = static_cast(0); - Attributes::NeighborTable::TypeInfo::DecodableType neighborTable; - Attributes::RouteTable::TypeInfo::DecodableType routeTable; - Attributes::PartitionId::TypeInfo::DecodableType partitionId; - Attributes::Weighting::TypeInfo::DecodableType weighting; - Attributes::DataVersion::TypeInfo::DecodableType dataVersion; - Attributes::StableDataVersion::TypeInfo::DecodableType stableDataVersion; - Attributes::LeaderRouterId::TypeInfo::DecodableType leaderRouterId; - Attributes::DetachedRoleCount::TypeInfo::DecodableType detachedRoleCount = static_cast(0); - Attributes::ChildRoleCount::TypeInfo::DecodableType childRoleCount = static_cast(0); - Attributes::RouterRoleCount::TypeInfo::DecodableType routerRoleCount = static_cast(0); - Attributes::LeaderRoleCount::TypeInfo::DecodableType leaderRoleCount = static_cast(0); - Attributes::AttachAttemptCount::TypeInfo::DecodableType attachAttemptCount = static_cast(0); - Attributes::PartitionIdChangeCount::TypeInfo::DecodableType partitionIdChangeCount = static_cast(0); - Attributes::BetterPartitionAttachAttemptCount::TypeInfo::DecodableType betterPartitionAttachAttemptCount = - static_cast(0); - Attributes::ParentChangeCount::TypeInfo::DecodableType parentChangeCount = static_cast(0); - Attributes::TxTotalCount::TypeInfo::DecodableType txTotalCount = static_cast(0); - Attributes::TxUnicastCount::TypeInfo::DecodableType txUnicastCount = static_cast(0); - Attributes::TxBroadcastCount::TypeInfo::DecodableType txBroadcastCount = static_cast(0); - Attributes::TxAckRequestedCount::TypeInfo::DecodableType txAckRequestedCount = static_cast(0); - Attributes::TxAckedCount::TypeInfo::DecodableType txAckedCount = static_cast(0); - Attributes::TxNoAckRequestedCount::TypeInfo::DecodableType txNoAckRequestedCount = static_cast(0); - Attributes::TxDataCount::TypeInfo::DecodableType txDataCount = static_cast(0); - Attributes::TxDataPollCount::TypeInfo::DecodableType txDataPollCount = static_cast(0); - Attributes::TxBeaconCount::TypeInfo::DecodableType txBeaconCount = static_cast(0); - Attributes::TxBeaconRequestCount::TypeInfo::DecodableType txBeaconRequestCount = static_cast(0); - Attributes::TxOtherCount::TypeInfo::DecodableType txOtherCount = static_cast(0); - Attributes::TxRetryCount::TypeInfo::DecodableType txRetryCount = static_cast(0); - Attributes::TxDirectMaxRetryExpiryCount::TypeInfo::DecodableType txDirectMaxRetryExpiryCount = static_cast(0); - Attributes::TxIndirectMaxRetryExpiryCount::TypeInfo::DecodableType txIndirectMaxRetryExpiryCount = static_cast(0); - Attributes::TxErrCcaCount::TypeInfo::DecodableType txErrCcaCount = static_cast(0); - Attributes::TxErrAbortCount::TypeInfo::DecodableType txErrAbortCount = static_cast(0); - Attributes::TxErrBusyChannelCount::TypeInfo::DecodableType txErrBusyChannelCount = static_cast(0); - Attributes::RxTotalCount::TypeInfo::DecodableType rxTotalCount = static_cast(0); - Attributes::RxUnicastCount::TypeInfo::DecodableType rxUnicastCount = static_cast(0); - Attributes::RxBroadcastCount::TypeInfo::DecodableType rxBroadcastCount = static_cast(0); - Attributes::RxDataCount::TypeInfo::DecodableType rxDataCount = static_cast(0); - Attributes::RxDataPollCount::TypeInfo::DecodableType rxDataPollCount = static_cast(0); - Attributes::RxBeaconCount::TypeInfo::DecodableType rxBeaconCount = static_cast(0); - Attributes::RxBeaconRequestCount::TypeInfo::DecodableType rxBeaconRequestCount = static_cast(0); - Attributes::RxOtherCount::TypeInfo::DecodableType rxOtherCount = static_cast(0); - Attributes::RxAddressFilteredCount::TypeInfo::DecodableType rxAddressFilteredCount = static_cast(0); - Attributes::RxDestAddrFilteredCount::TypeInfo::DecodableType rxDestAddrFilteredCount = static_cast(0); - Attributes::RxDuplicatedCount::TypeInfo::DecodableType rxDuplicatedCount = static_cast(0); - Attributes::RxErrNoFrameCount::TypeInfo::DecodableType rxErrNoFrameCount = static_cast(0); - Attributes::RxErrUnknownNeighborCount::TypeInfo::DecodableType rxErrUnknownNeighborCount = static_cast(0); - Attributes::RxErrInvalidSrcAddrCount::TypeInfo::DecodableType rxErrInvalidSrcAddrCount = static_cast(0); - Attributes::RxErrSecCount::TypeInfo::DecodableType rxErrSecCount = static_cast(0); - Attributes::RxErrFcsCount::TypeInfo::DecodableType rxErrFcsCount = static_cast(0); - Attributes::RxErrOtherCount::TypeInfo::DecodableType rxErrOtherCount = static_cast(0); - Attributes::ActiveTimestamp::TypeInfo::DecodableType activeTimestamp; - Attributes::PendingTimestamp::TypeInfo::DecodableType pendingTimestamp; - Attributes::Delay::TypeInfo::DecodableType delay; - Attributes::SecurityPolicy::TypeInfo::DecodableType securityPolicy; - Attributes::ChannelPage0Mask::TypeInfo::DecodableType channelPage0Mask; - Attributes::OperationalDatasetComponents::TypeInfo::DecodableType operationalDatasetComponents; - Attributes::ActiveNetworkFaultsList::TypeInfo::DecodableType activeNetworkFaultsList; + 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; @@ -10089,23 +10229,51 @@ struct TypeInfo }; } // namespace Attributes namespace Events { -namespace ConnectionStatus { +namespace DSTTableEmpty { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; enum class Fields : uint8_t { - kConnectionStatus = 0, }; struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::ConnectionStatus::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } + static constexpr EventId GetEventId() { return Events::DSTTableEmpty::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } static constexpr bool kIsFabricScoped = false; - ConnectionStatusEnum connectionStatus = 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::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; }; @@ -10114,33 +10282,33 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::ConnectionStatus::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } + static constexpr EventId GetEventId() { return Events::DSTStatus::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } - ConnectionStatusEnum connectionStatus = static_cast(0); + bool DSTOffsetActive = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace ConnectionStatus -namespace NetworkFaultChange { +} // namespace DSTStatus +namespace TimeZoneStatus { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; enum class Fields : uint8_t { - kCurrent = 0, - kPrevious = 1, + kOffset = 0, + kName = 1, }; struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::NetworkFaultChange::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } + static constexpr EventId GetEventId() { return Events::TimeZoneStatus::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } static constexpr bool kIsFabricScoped = false; - DataModel::List current; - DataModel::List previous; + int32_t offset = static_cast(0); + Optional name; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; @@ -10149,31 +10317,46 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::NetworkFaultChange::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::ThreadNetworkDiagnostics::Id; } + static constexpr EventId GetEventId() { return Events::TimeZoneStatus::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } - DataModel::DecodableList current; - DataModel::DecodableList previous; + int32_t offset = static_cast(0); + Optional name; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace NetworkFaultChange -} // namespace Events -} // namespace ThreadNetworkDiagnostics -namespace WiFiNetworkDiagnostics { +} // namespace TimeZoneStatus +namespace TimeFailure { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -namespace Commands { -// Forward-declarations so we can reference these later. +enum class Fields : uint8_t +{ +}; -namespace ResetCounts { -struct Type; -struct DecodableType; -} // namespace ResetCounts +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; -} // namespace Commands + 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; -namespace Commands { -namespace ResetCounts { enum class Fields : uint8_t { }; @@ -10181,221 +10364,293 @@ 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::ResetCounts::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } + 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; +}; - using ResponseType = DataModel::NullObjectType; +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 bool MustUseTimedInvoke() { return false; } + 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 DecodableType +struct Type { public: - static constexpr CommandId GetCommandId() { return Commands::ResetCounts::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } + 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; }; -}; // namespace ResetCounts -} // namespace Commands + +using DecodableType = Type; + +} // namespace ProductAppearanceStruct +} // namespace Structs namespace Attributes { -namespace Bssid { +namespace VendorName { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; - static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Bssid::Id; } + 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 6; } + static constexpr size_t MaxLength() { return 32; } }; -} // namespace Bssid -namespace SecurityType { +} // namespace VendorName +namespace VendorID { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + 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::WiFiNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SecurityType::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::HardwareVersion::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace SecurityType -namespace WiFiVersion { +} // namespace HardwareVersion +namespace HardwareVersionString { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; - static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::WiFiVersion::Id; } + 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 WiFiVersion -namespace ChannelNumber { +} // namespace HardwareVersionString +namespace SoftwareVersion { 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::WiFiNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ChannelNumber::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SoftwareVersion::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace ChannelNumber -namespace Rssi { +} // namespace SoftwareVersion +namespace SoftwareVersionString { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; - static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Rssi::Id; } + 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 Rssi -namespace BeaconLostCount { +} // namespace SoftwareVersionString +namespace ManufacturingDate { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; - static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BeaconLostCount::Id; } + 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 BeaconLostCount -namespace BeaconRxCount { +} // namespace ManufacturingDate +namespace PartNumber { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; - static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BeaconRxCount::Id; } + 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 BeaconRxCount -namespace PacketMulticastRxCount { +} // namespace PartNumber +namespace ProductURL { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; - static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PacketMulticastRxCount::Id; } + 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 PacketMulticastRxCount -namespace PacketMulticastTxCount { +} // namespace ProductURL +namespace ProductLabel { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; - static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PacketMulticastTxCount::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; } }; -} // namespace PacketMulticastTxCount -namespace PacketUnicastRxCount { +} // namespace ProductLabel +namespace SerialNumber { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; - static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PacketUnicastRxCount::Id; } + 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 PacketUnicastRxCount -namespace PacketUnicastTxCount { +} // namespace SerialNumber +namespace Reachable { 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::WiFiNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PacketUnicastTxCount::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Reachable::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace PacketUnicastTxCount -namespace CurrentMaxRate { +} // namespace Reachable +namespace UniqueID { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; - static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CurrentMaxRate::Id; } + 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 CurrentMaxRate -namespace OverrunCount { +} // namespace UniqueID +namespace ProductAppearance { 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::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::WiFiNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::OverrunCount::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ProductAppearance::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace OverrunCount +} // namespace ProductAppearance namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } + 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::WiFiNetworkDiagnostics::Id; } + 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::WiFiNetworkDiagnostics::Id; } + 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::WiFiNetworkDiagnostics::Id; } + 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::WiFiNetworkDiagnostics::Id; } + 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::WiFiNetworkDiagnostics::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } }; } // namespace ClusterRevision @@ -10403,23 +10658,26 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::Bssid::TypeInfo::DecodableType bssid; - Attributes::SecurityType::TypeInfo::DecodableType securityType; - Attributes::WiFiVersion::TypeInfo::DecodableType wiFiVersion; - Attributes::ChannelNumber::TypeInfo::DecodableType channelNumber; - Attributes::Rssi::TypeInfo::DecodableType rssi; - Attributes::BeaconLostCount::TypeInfo::DecodableType beaconLostCount; - Attributes::BeaconRxCount::TypeInfo::DecodableType beaconRxCount; - Attributes::PacketMulticastRxCount::TypeInfo::DecodableType packetMulticastRxCount; - Attributes::PacketMulticastTxCount::TypeInfo::DecodableType packetMulticastTxCount; - Attributes::PacketUnicastRxCount::TypeInfo::DecodableType packetUnicastRxCount; - Attributes::PacketUnicastTxCount::TypeInfo::DecodableType packetUnicastTxCount; - Attributes::CurrentMaxRate::TypeInfo::DecodableType currentMaxRate; - Attributes::OverrunCount::TypeInfo::DecodableType overrunCount; + 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; @@ -10430,23 +10688,23 @@ struct TypeInfo }; } // namespace Attributes namespace Events { -namespace Disconnection { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; +namespace StartUp { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; enum class Fields : uint8_t { - kReasonCode = 0, + kSoftwareVersion = 0, }; struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::Disconnection::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } + static constexpr EventId GetEventId() { return Events::StartUp::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } static constexpr bool kIsFabricScoped = false; - uint16_t reasonCode = static_cast(0); + uint32_t softwareVersion = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; @@ -10455,68 +10713,57 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::Disconnection::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } + static constexpr EventId GetEventId() { return Events::StartUp::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } - uint16_t reasonCode = static_cast(0); + uint32_t softwareVersion = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace Disconnection -namespace AssociationFailure { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; +} // namespace StartUp +namespace ShutDown { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; enum class Fields : uint8_t { - kAssociationFailureCause = 0, - kStatus = 1, }; struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::AssociationFailure::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } + static constexpr EventId GetEventId() { return Events::ShutDown::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } static constexpr bool kIsFabricScoped = false; - AssociationFailureCauseEnum associationFailureCause = static_cast(0); - uint16_t status = 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::AssociationFailure::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } - - AssociationFailureCauseEnum associationFailureCause = static_cast(0); - uint16_t status = static_cast(0); + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::ShutDown::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace AssociationFailure -namespace ConnectionStatus { +} // namespace ShutDown +namespace Leave { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; enum class Fields : uint8_t { - kConnectionStatus = 0, }; struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::ConnectionStatus::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } + static constexpr EventId GetEventId() { return Events::Leave::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } static constexpr bool kIsFabricScoped = false; - ConnectionStatusEnum connectionStatus = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; @@ -10524,203 +10771,121 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::ConnectionStatus::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::WiFiNetworkDiagnostics::Id; } - - ConnectionStatusEnum connectionStatus = static_cast(0); + static constexpr EventId GetEventId() { return Events::Leave::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace ConnectionStatus -} // namespace Events -} // namespace WiFiNetworkDiagnostics -namespace EthernetNetworkDiagnostics { - -namespace Commands { -// Forward-declarations so we can reference these later. - -namespace ResetCounts { -struct Type; -struct DecodableType; -} // namespace ResetCounts - -} // namespace Commands +} // namespace Leave +namespace ReachableChanged { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -namespace Commands { -namespace ResetCounts { enum class Fields : uint8_t { + kReachableNewValue = 0, }; 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::EthernetNetworkDiagnostics::Id; } - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + 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; - using ResponseType = DataModel::NullObjectType; + bool reachableNewValue = static_cast(0); - 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::ResetCounts::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::EthernetNetworkDiagnostics::Id; } + 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); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace ResetCounts -} // namespace Commands +} // namespace ReachableChanged +} // namespace Events +} // namespace BridgedDeviceBasicInformation +namespace Switch { namespace Attributes { -namespace PHYRate { -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::EthernetNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PHYRate::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace PHYRate -namespace FullDuplex { -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::EthernetNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::FullDuplex::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace FullDuplex -namespace PacketRxCount { -struct TypeInfo -{ - using Type = uint64_t; - using DecodableType = uint64_t; - using DecodableArgType = uint64_t; - - static constexpr ClusterId GetClusterId() { return Clusters::EthernetNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PacketRxCount::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace PacketRxCount -namespace PacketTxCount { -struct TypeInfo -{ - using Type = uint64_t; - using DecodableType = uint64_t; - using DecodableArgType = uint64_t; - - static constexpr ClusterId GetClusterId() { return Clusters::EthernetNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PacketTxCount::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace PacketTxCount -namespace TxErrCount { -struct TypeInfo -{ - using Type = uint64_t; - using DecodableType = uint64_t; - using DecodableArgType = uint64_t; - - static constexpr ClusterId GetClusterId() { return Clusters::EthernetNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TxErrCount::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace TxErrCount -namespace CollisionCount { -struct TypeInfo -{ - using Type = uint64_t; - using DecodableType = uint64_t; - using DecodableArgType = uint64_t; - - static constexpr ClusterId GetClusterId() { return Clusters::EthernetNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CollisionCount::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace CollisionCount -namespace OverrunCount { +namespace NumberOfPositions { struct TypeInfo { - using Type = uint64_t; - using DecodableType = uint64_t; - using DecodableArgType = uint64_t; + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::EthernetNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::OverrunCount::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfPositions::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace OverrunCount -namespace CarrierDetect { +} // namespace NumberOfPositions +namespace CurrentPosition { 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::EthernetNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CarrierDetect::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentPosition::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace CarrierDetect -namespace TimeSinceReset { +} // namespace CurrentPosition +namespace MultiPressMax { struct TypeInfo { - using Type = uint64_t; - using DecodableType = uint64_t; - using DecodableArgType = uint64_t; + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::EthernetNetworkDiagnostics::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TimeSinceReset::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MultiPressMax::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace TimeSinceReset +} // namespace MultiPressMax namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::EthernetNetworkDiagnostics::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::EthernetNetworkDiagnostics::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::EthernetNetworkDiagnostics::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::EthernetNetworkDiagnostics::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::EthernetNetworkDiagnostics::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::EthernetNetworkDiagnostics::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } }; } // namespace ClusterRevision @@ -10728,19 +10893,13 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::EthernetNetworkDiagnostics::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::PHYRate::TypeInfo::DecodableType PHYRate; - Attributes::FullDuplex::TypeInfo::DecodableType fullDuplex; - Attributes::PacketRxCount::TypeInfo::DecodableType packetRxCount = static_cast(0); - Attributes::PacketTxCount::TypeInfo::DecodableType packetTxCount = static_cast(0); - Attributes::TxErrCount::TypeInfo::DecodableType txErrCount = static_cast(0); - Attributes::CollisionCount::TypeInfo::DecodableType collisionCount = static_cast(0); - Attributes::OverrunCount::TypeInfo::DecodableType overrunCount = static_cast(0); - Attributes::CarrierDetect::TypeInfo::DecodableType carrierDetect; - Attributes::TimeSinceReset::TypeInfo::DecodableType timeSinceReset = 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; @@ -10750,544 +10909,447 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace EthernetNetworkDiagnostics -namespace TimeSynchronization { -namespace Structs { -namespace DSTOffsetStruct { +namespace Events { +namespace SwitchLatched { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + enum class Fields : uint8_t { - kOffset = 0, - kValidStarting = 1, - kValidUntil = 2, + kNewPosition = 0, }; struct Type { public: - int32_t offset = static_cast(0); - uint64_t validStarting = static_cast(0); - DataModel::Nullable validUntil; - - CHIP_ERROR Decode(TLV::TLVReader & reader); - + 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; - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; -}; - -using DecodableType = Type; + uint8_t newPosition = static_cast(0); -} // namespace DSTOffsetStruct -namespace FabricScopedTrustedTimeSourceStruct { -enum class Fields : uint8_t -{ - kNodeID = 0, - kEndpoint = 1, + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -struct Type +struct DecodableType { public: - chip::NodeId nodeID = static_cast(0); - chip::EndpointId endpoint = static_cast(0); - - CHIP_ERROR Decode(TLV::TLVReader & reader); + 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; + uint8_t newPosition = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + CHIP_ERROR Decode(TLV::TLVReader & reader); }; +} // namespace SwitchLatched +namespace InitialPress { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -using DecodableType = Type; - -} // namespace FabricScopedTrustedTimeSourceStruct -namespace TimeZoneStruct { enum class Fields : uint8_t { - kOffset = 0, - kValidAt = 1, - kName = 2, + kNewPosition = 0, }; struct Type { public: - int32_t offset = static_cast(0); - uint64_t validAt = static_cast(0); - Optional name; - - CHIP_ERROR Decode(TLV::TLVReader & reader); - + 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; + uint8_t newPosition = 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::InitialPress::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } + + uint8_t newPosition = static_cast(0); + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +} // namespace InitialPress +namespace LongPress { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -} // namespace TimeZoneStruct -namespace TrustedTimeSourceStruct { enum class Fields : uint8_t { - kFabricIndex = 0, - kNodeID = 1, - kEndpoint = 2, + kNewPosition = 0, }; struct Type { public: - chip::FabricIndex fabricIndex = static_cast(0); - chip::NodeId nodeID = static_cast(0); - chip::EndpointId endpoint = static_cast(0); - - CHIP_ERROR Decode(TLV::TLVReader & reader); - + 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; + uint8_t newPosition = 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::LongPress::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } -} // namespace TrustedTimeSourceStruct -} // namespace Structs + uint8_t newPosition = static_cast(0); -namespace Commands { -// Forward-declarations so we can reference these later. + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +} // namespace LongPress +namespace ShortRelease { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -namespace SetUTCTime { -struct Type; -struct DecodableType; -} // namespace SetUTCTime +enum class Fields : uint8_t +{ + kPreviousPosition = 0, +}; -namespace SetTrustedTimeSource { -struct Type; -struct DecodableType; -} // namespace SetTrustedTimeSource +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; -namespace SetTimeZone { -struct Type; -struct DecodableType; -} // namespace SetTimeZone + uint8_t previousPosition = static_cast(0); -namespace SetTimeZoneResponse { -struct Type; -struct DecodableType; -} // namespace SetTimeZoneResponse + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +}; -namespace SetDSTOffset { -struct Type; -struct DecodableType; -} // namespace SetDSTOffset +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; } -namespace SetDefaultNTP { -struct Type; -struct DecodableType; -} // namespace SetDefaultNTP + uint8_t previousPosition = static_cast(0); -} // namespace Commands + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +} // namespace ShortRelease +namespace LongRelease { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -namespace Commands { -namespace SetUTCTime { enum class Fields : uint8_t { - kUTCTime = 0, - kGranularity = 1, - kTimeSource = 2, + kPreviousPosition = 0, }; struct Type { public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::SetUTCTime::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + 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; - uint64_t UTCTime = static_cast(0); - GranularityEnum granularity = static_cast(0); - Optional timeSource; + uint8_t previousPosition = 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::SetUTCTime::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + 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); - uint64_t UTCTime = static_cast(0); - GranularityEnum granularity = static_cast(0); - Optional timeSource; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace SetUTCTime -namespace SetTrustedTimeSource { +} // namespace LongRelease +namespace MultiPressOngoing { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + enum class Fields : uint8_t { - kTrustedTimeSource = 0, + kNewPosition = 0, + kCurrentNumberOfPressesCounted = 1, }; struct Type { public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::SetTrustedTimeSource::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + 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; - DataModel::Nullable trustedTimeSource; + uint8_t newPosition = static_cast(0); + uint8_t currentNumberOfPressesCounted = 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::SetTrustedTimeSource::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + 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); - DataModel::Nullable trustedTimeSource; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace SetTrustedTimeSource -namespace SetTimeZone { +} // namespace MultiPressOngoing +namespace MultiPressComplete { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + enum class Fields : uint8_t { - kTimeZone = 0, + kPreviousPosition = 0, + kTotalNumberOfPressesCounted = 1, }; struct Type { public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::SetTimeZone::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + 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; - DataModel::List timeZone; + uint8_t previousPosition = static_cast(0); + uint8_t totalNumberOfPressesCounted = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = Clusters::TimeSynchronization::Commands::SetTimeZoneResponse::DecodableType; - - 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; } + 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); - DataModel::DecodableList timeZone; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace SetTimeZone -namespace SetTimeZoneResponse { +} // 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 { - kDSTOffsetRequired = 0, + kCommissioningTimeout = 0, + kPAKEPasscodeVerifier = 1, + kDiscriminator = 2, + kIterations = 3, + kSalt = 4, }; 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 CommandId GetCommandId() { return Commands::OpenCommissioningWindow::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } - bool DSTOffsetRequired = static_cast(0); + 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 false; } + static constexpr bool MustUseTimedInvoke() { return true; } }; struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::SetTimeZoneResponse::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; } - bool DSTOffsetRequired = static_cast(0); + 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 SetTimeZoneResponse -namespace SetDSTOffset { +}; // namespace OpenCommissioningWindow +namespace OpenBasicCommissioningWindow { enum class Fields : uint8_t { - kDSTOffset = 0, + kCommissioningTimeout = 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; } + static constexpr CommandId GetCommandId() { return Commands::OpenBasicCommissioningWindow::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } - DataModel::List DSTOffset; + 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 false; } + static constexpr bool MustUseTimedInvoke() { return true; } }; struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::SetDSTOffset::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; } - DataModel::DecodableList DSTOffset; + uint16_t commissioningTimeout = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace SetDSTOffset -namespace SetDefaultNTP { +}; // namespace OpenBasicCommissioningWindow +namespace RevokeCommissioning { 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 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 ResponseType = DataModel::NullObjectType; - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr bool MustUseTimedInvoke() { return true; } }; struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::SetDefaultNTP::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr CommandId GetCommandId() { return Commands::RevokeCommissioning::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } - DataModel::Nullable defaultNTP; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace SetDefaultNTP +}; // namespace RevokeCommissioning } // 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 { +namespace WindowStatus { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + 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::TimeSynchronization::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TimeZoneListMaxSize::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::WindowStatus::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace TimeZoneListMaxSize -namespace DSTOffsetListMaxSize { +} // namespace WindowStatus +namespace AdminFabricIndex { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = 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::TimeSynchronization::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::DSTOffsetListMaxSize::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AdminFabricIndex::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace DSTOffsetListMaxSize -namespace SupportsDNSResolve { +} // namespace AdminFabricIndex +namespace AdminVendorId { struct TypeInfo { - using Type = bool; - using DecodableType = bool; - using DecodableArgType = bool; + 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::SupportsDNSResolve::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AdminVendorId::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace SupportsDNSResolve +} // namespace AdminVendorId namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::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::TimeSynchronization::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::TimeSynchronization::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::TimeSynchronization::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::TimeSynchronization::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::TimeSynchronization::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } }; } // namespace ClusterRevision @@ -11295,26 +11357,14 @@ 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); + static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::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::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -11324,664 +11374,678 @@ struct TypeInfo }; }; } // namespace Attributes -namespace Events { -namespace DSTTableEmpty { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - +} // namespace AdministratorCommissioning +namespace OperationalCredentials { +namespace Structs { +namespace FabricDescriptorStruct { enum class Fields : uint8_t { + 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::DSTTableEmpty::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::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); - 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::DSTTableEmpty::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + static constexpr bool kIsFabricScoped = true; - CHIP_ERROR Decode(TLV::TLVReader & reader); + 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 DSTTableEmpty -namespace DSTStatus { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; +using DecodableType = Type; + +} // namespace FabricDescriptorStruct +namespace NOCStruct { enum class Fields : uint8_t { - kDSTOffsetActive = 0, + kNoc = 1, + kIcac = 2, + kFabricIndex = 254, }; 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; + chip::ByteSpan noc; + DataModel::Nullable icac; + chip::FabricIndex fabricIndex = static_cast(0); - bool DSTOffsetActive = 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::DSTStatus::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + auto GetFabricIndex() const { return fabricIndex; } - bool DSTOffsetActive = 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 DSTStatus -namespace TimeZoneStatus { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; +using DecodableType = Type; + +} // 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 { - kOffset = 0, - kName = 1, + kAttestationNonce = 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 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; } - int32_t offset = static_cast(0); - Optional name; + 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::TimeZoneStatus::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } - - int32_t offset = static_cast(0); - Optional name; + 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 TimeZoneStatus -namespace TimeFailure { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - +}; // namespace AttestationRequest +namespace AttestationResponse { enum class Fields : uint8_t { + kAttestationElements = 0, + kAttestationSignature = 1, }; 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::AttestationResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + + chip::ByteSpan attestationElements; + 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::TimeFailure::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + 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 TimeFailure -namespace MissingTrustedTimeSource { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - +}; // namespace AttestationResponse +namespace CertificateChainRequest { enum class Fields : uint8_t { + kCertificateType = 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::CertificateChainRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + + 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::MissingTrustedTimeSource::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TimeSynchronization::Id; } + 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 MissingTrustedTimeSource -} // namespace Events -} // namespace TimeSynchronization -namespace BridgedDeviceBasicInformation { -namespace Structs { -namespace ProductAppearanceStruct { +}; // namespace CertificateChainRequest +namespace CertificateChainResponse { enum class Fields : uint8_t -{ - kFinish = 0, - kPrimaryColor = 1, +{ + kCertificate = 0, }; struct Type { public: - ProductFinishEnum finish = static_cast(0); - DataModel::Nullable primaryColor; - - 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::CertificateChainResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - static constexpr bool kIsFabricScoped = false; + chip::ByteSpan certificate; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; -}; -using DecodableType = Type; - -} // namespace ProductAppearanceStruct -} // namespace Structs + using ResponseType = DataModel::NullObjectType; -namespace Attributes { + static constexpr bool MustUseTimedInvoke() { return false; } +}; -namespace VendorName { -struct TypeInfo +struct DecodableType { - using Type = chip::CharSpan; - using DecodableType = chip::CharSpan; - using DecodableArgType = chip::CharSpan; +public: + static constexpr CommandId GetCommandId() { return Commands::CertificateChainResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - 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; } + chip::ByteSpan certificate; + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace VendorName -namespace VendorID { -struct TypeInfo +}; // namespace CertificateChainResponse +namespace CSRRequest { +enum class Fields : uint8_t { - 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; } + kCSRNonce = 0, + kIsForUpdateNOC = 1, }; -} // 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 +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::CSRRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - 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; + chip::ByteSpan CSRNonce; + Optional isForUpdateNOC; - 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; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - 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; + using ResponseType = Clusters::OperationalCredentials::Commands::CSRResponse::DecodableType; - static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SoftwareVersion::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + static constexpr bool MustUseTimedInvoke() { 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 +struct DecodableType { - using Type = chip::CharSpan; - using DecodableType = chip::CharSpan; - using DecodableArgType = chip::CharSpan; +public: + static constexpr CommandId GetCommandId() { return Commands::CSRRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - 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; } + chip::ByteSpan CSRNonce; + Optional isForUpdateNOC; + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace ManufacturingDate -namespace PartNumber { -struct TypeInfo +}; // namespace CSRRequest +namespace CSRResponse { +enum class Fields : uint8_t { - 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; } + kNOCSRElements = 0, + kAttestationSignature = 1, }; -} // 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 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::CSRResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::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; } -}; -} // namespace ProductLabel -namespace SerialNumber { -struct TypeInfo -{ - using Type = chip::CharSpan; - using DecodableType = chip::CharSpan; - using DecodableArgType = chip::CharSpan; + chip::ByteSpan NOCSRElements; + chip::ByteSpan attestationSignature; - 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; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - 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; + using ResponseType = DataModel::NullObjectType; - 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; } + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // 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 +struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } +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 AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +}; // namespace CSRResponse +namespace AddNOC { +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } + kNOCValue = 0, + kICACValue = 1, + kIPKValue = 2, + kCaseAdminSubject = 3, + kAdminVendorId = 4, }; -} // namespace EventList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo + +struct Type { - static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } +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; } }; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo + +struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } +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); }; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +}; // namespace AddNOC +namespace UpdateNOC { +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } + kNOCValue = 0, + kICACValue = 1, }; -} // namespace ClusterRevision -struct TypeInfo +struct Type { - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } +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; } - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + chip::ByteSpan NOCValue; + Optional ICACValue; - 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); - }; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace Attributes -namespace Events { -namespace StartUp { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; +struct DecodableType +{ +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); +}; +}; // namespace UpdateNOC +namespace NOCResponse { enum class Fields : uint8_t { - kSoftwareVersion = 0, + kStatusCode = 0, + kFabricIndex = 1, + kDebugText = 2, }; 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; + // 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; } - uint32_t softwareVersion = 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::StartUp::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } - - uint32_t softwareVersion = 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 StartUp -namespace ShutDown { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; - +}; // namespace NOCResponse +namespace UpdateFabricLabel { enum class Fields : uint8_t { + kLabel = 0, }; 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; + // 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; } + + chip::CharSpan label; 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::ShutDown::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } + 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); }; -} // namespace ShutDown -namespace Leave { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - +}; // namespace UpdateFabricLabel +namespace RemoveFabric { 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::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::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; } }; 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; } + 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); }; -} // namespace Leave -namespace ReachableChanged { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - +}; // namespace RemoveFabric +namespace AddTrustedRootCertificate { enum class Fields : uint8_t { - kReachableNewValue = 0, + kRootCACertificate = 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::AddTrustedRootCertificate::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - bool reachableNewValue = static_cast(0); + chip::ByteSpan rootCACertificate; 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::ReachableChanged::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } + static constexpr CommandId GetCommandId() { return Commands::AddTrustedRootCertificate::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - bool reachableNewValue = static_cast(0); + chip::ByteSpan rootCACertificate; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace AddTrustedRootCertificate +} // namespace Commands + +namespace Attributes { + +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> &; - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Fabrics::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace ReachableChanged -} // namespace Events -} // namespace BridgedDeviceBasicInformation -namespace Switch { - -namespace Attributes { - -namespace NumberOfPositions { +} // namespace Fabrics +namespace SupportedFabrics { 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::NumberOfPositions::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SupportedFabrics::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace NumberOfPositions -namespace CurrentPosition { +} // namespace SupportedFabrics +namespace CommissionedFabrics { 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 ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CommissionedFabrics::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace CurrentPosition -namespace MultiPressMax { +} // namespace CommissionedFabrics +namespace TrustedRootCertificates { +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::TrustedRootCertificates::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace TrustedRootCertificates +namespace CurrentFabricIndex { 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::MultiPressMax::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentFabricIndex::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MultiPressMax +} // namespace CurrentFabricIndex namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::Switch::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::Switch::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::Switch::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::Switch::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::Switch::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::Switch::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } }; } // namespace ClusterRevision @@ -11989,13 +12053,16 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - 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::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; @@ -12005,447 +12072,656 @@ struct TypeInfo }; }; } // namespace Attributes -namespace Events { -namespace SwitchLatched { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; +} // namespace OperationalCredentials +namespace GroupKeyManagement { +namespace Structs { +namespace GroupInfoMapStruct { +enum class Fields : uint8_t +{ + kGroupId = 1, + kEndpoints = 2, + kGroupName = 3, + kFabricIndex = 254, +}; + +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_; } + + 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; +}; + +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; + + auto GetFabricIndex() const { return fabricIndex; } + + void SetFabricIndex(chip::FabricIndex fabricIndex_) { fabricIndex = fabricIndex_; } +}; + +} // namespace GroupInfoMapStruct +namespace GroupKeyMapStruct { +enum class Fields : uint8_t +{ + kGroupId = 1, + kGroupKeySetID = 2, + kFabricIndex = 254, +}; + +struct Type +{ +public: + chip::GroupId groupId = static_cast(0); + uint16_t groupKeySetID = 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 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 KeySetWrite { +struct Type; +struct DecodableType; +} // namespace KeySetWrite + +namespace KeySetRead { +struct Type; +struct DecodableType; +} // namespace KeySetRead + +namespace KeySetReadResponse { +struct Type; +struct DecodableType; +} // namespace KeySetReadResponse + +namespace KeySetRemove { +struct Type; +struct DecodableType; +} // namespace KeySetRemove + +namespace KeySetReadAllIndices { +struct Type; +struct DecodableType; +} // namespace KeySetReadAllIndices + +namespace KeySetReadAllIndicesResponse { +struct Type; +struct DecodableType; +} // namespace KeySetReadAllIndicesResponse + +} // 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 { - kNewPosition = 0, + kGroupKeySetID = 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::KeySetRead::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } - uint8_t newPosition = static_cast(0); + 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 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::KeySetRead::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } + uint16_t groupKeySetID = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace SwitchLatched -namespace InitialPress { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - +}; // namespace KeySetRead +namespace KeySetReadResponse { enum class Fields : uint8_t { - kNewPosition = 0, + kGroupKeySet = 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::KeySetReadResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } - uint8_t newPosition = static_cast(0); + 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 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::KeySetReadResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } + Structs::GroupKeySetStruct::DecodableType groupKeySet; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace InitialPress -namespace LongPress { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - +}; // namespace KeySetReadResponse +namespace KeySetRemove { enum class Fields : uint8_t { - kNewPosition = 0, + kGroupKeySetID = 0, }; 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::KeySetRemove::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } - uint8_t newPosition = static_cast(0); + uint16_t groupKeySetID = 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 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::KeySetRemove::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } + uint16_t groupKeySetID = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace LongPress -namespace ShortRelease { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - +}; // namespace KeySetRemove +namespace KeySetReadAllIndices { 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); + // 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; } CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = Clusters::GroupKeyManagement::Commands::KeySetReadAllIndicesResponse::DecodableType; + + 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); + static constexpr CommandId GetCommandId() { return Commands::KeySetReadAllIndices::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace ShortRelease -namespace LongRelease { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - +}; // namespace KeySetReadAllIndices +namespace KeySetReadAllIndicesResponse { enum class Fields : uint8_t { - kPreviousPosition = 0, + kGroupKeySetIDs = 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; + // 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; } - uint8_t previousPosition = static_cast(0); + DataModel::List groupKeySetIDs; 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::LongRelease::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Switch::Id; } - - uint8_t previousPosition = static_cast(0); + static constexpr CommandId GetCommandId() { return Commands::KeySetReadAllIndicesResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } + DataModel::DecodableList groupKeySetIDs; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace LongRelease -namespace MultiPressOngoing { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; +}; // 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 -enum class Fields : uint8_t -{ - kNewPosition = 0, - kCurrentNumberOfPressesCounted = 1, -}; +namespace Attributes { -struct Type +namespace LabelList { +struct TypeInfo { -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); + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList; + using DecodableArgType = + const chip::app::DataModel::DecodableList &; - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + static constexpr ClusterId GetClusterId() { return Clusters::FixedLabel::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::LabelList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; - -struct DecodableType +} // namespace LabelList +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { -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); + static constexpr ClusterId GetClusterId() { return Clusters::FixedLabel::Id; } }; -} // namespace MultiPressOngoing -namespace MultiPressComplete { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - -enum class Fields : uint8_t +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - kPreviousPosition = 0, - kTotalNumberOfPressesCounted = 1, + static constexpr ClusterId GetClusterId() { return Clusters::FixedLabel::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::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; + static constexpr ClusterId GetClusterId() { return Clusters::FixedLabel::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::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); + static constexpr ClusterId GetClusterId() { return Clusters::FixedLabel::Id; } }; -} // 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 +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - kCommissioningTimeout = 0, - kPAKEPasscodeVerifier = 1, - kDiscriminator = 2, - kIterations = 3, - kSalt = 4, + static constexpr ClusterId GetClusterId() { return Clusters::FixedLabel::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::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; + static constexpr ClusterId GetClusterId() { return Clusters::FixedLabel::Id; } +}; +} // namespace ClusterRevision - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +struct TypeInfo +{ + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::FixedLabel::Id; } - using ResponseType = DataModel::NullObjectType; + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - static constexpr bool MustUseTimedInvoke() { return true; } + 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 +namespace Attributes { + +namespace LabelList { +struct TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::OpenCommissioningWindow::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList; + using DecodableArgType = + const chip::app::DataModel::DecodableList &; - 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); + static constexpr ClusterId GetClusterId() { return Clusters::UserLabel::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::LabelList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -}; // namespace OpenCommissioningWindow -namespace OpenBasicCommissioningWindow { -enum class Fields : uint8_t +} // namespace LabelList +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - kCommissioningTimeout = 0, + static constexpr ClusterId GetClusterId() { return Clusters::UserLabel::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::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; } + static constexpr ClusterId GetClusterId() { return Clusters::UserLabel::Id; } }; - -struct DecodableType +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { -public: - 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); + static constexpr ClusterId GetClusterId() { return Clusters::UserLabel::Id; } }; -}; // namespace OpenBasicCommissioningWindow -namespace RevokeCommissioning { -enum class Fields : uint8_t +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { + static constexpr ClusterId GetClusterId() { return Clusters::UserLabel::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::RevokeCommissioning::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = DataModel::NullObjectType; - - static constexpr bool MustUseTimedInvoke() { return true; } + static constexpr ClusterId GetClusterId() { return Clusters::UserLabel::Id; } }; - -struct DecodableType +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::RevokeCommissioning::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } - - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::UserLabel::Id; } }; -}; // namespace RevokeCommissioning -} // namespace Commands - -namespace Attributes { +} // namespace ClusterRevision -namespace WindowStatus { struct TypeInfo { - using Type = chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum; - using DecodableType = chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum; - using DecodableArgType = chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum; + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::UserLabel::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::WindowStatus::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace WindowStatus -namespace AdminFabricIndex { -struct TypeInfo -{ - 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, const ConcreteAttributePath & path); - static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AdminFabricIndex::Id; } - static constexpr bool MustUseTimedWrite() { 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 AdminFabricIndex -namespace AdminVendorId { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +} // namespace Attributes +} // namespace UserLabel +namespace ProxyConfiguration { + +namespace Attributes { - static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AdminVendorId::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace AdminVendorId namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } + 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::AdministratorCommissioning::Id; } + 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::AdministratorCommissioning::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ProxyConfiguration::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::ProxyConfiguration::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::ProxyConfiguration::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::ProxyConfiguration::Id; } }; } // namespace ClusterRevision @@ -12453,14 +12729,10 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::AdministratorCommissioning::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ProxyConfiguration::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::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -12470,414 +12742,324 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace AdministratorCommissioning -namespace OperationalCredentials { -namespace Structs { -namespace FabricDescriptorStruct { -enum class Fields : uint8_t +} // namespace ProxyConfiguration +namespace ProxyDiscovery { + +namespace Attributes { + +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - kRootPublicKey = 1, - kVendorID = 2, - kFabricID = 3, - kNodeID = 4, - kLabel = 5, - kFabricIndex = 254, + static constexpr ClusterId GetClusterId() { return Clusters::ProxyDiscovery::Id; } }; - -struct Type +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { -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::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; + static constexpr ClusterId GetClusterId() { return Clusters::ProxyDiscovery::Id; } }; - -using DecodableType = Type; - -} // namespace FabricDescriptorStruct -namespace NOCStruct { -enum class Fields : uint8_t +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - kNoc = 1, - kIcac = 2, - kFabricIndex = 254, + static constexpr ClusterId GetClusterId() { return Clusters::ProxyDiscovery::Id; } }; - -struct Type +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { -public: - chip::ByteSpan noc; - DataModel::Nullable icac; - 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; + static constexpr ClusterId GetClusterId() { return Clusters::ProxyDiscovery::Id; } }; - -using DecodableType = Type; - -} // 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 +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - kAttestationNonce = 0, + static constexpr ClusterId GetClusterId() { return Clusters::ProxyDiscovery::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + 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::AttestationRequest::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::ProxyDiscovery::Id; } - chip::ByteSpan attestationNonce; + 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 = Clusters::OperationalCredentials::Commands::AttestationResponse::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::ProxyValid::Id; } }; - -struct DecodableType +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { -public: - 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); + static constexpr ClusterId GetClusterId() { return Clusters::ProxyValid::Id; } }; -}; // namespace AttestationRequest -namespace AttestationResponse { -enum class Fields : uint8_t +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - kAttestationElements = 0, - kAttestationSignature = 1, + static constexpr ClusterId GetClusterId() { return Clusters::ProxyValid::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::AttestationResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - - chip::ByteSpan attestationElements; - 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::ProxyValid::Id; } }; - -struct DecodableType +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { -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); + static constexpr ClusterId GetClusterId() { return Clusters::ProxyValid::Id; } }; -}; // namespace AttestationResponse -namespace CertificateChainRequest { -enum class Fields : uint8_t +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - kCertificateType = 0, + static constexpr ClusterId GetClusterId() { return Clusters::ProxyValid::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::CertificateChainRequest::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - - CertificateChainTypeEnum certificateType = static_cast(0); - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::ProxyValid::Id; } - using ResponseType = Clusters::OperationalCredentials::Commands::CertificateChainResponse::DecodableType; + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - static constexpr bool MustUseTimedInvoke() { return false; } + 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 ProxyValid +namespace BooleanState { -struct DecodableType +namespace Attributes { + +namespace StateValue { +struct TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::CertificateChainRequest::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + using Type = bool; + using DecodableType = bool; + using DecodableArgType = bool; - CertificateChainTypeEnum certificateType = static_cast(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::BooleanState::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::StateValue::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -}; // namespace CertificateChainRequest -namespace CertificateChainResponse { -enum class Fields : uint8_t +} // namespace StateValue +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - kCertificate = 0, + static constexpr ClusterId GetClusterId() { return Clusters::BooleanState::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::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::BooleanState::Id; } }; - -struct DecodableType +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::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::BooleanState::Id; } }; -}; // namespace CertificateChainResponse -namespace CSRRequest { -enum class Fields : uint8_t +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - kCSRNonce = 0, - kIsForUpdateNOC = 1, + static constexpr ClusterId GetClusterId() { return Clusters::BooleanState::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::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; - - using ResponseType = Clusters::OperationalCredentials::Commands::CSRResponse::DecodableType; - - static constexpr bool MustUseTimedInvoke() { return false; } + 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::BooleanState::Id; } +}; +} // namespace ClusterRevision -struct DecodableType +struct TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::CSRRequest::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::BooleanState::Id; } - chip::ByteSpan CSRNonce; - Optional isForUpdateNOC; - CHIP_ERROR Decode(TLV::TLVReader & reader); + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::StateValue::TypeInfo::DecodableType stateValue = 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 CSRRequest -namespace CSRResponse { +} // namespace Attributes +namespace Events { +namespace StateChange { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + enum class Fields : uint8_t { - kNOCSRElements = 0, - kAttestationSignature = 1, + kStateValue = 0, }; struct Type { 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; } + 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::ByteSpan NOCSRElements; - chip::ByteSpan attestationSignature; + bool stateValue = 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::CSRResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + 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::ByteSpan NOCSRElements; - chip::ByteSpan attestationSignature; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace CSRResponse -namespace AddNOC { +} // namespace StateChange +} // namespace Events +} // namespace BooleanState +namespace IcdManagement { +namespace Structs { +namespace MonitoringRegistrationStruct { enum class Fields : uint8_t { - kNOCValue = 0, - kICACValue = 1, - kIPKValue = 2, - kCaseAdminSubject = 3, - kAdminVendorId = 4, + kCheckInNodeID = 1, + kMonitoredSubject = 2, + 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::AddNOC::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + chip::NodeId checkInNodeID = static_cast(0); + uint64_t monitoredSubject = static_cast(0); + chip::FabricIndex fabricIndex = 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 Decode(TLV::TLVReader & reader); - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + static constexpr bool kIsFabricScoped = true; - using ResponseType = Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType; + 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::AddNOC::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + CHIP_ERROR EncodeForWrite(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + CHIP_ERROR EncodeForRead(TLV::TLVWriter & aWriter, TLV::Tag aTag, FabricIndex aAccessingFabricIndex) const; - 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); +private: + CHIP_ERROR DoEncode(TLV::TLVWriter & aWriter, TLV::Tag aTag, const Optional & aAccessingFabricIndex) const; }; -}; // namespace AddNOC -namespace UpdateNOC { + +using DecodableType = Type; + +} // namespace MonitoringRegistrationStruct +} // namespace Structs + +namespace Commands { +// Forward-declarations so we can reference these later. + +namespace RegisterClient { +struct Type; +struct DecodableType; +} // namespace RegisterClient + +namespace RegisterClientResponse { +struct Type; +struct DecodableType; +} // namespace RegisterClientResponse + +namespace UnregisterClient { +struct Type; +struct DecodableType; +} // namespace UnregisterClient + +namespace StayActiveRequest { +struct Type; +struct DecodableType; +} // namespace StayActiveRequest + +namespace StayActiveResponse { +struct Type; +struct DecodableType; +} // namespace StayActiveResponse + +} // namespace Commands + +namespace Commands { +namespace RegisterClient { enum class Fields : uint8_t { - kNOCValue = 0, - kICACValue = 1, + 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::UpdateNOC::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + static constexpr CommandId GetCommandId() { return Commands::RegisterClient::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } - chip::ByteSpan NOCValue; - Optional ICACValue; + 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::OperationalCredentials::Commands::NOCResponse::DecodableType; + using ResponseType = Clusters::IcdManagement::Commands::RegisterClientResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -12885,32 +13067,30 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::UpdateNOC::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + static constexpr CommandId GetCommandId() { return Commands::RegisterClient::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } - chip::ByteSpan NOCValue; - Optional ICACValue; + chip::NodeId checkInNodeID = static_cast(0); + uint64_t monitoredSubject = static_cast(0); + chip::ByteSpan key; + Optional verificationKey; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace UpdateNOC -namespace NOCResponse { +}; // namespace RegisterClient +namespace RegisterClientResponse { enum class Fields : uint8_t { - kStatusCode = 0, - kFabricIndex = 1, - kDebugText = 2, + 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::NOCResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + static constexpr CommandId GetCommandId() { return Commands::RegisterClientResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } - NodeOperationalCertStatusEnum statusCode = static_cast(0); - Optional fabricIndex; - Optional debugText; + uint32_t ICDCounter = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -12922,33 +13102,33 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::NOCResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + static constexpr CommandId GetCommandId() { return Commands::RegisterClientResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } - NodeOperationalCertStatusEnum statusCode = static_cast(0); - Optional fabricIndex; - Optional debugText; + uint32_t ICDCounter = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace NOCResponse -namespace UpdateFabricLabel { +}; // namespace RegisterClientResponse +namespace UnregisterClient { enum class Fields : uint8_t { - kLabel = 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::UpdateFabricLabel::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + static constexpr CommandId GetCommandId() { return Commands::UnregisterClient::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } - chip::CharSpan label; + chip::NodeId checkInNodeID = static_cast(0); + Optional verificationKey; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType; + using ResponseType = DataModel::NullObjectType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -12956,31 +13136,29 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::UpdateFabricLabel::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + static constexpr CommandId GetCommandId() { return Commands::UnregisterClient::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } - chip::CharSpan label; + chip::NodeId checkInNodeID = static_cast(0); + Optional verificationKey; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace UpdateFabricLabel -namespace RemoveFabric { +}; // namespace UnregisterClient +namespace StayActiveRequest { enum class Fields : uint8_t { - 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::RemoveFabric::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - - chip::FabricIndex fabricIndex = static_cast(0); + 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::OperationalCredentials::Commands::NOCResponse::DecodableType; + using ResponseType = Clusters::IcdManagement::Commands::StayActiveResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -12988,27 +13166,26 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::RemoveFabric::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + static constexpr CommandId GetCommandId() { return Commands::StayActiveRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } - chip::FabricIndex fabricIndex = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace RemoveFabric -namespace AddTrustedRootCertificate { +}; // namespace StayActiveRequest +namespace StayActiveResponse { enum class Fields : uint8_t { - kRootCACertificate = 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::AddTrustedRootCertificate::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + static constexpr CommandId GetCommandId() { return Commands::StayActiveResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } - chip::ByteSpan rootCACertificate; + uint32_t promisedActiveDuration = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -13020,128 +13197,162 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::AddTrustedRootCertificate::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + static constexpr CommandId GetCommandId() { return Commands::StayActiveResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } - chip::ByteSpan rootCACertificate; + uint32_t promisedActiveDuration = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace AddTrustedRootCertificate +}; // namespace StayActiveResponse } // namespace Commands namespace Attributes { -namespace NOCs { +namespace IdleModeDuration { 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::OperationalCredentials::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::NOCs::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::IdleModeDuration::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace NOCs -namespace Fabrics { +} // namespace IdleModeDuration +namespace ActiveModeDuration { +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::ActiveModeDuration::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ActiveModeDuration +namespace ActiveModeThreshold { +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::ActiveModeThreshold::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ActiveModeThreshold +namespace RegisteredClients { +struct TypeInfo +{ + 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::IcdManagement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::RegisteredClients::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace RegisteredClients +namespace ICDCounter { 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> &; + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Fabrics::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ICDCounter::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Fabrics -namespace SupportedFabrics { +} // namespace ICDCounter +namespace ClientsSupportedPerFabric { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SupportedFabrics::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ClientsSupportedPerFabric::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace SupportedFabrics -namespace CommissionedFabrics { +} // namespace ClientsSupportedPerFabric +namespace UserActiveModeTriggerHint { 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::OperationalCredentials::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CommissionedFabrics::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::UserActiveModeTriggerHint::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace CommissionedFabrics -namespace TrustedRootCertificates { +} // namespace UserActiveModeTriggerHint +namespace UserActiveModeTriggerInstruction { struct TypeInfo { - using Type = chip::app::DataModel::List; - using DecodableType = chip::app::DataModel::DecodableList; - using DecodableArgType = const chip::app::DataModel::DecodableList &; + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TrustedRootCertificates::Id; } + 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 TrustedRootCertificates -namespace CurrentFabricIndex { +} // namespace UserActiveModeTriggerInstruction +namespace OperatingMode { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + 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::OperationalCredentials::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CurrentFabricIndex::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OperatingMode::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace CurrentFabricIndex +} // namespace OperatingMode namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::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::OperationalCredentials::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::OperationalCredentials::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::OperationalCredentials::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::OperationalCredentials::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::OperationalCredentials::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } }; } // namespace ClusterRevision @@ -13149,260 +13360,103 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::OperationalCredentials::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::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::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 OperationalCredentials -namespace GroupKeyManagement { -namespace Structs { -namespace GroupInfoMapStruct { -enum class Fields : uint8_t -{ - kGroupId = 1, - kEndpoints = 2, - kGroupName = 3, - kFabricIndex = 254, -}; - -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_; } - - 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; -}; - -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; - - auto GetFabricIndex() const { return fabricIndex; } - - void SetFabricIndex(chip::FabricIndex fabricIndex_) { fabricIndex = fabricIndex_; } -}; - -} // namespace GroupInfoMapStruct -namespace GroupKeyMapStruct { -enum class Fields : uint8_t -{ - kGroupId = 1, - kGroupKeySetID = 2, - kFabricIndex = 254, -}; - -struct Type -{ -public: - chip::GroupId groupId = static_cast(0); - uint16_t groupKeySetID = 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 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 KeySetWrite { -struct Type; -struct DecodableType; -} // namespace KeySetWrite - -namespace KeySetRead { -struct Type; -struct DecodableType; -} // namespace KeySetRead - -namespace KeySetReadResponse { -struct Type; -struct DecodableType; -} // namespace KeySetReadResponse - -namespace KeySetRemove { -struct Type; -struct DecodableType; -} // namespace KeySetRemove - -namespace KeySetReadAllIndices { -struct Type; -struct DecodableType; -} // namespace KeySetReadAllIndices - -namespace KeySetReadAllIndicesResponse { -struct Type; -struct DecodableType; -} // namespace KeySetReadAllIndicesResponse - -} // namespace Commands + 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; + 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 OnTransitionToActiveMode { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; -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; + 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; - - 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; } + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::OnTransitionToActiveMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } - Structs::GroupKeySetStruct::DecodableType groupKeySet; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace KeySetWrite -namespace KeySetRead { -enum class Fields : uint8_t -{ - kGroupKeySetID = 0, -}; +} // namespace OnTransitionToActiveMode +} // namespace Events +} // namespace IcdManagement +namespace Timer { -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; } +namespace Commands { +// Forward-declarations so we can reference these later. - uint16_t groupKeySetID = static_cast(0); +namespace SetTimer { +struct Type; +struct DecodableType; +} // namespace SetTimer - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +namespace ResetTimer { +struct Type; +struct DecodableType; +} // namespace ResetTimer - using ResponseType = Clusters::GroupKeyManagement::Commands::KeySetReadResponse::DecodableType; +namespace AddTime { +struct Type; +struct DecodableType; +} // namespace AddTime - static constexpr bool MustUseTimedInvoke() { return false; } -}; +namespace ReduceTime { +struct Type; +struct DecodableType; +} // namespace ReduceTime -struct DecodableType -{ -public: - static constexpr CommandId GetCommandId() { return Commands::KeySetRead::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } +} // namespace Commands - uint16_t groupKeySetID = static_cast(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace KeySetRead -namespace KeySetReadResponse { +namespace Commands { +namespace SetTimer { enum class Fields : uint8_t { - kGroupKeySet = 0, + kNewTime = 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::SetTimer::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } - Structs::GroupKeySetStruct::Type groupKeySet; + uint32_t newTime = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -13414,27 +13468,24 @@ 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::SetTimer::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } - Structs::GroupKeySetStruct::DecodableType groupKeySet; + uint32_t newTime = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace KeySetReadResponse -namespace KeySetRemove { +}; // namespace SetTimer +namespace ResetTimer { 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::KeySetRemove::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } - - uint16_t groupKeySetID = static_cast(0); + static constexpr CommandId GetCommandId() { return Commands::ResetTimer::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -13446,28 +13497,30 @@ 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::ResetTimer::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } - uint16_t groupKeySetID = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace KeySetRemove -namespace KeySetReadAllIndices { +}; // 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::KeySetReadAllIndices::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } + 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 = Clusters::GroupKeyManagement::Commands::KeySetReadAllIndicesResponse::DecodableType; + using ResponseType = DataModel::NullObjectType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -13475,26 +13528,27 @@ 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::AddTime::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } + uint32_t additionalTime = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace KeySetReadAllIndices -namespace KeySetReadAllIndicesResponse { +}; // namespace AddTime +namespace ReduceTime { enum class Fields : uint8_t { - kGroupKeySetIDs = 0, + kTimeReduction = 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::ReduceTime::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } - DataModel::List groupKeySetIDs; + uint32_t timeReduction = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -13506,182 +13560,87 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::KeySetReadAllIndicesResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::GroupKeyManagement::Id; } - - DataModel::DecodableList groupKeySetIDs; - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // 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 CommandId GetCommandId() { return Commands::ReduceTime::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } - 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; } + uint32_t timeReduction = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace ClusterRevision +}; // namespace ReduceTime +} // namespace Commands +namespace Attributes { + +namespace SetTime { 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::Timer::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SetTime::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 SetTime +namespace TimeRemaining { +struct TypeInfo +{ + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; -namespace LabelList { + 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::DataModel::List; - using DecodableType = chip::app::DataModel::DecodableList; - using DecodableArgType = - const chip::app::DataModel::DecodableList &; + 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::FixedLabel::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::LabelList::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TimerState::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace LabelList +} // namespace TimerState namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::FixedLabel::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::FixedLabel::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::FixedLabel::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::FixedLabel::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::FixedLabel::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::FixedLabel::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } }; } // namespace ClusterRevision @@ -13689,11 +13648,13 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::FixedLabel::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::LabelList::TypeInfo::DecodableType labelList; + 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; @@ -13703,239 +13664,301 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace FixedLabel -namespace UserLabel { +} // namespace Timer +namespace OvenCavityOperationalState { namespace Structs { -namespace LabelStruct = Clusters::detail::Structs::LabelStruct; +namespace ErrorStateStruct = Clusters::detail::Structs::ErrorStateStruct; +namespace OperationalStateStruct = Clusters::detail::Structs::OperationalStateStruct; } // namespace Structs -namespace Attributes { +namespace Commands { +// Forward-declarations so we can reference these later. -namespace LabelList { -struct TypeInfo -{ - using Type = chip::app::DataModel::List; - using DecodableType = chip::app::DataModel::DecodableList; - using DecodableArgType = - const chip::app::DataModel::DecodableList &; +namespace Pause { +struct Type; +struct DecodableType; +} // namespace Pause - static constexpr ClusterId GetClusterId() { return Clusters::UserLabel::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::LabelList::Id; } - static constexpr bool MustUseTimedWrite() { return false; } +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 +{ }; -} // namespace LabelList -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo + +struct Type { - static constexpr ClusterId GetClusterId() { return Clusters::UserLabel::Id; } +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; + + using ResponseType = Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::DecodableType; + + 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::UserLabel::Id; } +public: + static constexpr CommandId GetCommandId() { return Commands::Pause::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +}; // namespace Pause +namespace Stop { +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::UserLabel::Id; } }; -} // namespace EventList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo + +struct Type { - static constexpr ClusterId GetClusterId() { return Clusters::UserLabel::Id; } +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; } + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::DecodableType; + + 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::UserLabel::Id; } +public: + static constexpr CommandId GetCommandId() { return Commands::Stop::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +}; // namespace Stop +namespace Start { +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::UserLabel::Id; } }; -} // namespace ClusterRevision -struct TypeInfo +struct Type { - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::UserLabel::Id; } +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 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::OvenCavityOperationalState::Commands::OperationalCommandResponse::DecodableType; -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::ProxyConfiguration::Id; } +public: + static constexpr CommandId GetCommandId() { return Commands::Start::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +}; // namespace Start +namespace Resume { +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::ProxyConfiguration::Id; } }; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo + +struct Type { - static constexpr ClusterId GetClusterId() { return Clusters::ProxyConfiguration::Id; } +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; } + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::DecodableType; + + 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::ProxyConfiguration::Id; } +public: + static constexpr CommandId GetCommandId() { return Commands::Resume::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +}; // namespace Resume +namespace OperationalCommandResponse { +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::ProxyConfiguration::Id; } + kCommandResponseState = 0, }; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo + +struct Type { - static constexpr ClusterId GetClusterId() { return Clusters::ProxyConfiguration::Id; } +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; } + + Structs::ErrorStateStruct::Type commandResponseState; + + 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::ProxyConfiguration::Id; } - - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); +public: + static constexpr CommandId GetCommandId() { return Commands::OperationalCommandResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::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); - }; + Structs::ErrorStateStruct::DecodableType commandResponseState; + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace Attributes -} // namespace ProxyConfiguration -namespace ProxyDiscovery { +}; // namespace OperationalCommandResponse +} // namespace Commands namespace Attributes { -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 +namespace PhaseList { +struct TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::ProxyDiscovery::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::OvenCavityOperationalState::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PhaseList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +} // namespace PhaseList +namespace CurrentPhase { +struct TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::ProxyDiscovery::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::OvenCavityOperationalState::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentPhase::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace EventList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +} // namespace CurrentPhase +namespace CountdownTime { +struct TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::ProxyDiscovery::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::OvenCavityOperationalState::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CountdownTime::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +} // namespace CountdownTime +namespace OperationalStateList { +struct TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::ProxyDiscovery::Id; } + 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> &; + + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OperationalStateList::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +} // namespace OperationalStateList +namespace OperationalState { +struct TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::ProxyDiscovery::Id; } -}; -} // namespace ClusterRevision + 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::OvenCavityOperationalState::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OperationalState::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace OperationalState +namespace OperationalError { struct TypeInfo { - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::ProxyDiscovery::Id; } - - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + 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 &; - 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::OvenCavityOperationalState::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OperationalError::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Attributes -} // namespace ProxyDiscovery -namespace ProxyValid { - -namespace Attributes { - +} // namespace OperationalError namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::ProxyValid::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::ProxyValid::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::ProxyValid::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::ProxyValid::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::ProxyValid::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::ProxyValid::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } }; } // namespace ClusterRevision @@ -13943,10 +13966,17 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::ProxyValid::Id; } + 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; @@ -13956,96 +13986,61 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace ProxyValid -namespace BooleanState { - -namespace Attributes { - -namespace StateValue { -struct TypeInfo -{ - using Type = bool; - using DecodableType = bool; - using DecodableArgType = bool; +namespace Events { +namespace OperationalError { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; - static constexpr ClusterId GetClusterId() { return Clusters::BooleanState::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::StateValue::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace StateValue -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo -{ - 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::BooleanState::Id; } -}; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo -{ - 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::BooleanState::Id; } -}; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::BooleanState::Id; } + kErrorState = 0, }; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo + +struct Type { - static constexpr ClusterId GetClusterId() { return Clusters::BooleanState::Id; } +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; }; -} // namespace ClusterRevision -struct TypeInfo +struct DecodableType { - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::BooleanState::Id; } +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::OperationalError::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + Structs::ErrorStateStruct::DecodableType errorState; - Attributes::StateValue::TypeInfo::DecodableType stateValue = 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 StateChange { +} // namespace OperationalError +namespace OperationCompletion { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; enum class Fields : uint8_t { - kStateValue = 0, + kCompletionErrorCode = 0, + kTotalOperationalTime = 1, + kPausedTime = 2, }; 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 EventId GetEventId() { return Events::OperationCompletion::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } static constexpr bool kIsFabricScoped = false; - bool stateValue = static_cast(0); + uint8_t completionErrorCode = static_cast(0); + Optional> totalOperationalTime; + Optional> pausedTime; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; @@ -14054,401 +14049,522 @@ 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; } + static constexpr EventId GetEventId() { return Events::OperationCompletion::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } - bool stateValue = static_cast(0); + uint8_t completionErrorCode = static_cast(0); + Optional> totalOperationalTime; + Optional> pausedTime; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace StateChange +} // namespace OperationCompletion } // namespace Events -} // namespace BooleanState -namespace IcdManagement { +} // namespace OvenCavityOperationalState +namespace OvenMode { namespace Structs { -namespace MonitoringRegistrationStruct { +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 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 { - kCheckInNodeID = 1, - kMonitoredSubject = 2, - kFabricIndex = 254, + kNewMode = 0, }; struct Type { public: - chip::NodeId checkInNodeID = static_cast(0); - uint64_t monitoredSubject = static_cast(0); - 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::ChangeToMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } - CHIP_ERROR Decode(TLV::TLVReader & reader); + uint8_t newMode = static_cast(0); - static constexpr bool kIsFabricScoped = true; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - auto GetFabricIndex() const { return fabricIndex; } + using ResponseType = Clusters::OvenMode::Commands::ChangeToModeResponse::DecodableType; - 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::ChangeToMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } -private: - CHIP_ERROR DoEncode(TLV::TLVWriter & aWriter, TLV::Tag aTag, const Optional & aAccessingFabricIndex) const; + uint8_t newMode = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace ChangeToMode +namespace ChangeToModeResponse { +enum class Fields : uint8_t +{ + kStatus = 0, + kStatusText = 1, }; -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::ChangeToModeResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } -} // namespace MonitoringRegistrationStruct -} // namespace Structs + uint8_t status = static_cast(0); + Optional statusText; -namespace Commands { -// Forward-declarations so we can reference these later. + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; -namespace RegisterClient { -struct Type; -struct DecodableType; -} // namespace RegisterClient + using ResponseType = DataModel::NullObjectType; -namespace RegisterClientResponse { -struct Type; -struct DecodableType; -} // namespace RegisterClientResponse + static constexpr bool MustUseTimedInvoke() { return false; } +}; -namespace UnregisterClient { -struct Type; -struct DecodableType; -} // namespace UnregisterClient +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::ChangeToModeResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } -namespace StayActiveRequest { -struct Type; -struct DecodableType; -} // namespace StayActiveRequest + uint8_t status = static_cast(0); + Optional statusText; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace ChangeToModeResponse +} // namespace Commands -namespace StayActiveResponse { -struct Type; -struct DecodableType; -} // namespace StayActiveResponse +namespace Attributes { -} // namespace Commands +namespace SupportedModes { +struct TypeInfo +{ + using Type = chip::app::DataModel::List; + using DecodableType = + chip::app::DataModel::DecodableList; + using DecodableArgType = + const chip::app::DataModel::DecodableList &; -namespace Commands { -namespace RegisterClient { -enum class Fields : uint8_t + 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 { - kCheckInNodeID = 0, - kMonitoredSubject = 1, - kKey = 2, - kVerificationKey = 3, + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; + + 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 &; + + 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 +{ + 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::OvenMode::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::OvenMode::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } +}; +} // 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 + +struct TypeInfo +{ + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } -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_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - chip::NodeId checkInNodeID = static_cast(0); - uint64_t monitoredSubject = static_cast(0); - chip::ByteSpan key; - Optional verificationKey; + 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 OvenMode +namespace LaundryDryerControls { - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +namespace Attributes { - using ResponseType = Clusters::IcdManagement::Commands::RegisterClientResponse::DecodableType; +namespace SupportedDrynessLevels { +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::LaundryDryerControls::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SupportedDrynessLevels::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; - -struct DecodableType +} // namespace SupportedDrynessLevels +namespace SelectedDrynessLevel { +struct TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::RegisterClient::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - chip::NodeId checkInNodeID = static_cast(0); - uint64_t monitoredSubject = static_cast(0); - chip::ByteSpan key; - Optional verificationKey; - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::LaundryDryerControls::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SelectedDrynessLevel::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -}; // namespace RegisterClient -namespace RegisterClientResponse { -enum class Fields : uint8_t +} // namespace SelectedDrynessLevel +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - kICDCounter = 0, + static constexpr ClusterId GetClusterId() { return Clusters::LaundryDryerControls::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::RegisterClientResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } - - uint32_t ICDCounter = 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::LaundryDryerControls::Id; } }; - -struct DecodableType +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::RegisterClientResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } - - uint32_t ICDCounter = static_cast(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::LaundryDryerControls::Id; } }; -}; // namespace RegisterClientResponse -namespace UnregisterClient { -enum class Fields : uint8_t +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - kCheckInNodeID = 0, - kVerificationKey = 1, + static constexpr ClusterId GetClusterId() { return Clusters::LaundryDryerControls::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::UnregisterClient::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } - - chip::NodeId checkInNodeID = static_cast(0); - Optional verificationKey; - - 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::LaundryDryerControls::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::LaundryDryerControls::Id; } }; +} // namespace ClusterRevision -struct DecodableType +struct TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::UnregisterClient::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::LaundryDryerControls::Id; } - chip::NodeId checkInNodeID = static_cast(0); - Optional verificationKey; - CHIP_ERROR Decode(TLV::TLVReader & reader); + 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 UnregisterClient -namespace StayActiveRequest { +} // namespace Attributes +} // namespace LaundryDryerControls +namespace ModeSelect { +namespace Structs { +namespace SemanticTagStruct { enum class Fields : uint8_t { + kMfgCode = 0, + kValue = 1, }; 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; } + chip::VendorId mfgCode = static_cast(0); + uint16_t value = static_cast(0); - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + CHIP_ERROR Decode(TLV::TLVReader & reader); - using ResponseType = Clusters::IcdManagement::Commands::StayActiveResponse::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::StayActiveRequest::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } +using DecodableType = Type; - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace StayActiveRequest -namespace StayActiveResponse { +} // namespace SemanticTagStruct +namespace ModeOptionStruct { enum class Fields : uint8_t { - kPromisedActiveDuration = 0, + 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::StayActiveResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } + chip::CharSpan label; + uint8_t mode = static_cast(0); + DataModel::List semanticTags; - uint32_t promisedActiveDuration = 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::StayActiveResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } + chip::CharSpan label; + uint8_t mode = static_cast(0); + DataModel::DecodableList semanticTags; - uint32_t promisedActiveDuration = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; }; -}; // namespace StayActiveResponse -} // namespace Commands -namespace Attributes { +} // namespace ModeOptionStruct +} // namespace Structs -namespace IdleModeDuration { -struct TypeInfo -{ - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; +namespace Commands { +// Forward-declarations so we can reference these later. - static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::IdleModeDuration::Id; } - static constexpr bool MustUseTimedWrite() { return false; } +namespace ChangeToMode { +struct Type; +struct DecodableType; +} // namespace ChangeToMode + +} // namespace Commands + +namespace Commands { +namespace ChangeToMode { +enum class Fields : uint8_t +{ + kNewMode = 0, }; -} // namespace IdleModeDuration -namespace ActiveModeDuration { -struct TypeInfo + +struct Type { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; +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; } + + uint8_t newMode = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; - static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ActiveModeDuration::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace ActiveModeDuration -namespace ActiveModeThreshold { -struct TypeInfo + +struct DecodableType { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; +public: + static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ActiveModeThreshold::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + uint8_t newMode = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace ActiveModeThreshold -namespace RegisteredClients { +}; // namespace ChangeToMode +} // namespace Commands + +namespace Attributes { + +namespace Description { struct TypeInfo { - 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> &; + using Type = chip::CharSpan; + using DecodableType = chip::CharSpan; + using DecodableArgType = chip::CharSpan; - static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RegisteredClients::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; } }; -} // namespace RegisteredClients -namespace ICDCounter { +} // namespace Description +namespace StandardNamespace { 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::ICDCounter::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::StandardNamespace::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace ICDCounter -namespace ClientsSupportedPerFabric { +} // namespace StandardNamespace +namespace SupportedModes { 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::IcdManagement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ClientsSupportedPerFabric::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SupportedModes::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace ClientsSupportedPerFabric -namespace UserActiveModeTriggerHint { +} // namespace SupportedModes +namespace CurrentMode { struct TypeInfo { - using Type = chip::BitMask; - using DecodableType = chip::BitMask; - using DecodableArgType = chip::BitMask; + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::UserActiveModeTriggerHint::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentMode::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace UserActiveModeTriggerHint -namespace UserActiveModeTriggerInstruction { +} // namespace CurrentMode +namespace StartUpMode { 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::IcdManagement::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::UserActiveModeTriggerInstruction::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::StartUpMode::Id; } static constexpr bool MustUseTimedWrite() { return false; } - static constexpr size_t MaxLength() { return 128; } }; -} // namespace UserActiveModeTriggerInstruction -namespace OperatingMode { +} // namespace StartUpMode +namespace OnMode { 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::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::OperatingMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OnMode::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace OperatingMode +} // namespace OnMode namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } + 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::IcdManagement::Id; } + 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::IcdManagement::Id; } + 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::IcdManagement::Id; } + 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::IcdManagement::Id; } + 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::IcdManagement::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } }; } // namespace ClusterRevision @@ -14456,21 +14572,16 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::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::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; @@ -14480,143 +14591,47 @@ struct TypeInfo }; }; } // namespace Attributes -namespace Events { -namespace OnTransitionToActiveMode { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; - -enum class Fields : uint8_t -{ -}; - -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 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::OnTransitionToActiveMode::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::IcdManagement::Id; } - - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -} // namespace OnTransitionToActiveMode -} // namespace Events -} // namespace IcdManagement -namespace Timer { - -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 { -struct Type; -struct DecodableType; -} // namespace AddTime - -namespace ReduceTime { -struct Type; -struct DecodableType; -} // namespace ReduceTime - -} // namespace Commands - -namespace Commands { -namespace SetTimer { -enum class Fields : uint8_t -{ - kNewTime = 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; } - - 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; } -}; - -struct DecodableType -{ -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 SetTimer -namespace ResetTimer { -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::ResetTimer::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } +} // namespace ModeSelect +namespace LaundryWasherMode { +namespace Structs { +namespace ModeTagStruct = Clusters::detail::Structs::ModeTagStruct; +namespace ModeOptionStruct = Clusters::detail::Structs::ModeOptionStruct; +} // namespace Structs - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +namespace Commands { +// Forward-declarations so we can reference these later. - using ResponseType = DataModel::NullObjectType; +namespace ChangeToMode { +struct Type; +struct DecodableType; +} // namespace ChangeToMode - static constexpr bool MustUseTimedInvoke() { return false; } -}; +namespace ChangeToModeResponse { +struct Type; +struct DecodableType; +} // namespace ChangeToModeResponse -struct DecodableType -{ -public: - static constexpr CommandId GetCommandId() { return Commands::ResetTimer::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } +} // namespace Commands - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace ResetTimer -namespace AddTime { +namespace Commands { +namespace ChangeToMode { enum class Fields : uint8_t { - kAdditionalTime = 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::AddTime::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } + static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } - uint32_t additionalTime = 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::LaundryWasherMode::Commands::ChangeToModeResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -14624,27 +14639,29 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::AddTime::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } + static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } - uint32_t additionalTime = static_cast(0); + uint8_t newMode = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace AddTime -namespace ReduceTime { +}; // namespace ChangeToMode +namespace ChangeToModeResponse { enum class Fields : uint8_t { - kTimeReduction = 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::ReduceTime::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } + static constexpr CommandId GetCommandId() { return Commands::ChangeToModeResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } - uint32_t timeReduction = static_cast(0); + uint8_t status = static_cast(0); + Optional statusText; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -14656,87 +14673,102 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::ReduceTime::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } + static constexpr CommandId GetCommandId() { return Commands::ChangeToModeResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } - uint32_t timeReduction = static_cast(0); + uint8_t status = static_cast(0); + Optional statusText; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace ReduceTime +}; // namespace ChangeToModeResponse } // namespace Commands namespace Attributes { -namespace SetTime { +namespace SupportedModes { 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< + chip::app::Clusters::LaundryWasherMode::Structs::ModeOptionStruct::DecodableType> &; - static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SetTime::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SupportedModes::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace SetTime -namespace TimeRemaining { +} // namespace SupportedModes +namespace CurrentMode { 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::Timer::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TimeRemaining::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentMode::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace TimeRemaining -namespace TimerState { +} // namespace CurrentMode +namespace StartUpMode { 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::LaundryWasherMode::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::StartUpMode::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace TimerState +} // 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::LaundryWasherMode::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::Timer::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::Timer::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::Timer::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::Timer::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::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::LaundryWasherMode::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::LaundryWasherMode::Id; } }; } // namespace ClusterRevision @@ -14744,13 +14776,14 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::Timer::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::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::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; @@ -14760,143 +14793,47 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace Timer -namespace OvenCavityOperationalState { +} // namespace LaundryWasherMode +namespace RefrigeratorAndTemperatureControlledCabinetMode { namespace Structs { -namespace ErrorStateStruct = Clusters::detail::Structs::ErrorStateStruct; -namespace OperationalStateStruct = Clusters::detail::Structs::OperationalStateStruct; +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 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 { +namespace ChangeToMode { struct Type; struct DecodableType; -} // namespace Resume +} // namespace ChangeToMode -namespace OperationalCommandResponse { +namespace ChangeToModeResponse { struct Type; struct DecodableType; -} // namespace OperationalCommandResponse - -} // namespace Commands - -namespace Commands { -namespace Pause { -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::Pause::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = Clusters::OvenCavityOperationalState::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::OvenCavityOperationalState::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::OvenCavityOperationalState::Id; } - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = Clusters::OvenCavityOperationalState::Commands::OperationalCommandResponse::DecodableType; - - static constexpr bool MustUseTimedInvoke() { return false; } -}; - -struct DecodableType -{ -public: - static constexpr CommandId GetCommandId() { return Commands::Stop::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } - - 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::OvenCavityOperationalState::Id; } - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = Clusters::OvenCavityOperationalState::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::OvenCavityOperationalState::Id; } +} // namespace ChangeToModeResponse - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace Start -namespace Resume { +} // 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::RefrigeratorAndTemperatureControlledCabinetMode::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::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToModeResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -14904,26 +14841,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::RefrigeratorAndTemperatureControlledCabinetMode::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::RefrigeratorAndTemperatureControlledCabinetMode::Id; } - Structs::ErrorStateStruct::Type commandResponseState; + uint8_t status = static_cast(0); + Optional statusText; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -14935,126 +14875,103 @@ 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::RefrigeratorAndTemperatureControlledCabinetMode::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< + 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::OvenCavityOperationalState::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CountdownTime::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::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::RefrigeratorAndTemperatureControlledCabinetMode::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::RefrigeratorAndTemperatureControlledCabinetMode::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::RefrigeratorAndTemperatureControlledCabinetMode::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::RefrigeratorAndTemperatureControlledCabinetMode::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::RefrigeratorAndTemperatureControlledCabinetMode::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::RefrigeratorAndTemperatureControlledCabinetMode::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::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::OvenCavityOperationalState::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::OvenCavityOperationalState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } }; } // namespace ClusterRevision @@ -15062,17 +14979,14 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::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::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; @@ -15082,82 +14996,121 @@ struct TypeInfo }; }; } // namespace Attributes -namespace Events { -namespace OperationalError { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; +} // namespace RefrigeratorAndTemperatureControlledCabinetMode +namespace LaundryWasherControls { -enum class Fields : uint8_t -{ - kErrorState = 0, -}; +namespace Attributes { -struct Type +namespace SpinSpeeds { +struct TypeInfo { -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; + using Type = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList; + using DecodableArgType = const chip::app::DataModel::DecodableList &; - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SpinSpeeds::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; - -struct DecodableType +} // namespace SpinSpeeds +namespace SpinSpeedCurrent { +struct TypeInfo { -public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::OperationalError::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OvenCavityOperationalState::Id; } + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - Structs::ErrorStateStruct::DecodableType errorState; + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SpinSpeedCurrent::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // 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; - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfRinses::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace OperationalError -namespace OperationCompletion { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; +} // 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 &; -enum class Fields : uint8_t + 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 { - kCompletionErrorCode = 0, - kTotalOperationalTime = 1, - kPausedTime = 2, + 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::LaundryWasherControls::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +{ + 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::LaundryWasherControls::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::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::LaundryWasherControls::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::LaundryWasherControls::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::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 OperationCompletion -} // namespace Events -} // namespace OvenCavityOperationalState -namespace OvenMode { +} // namespace Attributes +} // namespace LaundryWasherControls +namespace RvcRunMode { namespace Structs { namespace ModeTagStruct = Clusters::detail::Structs::ModeTagStruct; namespace ModeOptionStruct = Clusters::detail::Structs::ModeOptionStruct; @@ -15190,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::OvenMode::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 = Clusters::OvenMode::Commands::ChangeToModeResponse::DecodableType; + using ResponseType = Clusters::RvcRunMode::Commands::ChangeToModeResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -15205,7 +15158,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::RvcRunMode::Id; } uint8_t newMode = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -15223,7 +15176,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::RvcRunMode::Id; } uint8_t status = static_cast(0); Optional statusText; @@ -15239,7 +15192,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::RvcRunMode::Id; } uint8_t status = static_cast(0); Optional statusText; @@ -15253,13 +15206,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::OvenMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcRunMode::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::SupportedModes::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -15271,23 +15224,11 @@ struct TypeInfo using DecodableType = uint8_t; using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::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::OvenMode::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::StartUpMode::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace StartUpMode namespace OnMode { struct TypeInfo { @@ -15295,7 +15236,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::RvcRunMode::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::OnMode::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -15303,37 +15244,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::RvcRunMode::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::RvcRunMode::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::RvcRunMode::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::RvcRunMode::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::RvcRunMode::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::RvcRunMode::Id; } }; } // namespace ClusterRevision @@ -15341,13 +15282,12 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::OvenMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcRunMode::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; @@ -15358,151 +15298,11 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace OvenMode -namespace LaundryDryerControls { - -namespace Attributes { - -namespace SupportedDrynessLevels { -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::LaundryDryerControls::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SupportedDrynessLevels::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace SupportedDrynessLevels -namespace SelectedDrynessLevel { -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::LaundryDryerControls::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SelectedDrynessLevel::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace SelectedDrynessLevel -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo -{ - 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::LaundryDryerControls::Id; } -}; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo -{ - 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::LaundryDryerControls::Id; } -}; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo -{ - 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::LaundryDryerControls::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 RvcRunMode +namespace RvcCleanMode { 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); - - static constexpr bool kIsFabricScoped = false; -}; - -} // namespace ModeOptionStruct +namespace ModeTagStruct = Clusters::detail::Structs::ModeTagStruct; +namespace ModeOptionStruct = Clusters::detail::Structs::ModeOptionStruct; } // namespace Structs namespace Commands { @@ -15511,7 +15311,12 @@ namespace Commands { namespace ChangeToMode { struct Type; struct DecodableType; -} // namespace ChangeToMode +} // namespace ChangeToMode + +namespace ChangeToModeResponse { +struct Type; +struct DecodableType; +} // namespace ChangeToModeResponse } // namespace Commands @@ -15527,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::ModeSelect::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 = DataModel::NullObjectType; + using ResponseType = Clusters::RvcCleanMode::Commands::ChangeToModeResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -15542,51 +15347,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::RvcCleanMode::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::RvcCleanMode::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::RvcCleanMode::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::RvcCleanMode::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::SupportedModes::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -15598,23 +15413,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::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::ModeSelect::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::StartUpMode::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace StartUpMode namespace OnMode { struct TypeInfo { @@ -15622,7 +15425,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::RvcCleanMode::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::OnMode::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -15630,37 +15433,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::RvcCleanMode::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::RvcCleanMode::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::RvcCleanMode::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::RvcCleanMode::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::RvcCleanMode::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::RvcCleanMode::Id; } }; } // namespace ClusterRevision @@ -15668,15 +15471,12 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::ModeSelect::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanMode::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,47 +15487,40 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace ModeSelect -namespace LaundryWasherMode { -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 { +namespace SetTemperature { enum class Fields : uint8_t { - kNewMode = 0, + 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::ChangeToMode::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } + static constexpr CommandId GetCommandId() { return Commands::SetTemperature::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } - uint8_t newMode = static_cast(0); + Optional targetTemperature; + Optional targetTemperatureLevel; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::LaundryWasherMode::Commands::ChangeToModeResponse::DecodableType; + using ResponseType = DataModel::NullObjectType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -15735,136 +15528,225 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } + static constexpr CommandId GetCommandId() { return Commands::SetTemperature::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } - uint8_t newMode = static_cast(0); + Optional targetTemperature; + Optional targetTemperatureLevel; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace ChangeToMode -namespace ChangeToModeResponse { -enum class Fields : uint8_t +}; // namespace SetTemperature +} // namespace Commands + +namespace Attributes { + +namespace TemperatureSetpoint { +struct TypeInfo { - kStatus = 0, - kStatusText = 1, + using Type = int16_t; + using DecodableType = int16_t; + using DecodableArgType = int16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TemperatureSetpoint::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; +} // namespace TemperatureSetpoint +namespace MinTemperature { +struct TypeInfo +{ + using Type = int16_t; + using DecodableType = int16_t; + using DecodableArgType = int16_t; -struct Type + static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MinTemperature::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MinTemperature +namespace MaxTemperature { +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::LaundryWasherMode::Id; } + using Type = int16_t; + using DecodableType = int16_t; + using DecodableArgType = int16_t; - uint8_t status = static_cast(0); - Optional statusText; + static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxTemperature::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MaxTemperature +namespace Step { +struct TypeInfo +{ + using Type = int16_t; + using DecodableType = int16_t; + using DecodableArgType = int16_t; - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Step::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Step +namespace SelectedTemperatureLevel { +struct TypeInfo +{ + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; - using ResponseType = DataModel::NullObjectType; + 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 bool MustUseTimedInvoke() { return false; } + 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::TemperatureControl::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + 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::TemperatureControl::Id; } +}; +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + 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::TemperatureControl::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } }; +} // namespace ClusterRevision -struct DecodableType +struct TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::ChangeToModeResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } - uint8_t status = static_cast(0); - Optional statusText; - CHIP_ERROR Decode(TLV::TLVReader & reader); + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + 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); + }; }; -}; // namespace ChangeToModeResponse -} // namespace Commands +} // namespace Attributes +} // namespace TemperatureControl +namespace RefrigeratorAlarm { 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< - chip::app::Clusters::LaundryWasherMode::Structs::ModeOptionStruct::DecodableType> &; - - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SupportedModes::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace SupportedModes -namespace CurrentMode { +namespace Mask { 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::LaundryWasherMode::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CurrentMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Mask::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace CurrentMode -namespace StartUpMode { +} // namespace Mask +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::LaundryWasherMode::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::StartUpMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::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::LaundryWasherMode::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::OnMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::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::LaundryWasherMode::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::LaundryWasherMode::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::LaundryWasherMode::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::LaundryWasherMode::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::LaundryWasherMode::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::LaundryWasherMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } }; } // namespace ClusterRevision @@ -15872,14 +15754,16 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::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::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; @@ -15889,8 +15773,52 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace LaundryWasherMode -namespace RefrigeratorAndTemperatureControlledCabinetMode { +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; @@ -15923,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::RefrigeratorAndTemperatureControlledCabinetMode::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::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToModeResponse::DecodableType; + using ResponseType = Clusters::DishwasherMode::Commands::ChangeToModeResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -15938,7 +15866,7 @@ struct DecodableType { public: static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherMode::Id; } uint8_t newMode = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -15956,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::RefrigeratorAndTemperatureControlledCabinetMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherMode::Id; } uint8_t status = static_cast(0); Optional statusText; @@ -15972,7 +15900,7 @@ struct DecodableType { public: static constexpr CommandId GetCommandId() { return Commands::ChangeToModeResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherMode::Id; } uint8_t status = static_cast(0); Optional statusText; @@ -15986,14 +15914,13 @@ namespace Attributes { namespace SupportedModes { 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 = chip::app::DataModel::List; + using DecodableType = + chip::app::DataModel::DecodableList; + using DecodableArgType = + const chip::app::DataModel::DecodableList &; - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherMode::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::SupportedModes::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -16005,7 +15932,7 @@ struct TypeInfo using DecodableType = uint8_t; using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherMode::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::CurrentMode::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -16017,7 +15944,7 @@ struct TypeInfo using DecodableType = chip::app::DataModel::Nullable; using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherMode::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::StartUpMode::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -16029,7 +15956,7 @@ struct TypeInfo using DecodableType = chip::app::DataModel::Nullable; using DecodableArgType = const chip::app::DataModel::Nullable &; - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherMode::Id; } static constexpr AttributeId GetAttributeId() { return Attributes::OnMode::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; @@ -16037,149 +15964,112 @@ struct TypeInfo namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::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::RefrigeratorAndTemperatureControlledCabinetMode::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::RefrigeratorAndTemperatureControlledCabinetMode::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::RefrigeratorAndTemperatureControlledCabinetMode::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::RefrigeratorAndTemperatureControlledCabinetMode::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::RefrigeratorAndTemperatureControlledCabinetMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherMode::Id; } }; } // namespace ClusterRevision - -struct TypeInfo -{ - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAndTemperatureControlledCabinetMode::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; - 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 RefrigeratorAndTemperatureControlledCabinetMode -namespace LaundryWasherControls { - -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 { -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::LaundryWasherControls::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SpinSpeedCurrent::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // 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; + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::DishwasherMode::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfRinses::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 NumberOfRinses -namespace SupportedRinses { +} // namespace Attributes +} // namespace DishwasherMode +namespace AirQuality { + +namespace Attributes { + +namespace AirQuality { 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::AirQuality::AirQualityEnum; + using DecodableType = chip::app::Clusters::AirQuality::AirQualityEnum; + using DecodableArgType = chip::app::Clusters::AirQuality::AirQualityEnum; - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SupportedRinses::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AirQuality::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::AirQuality::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace SupportedRinses +} // namespace AirQuality namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } + 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::LaundryWasherControls::Id; } + 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::LaundryWasherControls::Id; } + 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::LaundryWasherControls::Id; } + 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::LaundryWasherControls::Id; } + 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::LaundryWasherControls::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AirQuality::Id; } }; } // namespace ClusterRevision @@ -16187,15 +16077,12 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::LaundryWasherControls::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::AirQuality::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::AirQuality::TypeInfo::DecodableType airQuality = + static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -16205,47 +16092,35 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace LaundryWasherControls -namespace RvcRunMode { -namespace Structs { -namespace ModeTagStruct = Clusters::detail::Structs::ModeTagStruct; -namespace ModeOptionStruct = Clusters::detail::Structs::ModeOptionStruct; -} // namespace Structs +} // 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::RvcRunMode::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::RvcRunMode::Commands::ChangeToModeResponse::DecodableType; + using ResponseType = DataModel::NullObjectType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -16253,124 +16128,206 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::ChangeToMode::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RvcRunMode::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::RvcRunMode::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 bool MustUseTimedInvoke() { return false; } + 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; -struct DecodableType + 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 { -public: - static constexpr CommandId GetCommandId() { return Commands::ChangeToModeResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RvcRunMode::Id; } + using Type = chip::app::Clusters::SmokeCoAlarm::EndOfServiceEnum; + using DecodableType = chip::app::Clusters::SmokeCoAlarm::EndOfServiceEnum; + using DecodableArgType = chip::app::Clusters::SmokeCoAlarm::EndOfServiceEnum; - 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::EndOfServiceAlert::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -}; // namespace ChangeToModeResponse -} // namespace Commands +} // 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; -namespace Attributes { + static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::InterconnectSmokeAlarm::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace InterconnectSmokeAlarm +namespace InterconnectCOAlarm { +struct TypeInfo +{ + using Type = chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum; + using DecodableType = chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum; + using DecodableArgType = chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum; -namespace SupportedModes { + static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::InterconnectCOAlarm::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // 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::RvcRunMode::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::RvcRunMode::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::RvcRunMode::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::RvcRunMode::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::RvcRunMode::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::RvcRunMode::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::RvcRunMode::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::RvcRunMode::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::RvcRunMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } }; } // namespace ClusterRevision @@ -16378,13 +16335,32 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::RvcRunMode::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; @@ -16394,506 +16370,327 @@ 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 Commands { -// Forward-declarations so we can reference these later. - -namespace ChangeToMode { -struct Type; -struct DecodableType; -} // namespace ChangeToMode - -namespace ChangeToModeResponse { -struct Type; -struct DecodableType; -} // namespace ChangeToModeResponse - -} // namespace Commands +namespace Events { +namespace SmokeAlarm { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; -namespace Commands { -namespace ChangeToMode { enum class Fields : uint8_t { - kNewMode = 0, + 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::ChangeToMode::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanMode::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; - uint8_t newMode = static_cast(0); + AlarmStateEnum alarmSeverityLevel = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = Clusters::RvcCleanMode::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::RvcCleanMode::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); - uint8_t newMode = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace ChangeToMode -namespace ChangeToModeResponse { +} // namespace SmokeAlarm +namespace COAlarm { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; + enum class Fields : uint8_t { - kStatus = 0, - kStatusText = 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::ChangeToModeResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanMode::Id; } + 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; - uint8_t status = static_cast(0); - Optional statusText; + 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::ChangeToModeResponse::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanMode::Id; } - - uint8_t status = static_cast(0); - Optional statusText; - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -}; // namespace ChangeToModeResponse -} // namespace Commands - -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 &; - - static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanMode::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::RvcCleanMode::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CurrentMode::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace CurrentMode -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::RvcCleanMode::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::RvcCleanMode::Id; } -}; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo -{ - 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::RvcCleanMode::Id; } -}; -} // namespace EventList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo -{ - 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::RvcCleanMode::Id; } -}; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo -{ - static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanMode::Id; } -}; -} // namespace ClusterRevision - -struct TypeInfo -{ - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::RvcCleanMode::Id; } + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::COAlarm::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + AlarmStateEnum alarmSeverityLevel = static_cast(0); - Attributes::SupportedModes::TypeInfo::DecodableType supportedModes; - Attributes::CurrentMode::TypeInfo::DecodableType currentMode = static_cast(0); - 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); - }; + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // 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 COAlarm +namespace LowBattery { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -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::LowBattery::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::LowBattery::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 Attributes { +} // namespace LowBattery +namespace HardwareFault { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -namespace TemperatureSetpoint { -struct TypeInfo +enum class Fields : uint8_t { - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - - static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TemperatureSetpoint::Id; } - static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace TemperatureSetpoint -namespace MinTemperature { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MinTemperature::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace MinTemperature -namespace MaxTemperature { -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::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::MaxTemperature::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace MaxTemperature -namespace Step { -struct TypeInfo -{ - using Type = int16_t; - using DecodableType = int16_t; - using DecodableArgType = int16_t; - static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Step::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // 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::HardwareFault::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SelectedTemperatureLevel::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // 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 &; +} // namespace HardwareFault +namespace EndOfService { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - 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 +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } }; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::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 AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::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 EventList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::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 AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::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 FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo + +struct DecodableType { - 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; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace ClusterRevision +} // namespace SelfTestComplete +namespace AlarmMuted { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; -struct TypeInfo +enum class Fields : uint8_t { - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::TemperatureControl::Id; } +}; - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); +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 bool kIsFabricScoped = false; - 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 Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace Attributes -} // namespace TemperatureControl -namespace RefrigeratorAlarm { -namespace Attributes { - -namespace Mask { -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::Mask::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace Mask -namespace State { -struct TypeInfo -{ - using Type = chip::BitMask; - using DecodableType = chip::BitMask; - using DecodableArgType = chip::BitMask; +} // namespace AlarmMuted +namespace MuteEnded { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - static constexpr ClusterId GetClusterId() { return Clusters::RefrigeratorAlarm::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::State::Id; } - static constexpr bool MustUseTimedWrite() { return false; } +enum class Fields : uint8_t +{ }; -} // namespace State -namespace Supported { -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::MuteEnded::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::Supported::Id; } - static constexpr bool MustUseTimedWrite() { return 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::Clusters::AirQuality::AirQualityEnum; - using DecodableType = chip::app::Clusters::AirQuality::AirQualityEnum; - using DecodableArgType = chip::app::Clusters::AirQuality::AirQualityEnum; + 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::AirQuality::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::AirQuality::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenMode::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SupportedModes::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace AirQuality +} // 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 { - 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,47 @@ 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, + kWattSettingIndex = 3, + kStartAfterSetting = 4, }; 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; + Optional wattSettingIndex; + Optional startAfterSetting; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -17224,206 +17089,195 @@ 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; + Optional wattSettingIndex; + Optional startAfterSetting; 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; } + uint32_t timeToAdd = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace COState -namespace BatteryAlert { -struct TypeInfo + +struct DecodableType { - using Type = chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum; - using DecodableType = chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum; - using DecodableArgType = chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum; +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::BatteryAlert::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + uint32_t timeToAdd = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace BatteryAlert -namespace DeviceMuted { +}; // namespace AddMoreTime +} // namespace Commands + +namespace Attributes { + +namespace CookTime { struct TypeInfo { - using Type = chip::app::Clusters::SmokeCoAlarm::MuteStateEnum; - using DecodableType = chip::app::Clusters::SmokeCoAlarm::MuteStateEnum; - using DecodableArgType = chip::app::Clusters::SmokeCoAlarm::MuteStateEnum; + 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::DeviceMuted::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CookTime::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace DeviceMuted -namespace TestInProgress { +} // namespace CookTime +namespace MaxCookTime { 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::SmokeCoAlarm::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TestInProgress::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxCookTime::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace TestInProgress -namespace HardwareFaultAlert { +} // namespace MaxCookTime +namespace PowerSetting { 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::SmokeCoAlarm::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::HardwareFaultAlert::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PowerSetting::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace HardwareFaultAlert -namespace EndOfServiceAlert { +} // namespace PowerSetting +namespace MinPower { struct TypeInfo { - using Type = chip::app::Clusters::SmokeCoAlarm::EndOfServiceEnum; - using DecodableType = chip::app::Clusters::SmokeCoAlarm::EndOfServiceEnum; - using DecodableArgType = chip::app::Clusters::SmokeCoAlarm::EndOfServiceEnum; + 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::EndOfServiceAlert::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MinPower::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace EndOfServiceAlert -namespace InterconnectSmokeAlarm { +} // namespace MinPower +namespace MaxPower { 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::InterconnectSmokeAlarm::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxPower::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace InterconnectSmokeAlarm -namespace InterconnectCOAlarm { +} // namespace MaxPower +namespace PowerStep { 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::PowerStep::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace InterconnectCOAlarm -namespace ContaminationState { +} // namespace PowerStep +namespace SupportedWatts { 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 = chip::app::DataModel::List; + using DecodableType = chip::app::DataModel::DecodableList; + using DecodableArgType = const chip::app::DataModel::DecodableList &; - 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::SupportedWatts::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace ContaminationState -namespace SmokeSensitivityLevel { +} // namespace SupportedWatts +namespace SelectedWattIndex { 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::SelectedWattIndex::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace SmokeSensitivityLevel -namespace ExpiryDate { +} // namespace SelectedWattIndex +namespace WattRating { struct TypeInfo { - using Type = uint32_t; - using DecodableType = uint32_t; - using DecodableArgType = uint32_t; + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_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::WattRating::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace ExpiryDate +} // namespace WattRating 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 +17285,19 @@ 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::MaxCookTime::TypeInfo::DecodableType maxCookTime = 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::SupportedWatts::TypeInfo::DecodableType supportedWatts; + Attributes::SelectedWattIndex::TypeInfo::DecodableType selectedWattIndex = static_cast(0); + Attributes::WattRating::TypeInfo::DecodableType wattRating = static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -17466,137 +17307,73 @@ struct TypeInfo }; }; } // namespace Attributes -namespace Events { -namespace SmokeAlarm { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; - -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; - - AlarmStateEnum alarmSeverityLevel = 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::SmokeAlarm::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } - - AlarmStateEnum alarmSeverityLevel = static_cast(0); - - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -} // namespace SmokeAlarm -namespace COAlarm { -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 -enum class Fields : uint8_t -{ - kAlarmSeverityLevel = 0, -}; +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::COAlarm::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } - static constexpr bool kIsFabricScoped = false; +namespace Pause { +struct Type; +struct DecodableType; +} // namespace Pause - AlarmStateEnum alarmSeverityLevel = static_cast(0); +namespace Stop { +struct Type; +struct DecodableType; +} // namespace Stop - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; -}; +namespace Start { +struct Type; +struct DecodableType; +} // namespace Start -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; } +namespace Resume { +struct Type; +struct DecodableType; +} // namespace Resume - AlarmStateEnum alarmSeverityLevel = static_cast(0); +namespace OperationalCommandResponse { +struct Type; +struct DecodableType; +} // namespace OperationalCommandResponse - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -} // namespace COAlarm -namespace LowBattery { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; +} // 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::LowBattery::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::Pause::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } 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::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; - -enum class Fields : uint8_t -{ -}; -struct Type -{ -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; + using ResponseType = Clusters::OperationalState::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::HardwareFault::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + static constexpr CommandId GetCommandId() { return Commands::Pause::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace HardwareFault -namespace EndOfService { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - +}; // namespace Pause +namespace Stop { enum class Fields : uint8_t { }; @@ -17604,27 +17381,27 @@ enum class Fields : uint8_t struct Type { 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; + // 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::EndOfService::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; } CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace EndOfService -namespace SelfTestComplete { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - +}; // namespace Stop +namespace Start { enum class Fields : uint8_t { }; @@ -17632,27 +17409,27 @@ enum class Fields : uint8_t 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 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::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::SelfTestComplete::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + static constexpr CommandId GetCommandId() { return Commands::Start::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace SelfTestComplete -namespace AlarmMuted { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - +}; // namespace Start +namespace Resume { enum class Fields : uint8_t { }; @@ -17660,102 +17437,215 @@ enum class Fields : uint8_t 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 bool kIsFabricScoped = false; + // 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 PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::AlarmMuted::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + static constexpr CommandId GetCommandId() { return Commands::Resume::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace AlarmMuted -namespace MuteEnded { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - +}; // namespace Resume +namespace OperationalCommandResponse { enum class Fields : uint8_t { + kCommandResponseState = 0, }; 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; + // 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; } + + 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::MuteEnded::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; } + Structs::ErrorStateStruct::DecodableType commandResponseState; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace MuteEnded -namespace InterconnectSmokeAlarm { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; +}; // namespace OperationalCommandResponse +} // namespace Commands -enum class Fields : uint8_t +namespace Attributes { + +namespace PhaseList { +struct TypeInfo { - kAlarmSeverityLevel = 0, + 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 &; -struct Type + 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 { -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; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - AlarmStateEnum alarmSeverityLevel = static_cast(0); + 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 Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + 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; -struct DecodableType + 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::InterconnectSmokeAlarm::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::SmokeCoAlarm::Id; } + 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 &; - AlarmStateEnum alarmSeverityLevel = static_cast(0); + 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; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } +}; +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } +}; +} // namespace ClusterRevision - CHIP_ERROR Decode(TLV::TLVReader & reader); +struct TypeInfo +{ + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::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 InterconnectSmokeAlarm -namespace InterconnectCOAlarm { +} // namespace Attributes +namespace Events { +namespace OperationalError { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; enum class Fields : uint8_t { - kAlarmSeverityLevel = 0, + kErrorState = 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 EventId GetEventId() { return Events::OperationalError::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } static constexpr bool kIsFabricScoped = false; - AlarmStateEnum alarmSeverityLevel = static_cast(0); + Structs::ErrorStateStruct::Type errorState; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; @@ -17764,29 +17654,36 @@ 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; } + static constexpr EventId GetEventId() { return Events::OperationalError::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } - AlarmStateEnum alarmSeverityLevel = static_cast(0); + Structs::ErrorStateStruct::DecodableType errorState; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace InterconnectCOAlarm -namespace AllClear { +} // 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::AllClear::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; }; @@ -17794,50 +17691,70 @@ 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 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 AllClear +} // namespace OperationCompletion } // namespace Events -} // namespace SmokeCoAlarm -namespace DishwasherAlarm { +} // 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 Reset { +namespace Pause { struct Type; struct DecodableType; -} // namespace Reset +} // namespace Pause -namespace ModifyEnabledAlarms { +namespace Stop { struct Type; struct DecodableType; -} // namespace ModifyEnabledAlarms +} // 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 Reset { +namespace Pause { 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::Pause::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,31 +17762,27 @@ 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::Pause::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 Pause +namespace Stop { enum class Fields : uint8_t { - 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::ModifyEnabledAlarms::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } - - chip::BitMask mask = static_cast>(0); + 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 = DataModel::NullObjectType; + using ResponseType = Clusters::RvcOperationalState::Commands::OperationalCommandResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -17877,240 +17790,212 @@ 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::Stop::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } - chip::BitMask mask = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace ModifyEnabledAlarms -} // namespace Commands - -namespace Attributes { - -namespace Mask { -struct TypeInfo +}; // namespace Stop +namespace Start { +enum class Fields : uint8_t { - using Type = chip::BitMask; - using DecodableType = chip::BitMask; - using DecodableArgType = chip::BitMask; - - static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Mask::Id; } - static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Mask -namespace Latch { -struct TypeInfo -{ - using Type = chip::BitMask; - using DecodableType = chip::BitMask; - using DecodableArgType = chip::BitMask; - static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Latch::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace Latch -namespace State { -struct TypeInfo +struct Type { - using Type = chip::BitMask; - using DecodableType = chip::BitMask; - using DecodableArgType = chip::BitMask; +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 ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::State::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace State -namespace Supported { -struct TypeInfo -{ - using Type = chip::BitMask; - using DecodableType = chip::BitMask; - using DecodableArgType = chip::BitMask; + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Supported::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace Supported -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo -{ - 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::DishwasherAlarm::Id; } -}; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo -{ - 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::DishwasherAlarm::Id; } + using ResponseType = Clusters::RvcOperationalState::Commands::OperationalCommandResponse::DecodableType; + + 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::DishwasherAlarm::Id; } +public: + static constexpr CommandId GetCommandId() { return Commands::Start::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +}; // namespace Start +namespace Resume { +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } }; -} // namespace ClusterRevision -struct TypeInfo +struct Type { - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::DishwasherAlarm::Id; } +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; } - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - 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); - }; + using ResponseType = Clusters::RvcOperationalState::Commands::OperationalCommandResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace Attributes -namespace Events { -namespace Notify { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::Resume::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace Resume +namespace OperationalCommandResponse { enum class Fields : uint8_t { - kActive = 0, - kInactive = 1, - kState = 2, - kMask = 3, + kCommandResponseState = 0, }; 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; + // 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; } - chip::BitMask active = static_cast>(0); - chip::BitMask inactive = static_cast>(0); - chip::BitMask state = static_cast>(0); - chip::BitMask mask = 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::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); + static constexpr CommandId GetCommandId() { return Commands::OperationalCommandResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } + Structs::ErrorStateStruct::DecodableType commandResponseState; 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 OperationalCommandResponse +} // namespace Commands namespace Attributes { -namespace SupportedModes { +namespace PhaseList { struct TypeInfo { - using Type = chip::app::DataModel::List; - using DecodableType = - 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::RvcOperationalState::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::RvcOperationalState::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::RvcOperationalState::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< + chip::app::Clusters::RvcOperationalState::Structs::OperationalStateStruct::DecodableType>; using DecodableArgType = const chip::app::DataModel::DecodableList< - chip::app::Clusters::MicrowaveOvenMode::Structs::ModeOptionStruct::DecodableType> &; + chip::app::Clusters::RvcOperationalState::Structs::OperationalStateStruct::DecodableType> &; - static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenMode::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SupportedModes::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OperationalStateList::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace SupportedModes -namespace CurrentMode { +} // namespace OperationalStateList +namespace OperationalState { 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 ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OperationalState::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace CurrentMode +} // 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::MicrowaveOvenMode::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::MicrowaveOvenMode::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::MicrowaveOvenMode::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::MicrowaveOvenMode::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::MicrowaveOvenMode::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::MicrowaveOvenMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } }; } // namespace ClusterRevision @@ -18118,12 +18003,16 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenMode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::SupportedModes::TypeInfo::DecodableType supportedModes; - Attributes::CurrentMode::TypeInfo::DecodableType currentMode = 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; @@ -18133,271 +18022,344 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace MicrowaveOvenMode -namespace MicrowaveOvenControl { - -namespace Commands { -// Forward-declarations so we can reference these later. - -namespace SetCookingParameters { -struct Type; -struct DecodableType; -} // namespace SetCookingParameters - -namespace AddMoreTime { -struct Type; -struct DecodableType; -} // namespace AddMoreTime - -} // namespace Commands +namespace Events { +namespace OperationalError { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; -namespace Commands { -namespace SetCookingParameters { enum class Fields : uint8_t { - kCookMode = 0, - kCookTime = 1, - kPowerSetting = 2, + kErrorState = 0, }; 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 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; - Optional cookMode; - Optional cookTime; - Optional powerSetting; + Structs::ErrorStateStruct::Type errorState; 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::SetCookingParameters::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenControl::Id; } + 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; - Optional cookMode; - Optional cookTime; - Optional powerSetting; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace SetCookingParameters -namespace AddMoreTime { +} // namespace OperationalError +namespace OperationCompletion { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + enum class Fields : uint8_t { - kTimeToAdd = 0, + kCompletionErrorCode = 0, + kTotalOperationalTime = 1, + kPausedTime = 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 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; - uint32_t timeToAdd = static_cast(0); + uint8_t completionErrorCode = static_cast(0); + Optional> totalOperationalTime; + Optional> pausedTime; 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::AddMoreTime::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenControl::Id; } - - uint32_t timeToAdd = 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 PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::OperationCompletion::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } - 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; + uint8_t completionErrorCode = static_cast(0); + Optional> totalOperationalTime; + Optional> pausedTime; - static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PowerStep::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace PowerStep -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +} // namespace OperationCompletion +} // namespace Events +} // namespace RvcOperationalState +namespace ScenesManagement { +namespace Structs { +namespace AttributeValuePair { +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenControl::Id; } + kAttributeID = 0, + kAttributeValue = 1, }; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo + +struct Type { - static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenControl::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 AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo + +using DecodableType = Type; + +} // namespace AttributeValuePair +namespace ExtensionFieldSet { +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenControl::Id; } + kClusterID = 0, + kAttributeValueList = 1, }; -} // namespace EventList -namespace AttributeList { -struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo + +struct Type { - static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenControl::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 AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo + +struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenControl::Id; } +public: + chip::ClusterId clusterID = static_cast(0); + DataModel::DecodableList attributeValueList; + + CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; }; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo + +} // namespace ExtensionFieldSet +namespace SceneInfoStruct { +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenControl::Id; } + kSceneCount = 0, + kCurrentScene = 1, + kCurrentGroup = 2, + kSceneValid = 3, + kRemainingCapacity = 4, + kFabricIndex = 254, }; -} // namespace ClusterRevision -struct TypeInfo +struct Type { - struct DecodableType - { - static constexpr ClusterId GetClusterId() { return Clusters::MicrowaveOvenControl::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, const ConcreteAttributePath & path); + CHIP_ERROR Decode(TLV::TLVReader & reader); - 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); - }; + 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 Attributes -} // namespace MicrowaveOvenControl -namespace OperationalState { -namespace Structs { -namespace ErrorStateStruct = Clusters::detail::Structs::ErrorStateStruct; -namespace OperationalStateStruct = Clusters::detail::Structs::OperationalStateStruct; + +using DecodableType = Type; + +} // namespace SceneInfoStruct } // namespace Structs namespace Commands { // Forward-declarations so we can reference these later. -namespace Pause { +namespace AddScene { struct Type; struct DecodableType; -} // namespace Pause +} // namespace AddScene -namespace Stop { +namespace AddSceneResponse { struct Type; struct DecodableType; -} // namespace Stop +} // namespace AddSceneResponse -namespace Start { +namespace ViewScene { struct Type; struct DecodableType; -} // namespace Start +} // namespace ViewScene -namespace Resume { +namespace ViewSceneResponse { struct Type; struct DecodableType; -} // namespace Resume +} // namespace ViewSceneResponse -namespace OperationalCommandResponse { +namespace RemoveScene { struct Type; struct DecodableType; -} // namespace OperationalCommandResponse +} // 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 + +namespace EnhancedAddSceneResponse { +struct Type; +struct DecodableType; +} // namespace EnhancedAddSceneResponse + +namespace EnhancedViewScene { +struct Type; +struct DecodableType; +} // namespace EnhancedViewScene + +namespace EnhancedViewSceneResponse { +struct Type; +struct DecodableType; +} // namespace EnhancedViewSceneResponse + +namespace CopyScene { +struct Type; +struct DecodableType; +} // namespace CopyScene + +namespace CopySceneResponse { +struct Type; +struct DecodableType; +} // namespace CopySceneResponse } // namespace Commands namespace Commands { -namespace Pause { +namespace AddScene { +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::ScenesManagement::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; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = Clusters::ScenesManagement::Commands::AddSceneResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::AddScene::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::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 { 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::OperationalState::Id; } + static constexpr CommandId GetCommandId() { return Commands::AddSceneResponse::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; } }; @@ -18405,27 +18367,35 @@ 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::AddSceneResponse::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 AddSceneResponse +namespace ViewScene { 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::ViewScene::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::ViewSceneResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -18433,27 +18403,42 @@ 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::ViewScene::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 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::Start::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; } }; @@ -18461,27 +18446,38 @@ 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::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 Start -namespace Resume { +}; // 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::Resume::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; } }; @@ -18489,26 +18485,32 @@ 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::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 Resume -namespace OperationalCommandResponse { +}; // namespace RemoveScene +namespace RemoveSceneResponse { enum class Fields : uint8_t { - kCommandResponseState = 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::OperationalCommandResponse::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; } - Structs::ErrorStateStruct::Type commandResponseState; + 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; @@ -18520,279 +18522,332 @@ 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::RemoveSceneResponse::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); + uint8_t sceneID = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace OperationalCommandResponse -} // namespace Commands - -namespace Attributes { +}; // namespace RemoveSceneResponse +namespace RemoveAllScenes { +enum class Fields : uint8_t +{ + kGroupID = 0, +}; -namespace PhaseList { -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::RemoveAllScenes::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PhaseList::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + chip::GroupId groupID = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = Clusters::ScenesManagement::Commands::RemoveAllScenesResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace PhaseList -namespace CurrentPhase { -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::RemoveAllScenes::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CurrentPhase::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + chip::GroupId groupID = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace CurrentPhase -namespace CountdownTime { -struct TypeInfo +}; // namespace RemoveAllScenes +namespace RemoveAllScenesResponse { +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::CountdownTime::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + kStatus = 0, + kGroupID = 1, }; -} // namespace CountdownTime -namespace OperationalStateList { -struct TypeInfo + +struct Type { - 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> &; +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::ScenesManagement::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::OperationalStateList::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + 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; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace OperationalStateList -namespace OperationalState { -struct TypeInfo + +struct DecodableType { - using Type = chip::app::Clusters::OperationalState::OperationalStateEnum; - using DecodableType = chip::app::Clusters::OperationalState::OperationalStateEnum; - using DecodableArgType = chip::app::Clusters::OperationalState::OperationalStateEnum; +public: + static constexpr CommandId GetCommandId() { return Commands::RemoveAllScenesResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::OperationalState::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + uint8_t status = static_cast(0); + chip::GroupId groupID = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace OperationalState -namespace OperationalError { -struct TypeInfo +}; // namespace RemoveAllScenesResponse +namespace StoreScene { +enum class Fields : uint8_t { - 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 &; - - static constexpr ClusterId GetClusterId() { return Clusters::OperationalState::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::OperationalError::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + kGroupID = 0, + kSceneID = 1, }; -} // namespace OperationalError -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::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::StoreScene::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::ScenesManagement::Commands::StoreSceneResponse::DecodableType; + + 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 +18855,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 +18891,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 +18934,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 +18979,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,226 +19019,181 @@ 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; } -}; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo -{ - 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::RvcOperationalState::Id; } -}; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo -{ - 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::RvcOperationalState::Id; } -}; -} // namespace ClusterRevision - -struct TypeInfo -{ - struct DecodableType - { - 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, + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::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::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; + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::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::OperationalError::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::RvcOperationalState::Id; } - - Structs::ErrorStateStruct::DecodableType errorState; - - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::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::ScenesManagement::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::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; + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::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::RvcOperationalState::Id; } + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::ScenesManagement::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::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; + 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 RvcOperationalState +} // namespace Attributes +} // namespace ScenesManagement namespace HepaFilterMonitoring { namespace Structs { namespace ReplacementProductStruct { @@ -25388,68 +25447,248 @@ struct Type using ResponseType = DataModel::NullObjectType; - static constexpr bool MustUseTimedInvoke() { return false; } + static constexpr bool MustUseTimedInvoke() { return false; } +}; + +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::GoToTiltValue::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + + uint16_t tiltValue = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace GoToTiltValue +namespace GoToTiltPercentage { +enum class Fields : uint8_t +{ + kTiltPercent100thsValue = 0, +}; + +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::GoToTiltPercentage::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + + chip::Percent100ths tiltPercent100thsValue = 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::GoToTiltPercentage::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + + chip::Percent100ths tiltPercent100thsValue = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace GoToTiltPercentage +} // namespace Commands + +namespace Attributes { + +namespace Type { +struct TypeInfo +{ + using Type = chip::app::Clusters::WindowCovering::Type; + using DecodableType = chip::app::Clusters::WindowCovering::Type; + using DecodableArgType = chip::app::Clusters::WindowCovering::Type; + + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Type::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Type +namespace PhysicalClosedLimitLift { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PhysicalClosedLimitLift::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace PhysicalClosedLimitLift +namespace PhysicalClosedLimitTilt { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PhysicalClosedLimitTilt::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace PhysicalClosedLimitTilt +namespace CurrentPositionLift { +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::WindowCovering::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentPositionLift::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace CurrentPositionLift +namespace CurrentPositionTilt { +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::WindowCovering::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentPositionTilt::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace CurrentPositionTilt +namespace NumberOfActuationsLift { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfActuationsLift::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace NumberOfActuationsLift +namespace NumberOfActuationsTilt { +struct TypeInfo +{ + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; + + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfActuationsTilt::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace NumberOfActuationsTilt +namespace ConfigStatus { +struct TypeInfo +{ + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; + + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ConfigStatus::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ConfigStatus +namespace CurrentPositionLiftPercentage { +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::WindowCovering::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentPositionLiftPercentage::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace CurrentPositionLiftPercentage +namespace CurrentPositionTiltPercentage { +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::WindowCovering::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentPositionTiltPercentage::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace CurrentPositionTiltPercentage +namespace OperationalStatus { +struct TypeInfo +{ + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; + + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OperationalStatus::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; - -struct DecodableType +} // namespace OperationalStatus +namespace TargetPositionLiftPercent100ths { +struct TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::GoToTiltValue::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - uint16_t tiltValue = static_cast(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TargetPositionLiftPercent100ths::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -}; // namespace GoToTiltValue -namespace GoToTiltPercentage { -enum class Fields : uint8_t +} // namespace TargetPositionLiftPercent100ths +namespace TargetPositionTiltPercent100ths { +struct TypeInfo { - kTiltPercent100thsValue = 0, -}; + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; -struct Type -{ -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::GoToTiltPercentage::Id; } static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - - chip::Percent100ths tiltPercent100thsValue = 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 AttributeId GetAttributeId() { return Attributes::TargetPositionTiltPercent100ths::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; - -struct DecodableType +} // namespace TargetPositionTiltPercent100ths +namespace EndProductType { +struct TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::GoToTiltPercentage::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + using Type = chip::app::Clusters::WindowCovering::EndProductType; + using DecodableType = chip::app::Clusters::WindowCovering::EndProductType; + using DecodableArgType = chip::app::Clusters::WindowCovering::EndProductType; - chip::Percent100ths tiltPercent100thsValue = static_cast(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::EndProductType::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -}; // namespace GoToTiltPercentage -} // namespace Commands - -namespace Attributes { +} // namespace EndProductType +namespace CurrentPositionLiftPercent100ths { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; -namespace Type { + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentPositionLiftPercent100ths::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace CurrentPositionLiftPercent100ths +namespace CurrentPositionTiltPercent100ths { struct TypeInfo { - using Type = chip::app::Clusters::WindowCovering::Type; - using DecodableType = chip::app::Clusters::WindowCovering::Type; - using DecodableArgType = chip::app::Clusters::WindowCovering::Type; + 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::WindowCovering::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Type::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::CurrentPositionTiltPercent100ths::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Type -namespace PhysicalClosedLimitLift { +} // namespace CurrentPositionTiltPercent100ths +namespace InstalledOpenLimitLift { struct TypeInfo { using Type = uint16_t; @@ -25457,11 +25696,11 @@ struct TypeInfo using DecodableArgType = uint16_t; static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PhysicalClosedLimitLift::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::InstalledOpenLimitLift::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace PhysicalClosedLimitLift -namespace PhysicalClosedLimitTilt { +} // namespace InstalledOpenLimitLift +namespace InstalledClosedLimitLift { struct TypeInfo { using Type = uint16_t; @@ -25469,272 +25708,375 @@ struct TypeInfo using DecodableArgType = uint16_t; static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PhysicalClosedLimitTilt::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::InstalledClosedLimitLift::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace PhysicalClosedLimitTilt -namespace CurrentPositionLift { +} // namespace InstalledClosedLimitLift +namespace InstalledOpenLimitTilt { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CurrentPositionLift::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::InstalledOpenLimitTilt::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace CurrentPositionLift -namespace CurrentPositionTilt { +} // namespace InstalledOpenLimitTilt +namespace InstalledClosedLimitTilt { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CurrentPositionTilt::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::InstalledClosedLimitTilt::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace CurrentPositionTilt -namespace NumberOfActuationsLift { +} // namespace InstalledClosedLimitTilt +namespace Mode { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfActuationsLift::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Mode::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace NumberOfActuationsLift -namespace NumberOfActuationsTilt { +} // namespace Mode +namespace SafetyStatus { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfActuationsTilt::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SafetyStatus::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace NumberOfActuationsTilt -namespace ConfigStatus { -struct TypeInfo +} // namespace SafetyStatus +namespace GeneratedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } +}; +} // namespace GeneratedCommandList +namespace AcceptedCommandList { +struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } +}; +} // namespace AcceptedCommandList +namespace EventList { +struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } +}; +} // namespace EventList +namespace AttributeList { +struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } +}; +} // namespace AttributeList +namespace FeatureMap { +struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } +}; +} // namespace FeatureMap +namespace ClusterRevision { +struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo +{ + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } +}; +} // namespace ClusterRevision + +struct TypeInfo +{ + struct DecodableType + { + static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); + + Attributes::Type::TypeInfo::DecodableType type = static_cast(0); + Attributes::PhysicalClosedLimitLift::TypeInfo::DecodableType physicalClosedLimitLift = static_cast(0); + Attributes::PhysicalClosedLimitTilt::TypeInfo::DecodableType physicalClosedLimitTilt = static_cast(0); + Attributes::CurrentPositionLift::TypeInfo::DecodableType currentPositionLift; + Attributes::CurrentPositionTilt::TypeInfo::DecodableType currentPositionTilt; + Attributes::NumberOfActuationsLift::TypeInfo::DecodableType numberOfActuationsLift = static_cast(0); + Attributes::NumberOfActuationsTilt::TypeInfo::DecodableType numberOfActuationsTilt = static_cast(0); + Attributes::ConfigStatus::TypeInfo::DecodableType configStatus = + static_cast>(0); + Attributes::CurrentPositionLiftPercentage::TypeInfo::DecodableType currentPositionLiftPercentage; + Attributes::CurrentPositionTiltPercentage::TypeInfo::DecodableType currentPositionTiltPercentage; + Attributes::OperationalStatus::TypeInfo::DecodableType operationalStatus = + static_cast>(0); + Attributes::TargetPositionLiftPercent100ths::TypeInfo::DecodableType targetPositionLiftPercent100ths; + Attributes::TargetPositionTiltPercent100ths::TypeInfo::DecodableType targetPositionTiltPercent100ths; + Attributes::EndProductType::TypeInfo::DecodableType endProductType = + static_cast(0); + Attributes::CurrentPositionLiftPercent100ths::TypeInfo::DecodableType currentPositionLiftPercent100ths; + Attributes::CurrentPositionTiltPercent100ths::TypeInfo::DecodableType currentPositionTiltPercent100ths; + Attributes::InstalledOpenLimitLift::TypeInfo::DecodableType installedOpenLimitLift = static_cast(0); + Attributes::InstalledClosedLimitLift::TypeInfo::DecodableType installedClosedLimitLift = static_cast(0); + Attributes::InstalledOpenLimitTilt::TypeInfo::DecodableType installedOpenLimitTilt = static_cast(0); + Attributes::InstalledClosedLimitTilt::TypeInfo::DecodableType installedClosedLimitTilt = static_cast(0); + Attributes::Mode::TypeInfo::DecodableType mode = static_cast>(0); + Attributes::SafetyStatus::TypeInfo::DecodableType safetyStatus = + 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 WindowCovering +namespace BarrierControl { + +namespace Commands { +// Forward-declarations so we can reference these later. + +namespace BarrierControlGoToPercent { +struct Type; +struct DecodableType; +} // namespace BarrierControlGoToPercent + +namespace BarrierControlStop { +struct Type; +struct DecodableType; +} // namespace BarrierControlStop + +} // namespace Commands + +namespace Commands { +namespace BarrierControlGoToPercent { +enum class Fields : uint8_t +{ + kPercentOpen = 0, +}; + +struct Type { - using Type = chip::BitMask; - using DecodableType = chip::BitMask; - using DecodableArgType = chip::BitMask; +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::BarrierControlGoToPercent::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ConfigStatus::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + uint8_t percentOpen = static_cast(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace ConfigStatus -namespace CurrentPositionLiftPercentage { -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::BarrierControlGoToPercent::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CurrentPositionLiftPercentage::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + uint8_t percentOpen = static_cast(0); + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace CurrentPositionLiftPercentage -namespace CurrentPositionTiltPercentage { -struct TypeInfo +}; // namespace BarrierControlGoToPercent +namespace BarrierControlStop { +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::WindowCovering::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CurrentPositionTiltPercentage::Id; } - static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace CurrentPositionTiltPercentage -namespace OperationalStatus { -struct TypeInfo + +struct Type { - using Type = chip::BitMask; - using DecodableType = chip::BitMask; - using DecodableArgType = chip::BitMask; +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::BarrierControlStop::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::OperationalStatus::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = DataModel::NullObjectType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; -} // namespace OperationalStatus -namespace TargetPositionLiftPercent100ths { -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::BarrierControlStop::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TargetPositionLiftPercent100ths::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace TargetPositionLiftPercent100ths -namespace TargetPositionTiltPercent100ths { +}; // namespace BarrierControlStop +} // namespace Commands + +namespace Attributes { + +namespace BarrierMovingState { 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::WindowCovering::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::TargetPositionTiltPercent100ths::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::BarrierMovingState::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace TargetPositionTiltPercent100ths -namespace EndProductType { +} // namespace BarrierMovingState +namespace BarrierSafetyStatus { struct TypeInfo { - using Type = chip::app::Clusters::WindowCovering::EndProductType; - using DecodableType = chip::app::Clusters::WindowCovering::EndProductType; - using DecodableArgType = chip::app::Clusters::WindowCovering::EndProductType; + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::EndProductType::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::BarrierSafetyStatus::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace EndProductType -namespace CurrentPositionLiftPercent100ths { +} // namespace BarrierSafetyStatus +namespace BarrierCapabilities { 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::WindowCovering::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CurrentPositionLiftPercent100ths::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::BarrierCapabilities::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace CurrentPositionLiftPercent100ths -namespace CurrentPositionTiltPercent100ths { +} // namespace BarrierCapabilities +namespace BarrierOpenEvents { struct TypeInfo { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + using Type = uint16_t; + using DecodableType = uint16_t; + using DecodableArgType = uint16_t; - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::CurrentPositionTiltPercent100ths::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::BarrierOpenEvents::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace CurrentPositionTiltPercent100ths -namespace InstalledOpenLimitLift { +} // namespace BarrierOpenEvents +namespace BarrierCloseEvents { struct TypeInfo { using Type = uint16_t; using DecodableType = uint16_t; using DecodableArgType = uint16_t; - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::InstalledOpenLimitLift::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::BarrierCloseEvents::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace InstalledOpenLimitLift -namespace InstalledClosedLimitLift { +} // namespace BarrierCloseEvents +namespace BarrierCommandOpenEvents { struct TypeInfo { using Type = uint16_t; using DecodableType = uint16_t; using DecodableArgType = uint16_t; - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::InstalledClosedLimitLift::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::BarrierCommandOpenEvents::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace InstalledClosedLimitLift -namespace InstalledOpenLimitTilt { +} // namespace BarrierCommandOpenEvents +namespace BarrierCommandCloseEvents { struct TypeInfo { using Type = uint16_t; using DecodableType = uint16_t; using DecodableArgType = uint16_t; - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::InstalledOpenLimitTilt::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::BarrierCommandCloseEvents::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace InstalledOpenLimitTilt -namespace InstalledClosedLimitTilt { +} // namespace BarrierCommandCloseEvents +namespace BarrierOpenPeriod { struct TypeInfo { using Type = uint16_t; using DecodableType = uint16_t; using DecodableArgType = uint16_t; - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::InstalledClosedLimitTilt::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::BarrierOpenPeriod::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace InstalledClosedLimitTilt -namespace Mode { +} // namespace BarrierOpenPeriod +namespace BarrierClosePeriod { 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::WindowCovering::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Mode::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::BarrierClosePeriod::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace Mode -namespace SafetyStatus { +} // namespace BarrierClosePeriod +namespace BarrierPosition { struct TypeInfo { - using Type = chip::BitMask; - using DecodableType = chip::BitMask; - using DecodableArgType = chip::BitMask; + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::SafetyStatus::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::BarrierPosition::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace SafetyStatus +} // namespace BarrierPosition namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } }; } // namespace ClusterRevision @@ -25742,36 +26084,20 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::WindowCovering::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::Type::TypeInfo::DecodableType type = static_cast(0); - Attributes::PhysicalClosedLimitLift::TypeInfo::DecodableType physicalClosedLimitLift = static_cast(0); - Attributes::PhysicalClosedLimitTilt::TypeInfo::DecodableType physicalClosedLimitTilt = static_cast(0); - Attributes::CurrentPositionLift::TypeInfo::DecodableType currentPositionLift; - Attributes::CurrentPositionTilt::TypeInfo::DecodableType currentPositionTilt; - Attributes::NumberOfActuationsLift::TypeInfo::DecodableType numberOfActuationsLift = static_cast(0); - Attributes::NumberOfActuationsTilt::TypeInfo::DecodableType numberOfActuationsTilt = static_cast(0); - Attributes::ConfigStatus::TypeInfo::DecodableType configStatus = - static_cast>(0); - Attributes::CurrentPositionLiftPercentage::TypeInfo::DecodableType currentPositionLiftPercentage; - Attributes::CurrentPositionTiltPercentage::TypeInfo::DecodableType currentPositionTiltPercentage; - Attributes::OperationalStatus::TypeInfo::DecodableType operationalStatus = - static_cast>(0); - Attributes::TargetPositionLiftPercent100ths::TypeInfo::DecodableType targetPositionLiftPercent100ths; - Attributes::TargetPositionTiltPercent100ths::TypeInfo::DecodableType targetPositionTiltPercent100ths; - Attributes::EndProductType::TypeInfo::DecodableType endProductType = - static_cast(0); - Attributes::CurrentPositionLiftPercent100ths::TypeInfo::DecodableType currentPositionLiftPercent100ths; - Attributes::CurrentPositionTiltPercent100ths::TypeInfo::DecodableType currentPositionTiltPercent100ths; - Attributes::InstalledOpenLimitLift::TypeInfo::DecodableType installedOpenLimitLift = static_cast(0); - Attributes::InstalledClosedLimitLift::TypeInfo::DecodableType installedClosedLimitLift = static_cast(0); - Attributes::InstalledOpenLimitTilt::TypeInfo::DecodableType installedOpenLimitTilt = static_cast(0); - Attributes::InstalledClosedLimitTilt::TypeInfo::DecodableType installedClosedLimitTilt = static_cast(0); - Attributes::Mode::TypeInfo::DecodableType mode = static_cast>(0); - Attributes::SafetyStatus::TypeInfo::DecodableType safetyStatus = - static_cast>(0); + Attributes::BarrierMovingState::TypeInfo::DecodableType barrierMovingState = static_cast(0); + Attributes::BarrierSafetyStatus::TypeInfo::DecodableType barrierSafetyStatus = static_cast(0); + Attributes::BarrierCapabilities::TypeInfo::DecodableType barrierCapabilities = static_cast(0); + Attributes::BarrierOpenEvents::TypeInfo::DecodableType barrierOpenEvents = static_cast(0); + Attributes::BarrierCloseEvents::TypeInfo::DecodableType barrierCloseEvents = static_cast(0); + Attributes::BarrierCommandOpenEvents::TypeInfo::DecodableType barrierCommandOpenEvents = static_cast(0); + Attributes::BarrierCommandCloseEvents::TypeInfo::DecodableType barrierCommandCloseEvents = static_cast(0); + Attributes::BarrierOpenPeriod::TypeInfo::DecodableType barrierOpenPeriod = static_cast(0); + Attributes::BarrierClosePeriod::TypeInfo::DecodableType barrierClosePeriod = static_cast(0); + Attributes::BarrierPosition::TypeInfo::DecodableType barrierPosition = static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -25781,243 +26107,321 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace WindowCovering -namespace BarrierControl { - -namespace Commands { -// Forward-declarations so we can reference these later. - -namespace BarrierControlGoToPercent { -struct Type; -struct DecodableType; -} // namespace BarrierControlGoToPercent - -namespace BarrierControlStop { -struct Type; -struct DecodableType; -} // namespace BarrierControlStop +} // namespace BarrierControl +namespace PumpConfigurationAndControl { -} // namespace Commands +namespace Attributes { -namespace Commands { -namespace BarrierControlGoToPercent { -enum class Fields : uint8_t +namespace MaxPressure { +struct TypeInfo { - kPercentOpen = 0, -}; + 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::PumpConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxPressure::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MaxPressure +namespace MaxSpeed { +struct TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::BarrierControlGoToPercent::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } - - uint8_t percentOpen = static_cast(0); - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - - using ResponseType = DataModel::NullObjectType; + 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::PumpConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxSpeed::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; +} // namespace MaxSpeed +namespace MaxFlow { +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::PumpConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxFlow::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MaxFlow +namespace MinConstPressure { +struct TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::BarrierControlGoToPercent::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - uint8_t percentOpen = static_cast(0); - CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MinConstPressure::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -}; // namespace BarrierControlGoToPercent -namespace BarrierControlStop { -enum class Fields : uint8_t +} // namespace MinConstPressure +namespace MaxConstPressure { +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::PumpConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxConstPressure::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; +} // namespace MaxConstPressure +namespace MinCompPressure { +struct TypeInfo +{ + 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::PumpConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MinCompPressure::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MinCompPressure +namespace MaxCompPressure { +struct TypeInfo { -public: - // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::BarrierControlStop::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } + 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::PumpConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxCompPressure::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MaxCompPressure +namespace MinConstSpeed { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; - using ResponseType = DataModel::NullObjectType; + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MinConstSpeed::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MinConstSpeed +namespace MaxConstSpeed { +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::PumpConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxConstSpeed::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; +} // namespace MaxConstSpeed +namespace MinConstFlow { +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::PumpConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MinConstFlow::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MinConstFlow +namespace MaxConstFlow { +struct TypeInfo { -public: - static constexpr CommandId GetCommandId() { return Commands::BarrierControlStop::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } + 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::PumpConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxConstFlow::Id; } + static constexpr bool MustUseTimedWrite() { return false; } }; -}; // namespace BarrierControlStop -} // namespace Commands +} // namespace MaxConstFlow +namespace MinConstTemp { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; -namespace Attributes { + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MinConstTemp::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MinConstTemp +namespace MaxConstTemp { +struct TypeInfo +{ + using Type = chip::app::DataModel::Nullable; + using DecodableType = chip::app::DataModel::Nullable; + using DecodableArgType = const chip::app::DataModel::Nullable &; -namespace BarrierMovingState { + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::MaxConstTemp::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace MaxConstTemp +namespace PumpStatus { 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::BarrierControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BarrierMovingState::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PumpStatus::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace BarrierMovingState -namespace BarrierSafetyStatus { +} // namespace PumpStatus +namespace EffectiveOperationMode { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum; + using DecodableType = chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum; + using DecodableArgType = chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum; - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BarrierSafetyStatus::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::EffectiveOperationMode::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace BarrierSafetyStatus -namespace BarrierCapabilities { +} // namespace EffectiveOperationMode +namespace EffectiveControlMode { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum; + using DecodableType = chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum; + using DecodableArgType = chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum; - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BarrierCapabilities::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::EffectiveControlMode::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace BarrierCapabilities -namespace BarrierOpenEvents { +} // namespace EffectiveControlMode +namespace Capacity { 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::BarrierControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BarrierOpenEvents::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Capacity::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace BarrierOpenEvents -namespace BarrierCloseEvents { +} // namespace Capacity +namespace Speed { 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::BarrierControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BarrierCloseEvents::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Speed::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace BarrierCloseEvents -namespace BarrierCommandOpenEvents { +} // namespace Speed +namespace LifetimeRunningHours { 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::BarrierControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BarrierCommandOpenEvents::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::LifetimeRunningHours::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace BarrierCommandOpenEvents -namespace BarrierCommandCloseEvents { +} // namespace LifetimeRunningHours +namespace Power { 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::BarrierControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BarrierCommandCloseEvents::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Power::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace BarrierCommandCloseEvents -namespace BarrierOpenPeriod { +} // namespace Power +namespace LifetimeEnergyConsumed { 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::BarrierControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BarrierOpenPeriod::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::LifetimeEnergyConsumed::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace BarrierOpenPeriod -namespace BarrierClosePeriod { +} // namespace LifetimeEnergyConsumed +namespace OperationMode { struct TypeInfo { - using Type = uint16_t; - using DecodableType = uint16_t; - using DecodableArgType = uint16_t; + using Type = chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum; + using DecodableType = chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum; + using DecodableArgType = chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum; - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BarrierClosePeriod::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::OperationMode::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace BarrierClosePeriod -namespace BarrierPosition { +} // namespace OperationMode +namespace ControlMode { struct TypeInfo { - using Type = uint8_t; - using DecodableType = uint8_t; - using DecodableArgType = uint8_t; + using Type = chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum; + using DecodableType = chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum; + using DecodableArgType = chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum; - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::BarrierPosition::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ControlMode::Id; } static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace BarrierPosition +} // namespace ControlMode namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } }; } // namespace GeneratedCommandList namespace AcceptedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } }; } // namespace AcceptedCommandList namespace EventList { struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } }; } // namespace EventList namespace AttributeList { struct TypeInfo : public Clusters::Globals::Attributes::AttributeList::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } }; } // namespace AttributeList namespace FeatureMap { struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } }; } // namespace FeatureMap namespace ClusterRevision { struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo { - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } }; } // namespace ClusterRevision @@ -26025,20 +26429,38 @@ struct TypeInfo { struct DecodableType { - static constexpr ClusterId GetClusterId() { return Clusters::BarrierControl::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::BarrierMovingState::TypeInfo::DecodableType barrierMovingState = static_cast(0); - Attributes::BarrierSafetyStatus::TypeInfo::DecodableType barrierSafetyStatus = static_cast(0); - Attributes::BarrierCapabilities::TypeInfo::DecodableType barrierCapabilities = static_cast(0); - Attributes::BarrierOpenEvents::TypeInfo::DecodableType barrierOpenEvents = static_cast(0); - Attributes::BarrierCloseEvents::TypeInfo::DecodableType barrierCloseEvents = static_cast(0); - Attributes::BarrierCommandOpenEvents::TypeInfo::DecodableType barrierCommandOpenEvents = static_cast(0); - Attributes::BarrierCommandCloseEvents::TypeInfo::DecodableType barrierCommandCloseEvents = static_cast(0); - Attributes::BarrierOpenPeriod::TypeInfo::DecodableType barrierOpenPeriod = static_cast(0); - Attributes::BarrierClosePeriod::TypeInfo::DecodableType barrierClosePeriod = static_cast(0); - Attributes::BarrierPosition::TypeInfo::DecodableType barrierPosition = static_cast(0); + Attributes::MaxPressure::TypeInfo::DecodableType maxPressure; + Attributes::MaxSpeed::TypeInfo::DecodableType maxSpeed; + Attributes::MaxFlow::TypeInfo::DecodableType maxFlow; + Attributes::MinConstPressure::TypeInfo::DecodableType minConstPressure; + Attributes::MaxConstPressure::TypeInfo::DecodableType maxConstPressure; + Attributes::MinCompPressure::TypeInfo::DecodableType minCompPressure; + Attributes::MaxCompPressure::TypeInfo::DecodableType maxCompPressure; + Attributes::MinConstSpeed::TypeInfo::DecodableType minConstSpeed; + Attributes::MaxConstSpeed::TypeInfo::DecodableType maxConstSpeed; + Attributes::MinConstFlow::TypeInfo::DecodableType minConstFlow; + Attributes::MaxConstFlow::TypeInfo::DecodableType maxConstFlow; + Attributes::MinConstTemp::TypeInfo::DecodableType minConstTemp; + Attributes::MaxConstTemp::TypeInfo::DecodableType maxConstTemp; + Attributes::PumpStatus::TypeInfo::DecodableType pumpStatus = + static_cast>(0); + Attributes::EffectiveOperationMode::TypeInfo::DecodableType effectiveOperationMode = + static_cast(0); + Attributes::EffectiveControlMode::TypeInfo::DecodableType effectiveControlMode = + static_cast(0); + Attributes::Capacity::TypeInfo::DecodableType capacity; + Attributes::Speed::TypeInfo::DecodableType speed; + Attributes::LifetimeRunningHours::TypeInfo::DecodableType lifetimeRunningHours; + Attributes::Power::TypeInfo::DecodableType power; + Attributes::LifetimeEnergyConsumed::TypeInfo::DecodableType lifetimeEnergyConsumed; + Attributes::OperationMode::TypeInfo::DecodableType operationMode = + static_cast(0); + Attributes::ControlMode::TypeInfo::DecodableType controlMode = + static_cast(0); Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; @@ -26048,371 +26470,288 @@ struct TypeInfo }; }; } // namespace Attributes -} // namespace BarrierControl -namespace PumpConfigurationAndControl { - -namespace Attributes { - -namespace MaxPressure { -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::PumpConfigurationAndControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MaxPressure::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace MaxPressure -namespace MaxSpeed { -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::PumpConfigurationAndControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MaxSpeed::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace MaxSpeed -namespace MaxFlow { -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::PumpConfigurationAndControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MaxFlow::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace MaxFlow -namespace MinConstPressure { -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::PumpConfigurationAndControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MinConstPressure::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace MinConstPressure -namespace MaxConstPressure { -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::PumpConfigurationAndControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MaxConstPressure::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace MaxConstPressure -namespace MinCompPressure { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +namespace Events { +namespace SupplyVoltageLow { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MinCompPressure::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace MinCompPressure -namespace MaxCompPressure { -struct TypeInfo +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::PumpConfigurationAndControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MaxCompPressure::Id; } - static constexpr bool MustUseTimedWrite() { return false; } }; -} // namespace MaxCompPressure -namespace MinConstSpeed { -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::PumpConfigurationAndControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MinConstSpeed::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace MinConstSpeed -namespace MaxConstSpeed { -struct TypeInfo +struct Type { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; - +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::SupplyVoltageLow::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MaxConstSpeed::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace MaxConstSpeed -namespace MinConstFlow { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; + 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::SupplyVoltageLow::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MinConstFlow::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace MinConstFlow -namespace MaxConstFlow { -struct TypeInfo +} // namespace SupplyVoltageLow +namespace SupplyVoltageHigh { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + +enum class Fields : uint8_t { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +}; +struct Type +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::SupplyVoltageHigh::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MaxConstFlow::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace MaxConstFlow -namespace MinConstTemp { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +struct DecodableType +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::SupplyVoltageHigh::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MinConstTemp::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace MinConstTemp -namespace MaxConstTemp { -struct TypeInfo +} // namespace SupplyVoltageHigh +namespace PowerMissingPhase { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + +enum class Fields : uint8_t { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +}; +struct Type +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::PowerMissingPhase::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::MaxConstTemp::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace MaxConstTemp -namespace PumpStatus { -struct TypeInfo -{ - using Type = chip::BitMask; - using DecodableType = chip::BitMask; - using DecodableArgType = chip::BitMask; +struct DecodableType +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::PowerMissingPhase::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::PumpStatus::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace PumpStatus -namespace EffectiveOperationMode { -struct TypeInfo +} // namespace PowerMissingPhase +namespace SystemPressureLow { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + +enum class Fields : uint8_t { - using Type = chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum; - using DecodableType = chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum; - using DecodableArgType = chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum; +}; +struct Type +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::SystemPressureLow::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::EffectiveOperationMode::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace EffectiveOperationMode -namespace EffectiveControlMode { -struct TypeInfo -{ - using Type = chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum; - using DecodableType = chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum; - using DecodableArgType = chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum; +struct DecodableType +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::SystemPressureLow::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::EffectiveControlMode::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace EffectiveControlMode -namespace Capacity { -struct TypeInfo +} // namespace SystemPressureLow +namespace SystemPressureHigh { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + +enum class Fields : uint8_t { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +}; +struct Type +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::SystemPressureHigh::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Capacity::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace Capacity -namespace Speed { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +struct DecodableType +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::SystemPressureHigh::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Speed::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace Speed -namespace LifetimeRunningHours { -struct TypeInfo +} // namespace SystemPressureHigh +namespace DryRunning { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; + +enum class Fields : uint8_t { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +}; +struct Type +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::DryRunning::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::LifetimeRunningHours::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace LifetimeRunningHours -namespace Power { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +struct DecodableType +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::DryRunning::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::Power::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace Power -namespace LifetimeEnergyConsumed { -struct TypeInfo +} // namespace DryRunning +namespace MotorTemperatureHigh { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + +enum class Fields : uint8_t { - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; +}; +struct Type +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::MotorTemperatureHigh::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::LifetimeEnergyConsumed::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace LifetimeEnergyConsumed -namespace OperationMode { -struct TypeInfo -{ - using Type = chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum; - using DecodableType = chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum; - using DecodableArgType = chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum; +struct DecodableType +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::MotorTemperatureHigh::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::OperationMode::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace OperationMode -namespace ControlMode { -struct TypeInfo +} // namespace MotorTemperatureHigh +namespace PumpMotorFatalFailure { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; + +enum class Fields : uint8_t { - using Type = chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum; - using DecodableType = chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum; - using DecodableArgType = chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum; +}; +struct Type +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::PumpMotorFatalFailure::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::ControlMode::Id; } - static constexpr bool MustUseTimedWrite() { return false; } + static constexpr bool kIsFabricScoped = false; + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -} // namespace ControlMode -namespace GeneratedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo + +struct DecodableType { +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::PumpMotorFatalFailure::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace GeneratedCommandList -namespace AcceptedCommandList { -struct TypeInfo : public Clusters::Globals::Attributes::AcceptedCommandList::TypeInfo +} // namespace PumpMotorFatalFailure +namespace ElectronicTemperatureHigh { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } }; -} // namespace AcceptedCommandList -namespace EventList { -struct TypeInfo : public Clusters::Globals::Attributes::EventList::TypeInfo + +struct Type { +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::ElectronicTemperatureHigh::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::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 { +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::ElectronicTemperatureHigh::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + + CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace AttributeList -namespace FeatureMap { -struct TypeInfo : public Clusters::Globals::Attributes::FeatureMap::TypeInfo +} // namespace ElectronicTemperatureHigh +namespace PumpBlocked { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; + +enum class Fields : uint8_t { - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } }; -} // namespace FeatureMap -namespace ClusterRevision { -struct TypeInfo : public Clusters::Globals::Attributes::ClusterRevision::TypeInfo + +struct Type { +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::PumpBlocked::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::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::PumpConfigurationAndControl::Id; } - - CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::PumpBlocked::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - Attributes::MaxPressure::TypeInfo::DecodableType maxPressure; - Attributes::MaxSpeed::TypeInfo::DecodableType maxSpeed; - Attributes::MaxFlow::TypeInfo::DecodableType maxFlow; - Attributes::MinConstPressure::TypeInfo::DecodableType minConstPressure; - Attributes::MaxConstPressure::TypeInfo::DecodableType maxConstPressure; - Attributes::MinCompPressure::TypeInfo::DecodableType minCompPressure; - Attributes::MaxCompPressure::TypeInfo::DecodableType maxCompPressure; - Attributes::MinConstSpeed::TypeInfo::DecodableType minConstSpeed; - Attributes::MaxConstSpeed::TypeInfo::DecodableType maxConstSpeed; - Attributes::MinConstFlow::TypeInfo::DecodableType minConstFlow; - Attributes::MaxConstFlow::TypeInfo::DecodableType maxConstFlow; - Attributes::MinConstTemp::TypeInfo::DecodableType minConstTemp; - Attributes::MaxConstTemp::TypeInfo::DecodableType maxConstTemp; - Attributes::PumpStatus::TypeInfo::DecodableType pumpStatus = - static_cast>(0); - Attributes::EffectiveOperationMode::TypeInfo::DecodableType effectiveOperationMode = - static_cast(0); - Attributes::EffectiveControlMode::TypeInfo::DecodableType effectiveControlMode = - static_cast(0); - Attributes::Capacity::TypeInfo::DecodableType capacity; - Attributes::Speed::TypeInfo::DecodableType speed; - Attributes::LifetimeRunningHours::TypeInfo::DecodableType lifetimeRunningHours; - Attributes::Power::TypeInfo::DecodableType power; - Attributes::LifetimeEnergyConsumed::TypeInfo::DecodableType lifetimeEnergyConsumed; - Attributes::OperationMode::TypeInfo::DecodableType operationMode = - static_cast(0); - Attributes::ControlMode::TypeInfo::DecodableType controlMode = - 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 SupplyVoltageLow { +} // namespace PumpBlocked +namespace SensorFailure { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; enum class Fields : uint8_t @@ -26423,7 +26762,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::SupplyVoltageLow::Id; } + static constexpr EventId GetEventId() { return Events::SensorFailure::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr bool kIsFabricScoped = false; @@ -26434,13 +26773,13 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::SupplyVoltageLow::Id; } + static constexpr EventId GetEventId() { return Events::SensorFailure::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace SupplyVoltageLow -namespace SupplyVoltageHigh { +} // namespace SensorFailure +namespace ElectronicNonFatalFailure { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; enum class Fields : uint8_t @@ -26451,7 +26790,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::SupplyVoltageHigh::Id; } + static constexpr EventId GetEventId() { return Events::ElectronicNonFatalFailure::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr bool kIsFabricScoped = false; @@ -26462,14 +26801,14 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::SupplyVoltageHigh::Id; } + static constexpr EventId GetEventId() { return Events::ElectronicNonFatalFailure::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace SupplyVoltageHigh -namespace PowerMissingPhase { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; +} // namespace ElectronicNonFatalFailure +namespace ElectronicFatalFailure { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; enum class Fields : uint8_t { @@ -26479,7 +26818,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::PowerMissingPhase::Id; } + static constexpr EventId GetEventId() { return Events::ElectronicFatalFailure::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr bool kIsFabricScoped = false; @@ -26490,13 +26829,13 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::PowerMissingPhase::Id; } + static constexpr EventId GetEventId() { return Events::ElectronicFatalFailure::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace PowerMissingPhase -namespace SystemPressureLow { +} // namespace ElectronicFatalFailure +namespace GeneralFault { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; enum class Fields : uint8_t @@ -26507,7 +26846,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::SystemPressureLow::Id; } + static constexpr EventId GetEventId() { return Events::GeneralFault::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr bool kIsFabricScoped = false; @@ -26518,13 +26857,13 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::SystemPressureLow::Id; } + static constexpr EventId GetEventId() { return Events::GeneralFault::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace SystemPressureLow -namespace SystemPressureHigh { +} // namespace GeneralFault +namespace Leakage { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; enum class Fields : uint8_t @@ -26535,7 +26874,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::SystemPressureHigh::Id; } + static constexpr EventId GetEventId() { return Events::Leakage::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr bool kIsFabricScoped = false; @@ -26546,14 +26885,14 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::SystemPressureHigh::Id; } + static constexpr EventId GetEventId() { return Events::Leakage::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace SystemPressureHigh -namespace DryRunning { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; +} // namespace Leakage +namespace AirDetection { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; enum class Fields : uint8_t { @@ -26563,7 +26902,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::DryRunning::Id; } + static constexpr EventId GetEventId() { return Events::AirDetection::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr bool kIsFabricScoped = false; @@ -26574,13 +26913,13 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::DryRunning::Id; } + static constexpr EventId GetEventId() { return Events::AirDetection::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace DryRunning -namespace MotorTemperatureHigh { +} // namespace AirDetection +namespace TurbineOperation { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; enum class Fields : uint8_t @@ -26591,7 +26930,7 @@ struct Type { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::MotorTemperatureHigh::Id; } + static constexpr EventId GetEventId() { return Events::TurbineOperation::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } static constexpr bool kIsFabricScoped = false; @@ -26602,25 +26941,68 @@ struct DecodableType { public: static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::MotorTemperatureHigh::Id; } + static constexpr EventId GetEventId() { return Events::TurbineOperation::Id; } static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace MotorTemperatureHigh -namespace PumpMotorFatalFailure { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; +} // namespace TurbineOperation +} // namespace Events +} // namespace PumpConfigurationAndControl +namespace Thermostat { +namespace Structs { +namespace ScheduleTransitionStruct { +enum class Fields : uint8_t +{ + kDayOfWeek = 0, + kTransitionTime = 1, + kPresetHandle = 2, + kSystemMode = 3, + kCoolingSetpoint = 4, + kHeatingSetpoint = 5, +}; + +struct Type +{ +public: + chip::BitMask dayOfWeek = static_cast>(0); + uint16_t transitionTime = static_cast(0); + Optional presetHandle; + Optional systemMode; + Optional coolingSetpoint; + Optional heatingSetpoint; + + 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 ScheduleTransitionStruct +namespace ScheduleStruct { enum class Fields : uint8_t { + kScheduleHandle = 0, + kSystemMode = 1, + kName = 2, + kPresetHandle = 3, + kTransitions = 4, + kBuiltIn = 5, }; struct Type { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::PumpMotorFatalFailure::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + DataModel::Nullable scheduleHandle; + SystemModeEnum systemMode = static_cast(0); + Optional name; + Optional presetHandle; + DataModel::List transitions; + Optional> builtIn; + static constexpr bool kIsFabricScoped = false; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -26629,212 +27011,369 @@ struct Type struct DecodableType { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::PumpMotorFatalFailure::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + DataModel::Nullable scheduleHandle; + SystemModeEnum systemMode = static_cast(0); + Optional name; + Optional presetHandle; + DataModel::DecodableList transitions; + Optional> builtIn; CHIP_ERROR Decode(TLV::TLVReader & reader); + + static constexpr bool kIsFabricScoped = false; }; -} // namespace PumpMotorFatalFailure -namespace ElectronicTemperatureHigh { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; +} // namespace ScheduleStruct +namespace PresetStruct { enum class Fields : uint8_t { + kPresetHandle = 0, + kPresetScenario = 1, + kName = 2, + kCoolingSetpoint = 3, + kHeatingSetpoint = 4, + kBuiltIn = 5, }; struct Type { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::ElectronicTemperatureHigh::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + DataModel::Nullable presetHandle; + PresetScenarioEnum presetScenario = static_cast(0); + Optional> name; + Optional coolingSetpoint; + Optional heatingSetpoint; + DataModel::Nullable builtIn; + + CHIP_ERROR Decode(TLV::TLVReader & reader); + static constexpr bool kIsFabricScoped = false; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; }; -struct DecodableType +using DecodableType = Type; + +} // namespace PresetStruct +namespace PresetTypeStruct { +enum class Fields : uint8_t +{ + kPresetScenario = 0, + kNumberOfPresets = 1, + kPresetTypeFeatures = 2, +}; + +struct Type { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::ElectronicTemperatureHigh::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + PresetScenarioEnum presetScenario = static_cast(0); + uint8_t numberOfPresets = static_cast(0); + chip::BitMask presetTypeFeatures = 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 ElectronicTemperatureHigh -namespace PumpBlocked { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; +using DecodableType = Type; + +} // namespace PresetTypeStruct +namespace QueuedPresetStruct { +enum class Fields : uint8_t +{ + kPresetHandle = 0, + kTransitionTimestamp = 1, +}; + +struct Type +{ +public: + DataModel::Nullable presetHandle; + DataModel::Nullable transitionTimestamp; + + 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 QueuedPresetStruct +namespace ScheduleTypeStruct { enum class Fields : uint8_t { + kSystemMode = 0, + kNumberOfSchedules = 1, + kScheduleTypeFeatures = 2, }; struct Type { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::PumpBlocked::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + SystemModeEnum systemMode = static_cast(0); + uint8_t numberOfSchedules = static_cast(0); + chip::BitMask scheduleTypeFeatures = 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::PumpBlocked::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -} // namespace PumpBlocked -namespace SensorFailure { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; +using DecodableType = Type; +} // namespace ScheduleTypeStruct +namespace WeeklyScheduleTransitionStruct { enum class Fields : uint8_t { + kTransitionTime = 0, + kHeatSetpoint = 1, + kCoolSetpoint = 2, }; struct Type { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::SensorFailure::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + uint16_t transitionTime = static_cast(0); + DataModel::Nullable heatSetpoint; + DataModel::Nullable coolSetpoint; + + 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::SensorFailure::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } +using DecodableType = Type; - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -} // namespace SensorFailure -namespace ElectronicNonFatalFailure { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; +} // namespace WeeklyScheduleTransitionStruct +} // namespace Structs + +namespace Commands { +// Forward-declarations so we can reference these later. + +namespace SetpointRaiseLower { +struct Type; +struct DecodableType; +} // namespace SetpointRaiseLower + +namespace GetWeeklyScheduleResponse { +struct Type; +struct DecodableType; +} // namespace GetWeeklyScheduleResponse + +namespace SetWeeklySchedule { +struct Type; +struct DecodableType; +} // namespace SetWeeklySchedule + +namespace GetWeeklySchedule { +struct Type; +struct DecodableType; +} // namespace GetWeeklySchedule + +namespace ClearWeeklySchedule { +struct Type; +struct DecodableType; +} // namespace ClearWeeklySchedule + +namespace SetActiveScheduleRequest { +struct Type; +struct DecodableType; +} // namespace SetActiveScheduleRequest + +namespace SetActivePresetRequest { +struct Type; +struct DecodableType; +} // namespace SetActivePresetRequest + +namespace StartPresetsSchedulesEditRequest { +struct Type; +struct DecodableType; +} // namespace StartPresetsSchedulesEditRequest + +namespace CancelPresetsSchedulesEditRequest { +struct Type; +struct DecodableType; +} // namespace CancelPresetsSchedulesEditRequest + +namespace CommitPresetsSchedulesRequest { +struct Type; +struct DecodableType; +} // namespace CommitPresetsSchedulesRequest + +namespace CancelSetActivePresetRequest { +struct Type; +struct DecodableType; +} // namespace CancelSetActivePresetRequest + +namespace SetTemperatureSetpointHoldPolicy { +struct Type; +struct DecodableType; +} // namespace SetTemperatureSetpointHoldPolicy +} // namespace Commands + +namespace Commands { +namespace SetpointRaiseLower { enum class Fields : uint8_t { + kMode = 0, + kAmount = 1, }; struct Type { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::ElectronicNonFatalFailure::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::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::SetpointRaiseLower::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + + SetpointRaiseLowerModeEnum mode = static_cast(0); + int8_t amount = 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 PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::ElectronicNonFatalFailure::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr CommandId GetCommandId() { return Commands::SetpointRaiseLower::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + SetpointRaiseLowerModeEnum mode = static_cast(0); + int8_t amount = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace ElectronicNonFatalFailure -namespace ElectronicFatalFailure { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Critical; - +}; // namespace SetpointRaiseLower +namespace GetWeeklyScheduleResponse { enum class Fields : uint8_t { + kNumberOfTransitionsForSequence = 0, + kDayOfWeekForSequence = 1, + kModeForSequence = 2, + kTransitions = 3, }; struct Type { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::ElectronicFatalFailure::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::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::GetWeeklyScheduleResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + + uint8_t numberOfTransitionsForSequence = static_cast(0); + chip::BitMask dayOfWeekForSequence = static_cast>(0); + chip::BitMask modeForSequence = static_cast>(0); + DataModel::List transitions; 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::ElectronicFatalFailure::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr CommandId GetCommandId() { return Commands::GetWeeklyScheduleResponse::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + uint8_t numberOfTransitionsForSequence = static_cast(0); + chip::BitMask dayOfWeekForSequence = static_cast>(0); + chip::BitMask modeForSequence = static_cast>(0); + DataModel::DecodableList transitions; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace ElectronicFatalFailure -namespace GeneralFault { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - +}; // namespace GetWeeklyScheduleResponse +namespace SetWeeklySchedule { enum class Fields : uint8_t { + kNumberOfTransitionsForSequence = 0, + kDayOfWeekForSequence = 1, + kModeForSequence = 2, + kTransitions = 3, }; struct Type { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::GeneralFault::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::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::SetWeeklySchedule::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + + uint8_t numberOfTransitionsForSequence = static_cast(0); + chip::BitMask dayOfWeekForSequence = static_cast>(0); + chip::BitMask modeForSequence = static_cast>(0); + DataModel::List transitions; 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::GeneralFault::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr CommandId GetCommandId() { return Commands::SetWeeklySchedule::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + uint8_t numberOfTransitionsForSequence = static_cast(0); + chip::BitMask dayOfWeekForSequence = static_cast>(0); + chip::BitMask modeForSequence = static_cast>(0); + DataModel::DecodableList transitions; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace GeneralFault -namespace Leakage { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - +}; // namespace SetWeeklySchedule +namespace GetWeeklySchedule { enum class Fields : uint8_t { + kDaysToReturn = 0, + kModeToReturn = 1, }; struct Type { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::Leakage::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::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::GetWeeklySchedule::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + + chip::BitMask daysToReturn = static_cast>(0); + chip::BitMask modeToReturn = static_cast>(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + using ResponseType = Clusters::Thermostat::Commands::GetWeeklyScheduleResponse::DecodableType; + + static constexpr bool MustUseTimedInvoke() { return false; } }; struct DecodableType { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::Leakage::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr CommandId GetCommandId() { return Commands::GetWeeklySchedule::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + chip::BitMask daysToReturn = static_cast>(0); + chip::BitMask modeToReturn = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace Leakage -namespace AirDetection { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - +}; // namespace GetWeeklySchedule +namespace ClearWeeklySchedule { enum class Fields : uint8_t { }; @@ -26842,130 +27381,107 @@ enum class Fields : uint8_t struct Type { public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::AirDetection::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::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::ClearWeeklySchedule::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::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 PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::AirDetection::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr CommandId GetCommandId() { return Commands::ClearWeeklySchedule::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace AirDetection -namespace TurbineOperation { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - +}; // namespace ClearWeeklySchedule +namespace SetActiveScheduleRequest { enum class Fields : uint8_t { + kScheduleHandle = 0, }; -struct Type -{ -public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::TurbineOperation::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } - static constexpr bool kIsFabricScoped = false; +struct Type +{ +public: + // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand + static constexpr CommandId GetCommandId() { return Commands::SetActiveScheduleRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + + chip::ByteSpan scheduleHandle; 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::TurbineOperation::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::PumpConfigurationAndControl::Id; } + static constexpr CommandId GetCommandId() { return Commands::SetActiveScheduleRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + chip::ByteSpan scheduleHandle; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -} // namespace TurbineOperation -} // namespace Events -} // namespace PumpConfigurationAndControl -namespace Thermostat { -namespace Structs { -namespace WeeklyScheduleTransitionStruct { +}; // namespace SetActiveScheduleRequest +namespace SetActivePresetRequest { enum class Fields : uint8_t { - kTransitionTime = 0, - kHeatSetpoint = 1, - kCoolSetpoint = 2, + kPresetHandle = 0, + kDelayMinutes = 1, }; struct Type { public: - uint16_t transitionTime = static_cast(0); - DataModel::Nullable heatSetpoint; - DataModel::Nullable coolSetpoint; - - 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::SetActivePresetRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - static constexpr bool kIsFabricScoped = false; + chip::ByteSpan presetHandle; + Optional delayMinutes; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; -}; -using DecodableType = Type; - -} // namespace WeeklyScheduleTransitionStruct -} // namespace Structs - -namespace Commands { -// Forward-declarations so we can reference these later. - -namespace SetpointRaiseLower { -struct Type; -struct DecodableType; -} // namespace SetpointRaiseLower - -namespace GetWeeklyScheduleResponse { -struct Type; -struct DecodableType; -} // namespace GetWeeklyScheduleResponse - -namespace SetWeeklySchedule { -struct Type; -struct DecodableType; -} // namespace SetWeeklySchedule - -namespace GetWeeklySchedule { -struct Type; -struct DecodableType; -} // namespace GetWeeklySchedule + using ResponseType = DataModel::NullObjectType; -namespace ClearWeeklySchedule { -struct Type; -struct DecodableType; -} // namespace ClearWeeklySchedule + static constexpr bool MustUseTimedInvoke() { return false; } +}; -} // namespace Commands +struct DecodableType +{ +public: + static constexpr CommandId GetCommandId() { return Commands::SetActivePresetRequest::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } -namespace Commands { -namespace SetpointRaiseLower { + chip::ByteSpan presetHandle; + Optional delayMinutes; + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +}; // namespace SetActivePresetRequest +namespace StartPresetsSchedulesEditRequest { enum class Fields : uint8_t { - kMode = 0, - kAmount = 1, + kTimeoutSeconds = 0, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::SetpointRaiseLower::Id; } + static constexpr CommandId GetCommandId() { return Commands::StartPresetsSchedulesEditRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - SetpointRaiseLowerModeEnum mode = static_cast(0); - int8_t amount = static_cast(0); + uint16_t timeoutSeconds = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -26977,35 +27493,25 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::SetpointRaiseLower::Id; } + static constexpr CommandId GetCommandId() { return Commands::StartPresetsSchedulesEditRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - SetpointRaiseLowerModeEnum mode = static_cast(0); - int8_t amount = static_cast(0); + uint16_t timeoutSeconds = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace SetpointRaiseLower -namespace GetWeeklyScheduleResponse { +}; // namespace StartPresetsSchedulesEditRequest +namespace CancelPresetsSchedulesEditRequest { enum class Fields : uint8_t { - kNumberOfTransitionsForSequence = 0, - kDayOfWeekForSequence = 1, - kModeForSequence = 2, - kTransitions = 3, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::GetWeeklyScheduleResponse::Id; } + static constexpr CommandId GetCommandId() { return Commands::CancelPresetsSchedulesEditRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - uint8_t numberOfTransitionsForSequence = static_cast(0); - chip::BitMask dayOfWeekForSequence = static_cast>(0); - chip::BitMask modeForSequence = static_cast>(0); - DataModel::List transitions; - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -27016,37 +27522,24 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::GetWeeklyScheduleResponse::Id; } + static constexpr CommandId GetCommandId() { return Commands::CancelPresetsSchedulesEditRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - uint8_t numberOfTransitionsForSequence = static_cast(0); - chip::BitMask dayOfWeekForSequence = static_cast>(0); - chip::BitMask modeForSequence = static_cast>(0); - DataModel::DecodableList transitions; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace GetWeeklyScheduleResponse -namespace SetWeeklySchedule { +}; // namespace CancelPresetsSchedulesEditRequest +namespace CommitPresetsSchedulesRequest { enum class Fields : uint8_t { - kNumberOfTransitionsForSequence = 0, - kDayOfWeekForSequence = 1, - kModeForSequence = 2, - kTransitions = 3, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::SetWeeklySchedule::Id; } + static constexpr CommandId GetCommandId() { return Commands::CommitPresetsSchedulesRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - uint8_t numberOfTransitionsForSequence = static_cast(0); - chip::BitMask dayOfWeekForSequence = static_cast>(0); - chip::BitMask modeForSequence = static_cast>(0); - DataModel::List transitions; - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -27057,36 +27550,27 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::SetWeeklySchedule::Id; } + static constexpr CommandId GetCommandId() { return Commands::CommitPresetsSchedulesRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - uint8_t numberOfTransitionsForSequence = static_cast(0); - chip::BitMask dayOfWeekForSequence = static_cast>(0); - chip::BitMask modeForSequence = static_cast>(0); - DataModel::DecodableList transitions; CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace SetWeeklySchedule -namespace GetWeeklySchedule { +}; // namespace CommitPresetsSchedulesRequest +namespace CancelSetActivePresetRequest { enum class Fields : uint8_t { - kDaysToReturn = 0, - kModeToReturn = 1, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::GetWeeklySchedule::Id; } + static constexpr CommandId GetCommandId() { return Commands::CancelSetActivePresetRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - chip::BitMask daysToReturn = static_cast>(0); - chip::BitMask modeToReturn = static_cast>(0); - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = Clusters::Thermostat::Commands::GetWeeklyScheduleResponse::DecodableType; + using ResponseType = DataModel::NullObjectType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -27094,26 +27578,28 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::GetWeeklySchedule::Id; } + static constexpr CommandId GetCommandId() { return Commands::CancelSetActivePresetRequest::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } - chip::BitMask daysToReturn = static_cast>(0); - chip::BitMask modeToReturn = static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace GetWeeklySchedule -namespace ClearWeeklySchedule { +}; // namespace CancelSetActivePresetRequest +namespace SetTemperatureSetpointHoldPolicy { enum class Fields : uint8_t { + kTemperatureSetpointHoldPolicy = 0, }; struct Type { public: // Use GetCommandId instead of commandId directly to avoid naming conflict with CommandIdentification in ExecutionOfACommand - static constexpr CommandId GetCommandId() { return Commands::ClearWeeklySchedule::Id; } + static constexpr CommandId GetCommandId() { return Commands::SetTemperatureSetpointHoldPolicy::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + chip::BitMask temperatureSetpointHoldPolicy = + static_cast>(0); + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; using ResponseType = DataModel::NullObjectType; @@ -27124,12 +27610,14 @@ struct Type struct DecodableType { public: - static constexpr CommandId GetCommandId() { return Commands::ClearWeeklySchedule::Id; } + static constexpr CommandId GetCommandId() { return Commands::SetTemperatureSetpointHoldPolicy::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + chip::BitMask temperatureSetpointHoldPolicy = + static_cast>(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; -}; // namespace ClearWeeklySchedule +}; // namespace SetTemperatureSetpointHoldPolicy } // namespace Commands namespace Attributes { @@ -27722,6 +28210,186 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace ACCapacityformat +namespace PresetTypes { +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::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PresetTypes::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace PresetTypes +namespace ScheduleTypes { +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::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ScheduleTypes::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ScheduleTypes +namespace NumberOfPresets { +struct TypeInfo +{ + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; + + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfPresets::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace NumberOfPresets +namespace NumberOfSchedules { +struct TypeInfo +{ + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; + + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfSchedules::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace NumberOfSchedules +namespace NumberOfScheduleTransitions { +struct TypeInfo +{ + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; + + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfScheduleTransitions::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace NumberOfScheduleTransitions +namespace NumberOfScheduleTransitionPerDay { +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::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::NumberOfScheduleTransitionPerDay::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace NumberOfScheduleTransitionPerDay +namespace ActivePresetHandle { +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::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ActivePresetHandle::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 16; } +}; +} // namespace ActivePresetHandle +namespace ActiveScheduleHandle { +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::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ActiveScheduleHandle::Id; } + static constexpr bool MustUseTimedWrite() { return false; } + static constexpr size_t MaxLength() { return 16; } +}; +} // namespace ActiveScheduleHandle +namespace Presets { +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::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Presets::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Presets +namespace Schedules { +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::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::Schedules::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace Schedules +namespace PresetsSchedulesEditable { +struct TypeInfo +{ + using Type = bool; + using DecodableType = bool; + using DecodableArgType = bool; + + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::PresetsSchedulesEditable::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace PresetsSchedulesEditable +namespace TemperatureSetpointHoldPolicy { +struct TypeInfo +{ + using Type = chip::BitMask; + using DecodableType = chip::BitMask; + using DecodableArgType = chip::BitMask; + + static constexpr ClusterId GetClusterId() { return Clusters::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::TemperatureSetpointHoldPolicy::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace TemperatureSetpointHoldPolicy +namespace SetpointHoldExpiryTimestamp { +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::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::SetpointHoldExpiryTimestamp::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace SetpointHoldExpiryTimestamp +namespace QueuedPreset { +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::Thermostat::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::QueuedPreset::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace QueuedPreset namespace GeneratedCommandList { struct TypeInfo : public Clusters::Globals::Attributes::GeneratedCommandList::TypeInfo { @@ -27830,6 +28498,21 @@ struct TypeInfo Attributes::ACCoilTemperature::TypeInfo::DecodableType ACCoilTemperature; Attributes::ACCapacityformat::TypeInfo::DecodableType ACCapacityformat = static_cast(0); + Attributes::PresetTypes::TypeInfo::DecodableType presetTypes; + Attributes::ScheduleTypes::TypeInfo::DecodableType scheduleTypes; + Attributes::NumberOfPresets::TypeInfo::DecodableType numberOfPresets = static_cast(0); + Attributes::NumberOfSchedules::TypeInfo::DecodableType numberOfSchedules = static_cast(0); + Attributes::NumberOfScheduleTransitions::TypeInfo::DecodableType numberOfScheduleTransitions = static_cast(0); + Attributes::NumberOfScheduleTransitionPerDay::TypeInfo::DecodableType numberOfScheduleTransitionPerDay; + Attributes::ActivePresetHandle::TypeInfo::DecodableType activePresetHandle; + Attributes::ActiveScheduleHandle::TypeInfo::DecodableType activeScheduleHandle; + Attributes::Presets::TypeInfo::DecodableType presets; + Attributes::Schedules::TypeInfo::DecodableType schedules; + Attributes::PresetsSchedulesEditable::TypeInfo::DecodableType presetsSchedulesEditable = static_cast(0); + Attributes::TemperatureSetpointHoldPolicy::TypeInfo::DecodableType temperatureSetpointHoldPolicy = + static_cast>(0); + Attributes::SetpointHoldExpiryTimestamp::TypeInfo::DecodableType setpointHoldExpiryTimestamp; + Attributes::QueuedPreset::TypeInfo::DecodableType queuedPreset; Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; Attributes::AcceptedCommandList::TypeInfo::DecodableType acceptedCommandList; Attributes::EventList::TypeInfo::DecodableType eventList; 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 4038c9c9c41723..62785377b59df5 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 { @@ -3255,9 +3193,13 @@ namespace MicrowaveOvenControl { namespace Attributes { namespace CookTime { -static constexpr AttributeId Id = 0x00000001; +static constexpr AttributeId Id = 0x00000000; } // namespace CookTime +namespace MaxCookTime { +static constexpr AttributeId Id = 0x00000001; +} // namespace MaxCookTime + namespace PowerSetting { static constexpr AttributeId Id = 0x00000002; } // namespace PowerSetting @@ -3274,6 +3216,18 @@ namespace PowerStep { static constexpr AttributeId Id = 0x00000005; } // namespace PowerStep +namespace SupportedWatts { +static constexpr AttributeId Id = 0x00000006; +} // namespace SupportedWatts + +namespace SelectedWattIndex { +static constexpr AttributeId Id = 0x00000007; +} // namespace SelectedWattIndex + +namespace WattRating { +static constexpr AttributeId Id = 0x00000008; +} // namespace WattRating + namespace GeneratedCommandList { static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; } // namespace GeneratedCommandList @@ -3409,6 +3363,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 { @@ -4722,6 +4738,62 @@ namespace ACCapacityformat { static constexpr AttributeId Id = 0x00000047; } // namespace ACCapacityformat +namespace PresetTypes { +static constexpr AttributeId Id = 0x00000048; +} // namespace PresetTypes + +namespace ScheduleTypes { +static constexpr AttributeId Id = 0x00000049; +} // namespace ScheduleTypes + +namespace NumberOfPresets { +static constexpr AttributeId Id = 0x0000004A; +} // namespace NumberOfPresets + +namespace NumberOfSchedules { +static constexpr AttributeId Id = 0x0000004B; +} // namespace NumberOfSchedules + +namespace NumberOfScheduleTransitions { +static constexpr AttributeId Id = 0x0000004C; +} // namespace NumberOfScheduleTransitions + +namespace NumberOfScheduleTransitionPerDay { +static constexpr AttributeId Id = 0x0000004D; +} // namespace NumberOfScheduleTransitionPerDay + +namespace ActivePresetHandle { +static constexpr AttributeId Id = 0x0000004E; +} // namespace ActivePresetHandle + +namespace ActiveScheduleHandle { +static constexpr AttributeId Id = 0x0000004F; +} // namespace ActiveScheduleHandle + +namespace Presets { +static constexpr AttributeId Id = 0x00000050; +} // namespace Presets + +namespace Schedules { +static constexpr AttributeId Id = 0x00000051; +} // namespace Schedules + +namespace PresetsSchedulesEditable { +static constexpr AttributeId Id = 0x00000052; +} // namespace PresetsSchedulesEditable + +namespace TemperatureSetpointHoldPolicy { +static constexpr AttributeId Id = 0x00000053; +} // namespace TemperatureSetpointHoldPolicy + +namespace SetpointHoldExpiryTimestamp { +static constexpr AttributeId Id = 0x00000054; +} // namespace SetpointHoldExpiryTimestamp + +namespace QueuedPreset { +static constexpr AttributeId Id = 0x00000055; +} // namespace QueuedPreset + namespace GeneratedCommandList { static constexpr AttributeId Id = Globals::Attributes::GeneratedCommandList::Id; } // namespace GeneratedCommandList 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 4aa2dada3394fb..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 { @@ -1224,6 +1224,34 @@ namespace ClearWeeklySchedule { static constexpr CommandId Id = 0x00000003; } // namespace ClearWeeklySchedule +namespace SetActiveScheduleRequest { +static constexpr CommandId Id = 0x00000005; +} // namespace SetActiveScheduleRequest + +namespace SetActivePresetRequest { +static constexpr CommandId Id = 0x00000006; +} // namespace SetActivePresetRequest + +namespace StartPresetsSchedulesEditRequest { +static constexpr CommandId Id = 0x00000007; +} // namespace StartPresetsSchedulesEditRequest + +namespace CancelPresetsSchedulesEditRequest { +static constexpr CommandId Id = 0x00000008; +} // namespace CancelPresetsSchedulesEditRequest + +namespace CommitPresetsSchedulesRequest { +static constexpr CommandId Id = 0x00000009; +} // namespace CommitPresetsSchedulesRequest + +namespace CancelSetActivePresetRequest { +static constexpr CommandId Id = 0x0000000A; +} // namespace CancelSetActivePresetRequest + +namespace SetTemperatureSetpointHoldPolicy { +static constexpr CommandId Id = 0x0000000B; +} // namespace SetTemperatureSetpointHoldPolicy + } // namespace Commands } // namespace Thermostat 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 a7645ac8f0c77f..c1e1d69f59d802 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(); } @@ -3358,21 +2929,596 @@ class SoftwareDiagnosticsResetWatermarks : public ClusterCommand \*----------------------------------------------------------------------------*/ /* - * Command ResetCounts + * Command ResetCounts + */ +class ThreadNetworkDiagnosticsResetCounts : public ClusterCommand +{ +public: + ThreadNetworkDiagnosticsResetCounts(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("reset-counts", credsIssuerConfig) + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ThreadNetworkDiagnostics::Commands::ResetCounts::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::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ThreadNetworkDiagnostics::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::ThreadNetworkDiagnostics::Commands::ResetCounts::Type mRequest; +}; + +/*----------------------------------------------------------------------------*\ +| Cluster WiFiNetworkDiagnostics | 0x0036 | +|------------------------------------------------------------------------------| +| Commands: | | +| * ResetCounts | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Bssid | 0x0000 | +| * SecurityType | 0x0001 | +| * WiFiVersion | 0x0002 | +| * ChannelNumber | 0x0003 | +| * Rssi | 0x0004 | +| * BeaconLostCount | 0x0005 | +| * BeaconRxCount | 0x0006 | +| * PacketMulticastRxCount | 0x0007 | +| * PacketMulticastTxCount | 0x0008 | +| * PacketUnicastRxCount | 0x0009 | +| * PacketUnicastTxCount | 0x000A | +| * CurrentMaxRate | 0x000B | +| * OverrunCount | 0x000C | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * Disconnection | 0x0000 | +| * AssociationFailure | 0x0001 | +| * ConnectionStatus | 0x0002 | +\*----------------------------------------------------------------------------*/ + +/* + * Command ResetCounts + */ +class WiFiNetworkDiagnosticsResetCounts : public ClusterCommand +{ +public: + WiFiNetworkDiagnosticsResetCounts(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("reset-counts", credsIssuerConfig) + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WiFiNetworkDiagnostics::Commands::ResetCounts::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::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WiFiNetworkDiagnostics::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::WiFiNetworkDiagnostics::Commands::ResetCounts::Type mRequest; +}; + +/*----------------------------------------------------------------------------*\ +| Cluster EthernetNetworkDiagnostics | 0x0037 | +|------------------------------------------------------------------------------| +| Commands: | | +| * ResetCounts | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * PHYRate | 0x0000 | +| * FullDuplex | 0x0001 | +| * PacketRxCount | 0x0002 | +| * PacketTxCount | 0x0003 | +| * TxErrCount | 0x0004 | +| * CollisionCount | 0x0005 | +| * OverrunCount | 0x0006 | +| * CarrierDetect | 0x0007 | +| * TimeSinceReset | 0x0008 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/* + * Command ResetCounts + */ +class EthernetNetworkDiagnosticsResetCounts : public ClusterCommand +{ +public: + EthernetNetworkDiagnosticsResetCounts(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("reset-counts", credsIssuerConfig) + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + 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 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::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 ThreadNetworkDiagnosticsResetCounts : public ClusterCommand +class AdministratorCommissioningRevokeCommissioning : public ClusterCommand { public: - ThreadNetworkDiagnosticsResetCounts(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("reset-counts", credsIssuerConfig) + 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::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ThreadNetworkDiagnostics::Commands::ResetCounts::Id; + 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)); @@ -3381,8 +3527,8 @@ class ThreadNetworkDiagnosticsResetCounts : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ThreadNetworkDiagnostics::Commands::ResetCounts::Id; + 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); @@ -3391,29 +3537,29 @@ class ThreadNetworkDiagnosticsResetCounts : public ClusterCommand } private: - chip::app::Clusters::ThreadNetworkDiagnostics::Commands::ResetCounts::Type mRequest; + chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Type mRequest; }; /*----------------------------------------------------------------------------*\ -| Cluster WiFiNetworkDiagnostics | 0x0036 | +| Cluster OperationalCredentials | 0x003E | |------------------------------------------------------------------------------| | Commands: | | -| * ResetCounts | 0x00 | +| * AttestationRequest | 0x00 | +| * CertificateChainRequest | 0x02 | +| * CSRRequest | 0x04 | +| * AddNOC | 0x06 | +| * UpdateNOC | 0x07 | +| * UpdateFabricLabel | 0x09 | +| * RemoveFabric | 0x0A | +| * AddTrustedRootCertificate | 0x0B | |------------------------------------------------------------------------------| | Attributes: | | -| * Bssid | 0x0000 | -| * SecurityType | 0x0001 | -| * WiFiVersion | 0x0002 | -| * ChannelNumber | 0x0003 | -| * Rssi | 0x0004 | -| * BeaconLostCount | 0x0005 | -| * BeaconRxCount | 0x0006 | -| * PacketMulticastRxCount | 0x0007 | -| * PacketMulticastTxCount | 0x0008 | -| * PacketUnicastRxCount | 0x0009 | -| * PacketUnicastTxCount | 0x000A | -| * CurrentMaxRate | 0x000B | -| * OverrunCount | 0x000C | +| * NOCs | 0x0000 | +| * Fabrics | 0x0001 | +| * SupportedFabrics | 0x0002 | +| * CommissionedFabrics | 0x0003 | +| * TrustedRootCertificates | 0x0004 | +| * CurrentFabricIndex | 0x0005 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -3422,27 +3568,25 @@ class ThreadNetworkDiagnosticsResetCounts : public ClusterCommand | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | -| * Disconnection | 0x0000 | -| * AssociationFailure | 0x0001 | -| * ConnectionStatus | 0x0002 | \*----------------------------------------------------------------------------*/ /* - * Command ResetCounts + * Command AttestationRequest */ -class WiFiNetworkDiagnosticsResetCounts : public ClusterCommand +class OperationalCredentialsAttestationRequest : public ClusterCommand { public: - WiFiNetworkDiagnosticsResetCounts(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("reset-counts", credsIssuerConfig) + OperationalCredentialsAttestationRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("attestation-request", credsIssuerConfig) { + AddArgument("AttestationNonce", &mRequest.attestationNonce); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::WiFiNetworkDiagnostics::Commands::ResetCounts::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)); @@ -3451,8 +3595,8 @@ class WiFiNetworkDiagnosticsResetCounts : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::WiFiNetworkDiagnostics::Commands::ResetCounts::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); @@ -3461,51 +3605,26 @@ class WiFiNetworkDiagnosticsResetCounts : public ClusterCommand } private: - chip::app::Clusters::WiFiNetworkDiagnostics::Commands::ResetCounts::Type mRequest; + chip::app::Clusters::OperationalCredentials::Commands::AttestationRequest::Type mRequest; }; -/*----------------------------------------------------------------------------*\ -| Cluster EthernetNetworkDiagnostics | 0x0037 | -|------------------------------------------------------------------------------| -| Commands: | | -| * ResetCounts | 0x00 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * PHYRate | 0x0000 | -| * FullDuplex | 0x0001 | -| * PacketRxCount | 0x0002 | -| * PacketTxCount | 0x0003 | -| * TxErrCount | 0x0004 | -| * CollisionCount | 0x0005 | -| * OverrunCount | 0x0006 | -| * CarrierDetect | 0x0007 | -| * TimeSinceReset | 0x0008 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Command ResetCounts + * Command CertificateChainRequest */ -class EthernetNetworkDiagnosticsResetCounts : public ClusterCommand +class OperationalCredentialsCertificateChainRequest : public ClusterCommand { public: - EthernetNetworkDiagnosticsResetCounts(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("reset-counts", credsIssuerConfig) + OperationalCredentialsCertificateChainRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("certificate-chain-request", credsIssuerConfig) { + 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::EthernetNetworkDiagnostics::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::EthernetNetworkDiagnostics::Commands::ResetCounts::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)); @@ -3514,8 +3633,8 @@ 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::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); @@ -3524,66 +3643,67 @@ class EthernetNetworkDiagnosticsResetCounts : public ClusterCommand } private: - chip::app::Clusters::EthernetNetworkDiagnostics::Commands::ResetCounts::Type mRequest; + chip::app::Clusters::OperationalCredentials::Commands::CertificateChainRequest::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 CSRRequest + */ +class OperationalCredentialsCSRRequest : public ClusterCommand +{ +public: + OperationalCredentialsCSRRequest(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("csrrequest", credsIssuerConfig) + { + 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::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)); + 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::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); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); + } + +private: + chip::app::Clusters::OperationalCredentials::Commands::CSRRequest::Type mRequest; +}; /* - * Command SetUTCTime + * Command AddNOC */ -class TimeSynchronizationSetUTCTime : public ClusterCommand +class OperationalCredentialsAddNOC : public ClusterCommand { public: - TimeSynchronizationSetUTCTime(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("set-utctime", credsIssuerConfig) + OperationalCredentialsAddNOC(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("add-noc", credsIssuerConfig) { - AddArgument("UTCTime", 0, UINT64_MAX, &mRequest.UTCTime); - AddArgument("Granularity", 0, UINT8_MAX, &mRequest.granularity); - AddArgument("TimeSource", 0, UINT8_MAX, &mRequest.timeSource); + 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::SetUTCTime::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)); @@ -3592,8 +3712,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::AddNOC::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -3602,26 +3722,26 @@ class TimeSynchronizationSetUTCTime : public ClusterCommand } private: - chip::app::Clusters::TimeSynchronization::Commands::SetUTCTime::Type mRequest; + chip::app::Clusters::OperationalCredentials::Commands::AddNOC::Type mRequest; }; /* - * Command SetTrustedTimeSource + * Command UpdateNOC */ -class TimeSynchronizationSetTrustedTimeSource : public ClusterCommand +class OperationalCredentialsUpdateNOC : public ClusterCommand { public: - TimeSynchronizationSetTrustedTimeSource(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("set-trusted-time-source", credsIssuerConfig), mComplex_TrustedTimeSource(&mRequest.trustedTimeSource) + OperationalCredentialsUpdateNOC(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("update-noc", credsIssuerConfig) { - AddArgument("TrustedTimeSource", &mComplex_TrustedTimeSource); + 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::SetTrustedTimeSource::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)); @@ -3630,8 +3750,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::UpdateNOC::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -3640,29 +3760,26 @@ class TimeSynchronizationSetTrustedTimeSource : public ClusterCommand } private: - chip::app::Clusters::TimeSynchronization::Commands::SetTrustedTimeSource::Type mRequest; - TypedComplexArgument> - mComplex_TrustedTimeSource; + chip::app::Clusters::OperationalCredentials::Commands::UpdateNOC::Type mRequest; }; /* - * Command SetTimeZone + * Command UpdateFabricLabel */ -class TimeSynchronizationSetTimeZone : public ClusterCommand +class OperationalCredentialsUpdateFabricLabel : public ClusterCommand { public: - TimeSynchronizationSetTimeZone(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("set-time-zone", credsIssuerConfig), mComplex_TimeZone(&mRequest.timeZone) + OperationalCredentialsUpdateFabricLabel(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("update-fabric-label", credsIssuerConfig) { - AddArgument("TimeZone", &mComplex_TimeZone); + AddArgument("Label", &mRequest.label); 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::UpdateFabricLabel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -3671,8 +3788,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::UpdateFabricLabel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -3681,28 +3798,26 @@ class TimeSynchronizationSetTimeZone : public ClusterCommand } private: - chip::app::Clusters::TimeSynchronization::Commands::SetTimeZone::Type mRequest; - TypedComplexArgument> - mComplex_TimeZone; + chip::app::Clusters::OperationalCredentials::Commands::UpdateFabricLabel::Type mRequest; }; /* - * Command SetDSTOffset + * Command RemoveFabric */ -class TimeSynchronizationSetDSTOffset : public ClusterCommand +class OperationalCredentialsRemoveFabric : public ClusterCommand { public: - TimeSynchronizationSetDSTOffset(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("set-dstoffset", credsIssuerConfig), mComplex_DSTOffset(&mRequest.DSTOffset) + OperationalCredentialsRemoveFabric(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("remove-fabric", credsIssuerConfig) { - AddArgument("DSTOffset", &mComplex_DSTOffset); + 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::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::RemoveFabric::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -3711,8 +3826,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::RemoveFabric::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -3721,28 +3836,26 @@ class TimeSynchronizationSetDSTOffset : public ClusterCommand } private: - chip::app::Clusters::TimeSynchronization::Commands::SetDSTOffset::Type mRequest; - TypedComplexArgument> - mComplex_DSTOffset; + chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type mRequest; }; /* - * Command SetDefaultNTP + * Command AddTrustedRootCertificate */ -class TimeSynchronizationSetDefaultNTP : public ClusterCommand +class OperationalCredentialsAddTrustedRootCertificate : public ClusterCommand { public: - TimeSynchronizationSetDefaultNTP(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("set-default-ntp", credsIssuerConfig) + OperationalCredentialsAddTrustedRootCertificate(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("add-trusted-root-certificate", credsIssuerConfig) { - AddArgument("DefaultNTP", &mRequest.defaultNTP); + AddArgument("RootCACertificate", &mRequest.rootCACertificate); 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::AddTrustedRootCertificate::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -3751,8 +3864,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::AddTrustedRootCertificate::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -3761,83 +3874,23 @@ class TimeSynchronizationSetDefaultNTP : public ClusterCommand } private: - chip::app::Clusters::TimeSynchronization::Commands::SetDefaultNTP::Type mRequest; + chip::app::Clusters::OperationalCredentials::Commands::AddTrustedRootCertificate::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 | +| Cluster GroupKeyManagement | 0x003F | |------------------------------------------------------------------------------| | Commands: | | -| * OpenCommissioningWindow | 0x00 | -| * OpenBasicCommissioningWindow | 0x01 | -| * RevokeCommissioning | 0x02 | +| * KeySetWrite | 0x00 | +| * KeySetRead | 0x01 | +| * KeySetRemove | 0x03 | +| * KeySetReadAllIndices | 0x04 | |------------------------------------------------------------------------------| | Attributes: | | -| * WindowStatus | 0x0000 | -| * AdminFabricIndex | 0x0001 | -| * AdminVendorId | 0x0002 | +| * GroupKeyMap | 0x0000 | +| * GroupTable | 0x0001 | +| * MaxGroupsPerFabric | 0x0002 | +| * MaxGroupKeysPerFabric | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -3849,27 +3902,22 @@ class TimeSynchronizationSetDefaultNTP : public ClusterCommand \*----------------------------------------------------------------------------*/ /* - * Command OpenCommissioningWindow + * Command KeySetWrite */ -class AdministratorCommissioningOpenCommissioningWindow : public ClusterCommand +class GroupKeyManagementKeySetWrite : public ClusterCommand { public: - AdministratorCommissioningOpenCommissioningWindow(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("open-commissioning-window", credsIssuerConfig) + GroupKeyManagementKeySetWrite(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("key-set-write", credsIssuerConfig), mComplex_GroupKeySet(&mRequest.groupKeySet) { - 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("GroupKeySet", &mComplex_GroupKeySet); 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::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)); @@ -3878,9 +3926,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::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); @@ -3889,27 +3936,26 @@ class AdministratorCommissioningOpenCommissioningWindow : public ClusterCommand } private: - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type mRequest; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type mRequest; + TypedComplexArgument mComplex_GroupKeySet; }; /* - * Command OpenBasicCommissioningWindow + * Command KeySetRead */ -class AdministratorCommissioningOpenBasicCommissioningWindow : public ClusterCommand +class GroupKeyManagementKeySetRead : public ClusterCommand { public: - AdministratorCommissioningOpenBasicCommissioningWindow(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("open-basic-commissioning-window", credsIssuerConfig) + GroupKeyManagementKeySetRead(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("key-set-read", credsIssuerConfig) { - AddArgument("CommissioningTimeout", 0, UINT16_MAX, &mRequest.commissioningTimeout); + 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::AdministratorCommissioning::Id; - constexpr chip::CommandId commandId = - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::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)); @@ -3918,9 +3964,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::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); @@ -3929,25 +3974,26 @@ class AdministratorCommissioningOpenBasicCommissioningWindow : public ClusterCom } private: - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type mRequest; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type mRequest; }; /* - * Command RevokeCommissioning + * Command KeySetRemove */ -class AdministratorCommissioningRevokeCommissioning : public ClusterCommand +class GroupKeyManagementKeySetRemove : public ClusterCommand { public: - AdministratorCommissioningRevokeCommissioning(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("revoke-commissioning", credsIssuerConfig) + GroupKeyManagementKeySetRemove(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("key-set-remove", 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::AdministratorCommissioning::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::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)); @@ -3956,66 +4002,35 @@ 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::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); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); - } - -private: - chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Type mRequest; -}; - -/*----------------------------------------------------------------------------*\ -| Cluster OperationalCredentials | 0x003E | -|------------------------------------------------------------------------------| -| Commands: | | -| * AttestationRequest | 0x00 | -| * CertificateChainRequest | 0x02 | -| * CSRRequest | 0x04 | -| * AddNOC | 0x06 | -| * UpdateNOC | 0x07 | -| * UpdateFabricLabel | 0x09 | -| * RemoveFabric | 0x0A | -| * AddTrustedRootCertificate | 0x0B | -|------------------------------------------------------------------------------| -| Attributes: | | -| * NOCs | 0x0000 | -| * Fabrics | 0x0001 | -| * SupportedFabrics | 0x0002 | -| * CommissionedFabrics | 0x0003 | -| * TrustedRootCertificates | 0x0004 | -| * CurrentFabricIndex | 0x0005 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ + groupId); + + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); + } + +private: + chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type mRequest; +}; /* - * Command AttestationRequest + * Command KeySetReadAllIndices */ -class OperationalCredentialsAttestationRequest : public ClusterCommand +class GroupKeyManagementKeySetReadAllIndices : public ClusterCommand { public: - OperationalCredentialsAttestationRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("attestation-request", credsIssuerConfig) + GroupKeyManagementKeySetReadAllIndices(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("key-set-read-all-indices", credsIssuerConfig) { - AddArgument("AttestationNonce", &mRequest.attestationNonce); 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::KeySetReadAllIndices::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -4024,8 +4039,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::KeySetReadAllIndices::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -4034,26 +4049,157 @@ class OperationalCredentialsAttestationRequest : public ClusterCommand } private: - chip::app::Clusters::OperationalCredentials::Commands::AttestationRequest::Type mRequest; + 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: | | +\*----------------------------------------------------------------------------*/ + +/*----------------------------------------------------------------------------*\ +| Cluster ProxyConfiguration | 0x0042 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/*----------------------------------------------------------------------------*\ +| Cluster ProxyDiscovery | 0x0043 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/*----------------------------------------------------------------------------*\ +| Cluster ProxyValid | 0x0044 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/*----------------------------------------------------------------------------*\ +| Cluster BooleanState | 0x0045 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * StateValue | 0x0000 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * StateChange | 0x0000 | +\*----------------------------------------------------------------------------*/ + +/*----------------------------------------------------------------------------*\ +| 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 CertificateChainRequest + * Command RegisterClient */ -class OperationalCredentialsCertificateChainRequest : public ClusterCommand +class IcdManagementRegisterClient : public ClusterCommand { public: - OperationalCredentialsCertificateChainRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("certificate-chain-request", credsIssuerConfig) + IcdManagementRegisterClient(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("register-client", credsIssuerConfig) { - AddArgument("CertificateType", 0, UINT8_MAX, &mRequest.certificateType); + 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::CertificateChainRequest::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)); @@ -4062,8 +4208,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::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); @@ -4072,26 +4218,27 @@ class OperationalCredentialsCertificateChainRequest : public ClusterCommand } private: - chip::app::Clusters::OperationalCredentials::Commands::CertificateChainRequest::Type mRequest; + chip::app::Clusters::IcdManagement::Commands::RegisterClient::Type mRequest; }; /* - * Command CSRRequest + * Command UnregisterClient */ -class OperationalCredentialsCSRRequest : public ClusterCommand +class IcdManagementUnregisterClient : public ClusterCommand { public: - OperationalCredentialsCSRRequest(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("csrrequest", credsIssuerConfig) + IcdManagementUnregisterClient(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("unregister-client", credsIssuerConfig) { - AddArgument("CSRNonce", &mRequest.CSRNonce); - AddArgument("IsForUpdateNOC", 0, 1, &mRequest.isForUpdateNOC); + 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::CSRRequest::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)); @@ -4100,8 +4247,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::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); @@ -4110,29 +4257,25 @@ class OperationalCredentialsCSRRequest : public ClusterCommand } private: - chip::app::Clusters::OperationalCredentials::Commands::CSRRequest::Type mRequest; + chip::app::Clusters::IcdManagement::Commands::UnregisterClient::Type mRequest; }; /* - * Command AddNOC + * Command StayActiveRequest */ -class OperationalCredentialsAddNOC : public ClusterCommand +class IcdManagementStayActiveRequest : public ClusterCommand { public: - OperationalCredentialsAddNOC(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("add-noc", credsIssuerConfig) + IcdManagementStayActiveRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("stay-active-request", 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::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)); @@ -4141,8 +4284,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::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); @@ -4151,26 +4294,48 @@ class OperationalCredentialsAddNOC : public ClusterCommand } private: - chip::app::Clusters::OperationalCredentials::Commands::AddNOC::Type mRequest; + chip::app::Clusters::IcdManagement::Commands::StayActiveRequest::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 UpdateNOC + * Command SetTimer */ -class OperationalCredentialsUpdateNOC : public ClusterCommand +class TimerSetTimer : public ClusterCommand { public: - OperationalCredentialsUpdateNOC(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("update-noc", credsIssuerConfig) + TimerSetTimer(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("set-timer", credsIssuerConfig) { - AddArgument("NOCValue", &mRequest.NOCValue); - AddArgument("ICACValue", &mRequest.ICACValue); + 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::OperationalCredentials::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::UpdateNOC::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)); @@ -4179,8 +4344,8 @@ class OperationalCredentialsUpdateNOC : 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::UpdateNOC::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); @@ -4189,26 +4354,24 @@ class OperationalCredentialsUpdateNOC : public ClusterCommand } private: - chip::app::Clusters::OperationalCredentials::Commands::UpdateNOC::Type mRequest; + chip::app::Clusters::Timer::Commands::SetTimer::Type mRequest; }; /* - * Command UpdateFabricLabel + * Command ResetTimer */ -class OperationalCredentialsUpdateFabricLabel : public ClusterCommand +class TimerResetTimer : public ClusterCommand { public: - OperationalCredentialsUpdateFabricLabel(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("update-fabric-label", credsIssuerConfig) + TimerResetTimer(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("reset-timer", credsIssuerConfig) { - AddArgument("Label", &mRequest.label); 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::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)); @@ -4217,8 +4380,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::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); @@ -4227,26 +4390,25 @@ class OperationalCredentialsUpdateFabricLabel : public ClusterCommand } private: - chip::app::Clusters::OperationalCredentials::Commands::UpdateFabricLabel::Type mRequest; + chip::app::Clusters::Timer::Commands::ResetTimer::Type mRequest; }; /* - * Command RemoveFabric + * Command AddTime */ -class OperationalCredentialsRemoveFabric : public ClusterCommand +class TimerAddTime : public ClusterCommand { public: - OperationalCredentialsRemoveFabric(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("remove-fabric", credsIssuerConfig) + TimerAddTime(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("add-time", credsIssuerConfig) { - AddArgument("FabricIndex", 0, UINT8_MAX, &mRequest.fabricIndex); + 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::OperationalCredentials::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::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)); @@ -4255,8 +4417,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::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); @@ -4265,26 +4427,25 @@ class OperationalCredentialsRemoveFabric : public ClusterCommand } private: - chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type mRequest; + chip::app::Clusters::Timer::Commands::AddTime::Type mRequest; }; /* - * Command AddTrustedRootCertificate + * Command ReduceTime */ -class OperationalCredentialsAddTrustedRootCertificate : public ClusterCommand +class TimerReduceTime : public ClusterCommand { public: - OperationalCredentialsAddTrustedRootCertificate(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("add-trusted-root-certificate", credsIssuerConfig) + TimerReduceTime(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("reduce-time", credsIssuerConfig) { - AddArgument("RootCACertificate", &mRequest.rootCACertificate); + 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::OperationalCredentials::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::AddTrustedRootCertificate::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, endpointIds.at(0)); @@ -4293,8 +4454,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::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 Group %u", clusterId, commandId, groupId); @@ -4303,23 +4464,25 @@ class OperationalCredentialsAddTrustedRootCertificate : public ClusterCommand } private: - chip::app::Clusters::OperationalCredentials::Commands::AddTrustedRootCertificate::Type mRequest; + chip::app::Clusters::Timer::Commands::ReduceTime::Type mRequest; }; /*----------------------------------------------------------------------------*\ -| Cluster GroupKeyManagement | 0x003F | +| Cluster OvenCavityOperationalState | 0x0048 | |------------------------------------------------------------------------------| | Commands: | | -| * KeySetWrite | 0x00 | -| * KeySetRead | 0x01 | -| * KeySetRemove | 0x03 | -| * KeySetReadAllIndices | 0x04 | +| * Pause | 0x00 | +| * Stop | 0x01 | +| * Start | 0x02 | +| * Resume | 0x03 | |------------------------------------------------------------------------------| | Attributes: | | -| * GroupKeyMap | 0x0000 | -| * GroupTable | 0x0001 | -| * MaxGroupsPerFabric | 0x0002 | -| * MaxGroupKeysPerFabric | 0x0003 | +| * PhaseList | 0x0000 | +| * CurrentPhase | 0x0001 | +| * CountdownTime | 0x0002 | +| * OperationalStateList | 0x0003 | +| * OperationalState | 0x0004 | +| * OperationalError | 0x0005 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -4328,63 +4491,25 @@ class OperationalCredentialsAddTrustedRootCertificate : public ClusterCommand | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | +| * OperationalError | 0x0000 | +| * OperationCompletion | 0x0001 | \*----------------------------------------------------------------------------*/ /* - * Command KeySetWrite - */ -class GroupKeyManagementKeySetWrite : public ClusterCommand -{ -public: - GroupKeyManagementKeySetWrite(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("key-set-write", credsIssuerConfig), mComplex_GroupKeySet(&mRequest.groupKeySet) - { - AddArgument("GroupKeySet", &mComplex_GroupKeySet); - 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; - - 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::KeySetWrite::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::KeySetWrite::Type mRequest; - TypedComplexArgument mComplex_GroupKeySet; -}; - -/* - * Command KeySetRead + * Command Pause */ -class GroupKeyManagementKeySetRead : public ClusterCommand +class OvenCavityOperationalStatePause : public ClusterCommand { public: - GroupKeyManagementKeySetRead(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("key-set-read", credsIssuerConfig) + OvenCavityOperationalStatePause(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("pause", 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::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)); @@ -4393,8 +4518,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::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); @@ -4403,26 +4528,24 @@ class GroupKeyManagementKeySetRead : public ClusterCommand } private: - chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type mRequest; + chip::app::Clusters::OvenCavityOperationalState::Commands::Pause::Type mRequest; }; /* - * Command KeySetRemove + * Command Stop */ -class GroupKeyManagementKeySetRemove : public ClusterCommand +class OvenCavityOperationalStateStop : public ClusterCommand { public: - GroupKeyManagementKeySetRemove(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("key-set-remove", credsIssuerConfig) + OvenCavityOperationalStateStop(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("stop", 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::KeySetRemove::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)); @@ -4431,8 +4554,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::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); @@ -4441,194 +4564,60 @@ class GroupKeyManagementKeySetRemove : public ClusterCommand } private: - chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type mRequest; + chip::app::Clusters::OvenCavityOperationalState::Commands::Stop::Type mRequest; }; /* - * Command KeySetReadAllIndices + * Command Start */ -class GroupKeyManagementKeySetReadAllIndices : public ClusterCommand +class OvenCavityOperationalStateStart : public ClusterCommand { public: - GroupKeyManagementKeySetReadAllIndices(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("key-set-read-all-indices", 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::GroupKeyManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndices::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)); - 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: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster ProxyConfiguration | 0x0042 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| Cluster ProxyDiscovery | 0x0043 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ + commandId, endpointIds.at(0)); + return ClusterCommand::SendCommand(device, endpointIds.at(0), clusterId, commandId, mRequest); + } -/*----------------------------------------------------------------------------*\ -| Cluster ProxyValid | 0x0044 | -|------------------------------------------------------------------------------| -| 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::OvenCavityOperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OvenCavityOperationalState::Commands::Start::Id; -/*----------------------------------------------------------------------------*\ -| Cluster BooleanState | 0x0045 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * StateValue | 0x0000 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * StateChange | 0x0000 | -\*----------------------------------------------------------------------------*/ + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, + groupId); -/*----------------------------------------------------------------------------*\ -| 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 | -\*----------------------------------------------------------------------------*/ + return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); + } + +private: + chip::app::Clusters::OvenCavityOperationalState::Commands::Start::Type mRequest; +}; /* - * Command RegisterClient + * Command Resume */ -class IcdManagementRegisterClient : public ClusterCommand +class OvenCavityOperationalStateResume : public ClusterCommand { public: - IcdManagementRegisterClient(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("register-client", credsIssuerConfig) + OvenCavityOperationalStateResume(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("resume", 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::Resume::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -4637,8 +4626,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::Resume::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -4647,27 +4636,46 @@ class IcdManagementRegisterClient : public ClusterCommand } private: - chip::app::Clusters::IcdManagement::Commands::RegisterClient::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 UnregisterClient + * Command ChangeToMode */ -class IcdManagementUnregisterClient : public ClusterCommand +class OvenModeChangeToMode : public ClusterCommand { public: - IcdManagementUnregisterClient(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("unregister-client", credsIssuerConfig) + OvenModeChangeToMode(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("change-to-mode", credsIssuerConfig) { - AddArgument("CheckInNodeID", 0, UINT64_MAX, &mRequest.checkInNodeID); - AddArgument("VerificationKey", &mRequest.verificationKey); + 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::IcdManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::IcdManagement::Commands::UnregisterClient::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)); @@ -4676,8 +4684,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::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); @@ -4686,25 +4694,66 @@ class IcdManagementUnregisterClient : public ClusterCommand } private: - chip::app::Clusters::IcdManagement::Commands::UnregisterClient::Type mRequest; + 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 StayActiveRequest + * Command ChangeToMode */ -class IcdManagementStayActiveRequest : public ClusterCommand +class ModeSelectChangeToMode : public ClusterCommand { public: - IcdManagementStayActiveRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("stay-active-request", credsIssuerConfig) + ModeSelectChangeToMode(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::IcdManagement::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::IcdManagement::Commands::StayActiveRequest::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)); @@ -4713,8 +4762,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::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); @@ -4723,22 +4772,20 @@ class IcdManagementStayActiveRequest : public ClusterCommand } private: - chip::app::Clusters::IcdManagement::Commands::StayActiveRequest::Type mRequest; + chip::app::Clusters::ModeSelect::Commands::ChangeToMode::Type mRequest; }; /*----------------------------------------------------------------------------*\ -| Cluster Timer | 0x0047 | +| Cluster LaundryWasherMode | 0x0051 | |------------------------------------------------------------------------------| | 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 | @@ -4750,21 +4797,22 @@ class IcdManagementStayActiveRequest : public ClusterCommand \*----------------------------------------------------------------------------*/ /* - * Command SetTimer + * Command ChangeToMode */ -class TimerSetTimer : public ClusterCommand +class LaundryWasherModeChangeToMode : public ClusterCommand { public: - TimerSetTimer(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("set-timer", credsIssuerConfig) + LaundryWasherModeChangeToMode(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("change-to-mode", credsIssuerConfig) { - AddArgument("NewTime", 0, UINT32_MAX, &mRequest.newTime); + 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::SetTimer::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)); @@ -4773,8 +4821,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::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); @@ -4783,24 +4831,48 @@ class TimerSetTimer : public ClusterCommand } private: - chip::app::Clusters::Timer::Commands::SetTimer::Type mRequest; + chip::app::Clusters::LaundryWasherMode::Commands::ChangeToMode::Type mRequest; }; +/*----------------------------------------------------------------------------*\ +| Cluster RefrigeratorAndTemperatureControlledCabinetMode | 0x0052 | +|------------------------------------------------------------------------------| +| 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 RefrigeratorAndTemperatureControlledCabinetModeChangeToMode : public ClusterCommand { public: - TimerResetTimer(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("reset-timer", 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::Timer::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Timer::Commands::ResetTimer::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)); @@ -4809,8 +4881,9 @@ 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::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); @@ -4819,25 +4892,65 @@ class TimerResetTimer : public ClusterCommand } private: - chip::app::Clusters::Timer::Commands::ResetTimer::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 AddTime + * Command ChangeToMode */ -class TimerAddTime : public ClusterCommand +class RvcRunModeChangeToMode : public ClusterCommand { public: - TimerAddTime(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("add-time", credsIssuerConfig) + RvcRunModeChangeToMode(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::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)); @@ -4846,8 +4959,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::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); @@ -4856,25 +4969,45 @@ class TimerAddTime : public ClusterCommand } private: - chip::app::Clusters::Timer::Commands::AddTime::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 ReduceTime + * Command ChangeToMode */ -class TimerReduceTime : public ClusterCommand +class RvcCleanModeChangeToMode : public ClusterCommand { public: - TimerReduceTime(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("reduce-time", credsIssuerConfig) + RvcCleanModeChangeToMode(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::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)); @@ -4883,8 +5016,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::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); @@ -4893,25 +5026,22 @@ class TimerReduceTime : public ClusterCommand } private: - chip::app::Clusters::Timer::Commands::ReduceTime::Type mRequest; + chip::app::Clusters::RvcCleanMode::Commands::ChangeToMode::Type mRequest; }; /*----------------------------------------------------------------------------*\ -| Cluster OvenCavityOperationalState | 0x0048 | +| Cluster TemperatureControl | 0x0056 | |------------------------------------------------------------------------------| | Commands: | | -| * Pause | 0x00 | -| * Stop | 0x01 | -| * Start | 0x02 | -| * Resume | 0x03 | +| * SetTemperature | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * PhaseList | 0x0000 | -| * CurrentPhase | 0x0001 | -| * CountdownTime | 0x0002 | -| * OperationalStateList | 0x0003 | -| * OperationalState | 0x0004 | -| * OperationalError | 0x0005 | +| * TemperatureSetpoint | 0x0000 | +| * MinTemperature | 0x0001 | +| * MaxTemperature | 0x0002 | +| * Step | 0x0003 | +| * SelectedTemperatureLevel | 0x0004 | +| * SupportedTemperatureLevels | 0x0005 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -4920,25 +5050,26 @@ class TimerReduceTime : public ClusterCommand | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | -| * OperationalError | 0x0000 | -| * OperationCompletion | 0x0001 | \*----------------------------------------------------------------------------*/ /* - * Command Pause + * Command SetTemperature */ -class OvenCavityOperationalStatePause : public ClusterCommand +class TemperatureControlSetTemperature : public ClusterCommand { public: - OvenCavityOperationalStatePause(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("pause", 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::Pause::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)); @@ -4947,8 +5078,8 @@ 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::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); @@ -4957,24 +5088,66 @@ class OvenCavityOperationalStatePause : public ClusterCommand } private: - chip::app::Clusters::OvenCavityOperationalState::Commands::Pause::Type mRequest; + chip::app::Clusters::TemperatureControl::Commands::SetTemperature::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 Stop + * Command ChangeToMode */ -class OvenCavityOperationalStateStop : public ClusterCommand +class DishwasherModeChangeToMode : public ClusterCommand { public: - OvenCavityOperationalStateStop(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("stop", credsIssuerConfig) + DishwasherModeChangeToMode(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::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)); @@ -4983,8 +5156,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::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); @@ -4993,24 +5166,83 @@ class OvenCavityOperationalStateStop : public ClusterCommand } private: - chip::app::Clusters::OvenCavityOperationalState::Commands::Stop::Type mRequest; + chip::app::Clusters::DishwasherMode::Commands::ChangeToMode::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 | +|------------------------------------------------------------------------------| +| Commands: | | +| * SelfTestRequest | 0x00 | +|------------------------------------------------------------------------------| +| 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 | +\*----------------------------------------------------------------------------*/ + /* - * Command Start + * Command SelfTestRequest */ -class OvenCavityOperationalStateStart : public ClusterCommand +class SmokeCoAlarmSelfTestRequest : public ClusterCommand { public: - OvenCavityOperationalStateStart(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("start", credsIssuerConfig) + SmokeCoAlarmSelfTestRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("self-test-request", credsIssuerConfig) { 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::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)); @@ -5019,8 +5251,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::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); @@ -5029,24 +5261,48 @@ class OvenCavityOperationalStateStart : public ClusterCommand } private: - chip::app::Clusters::OvenCavityOperationalState::Commands::Start::Type mRequest; + chip::app::Clusters::SmokeCoAlarm::Commands::SelfTestRequest::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 Resume + * Command Reset */ -class OvenCavityOperationalStateResume : public ClusterCommand +class DishwasherAlarmReset : public ClusterCommand { public: - OvenCavityOperationalStateResume(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("resume", credsIssuerConfig) + DishwasherAlarmReset(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("reset", 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::OvenCavityOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OvenCavityOperationalState::Commands::Resume::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)); @@ -5055,8 +5311,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::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); @@ -5065,46 +5321,26 @@ class OvenCavityOperationalStateResume : public ClusterCommand } private: - chip::app::Clusters::OvenCavityOperationalState::Commands::Resume::Type mRequest; + chip::app::Clusters::DishwasherAlarm::Commands::Reset::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 ChangeToMode + * Command ModifyEnabledAlarms */ -class OvenModeChangeToMode : public ClusterCommand +class DishwasherAlarmModifyEnabledAlarms : public ClusterCommand { public: - OvenModeChangeToMode(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("change-to-mode", credsIssuerConfig) + DishwasherAlarmModifyEnabledAlarms(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("modify-enabled-alarms", credsIssuerConfig) { - AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); + 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::OvenMode::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OvenMode::Commands::ChangeToMode::Id; + 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)); @@ -5113,8 +5349,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::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); @@ -5123,17 +5359,17 @@ class OvenModeChangeToMode : public ClusterCommand } private: - chip::app::Clusters::OvenMode::Commands::ChangeToMode::Type mRequest; + chip::app::Clusters::DishwasherAlarm::Commands::ModifyEnabledAlarms::Type mRequest; }; /*----------------------------------------------------------------------------*\ -| Cluster LaundryDryerControls | 0x004A | +| Cluster MicrowaveOvenMode | 0x005E | |------------------------------------------------------------------------------| | Commands: | | |------------------------------------------------------------------------------| | Attributes: | | -| * SupportedDrynessLevels | 0x0000 | -| * SelectedDrynessLevel | 0x0001 | +| * SupportedModes | 0x0000 | +| * CurrentMode | 0x0001 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -5145,18 +5381,22 @@ class OvenModeChangeToMode : public ClusterCommand \*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*\ -| Cluster ModeSelect | 0x0050 | +| Cluster MicrowaveOvenControl | 0x005F | |------------------------------------------------------------------------------| | Commands: | | -| * ChangeToMode | 0x00 | +| * SetCookingParameters | 0x00 | +| * AddMoreTime | 0x01 | |------------------------------------------------------------------------------| | Attributes: | | -| * Description | 0x0000 | -| * StandardNamespace | 0x0001 | -| * SupportedModes | 0x0002 | -| * CurrentMode | 0x0003 | -| * StartUpMode | 0x0004 | -| * OnMode | 0x0005 | +| * CookTime | 0x0000 | +| * MaxCookTime | 0x0001 | +| * PowerSetting | 0x0002 | +| * MinPower | 0x0003 | +| * MaxPower | 0x0004 | +| * PowerStep | 0x0005 | +| * SupportedWatts | 0x0006 | +| * SelectedWattIndex | 0x0007 | +| * WattRating | 0x0008 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -5168,21 +5408,26 @@ class OvenModeChangeToMode : public ClusterCommand \*----------------------------------------------------------------------------*/ /* - * Command ChangeToMode + * Command SetCookingParameters */ -class ModeSelectChangeToMode : public ClusterCommand +class MicrowaveOvenControlSetCookingParameters : public ClusterCommand { public: - ModeSelectChangeToMode(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); + AddArgument("WattSettingIndex", 0, UINT8_MAX, &mRequest.wattSettingIndex); + AddArgument("StartAfterSetting", 0, 1, &mRequest.startAfterSetting); 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::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)); @@ -5191,8 +5436,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::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); @@ -5201,47 +5446,26 @@ class ModeSelectChangeToMode : public ClusterCommand } private: - chip::app::Clusters::ModeSelect::Commands::ChangeToMode::Type mRequest; + chip::app::Clusters::MicrowaveOvenControl::Commands::SetCookingParameters::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 ChangeToMode + * Command AddMoreTime */ -class LaundryWasherModeChangeToMode : public ClusterCommand +class MicrowaveOvenControlAddMoreTime : public ClusterCommand { public: - LaundryWasherModeChangeToMode(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("change-to-mode", credsIssuerConfig) + MicrowaveOvenControlAddMoreTime(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("add-more-time", credsIssuerConfig) { - AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); + 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::LaundryWasherMode::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::LaundryWasherMode::Commands::ChangeToMode::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, endpointIds.at(0)); @@ -5250,8 +5474,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::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); @@ -5260,20 +5484,25 @@ class LaundryWasherModeChangeToMode : public ClusterCommand } private: - chip::app::Clusters::LaundryWasherMode::Commands::ChangeToMode::Type mRequest; + chip::app::Clusters::MicrowaveOvenControl::Commands::AddMoreTime::Type mRequest; }; /*----------------------------------------------------------------------------*\ -| Cluster RefrigeratorAndTemperatureControlledCabinetMode | 0x0052 | +| Cluster OperationalState | 0x0060 | |------------------------------------------------------------------------------| | Commands: | | -| * ChangeToMode | 0x00 | +| * Pause | 0x00 | +| * Stop | 0x01 | +| * Start | 0x02 | +| * Resume | 0x03 | |------------------------------------------------------------------------------| | Attributes: | | -| * SupportedModes | 0x0000 | -| * CurrentMode | 0x0001 | -| * StartUpMode | 0x0002 | -| * OnMode | 0x0003 | +| * PhaseList | 0x0000 | +| * CurrentPhase | 0x0001 | +| * CountdownTime | 0x0002 | +| * OperationalStateList | 0x0003 | +| * OperationalState | 0x0004 | +| * OperationalError | 0x0005 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -5282,104 +5511,61 @@ class LaundryWasherModeChangeToMode : public ClusterCommand | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | +| * OperationalError | 0x0000 | +| * OperationCompletion | 0x0001 | \*----------------------------------------------------------------------------*/ /* - * Command ChangeToMode + * Command Pause */ -class RefrigeratorAndTemperatureControlledCabinetModeChangeToMode : public ClusterCommand +class OperationalStatePause : public ClusterCommand { public: - RefrigeratorAndTemperatureControlledCabinetModeChangeToMode(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::RefrigeratorAndTemperatureControlledCabinetMode::Id; - constexpr chip::CommandId commandId = - chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::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)); 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::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); - - return ClusterCommand::SendGroupCommand(groupId, fabricIndex, clusterId, commandId, mRequest); - } - -private: - 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: | | -\*----------------------------------------------------------------------------*/ + 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; -/*----------------------------------------------------------------------------*\ -| 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: | | -\*----------------------------------------------------------------------------*/ + 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::OperationalState::Commands::Pause::Type mRequest; +}; /* - * Command ChangeToMode + * Command Stop */ -class RvcRunModeChangeToMode : public ClusterCommand +class OperationalStateStop : public ClusterCommand { public: - RvcRunModeChangeToMode(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::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::Stop::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -5388,8 +5574,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::Stop::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -5398,45 +5584,24 @@ class RvcRunModeChangeToMode : public ClusterCommand } private: - chip::app::Clusters::RvcRunMode::Commands::ChangeToMode::Type mRequest; + chip::app::Clusters::OperationalState::Commands::Stop::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 Start */ -class RvcCleanModeChangeToMode : public ClusterCommand +class OperationalStateStart : public ClusterCommand { public: - RvcCleanModeChangeToMode(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("change-to-mode", credsIssuerConfig) + OperationalStateStart(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("start", 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::Start::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -5445,8 +5610,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::Start::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -5455,50 +5620,24 @@ class RvcCleanModeChangeToMode : public ClusterCommand } private: - chip::app::Clusters::RvcCleanMode::Commands::ChangeToMode::Type mRequest; + chip::app::Clusters::OperationalState::Commands::Start::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 Resume */ -class TemperatureControlSetTemperature : public ClusterCommand +class OperationalStateResume : public ClusterCommand { public: - TemperatureControlSetTemperature(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("set-temperature", credsIssuerConfig) + OperationalStateResume(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("resume", 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::Resume::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -5507,8 +5646,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::Resume::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -5517,40 +5656,25 @@ class TemperatureControlSetTemperature : public ClusterCommand } private: - chip::app::Clusters::TemperatureControl::Commands::SetTemperature::Type mRequest; + chip::app::Clusters::OperationalState::Commands::Resume::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 | +| Cluster RvcOperationalState | 0x0061 | |------------------------------------------------------------------------------| | Commands: | | -| * ChangeToMode | 0x00 | +| * Pause | 0x00 | +| * Stop | 0x01 | +| * Start | 0x02 | +| * Resume | 0x03 | |------------------------------------------------------------------------------| | Attributes: | | -| * SupportedModes | 0x0000 | -| * CurrentMode | 0x0001 | -| * StartUpMode | 0x0002 | -| * OnMode | 0x0003 | +| * PhaseList | 0x0000 | +| * CurrentPhase | 0x0001 | +| * CountdownTime | 0x0002 | +| * OperationalStateList | 0x0003 | +| * OperationalState | 0x0004 | +| * OperationalError | 0x0005 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -5559,24 +5683,25 @@ class TemperatureControlSetTemperature : public ClusterCommand | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | +| * OperationalError | 0x0000 | +| * OperationCompletion | 0x0001 | \*----------------------------------------------------------------------------*/ /* - * Command ChangeToMode + * Command Pause */ -class DishwasherModeChangeToMode : public ClusterCommand +class RvcOperationalStatePause : public ClusterCommand { public: - DishwasherModeChangeToMode(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("change-to-mode", credsIssuerConfig) + RvcOperationalStatePause(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::DishwasherMode::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DishwasherMode::Commands::ChangeToMode::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)); @@ -5585,8 +5710,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::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); @@ -5595,83 +5720,24 @@ class DishwasherModeChangeToMode : public ClusterCommand } private: - chip::app::Clusters::DishwasherMode::Commands::ChangeToMode::Type mRequest; + chip::app::Clusters::RvcOperationalState::Commands::Pause::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 | -|------------------------------------------------------------------------------| -| Commands: | | -| * SelfTestRequest | 0x00 | -|------------------------------------------------------------------------------| -| 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 | -\*----------------------------------------------------------------------------*/ - /* - * Command SelfTestRequest + * Command Stop */ -class SmokeCoAlarmSelfTestRequest : public ClusterCommand +class RvcOperationalStateStop : public ClusterCommand { public: - SmokeCoAlarmSelfTestRequest(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("self-test-request", credsIssuerConfig) + RvcOperationalStateStop(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("stop", 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::Stop::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -5680,8 +5746,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::Stop::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -5690,48 +5756,24 @@ class SmokeCoAlarmSelfTestRequest : public ClusterCommand } private: - chip::app::Clusters::SmokeCoAlarm::Commands::SelfTestRequest::Type mRequest; + chip::app::Clusters::RvcOperationalState::Commands::Stop::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 Start */ -class DishwasherAlarmReset : public ClusterCommand +class RvcOperationalStateStart : public ClusterCommand { public: - DishwasherAlarmReset(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("reset", credsIssuerConfig) + RvcOperationalStateStart(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("start", 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::Start::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -5740,8 +5782,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::Start::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -5750,26 +5792,24 @@ class DishwasherAlarmReset : public ClusterCommand } private: - chip::app::Clusters::DishwasherAlarm::Commands::Reset::Type mRequest; + chip::app::Clusters::RvcOperationalState::Commands::Start::Type mRequest; }; /* - * Command ModifyEnabledAlarms + * Command Resume */ -class DishwasherAlarmModifyEnabledAlarms : public ClusterCommand +class RvcOperationalStateResume : public ClusterCommand { public: - DishwasherAlarmModifyEnabledAlarms(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("modify-enabled-alarms", credsIssuerConfig) + RvcOperationalStateResume(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("resume", 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::Resume::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -5778,8 +5818,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::Resume::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -5788,40 +5828,33 @@ class DishwasherAlarmModifyEnabledAlarms : public ClusterCommand } private: - chip::app::Clusters::DishwasherAlarm::Commands::ModifyEnabledAlarms::Type mRequest; + chip::app::Clusters::RvcOperationalState::Commands::Resume::Type mRequest; }; /*----------------------------------------------------------------------------*\ -| Cluster MicrowaveOvenMode | 0x005E | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * SupportedModes | 0x0000 | -| * CurrentMode | 0x0001 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/*----------------------------------------------------------------------------*\ -| 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 +5866,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 +5894,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 +5904,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 +5934,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 +5944,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 +5972,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 +5982,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 +6010,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 +6020,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 +6048,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 +6058,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 +6087,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 +6097,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 +6125,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 +6135,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 +6167,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 +6177,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 +6208,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 +6218,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 +6249,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 +6259,7 @@ class RvcOperationalStateResume : public ClusterCommand } private: - chip::app::Clusters::RvcOperationalState::Commands::Resume::Type mRequest; + chip::app::Clusters::ScenesManagement::Commands::CopyScene::Type mRequest; }; /*----------------------------------------------------------------------------*\ @@ -8873,6 +8881,13 @@ class BarrierControlBarrierControlStop : public ClusterCommand | * SetWeeklySchedule | 0x01 | | * GetWeeklySchedule | 0x02 | | * ClearWeeklySchedule | 0x03 | +| * SetActiveScheduleRequest | 0x05 | +| * SetActivePresetRequest | 0x06 | +| * StartPresetsSchedulesEditRequest | 0x07 | +| * CancelPresetsSchedulesEditRequest | 0x08 | +| * CommitPresetsSchedulesRequest | 0x09 | +| * CancelSetActivePresetRequest | 0x0A | +| * SetTemperatureSetpointHoldPolicy | 0x0B | |------------------------------------------------------------------------------| | Attributes: | | | * LocalTemperature | 0x0000 | @@ -8924,6 +8939,20 @@ class BarrierControlBarrierControlStop : public ClusterCommand | * ACLouverPosition | 0x0045 | | * ACCoilTemperature | 0x0046 | | * ACCapacityformat | 0x0047 | +| * PresetTypes | 0x0048 | +| * ScheduleTypes | 0x0049 | +| * NumberOfPresets | 0x004A | +| * NumberOfSchedules | 0x004B | +| * NumberOfScheduleTransitions | 0x004C | +| * NumberOfScheduleTransitionPerDay | 0x004D | +| * ActivePresetHandle | 0x004E | +| * ActiveScheduleHandle | 0x004F | +| * Presets | 0x0050 | +| * Schedules | 0x0051 | +| * PresetsSchedulesEditable | 0x0052 | +| * TemperatureSetpointHoldPolicy | 0x0053 | +| * SetpointHoldExpiryTimestamp | 0x0054 | +| * QueuedPreset | 0x0055 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -8935,23 +8964,295 @@ class BarrierControlBarrierControlStop : public ClusterCommand \*----------------------------------------------------------------------------*/ /* - * Command SetpointRaiseLower + * Command SetpointRaiseLower + */ +class ThermostatSetpointRaiseLower : public ClusterCommand +{ +public: + ThermostatSetpointRaiseLower(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("setpoint-raise-lower", credsIssuerConfig) + { + AddArgument("Mode", 0, UINT8_MAX, &mRequest.mode); + AddArgument("Amount", INT8_MIN, INT8_MAX, &mRequest.amount); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::SetpointRaiseLower::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::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::SetpointRaiseLower::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::Thermostat::Commands::SetpointRaiseLower::Type mRequest; +}; + +/* + * Command SetWeeklySchedule + */ +class ThermostatSetWeeklySchedule : public ClusterCommand +{ +public: + ThermostatSetWeeklySchedule(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("set-weekly-schedule", credsIssuerConfig), mComplex_Transitions(&mRequest.transitions) + { + AddArgument("NumberOfTransitionsForSequence", 0, UINT8_MAX, &mRequest.numberOfTransitionsForSequence); + AddArgument("DayOfWeekForSequence", 0, UINT8_MAX, &mRequest.dayOfWeekForSequence); + AddArgument("ModeForSequence", 0, UINT8_MAX, &mRequest.modeForSequence); + AddArgument("Transitions", &mComplex_Transitions); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::SetWeeklySchedule::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::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::SetWeeklySchedule::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::Thermostat::Commands::SetWeeklySchedule::Type mRequest; + TypedComplexArgument< + chip::app::DataModel::List> + mComplex_Transitions; +}; + +/* + * Command GetWeeklySchedule + */ +class ThermostatGetWeeklySchedule : public ClusterCommand +{ +public: + ThermostatGetWeeklySchedule(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("get-weekly-schedule", credsIssuerConfig) + { + AddArgument("DaysToReturn", 0, UINT8_MAX, &mRequest.daysToReturn); + AddArgument("ModeToReturn", 0, UINT8_MAX, &mRequest.modeToReturn); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::GetWeeklySchedule::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::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::GetWeeklySchedule::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::Thermostat::Commands::GetWeeklySchedule::Type mRequest; +}; + +/* + * Command ClearWeeklySchedule + */ +class ThermostatClearWeeklySchedule : public ClusterCommand +{ +public: + ThermostatClearWeeklySchedule(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("clear-weekly-schedule", credsIssuerConfig) + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::ClearWeeklySchedule::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::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::ClearWeeklySchedule::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::Thermostat::Commands::ClearWeeklySchedule::Type mRequest; +}; + +/* + * Command SetActiveScheduleRequest + */ +class ThermostatSetActiveScheduleRequest : public ClusterCommand +{ +public: + ThermostatSetActiveScheduleRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("set-active-schedule-request", credsIssuerConfig) + { + AddArgument("ScheduleHandle", &mRequest.scheduleHandle); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::SetActiveScheduleRequest::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::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::SetActiveScheduleRequest::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::Thermostat::Commands::SetActiveScheduleRequest::Type mRequest; +}; + +/* + * Command SetActivePresetRequest + */ +class ThermostatSetActivePresetRequest : public ClusterCommand +{ +public: + ThermostatSetActivePresetRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("set-active-preset-request", credsIssuerConfig) + { + AddArgument("PresetHandle", &mRequest.presetHandle); + AddArgument("DelayMinutes", 0, UINT16_MAX, &mRequest.delayMinutes); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::SetActivePresetRequest::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::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::SetActivePresetRequest::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::Thermostat::Commands::SetActivePresetRequest::Type mRequest; +}; + +/* + * Command StartPresetsSchedulesEditRequest + */ +class ThermostatStartPresetsSchedulesEditRequest : public ClusterCommand +{ +public: + ThermostatStartPresetsSchedulesEditRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("start-presets-schedules-edit-request", credsIssuerConfig) + { + AddArgument("TimeoutSeconds", 0, UINT16_MAX, &mRequest.timeoutSeconds); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::StartPresetsSchedulesEditRequest::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::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::StartPresetsSchedulesEditRequest::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::Thermostat::Commands::StartPresetsSchedulesEditRequest::Type mRequest; +}; + +/* + * Command CancelPresetsSchedulesEditRequest */ -class ThermostatSetpointRaiseLower : public ClusterCommand +class ThermostatCancelPresetsSchedulesEditRequest : public ClusterCommand { public: - ThermostatSetpointRaiseLower(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("setpoint-raise-lower", credsIssuerConfig) + ThermostatCancelPresetsSchedulesEditRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("cancel-presets-schedules-edit-request", credsIssuerConfig) { - AddArgument("Mode", 0, UINT8_MAX, &mRequest.mode); - AddArgument("Amount", INT8_MIN, INT8_MAX, &mRequest.amount); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::SetpointRaiseLower::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::CancelPresetsSchedulesEditRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -8961,7 +9262,7 @@ class ThermostatSetpointRaiseLower : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::SetpointRaiseLower::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::CancelPresetsSchedulesEditRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -8970,29 +9271,25 @@ class ThermostatSetpointRaiseLower : public ClusterCommand } private: - chip::app::Clusters::Thermostat::Commands::SetpointRaiseLower::Type mRequest; + chip::app::Clusters::Thermostat::Commands::CancelPresetsSchedulesEditRequest::Type mRequest; }; /* - * Command SetWeeklySchedule + * Command CommitPresetsSchedulesRequest */ -class ThermostatSetWeeklySchedule : public ClusterCommand +class ThermostatCommitPresetsSchedulesRequest : public ClusterCommand { public: - ThermostatSetWeeklySchedule(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("set-weekly-schedule", credsIssuerConfig), mComplex_Transitions(&mRequest.transitions) + ThermostatCommitPresetsSchedulesRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("commit-presets-schedules-request", credsIssuerConfig) { - AddArgument("NumberOfTransitionsForSequence", 0, UINT8_MAX, &mRequest.numberOfTransitionsForSequence); - AddArgument("DayOfWeekForSequence", 0, UINT8_MAX, &mRequest.dayOfWeekForSequence); - AddArgument("ModeForSequence", 0, UINT8_MAX, &mRequest.modeForSequence); - AddArgument("Transitions", &mComplex_Transitions); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::SetWeeklySchedule::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::CommitPresetsSchedulesRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -9002,7 +9299,7 @@ class ThermostatSetWeeklySchedule : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::SetWeeklySchedule::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::CommitPresetsSchedulesRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -9011,30 +9308,25 @@ class ThermostatSetWeeklySchedule : public ClusterCommand } private: - chip::app::Clusters::Thermostat::Commands::SetWeeklySchedule::Type mRequest; - TypedComplexArgument< - chip::app::DataModel::List> - mComplex_Transitions; + chip::app::Clusters::Thermostat::Commands::CommitPresetsSchedulesRequest::Type mRequest; }; /* - * Command GetWeeklySchedule + * Command CancelSetActivePresetRequest */ -class ThermostatGetWeeklySchedule : public ClusterCommand +class ThermostatCancelSetActivePresetRequest : public ClusterCommand { public: - ThermostatGetWeeklySchedule(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("get-weekly-schedule", credsIssuerConfig) + ThermostatCancelSetActivePresetRequest(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("cancel-set-active-preset-request", credsIssuerConfig) { - AddArgument("DaysToReturn", 0, UINT8_MAX, &mRequest.daysToReturn); - AddArgument("ModeToReturn", 0, UINT8_MAX, &mRequest.modeToReturn); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::GetWeeklySchedule::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::CancelSetActivePresetRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -9044,7 +9336,7 @@ class ThermostatGetWeeklySchedule : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::GetWeeklySchedule::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::CancelSetActivePresetRequest::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -9053,25 +9345,26 @@ class ThermostatGetWeeklySchedule : public ClusterCommand } private: - chip::app::Clusters::Thermostat::Commands::GetWeeklySchedule::Type mRequest; + chip::app::Clusters::Thermostat::Commands::CancelSetActivePresetRequest::Type mRequest; }; /* - * Command ClearWeeklySchedule + * Command SetTemperatureSetpointHoldPolicy */ -class ThermostatClearWeeklySchedule : public ClusterCommand +class ThermostatSetTemperatureSetpointHoldPolicy : public ClusterCommand { public: - ThermostatClearWeeklySchedule(CredentialIssuerCommands * credsIssuerConfig) : - ClusterCommand("clear-weekly-schedule", credsIssuerConfig) + ThermostatSetTemperatureSetpointHoldPolicy(CredentialIssuerCommands * credsIssuerConfig) : + ClusterCommand("set-temperature-setpoint-hold-policy", credsIssuerConfig) { + AddArgument("TemperatureSetpointHoldPolicy", 0, UINT8_MAX, &mRequest.temperatureSetpointHoldPolicy); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(chip::DeviceProxy * device, std::vector endpointIds) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::ClearWeeklySchedule::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::SetTemperatureSetpointHoldPolicy::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointIds.at(0)); @@ -9081,7 +9374,7 @@ class ThermostatClearWeeklySchedule : public ClusterCommand CHIP_ERROR SendGroupCommand(chip::GroupId groupId, chip::FabricIndex fabricIndex) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::ClearWeeklySchedule::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::SetTemperatureSetpointHoldPolicy::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on Group %u", clusterId, commandId, groupId); @@ -9090,7 +9383,7 @@ class ThermostatClearWeeklySchedule : public ClusterCommand } private: - chip::app::Clusters::Thermostat::Commands::ClearWeeklySchedule::Type mRequest; + chip::app::Clusters::Thermostat::Commands::SetTemperatureSetpointHoldPolicy::Type mRequest; }; /*----------------------------------------------------------------------------*\ @@ -14267,101 +14560,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; @@ -18988,10 +19186,14 @@ void registerClusterMicrowaveOvenControl(Commands & commands, CredentialIssuerCo // make_unique(Id, credsIssuerConfig), // make_unique(Id, "cook-time", Attributes::CookTime::Id, credsIssuerConfig), // + make_unique(Id, "max-cook-time", Attributes::MaxCookTime::Id, credsIssuerConfig), // make_unique(Id, "power-setting", Attributes::PowerSetting::Id, credsIssuerConfig), // make_unique(Id, "min-power", Attributes::MinPower::Id, credsIssuerConfig), // make_unique(Id, "max-power", Attributes::MaxPower::Id, credsIssuerConfig), // make_unique(Id, "power-step", Attributes::PowerStep::Id, credsIssuerConfig), // + make_unique(Id, "supported-watts", Attributes::SupportedWatts::Id, credsIssuerConfig), // + make_unique(Id, "selected-watt-index", Attributes::SelectedWattIndex::Id, credsIssuerConfig), // + make_unique(Id, "watt-rating", Attributes::WattRating::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), // @@ -19001,6 +19203,8 @@ void registerClusterMicrowaveOvenControl(Commands & commands, CredentialIssuerCo make_unique>(Id, credsIssuerConfig), // make_unique>(Id, "cook-time", 0, UINT32_MAX, Attributes::CookTime::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "max-cook-time", 0, UINT32_MAX, Attributes::MaxCookTime::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "power-setting", 0, UINT8_MAX, Attributes::PowerSetting::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>(Id, "min-power", 0, UINT8_MAX, Attributes::MinPower::Id, WriteCommandType::kForceWrite, @@ -19009,6 +19213,12 @@ void registerClusterMicrowaveOvenControl(Commands & commands, CredentialIssuerCo credsIssuerConfig), // make_unique>(Id, "power-step", 0, UINT8_MAX, Attributes::PowerStep::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "supported-watts", Attributes::SupportedWatts::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "selected-watt-index", 0, UINT8_MAX, Attributes::SelectedWattIndex::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "watt-rating", 0, UINT16_MAX, Attributes::WattRating::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -19024,10 +19234,14 @@ void registerClusterMicrowaveOvenControl(Commands & commands, CredentialIssuerCo WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // make_unique(Id, "cook-time", Attributes::CookTime::Id, credsIssuerConfig), // + make_unique(Id, "max-cook-time", Attributes::MaxCookTime::Id, credsIssuerConfig), // make_unique(Id, "power-setting", Attributes::PowerSetting::Id, credsIssuerConfig), // make_unique(Id, "min-power", Attributes::MinPower::Id, credsIssuerConfig), // make_unique(Id, "max-power", Attributes::MaxPower::Id, credsIssuerConfig), // make_unique(Id, "power-step", Attributes::PowerStep::Id, credsIssuerConfig), // + make_unique(Id, "supported-watts", Attributes::SupportedWatts::Id, credsIssuerConfig), // + make_unique(Id, "selected-watt-index", Attributes::SelectedWattIndex::Id, credsIssuerConfig), // + make_unique(Id, "watt-rating", Attributes::WattRating::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), // @@ -19216,6 +19430,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; @@ -20967,11 +21276,18 @@ void registerClusterThermostat(Commands & commands, CredentialIssuerCommands * c // // Commands // - make_unique(Id, credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // - make_unique(credsIssuerConfig), // + 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), // + make_unique(credsIssuerConfig), // // // Attributes // @@ -21039,6 +21355,25 @@ void registerClusterThermostat(Commands & commands, CredentialIssuerCommands * c make_unique(Id, "aclouver-position", Attributes::ACLouverPosition::Id, credsIssuerConfig), // make_unique(Id, "accoil-temperature", Attributes::ACCoilTemperature::Id, credsIssuerConfig), // make_unique(Id, "accapacityformat", Attributes::ACCapacityformat::Id, credsIssuerConfig), // + make_unique(Id, "preset-types", Attributes::PresetTypes::Id, credsIssuerConfig), // + make_unique(Id, "schedule-types", Attributes::ScheduleTypes::Id, credsIssuerConfig), // + make_unique(Id, "number-of-presets", Attributes::NumberOfPresets::Id, credsIssuerConfig), // + make_unique(Id, "number-of-schedules", Attributes::NumberOfSchedules::Id, credsIssuerConfig), // + make_unique(Id, "number-of-schedule-transitions", Attributes::NumberOfScheduleTransitions::Id, + credsIssuerConfig), // + make_unique(Id, "number-of-schedule-transition-per-day", Attributes::NumberOfScheduleTransitionPerDay::Id, + credsIssuerConfig), // + make_unique(Id, "active-preset-handle", Attributes::ActivePresetHandle::Id, credsIssuerConfig), // + make_unique(Id, "active-schedule-handle", Attributes::ActiveScheduleHandle::Id, credsIssuerConfig), // + make_unique(Id, "presets", Attributes::Presets::Id, credsIssuerConfig), // + make_unique(Id, "schedules", Attributes::Schedules::Id, credsIssuerConfig), // + make_unique(Id, "presets-schedules-editable", Attributes::PresetsSchedulesEditable::Id, + credsIssuerConfig), // + make_unique(Id, "temperature-setpoint-hold-policy", Attributes::TemperatureSetpointHoldPolicy::Id, + credsIssuerConfig), // + make_unique(Id, "setpoint-hold-expiry-timestamp", Attributes::SetpointHoldExpiryTimestamp::Id, + credsIssuerConfig), // + make_unique(Id, "queued-preset", Attributes::QueuedPreset::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), // @@ -21176,6 +21511,44 @@ void registerClusterThermostat(Commands & commands, CredentialIssuerCommands * c WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>( Id, "accapacityformat", 0, UINT8_MAX, Attributes::ACCapacityformat::Id, WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>>( + Id, "preset-types", Attributes::PresetTypes::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "schedule-types", Attributes::ScheduleTypes::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "number-of-presets", 0, UINT8_MAX, Attributes::NumberOfPresets::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "number-of-schedules", 0, UINT8_MAX, Attributes::NumberOfSchedules::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>(Id, "number-of-schedule-transitions", 0, UINT8_MAX, + Attributes::NumberOfScheduleTransitions::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "number-of-schedule-transition-per-day", 0, UINT8_MAX, Attributes::NumberOfScheduleTransitionPerDay::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "active-preset-handle", Attributes::ActivePresetHandle::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "active-schedule-handle", Attributes::ActiveScheduleHandle::Id, WriteCommandType::kForceWrite, + credsIssuerConfig), // + make_unique>>( + Id, "presets", Attributes::Presets::Id, WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>>( + Id, "schedules", Attributes::Schedules::Id, WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>(Id, "presets-schedules-editable", 0, 1, Attributes::PresetsSchedulesEditable::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "temperature-setpoint-hold-policy", 0, UINT8_MAX, Attributes::TemperatureSetpointHoldPolicy::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>(Id, "setpoint-hold-expiry-timestamp", 0, UINT32_MAX, + Attributes::SetpointHoldExpiryTimestamp::Id, + WriteCommandType::kForceWrite, credsIssuerConfig), // + make_unique>>( + Id, "queued-preset", Attributes::QueuedPreset::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "generated-command-list", Attributes::GeneratedCommandList::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -21257,6 +21630,25 @@ void registerClusterThermostat(Commands & commands, CredentialIssuerCommands * c make_unique(Id, "aclouver-position", Attributes::ACLouverPosition::Id, credsIssuerConfig), // make_unique(Id, "accoil-temperature", Attributes::ACCoilTemperature::Id, credsIssuerConfig), // make_unique(Id, "accapacityformat", Attributes::ACCapacityformat::Id, credsIssuerConfig), // + make_unique(Id, "preset-types", Attributes::PresetTypes::Id, credsIssuerConfig), // + make_unique(Id, "schedule-types", Attributes::ScheduleTypes::Id, credsIssuerConfig), // + make_unique(Id, "number-of-presets", Attributes::NumberOfPresets::Id, credsIssuerConfig), // + make_unique(Id, "number-of-schedules", Attributes::NumberOfSchedules::Id, credsIssuerConfig), // + make_unique(Id, "number-of-schedule-transitions", Attributes::NumberOfScheduleTransitions::Id, + credsIssuerConfig), // + make_unique(Id, "number-of-schedule-transition-per-day", + Attributes::NumberOfScheduleTransitionPerDay::Id, credsIssuerConfig), // + make_unique(Id, "active-preset-handle", Attributes::ActivePresetHandle::Id, credsIssuerConfig), // + make_unique(Id, "active-schedule-handle", Attributes::ActiveScheduleHandle::Id, credsIssuerConfig), // + make_unique(Id, "presets", Attributes::Presets::Id, credsIssuerConfig), // + make_unique(Id, "schedules", Attributes::Schedules::Id, credsIssuerConfig), // + make_unique(Id, "presets-schedules-editable", Attributes::PresetsSchedulesEditable::Id, + credsIssuerConfig), // + make_unique(Id, "temperature-setpoint-hold-policy", Attributes::TemperatureSetpointHoldPolicy::Id, + credsIssuerConfig), // + make_unique(Id, "setpoint-hold-expiry-timestamp", Attributes::SetpointHoldExpiryTimestamp::Id, + credsIssuerConfig), // + make_unique(Id, "queued-preset", Attributes::QueuedPreset::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), // @@ -25701,7 +26093,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); @@ -25760,6 +26151,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 acbd349dc09dfc..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, @@ -3313,6 +3315,305 @@ void ComplexArgumentParser::Finalize(chip::app::Clusters::DoorLock::Structs::Cre ComplexArgumentParser::Finalize(request.credentialIndex); } +CHIP_ERROR ComplexArgumentParser::Setup(const char * label, + chip::app::Clusters::Thermostat::Structs::ScheduleTransitionStruct::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("ScheduleTransitionStruct.dayOfWeek", "dayOfWeek", value.isMember("dayOfWeek"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ScheduleTransitionStruct.transitionTime", "transitionTime", + value.isMember("transitionTime"))); + + char labelWithMember[kMaxLabelLength]; + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "dayOfWeek"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.dayOfWeek, value["dayOfWeek"])); + valueCopy.removeMember("dayOfWeek"); + + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "transitionTime"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.transitionTime, value["transitionTime"])); + valueCopy.removeMember("transitionTime"); + + if (value.isMember("presetHandle")) + { + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "presetHandle"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.presetHandle, value["presetHandle"])); + } + valueCopy.removeMember("presetHandle"); + + if (value.isMember("systemMode")) + { + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "systemMode"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.systemMode, value["systemMode"])); + } + valueCopy.removeMember("systemMode"); + + if (value.isMember("coolingSetpoint")) + { + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "coolingSetpoint"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.coolingSetpoint, value["coolingSetpoint"])); + } + valueCopy.removeMember("coolingSetpoint"); + + if (value.isMember("heatingSetpoint")) + { + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "heatingSetpoint"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.heatingSetpoint, value["heatingSetpoint"])); + } + valueCopy.removeMember("heatingSetpoint"); + + return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy); +} + +void ComplexArgumentParser::Finalize(chip::app::Clusters::Thermostat::Structs::ScheduleTransitionStruct::Type & request) +{ + ComplexArgumentParser::Finalize(request.dayOfWeek); + ComplexArgumentParser::Finalize(request.transitionTime); + ComplexArgumentParser::Finalize(request.presetHandle); + ComplexArgumentParser::Finalize(request.systemMode); + ComplexArgumentParser::Finalize(request.coolingSetpoint); + ComplexArgumentParser::Finalize(request.heatingSetpoint); +} + +CHIP_ERROR ComplexArgumentParser::Setup(const char * label, + chip::app::Clusters::Thermostat::Structs::ScheduleStruct::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("ScheduleStruct.scheduleHandle", "scheduleHandle", + value.isMember("scheduleHandle"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("ScheduleStruct.systemMode", "systemMode", value.isMember("systemMode"))); + ReturnErrorOnFailure( + ComplexArgumentParser::EnsureMemberExist("ScheduleStruct.transitions", "transitions", value.isMember("transitions"))); + + char labelWithMember[kMaxLabelLength]; + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "scheduleHandle"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.scheduleHandle, value["scheduleHandle"])); + valueCopy.removeMember("scheduleHandle"); + + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "systemMode"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.systemMode, value["systemMode"])); + valueCopy.removeMember("systemMode"); + + if (value.isMember("name")) + { + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "name"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.name, value["name"])); + } + valueCopy.removeMember("name"); + + if (value.isMember("presetHandle")) + { + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "presetHandle"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.presetHandle, value["presetHandle"])); + } + valueCopy.removeMember("presetHandle"); + + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "transitions"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.transitions, value["transitions"])); + valueCopy.removeMember("transitions"); + + if (value.isMember("builtIn")) + { + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "builtIn"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.builtIn, value["builtIn"])); + } + valueCopy.removeMember("builtIn"); + + return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy); +} + +void ComplexArgumentParser::Finalize(chip::app::Clusters::Thermostat::Structs::ScheduleStruct::Type & request) +{ + ComplexArgumentParser::Finalize(request.scheduleHandle); + ComplexArgumentParser::Finalize(request.systemMode); + ComplexArgumentParser::Finalize(request.name); + ComplexArgumentParser::Finalize(request.presetHandle); + ComplexArgumentParser::Finalize(request.transitions); + ComplexArgumentParser::Finalize(request.builtIn); +} + +CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::Thermostat::Structs::PresetStruct::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("PresetStruct.presetHandle", "presetHandle", value.isMember("presetHandle"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("PresetStruct.presetScenario", "presetScenario", + value.isMember("presetScenario"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("PresetStruct.builtIn", "builtIn", value.isMember("builtIn"))); + + char labelWithMember[kMaxLabelLength]; + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "presetHandle"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.presetHandle, value["presetHandle"])); + valueCopy.removeMember("presetHandle"); + + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "presetScenario"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.presetScenario, value["presetScenario"])); + valueCopy.removeMember("presetScenario"); + + if (value.isMember("name")) + { + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "name"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.name, value["name"])); + } + valueCopy.removeMember("name"); + + if (value.isMember("coolingSetpoint")) + { + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "coolingSetpoint"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.coolingSetpoint, value["coolingSetpoint"])); + } + valueCopy.removeMember("coolingSetpoint"); + + if (value.isMember("heatingSetpoint")) + { + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "heatingSetpoint"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.heatingSetpoint, value["heatingSetpoint"])); + } + valueCopy.removeMember("heatingSetpoint"); + + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "builtIn"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.builtIn, value["builtIn"])); + valueCopy.removeMember("builtIn"); + + return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy); +} + +void ComplexArgumentParser::Finalize(chip::app::Clusters::Thermostat::Structs::PresetStruct::Type & request) +{ + ComplexArgumentParser::Finalize(request.presetHandle); + ComplexArgumentParser::Finalize(request.presetScenario); + ComplexArgumentParser::Finalize(request.name); + ComplexArgumentParser::Finalize(request.coolingSetpoint); + ComplexArgumentParser::Finalize(request.heatingSetpoint); + ComplexArgumentParser::Finalize(request.builtIn); +} + +CHIP_ERROR ComplexArgumentParser::Setup(const char * label, + chip::app::Clusters::Thermostat::Structs::PresetTypeStruct::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("PresetTypeStruct.presetScenario", "presetScenario", + value.isMember("presetScenario"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("PresetTypeStruct.numberOfPresets", "numberOfPresets", + value.isMember("numberOfPresets"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("PresetTypeStruct.presetTypeFeatures", "presetTypeFeatures", + value.isMember("presetTypeFeatures"))); + + char labelWithMember[kMaxLabelLength]; + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "presetScenario"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.presetScenario, value["presetScenario"])); + valueCopy.removeMember("presetScenario"); + + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "numberOfPresets"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.numberOfPresets, value["numberOfPresets"])); + valueCopy.removeMember("numberOfPresets"); + + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "presetTypeFeatures"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.presetTypeFeatures, value["presetTypeFeatures"])); + valueCopy.removeMember("presetTypeFeatures"); + + return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy); +} + +void ComplexArgumentParser::Finalize(chip::app::Clusters::Thermostat::Structs::PresetTypeStruct::Type & request) +{ + ComplexArgumentParser::Finalize(request.presetScenario); + ComplexArgumentParser::Finalize(request.numberOfPresets); + ComplexArgumentParser::Finalize(request.presetTypeFeatures); +} + +CHIP_ERROR ComplexArgumentParser::Setup(const char * label, + chip::app::Clusters::Thermostat::Structs::QueuedPresetStruct::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("QueuedPresetStruct.presetHandle", "presetHandle", + value.isMember("presetHandle"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("QueuedPresetStruct.transitionTimestamp", "transitionTimestamp", + value.isMember("transitionTimestamp"))); + + char labelWithMember[kMaxLabelLength]; + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "presetHandle"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.presetHandle, value["presetHandle"])); + valueCopy.removeMember("presetHandle"); + + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "transitionTimestamp"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.transitionTimestamp, value["transitionTimestamp"])); + valueCopy.removeMember("transitionTimestamp"); + + return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy); +} + +void ComplexArgumentParser::Finalize(chip::app::Clusters::Thermostat::Structs::QueuedPresetStruct::Type & request) +{ + ComplexArgumentParser::Finalize(request.presetHandle); + ComplexArgumentParser::Finalize(request.transitionTimestamp); +} + +CHIP_ERROR ComplexArgumentParser::Setup(const char * label, + chip::app::Clusters::Thermostat::Structs::ScheduleTypeStruct::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("ScheduleTypeStruct.systemMode", "systemMode", value.isMember("systemMode"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ScheduleTypeStruct.numberOfSchedules", "numberOfSchedules", + value.isMember("numberOfSchedules"))); + ReturnErrorOnFailure(ComplexArgumentParser::EnsureMemberExist("ScheduleTypeStruct.scheduleTypeFeatures", "scheduleTypeFeatures", + value.isMember("scheduleTypeFeatures"))); + + char labelWithMember[kMaxLabelLength]; + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "systemMode"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.systemMode, value["systemMode"])); + valueCopy.removeMember("systemMode"); + + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "numberOfSchedules"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.numberOfSchedules, value["numberOfSchedules"])); + valueCopy.removeMember("numberOfSchedules"); + + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "scheduleTypeFeatures"); + ReturnErrorOnFailure( + ComplexArgumentParser::Setup(labelWithMember, request.scheduleTypeFeatures, value["scheduleTypeFeatures"])); + valueCopy.removeMember("scheduleTypeFeatures"); + + return ComplexArgumentParser::EnsureNoMembersRemaining(label, valueCopy); +} + +void ComplexArgumentParser::Finalize(chip::app::Clusters::Thermostat::Structs::ScheduleTypeStruct::Type & request) +{ + ComplexArgumentParser::Finalize(request.systemMode); + ComplexArgumentParser::Finalize(request.numberOfSchedules); + ComplexArgumentParser::Finalize(request.scheduleTypeFeatures); +} + CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters::Thermostat::Structs::WeeklyScheduleTransitionStruct::Type & request, Json::Value & value) diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.h index 445524c97f85e4..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); @@ -388,6 +388,36 @@ static CHIP_ERROR Setup(const char * label, chip::app::Clusters::DoorLock::Struc static void Finalize(chip::app::Clusters::DoorLock::Structs::CredentialStruct::Type & request); +static CHIP_ERROR Setup(const char * label, chip::app::Clusters::Thermostat::Structs::ScheduleTransitionStruct::Type & request, + Json::Value & value); + +static void Finalize(chip::app::Clusters::Thermostat::Structs::ScheduleTransitionStruct::Type & request); + +static CHIP_ERROR Setup(const char * label, chip::app::Clusters::Thermostat::Structs::ScheduleStruct::Type & request, + Json::Value & value); + +static void Finalize(chip::app::Clusters::Thermostat::Structs::ScheduleStruct::Type & request); + +static CHIP_ERROR Setup(const char * label, chip::app::Clusters::Thermostat::Structs::PresetStruct::Type & request, + Json::Value & value); + +static void Finalize(chip::app::Clusters::Thermostat::Structs::PresetStruct::Type & request); + +static CHIP_ERROR Setup(const char * label, chip::app::Clusters::Thermostat::Structs::PresetTypeStruct::Type & request, + Json::Value & value); + +static void Finalize(chip::app::Clusters::Thermostat::Structs::PresetTypeStruct::Type & request); + +static CHIP_ERROR Setup(const char * label, chip::app::Clusters::Thermostat::Structs::QueuedPresetStruct::Type & request, + Json::Value & value); + +static void Finalize(chip::app::Clusters::Thermostat::Structs::QueuedPresetStruct::Type & request); + +static CHIP_ERROR Setup(const char * label, chip::app::Clusters::Thermostat::Structs::ScheduleTypeStruct::Type & request, + Json::Value & value); + +static void Finalize(chip::app::Clusters::Thermostat::Structs::ScheduleTypeStruct::Type & request); + static CHIP_ERROR Setup(const char * label, chip::app::Clusters::Thermostat::Structs::WeeklyScheduleTransitionStruct::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 2da87471d0a3c0..d38c78eded3f2b 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) @@ -2703,26 +2704,293 @@ DataModelLogger::LogValue(const char * label, size_t indent, } } { - CHIP_ERROR err = LogValue("LatestEndTime", indent + 1, value.latestEndTime); + CHIP_ERROR err = LogValue("LatestEndTime", indent + 1, value.latestEndTime); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'LatestEndTime'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("IsPauseable", indent + 1, value.isPauseable); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'IsPauseable'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("Slots", indent + 1, value.slots); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Slots'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR +DataModelLogger::LogValue(const char * label, size_t indent, + const chip::app::Clusters::DeviceEnergyManagement::Structs::ConstraintsStruct::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = LogValue("StartTime", indent + 1, value.startTime); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'StartTime'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("Duration", indent + 1, value.duration); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Duration'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("NominalPower", indent + 1, value.nominalPower); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'NominalPower'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("MaximumEnergy", indent + 1, value.maximumEnergy); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'MaximumEnergy'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("LoadControl", indent + 1, value.loadControl); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'LoadControl'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR +DataModelLogger::LogValue(const char * label, size_t indent, + const chip::app::Clusters::DeviceEnergyManagement::Structs::PowerAdjustStruct::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = LogValue("MinPower", indent + 1, value.minPower); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'MinPower'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("MaxPower", indent + 1, value.maxPower); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'MaxPower'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("MinDuration", indent + 1, value.minDuration); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'MinDuration'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("MaxDuration", indent + 1, value.maxDuration); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'MaxDuration'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR +DataModelLogger::LogValue(const char * label, size_t indent, + const chip::app::Clusters::DeviceEnergyManagement::Structs::SlotAdjustmentStruct::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = LogValue("SlotIndex", indent + 1, value.slotIndex); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'SlotIndex'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("NominalPower", indent + 1, value.nominalPower); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'NominalPower'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("Duration", indent + 1, value.duration); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Duration'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const chip::app::Clusters::EnergyEvse::Structs::ChargingTargetStruct::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = LogValue("TargetTimeMinutesPastMidnight", indent + 1, value.targetTimeMinutesPastMidnight); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'TargetTimeMinutesPastMidnight'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("TargetSoC", indent + 1, value.targetSoC); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'TargetSoC'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("AddedEnergy", indent + 1, value.addedEnergy); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'AddedEnergy'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const chip::app::Clusters::EnergyPreference::Structs::BalanceStruct::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = LogValue("Step", indent + 1, value.step); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Step'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("Label", indent + 1, value.label); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Label'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const chip::app::Clusters::DoorLock::Structs::CredentialStruct::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = LogValue("CredentialType", indent + 1, value.credentialType); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'CredentialType'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("CredentialIndex", indent + 1, value.credentialIndex); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'CredentialIndex'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR +DataModelLogger::LogValue(const char * label, size_t indent, + const chip::app::Clusters::Thermostat::Structs::ScheduleTransitionStruct::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = LogValue("DayOfWeek", indent + 1, value.dayOfWeek); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'DayOfWeek'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("TransitionTime", indent + 1, value.transitionTime); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'TransitionTime'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("PresetHandle", indent + 1, value.presetHandle); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'PresetHandle'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("SystemMode", indent + 1, value.systemMode); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'LatestEndTime'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'SystemMode'"); return err; } } { - CHIP_ERROR err = LogValue("IsPauseable", indent + 1, value.isPauseable); + CHIP_ERROR err = LogValue("CoolingSetpoint", indent + 1, value.coolingSetpoint); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'IsPauseable'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'CoolingSetpoint'"); return err; } } { - CHIP_ERROR err = LogValue("Slots", indent + 1, value.slots); + CHIP_ERROR err = LogValue("HeatingSetpoint", indent + 1, value.heatingSetpoint); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Slots'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'HeatingSetpoint'"); return err; } } @@ -2731,48 +2999,55 @@ 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::DeviceEnergyManagement::Structs::ConstraintsStruct::DecodableType & value) +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const chip::app::Clusters::Thermostat::Structs::ScheduleStruct::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = LogValue("StartTime", indent + 1, value.startTime); + CHIP_ERROR err = LogValue("ScheduleHandle", indent + 1, value.scheduleHandle); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'StartTime'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'ScheduleHandle'"); return err; } } { - CHIP_ERROR err = LogValue("Duration", indent + 1, value.duration); + CHIP_ERROR err = LogValue("SystemMode", indent + 1, value.systemMode); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Duration'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'SystemMode'"); return err; } } { - CHIP_ERROR err = LogValue("NominalPower", indent + 1, value.nominalPower); + CHIP_ERROR err = LogValue("Name", indent + 1, value.name); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'NominalPower'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Name'"); return err; } } { - CHIP_ERROR err = LogValue("MaximumEnergy", indent + 1, value.maximumEnergy); + CHIP_ERROR err = LogValue("PresetHandle", indent + 1, value.presetHandle); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'MaximumEnergy'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'PresetHandle'"); return err; } } { - CHIP_ERROR err = LogValue("LoadControl", indent + 1, value.loadControl); + CHIP_ERROR err = LogValue("Transitions", indent + 1, value.transitions); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'LoadControl'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Transitions'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("BuiltIn", indent + 1, value.builtIn); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'BuiltIn'"); return err; } } @@ -2781,74 +3056,55 @@ 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::DeviceEnergyManagement::Structs::PowerAdjustStruct::DecodableType & value) +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const chip::app::Clusters::Thermostat::Structs::PresetStruct::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = LogValue("MinPower", indent + 1, value.minPower); - if (err != CHIP_NO_ERROR) - { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'MinPower'"); - return err; - } - } - { - CHIP_ERROR err = LogValue("MaxPower", indent + 1, value.maxPower); + CHIP_ERROR err = LogValue("PresetHandle", indent + 1, value.presetHandle); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'MaxPower'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'PresetHandle'"); return err; } } { - CHIP_ERROR err = LogValue("MinDuration", indent + 1, value.minDuration); + CHIP_ERROR err = LogValue("PresetScenario", indent + 1, value.presetScenario); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'MinDuration'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'PresetScenario'"); return err; } } { - CHIP_ERROR err = LogValue("MaxDuration", indent + 1, value.maxDuration); + CHIP_ERROR err = LogValue("Name", indent + 1, value.name); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'MaxDuration'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Name'"); return err; } } - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} - -CHIP_ERROR -DataModelLogger::LogValue(const char * label, size_t indent, - const chip::app::Clusters::DeviceEnergyManagement::Structs::SlotAdjustmentStruct::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = LogValue("SlotIndex", indent + 1, value.slotIndex); + CHIP_ERROR err = LogValue("CoolingSetpoint", indent + 1, value.coolingSetpoint); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'SlotIndex'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'CoolingSetpoint'"); return err; } } { - CHIP_ERROR err = LogValue("NominalPower", indent + 1, value.nominalPower); + CHIP_ERROR err = LogValue("HeatingSetpoint", indent + 1, value.heatingSetpoint); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'NominalPower'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'HeatingSetpoint'"); return err; } } { - CHIP_ERROR err = LogValue("Duration", indent + 1, value.duration); + CHIP_ERROR err = LogValue("BuiltIn", indent + 1, value.builtIn); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Duration'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'BuiltIn'"); return err; } } @@ -2858,30 +3114,30 @@ DataModelLogger::LogValue(const char * label, size_t indent, } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const chip::app::Clusters::EnergyEvse::Structs::ChargingTargetStruct::DecodableType & value) + const chip::app::Clusters::Thermostat::Structs::PresetTypeStruct::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = LogValue("TargetTimeMinutesPastMidnight", indent + 1, value.targetTimeMinutesPastMidnight); + CHIP_ERROR err = LogValue("PresetScenario", indent + 1, value.presetScenario); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'TargetTimeMinutesPastMidnight'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'PresetScenario'"); return err; } } { - CHIP_ERROR err = LogValue("TargetSoC", indent + 1, value.targetSoC); + CHIP_ERROR err = LogValue("NumberOfPresets", indent + 1, value.numberOfPresets); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'TargetSoC'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'NumberOfPresets'"); return err; } } { - CHIP_ERROR err = LogValue("AddedEnergy", indent + 1, value.addedEnergy); + CHIP_ERROR err = LogValue("PresetTypeFeatures", indent + 1, value.presetTypeFeatures); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'AddedEnergy'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'PresetTypeFeatures'"); return err; } } @@ -2891,22 +3147,22 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const chip::app::Clusters::EnergyPreference::Structs::BalanceStruct::DecodableType & value) + const chip::app::Clusters::Thermostat::Structs::QueuedPresetStruct::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = LogValue("Step", indent + 1, value.step); + CHIP_ERROR err = LogValue("PresetHandle", indent + 1, value.presetHandle); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Step'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'PresetHandle'"); return err; } } { - CHIP_ERROR err = LogValue("Label", indent + 1, value.label); + CHIP_ERROR err = LogValue("TransitionTimestamp", indent + 1, value.transitionTimestamp); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'Label'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'TransitionTimestamp'"); return err; } } @@ -2916,22 +3172,30 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, } CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const chip::app::Clusters::DoorLock::Structs::CredentialStruct::DecodableType & value) + const chip::app::Clusters::Thermostat::Structs::ScheduleTypeStruct::DecodableType & value) { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = LogValue("CredentialType", indent + 1, value.credentialType); + CHIP_ERROR err = LogValue("SystemMode", indent + 1, value.systemMode); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'CredentialType'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'SystemMode'"); return err; } } { - CHIP_ERROR err = LogValue("CredentialIndex", indent + 1, value.credentialIndex); + CHIP_ERROR err = LogValue("NumberOfSchedules", indent + 1, value.numberOfSchedules); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'CredentialIndex'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'NumberOfSchedules'"); + return err; + } + } + { + CHIP_ERROR err = LogValue("ScheduleTypeFeatures", indent + 1, value.scheduleTypeFeatures); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'ScheduleTypeFeatures'"); return err; } } @@ -6596,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) { @@ -6922,41 +7090,137 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, { DataModelLogger::LogString(label, indent, "{"); ReturnErrorOnFailure(DataModelLogger::LogValue("status", indent + 1, value.status)); - ReturnErrorOnFailure(DataModelLogger::LogValue("statusText", indent + 1, value.statusText)); + 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 RvcCleanMode::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 DishwasherMode::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 OperationalState::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 RvcOperationalState::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 ScenesManagement::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 ScenesManagement::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 ScenesManagement::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 ScenesManagement::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 ScenesManagement::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 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; } @@ -7422,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) { @@ -11287,6 +11475,11 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("CookTime", 1, value); } + case MicrowaveOvenControl::Attributes::MaxCookTime::Id: { + uint32_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("MaxCookTime", 1, value); + } case MicrowaveOvenControl::Attributes::PowerSetting::Id: { uint8_t value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); @@ -11307,6 +11500,21 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("PowerStep", 1, value); } + case MicrowaveOvenControl::Attributes::SupportedWatts::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("SupportedWatts", 1, value); + } + case MicrowaveOvenControl::Attributes::SelectedWattIndex::Id: { + uint8_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("SelectedWattIndex", 1, value); + } + case MicrowaveOvenControl::Attributes::WattRating::Id: { + uint16_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("WattRating", 1, value); + } case MicrowaveOvenControl::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); @@ -11476,6 +11684,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) { @@ -13118,6 +13403,76 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("ACCapacityformat", 1, value); } + case Thermostat::Attributes::PresetTypes::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("PresetTypes", 1, value); + } + case Thermostat::Attributes::ScheduleTypes::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ScheduleTypes", 1, value); + } + case Thermostat::Attributes::NumberOfPresets::Id: { + uint8_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("NumberOfPresets", 1, value); + } + case Thermostat::Attributes::NumberOfSchedules::Id: { + uint8_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("NumberOfSchedules", 1, value); + } + case Thermostat::Attributes::NumberOfScheduleTransitions::Id: { + uint8_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("NumberOfScheduleTransitions", 1, value); + } + case Thermostat::Attributes::NumberOfScheduleTransitionPerDay::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("NumberOfScheduleTransitionPerDay", 1, value); + } + case Thermostat::Attributes::ActivePresetHandle::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ActivePresetHandle", 1, value); + } + case Thermostat::Attributes::ActiveScheduleHandle::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("ActiveScheduleHandle", 1, value); + } + case Thermostat::Attributes::Presets::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("Presets", 1, value); + } + case Thermostat::Attributes::Schedules::Id: { + chip::app::DataModel::DecodableList value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("Schedules", 1, value); + } + case Thermostat::Attributes::PresetsSchedulesEditable::Id: { + bool value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("PresetsSchedulesEditable", 1, value); + } + case Thermostat::Attributes::TemperatureSetpointHoldPolicy::Id: { + chip::BitMask value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("TemperatureSetpointHoldPolicy", 1, value); + } + case Thermostat::Attributes::SetpointHoldExpiryTimestamp::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("SetpointHoldExpiryTimestamp", 1, value); + } + case Thermostat::Attributes::QueuedPreset::Id: { + chip::app::DataModel::Nullable value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("QueuedPreset", 1, value); + } case Thermostat::Attributes::GeneratedCommandList::Id: { chip::app::DataModel::DecodableList value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); @@ -16981,57 +17336,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) { @@ -17285,6 +17589,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 2880226ecb9d14..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); @@ -244,6 +244,24 @@ static CHIP_ERROR LogValue(const char * label, size_t indent, static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::DoorLock::Structs::CredentialStruct::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::Thermostat::Structs::ScheduleTransitionStruct::DecodableType & value); + +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::Thermostat::Structs::ScheduleStruct::DecodableType & value); + +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::Thermostat::Structs::PresetStruct::DecodableType & value); + +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::Thermostat::Structs::PresetTypeStruct::DecodableType & value); + +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::Thermostat::Structs::QueuedPresetStruct::DecodableType & value); + +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::Thermostat::Structs::ScheduleTypeStruct::DecodableType & value); + static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::Thermostat::Structs::WeeklyScheduleTransitionStruct::DecodableType & value); @@ -581,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); @@ -669,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 8b7c3cfbf53724..49fd07683ab36e 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,665 +3241,61 @@ 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); - } - }]; - } + __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; } - -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 { +class SubscribeAttributeOnOffSwitchConfigurationSwitchType : public SubscribeAttribute { public: - SubscribeAttributeOnOffOffWaitTime() - : SubscribeAttribute("off-wait-time") + SubscribeAttributeOnOffSwitchConfigurationSwitchType() + : SubscribeAttribute("switch-type") { } - ~SubscribeAttributeOnOffOffWaitTime() + ~SubscribeAttributeOnOffSwitchConfigurationSwitchType() { } 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; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::SwitchType::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%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 * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -4393,10 +3306,10 @@ class SubscribeAttributeOnOffOffWaitTime : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOffWaitTimeWithParams:params + [cluster subscribeAttributeSwitchTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOff.OffWaitTime response %@", [value description]); + NSLog(@"OnOffSwitchConfiguration.SwitchType response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -4410,34 +3323,34 @@ class SubscribeAttributeOnOffOffWaitTime : public SubscribeAttribute { }; /* - * Attribute StartUpOnOff + * Attribute SwitchActions */ -class ReadOnOffStartUpOnOff : public ReadAttribute { +class ReadOnOffSwitchConfigurationSwitchActions : public ReadAttribute { public: - ReadOnOffStartUpOnOff() - : ReadAttribute("start-up-on-off") + ReadOnOffSwitchConfigurationSwitchActions() + : ReadAttribute("switch-actions") { } - ~ReadOnOffStartUpOnOff() + ~ReadOnOffSwitchConfigurationSwitchActions() { } 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; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::SwitchActions::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%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]); + __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSwitchActionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OnOffSwitchConfiguration.SwitchActions response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OnOff StartUpOnOff read Error", error); + LogNSError("OnOffSwitchConfiguration SwitchActions read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -4446,39 +3359,36 @@ class ReadOnOffStartUpOnOff : public ReadAttribute { } }; -class WriteOnOffStartUpOnOff : public WriteAttribute { +class WriteOnOffSwitchConfigurationSwitchActions : public WriteAttribute { public: - WriteOnOffStartUpOnOff() - : WriteAttribute("start-up-on-off") + WriteOnOffSwitchConfigurationSwitchActions() + : WriteAttribute("switch-actions") { - AddArgument("attr-name", "start-up-on-off"); + AddArgument("attr-name", "switch-actions"); AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteOnOffStartUpOnOff() + ~WriteOnOffSwitchConfigurationSwitchActions() { } 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; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::SwitchActions::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 * cluster = [[MTRBaseClusterOnOffSwitchConfiguration 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 writeAttributeStartUpOnOffWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeSwitchActionsWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("OnOff StartUpOnOff write Error", error); + LogNSError("OnOffSwitchConfiguration SwitchActions write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -4487,28 +3397,28 @@ class WriteOnOffStartUpOnOff : public WriteAttribute { } private: - chip::app::DataModel::Nullable mValue; + uint8_t mValue; }; -class SubscribeAttributeOnOffStartUpOnOff : public SubscribeAttribute { +class SubscribeAttributeOnOffSwitchConfigurationSwitchActions : public SubscribeAttribute { public: - SubscribeAttributeOnOffStartUpOnOff() - : SubscribeAttribute("start-up-on-off") + SubscribeAttributeOnOffSwitchConfigurationSwitchActions() + : SubscribeAttribute("switch-actions") { } - ~SubscribeAttributeOnOffStartUpOnOff() + ~SubscribeAttributeOnOffSwitchConfigurationSwitchActions() { } 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; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::SwitchActions::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%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 * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -4519,10 +3429,10 @@ class SubscribeAttributeOnOffStartUpOnOff : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeStartUpOnOffWithParams:params + [cluster subscribeAttributeSwitchActionsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOff.StartUpOnOff response %@", [value description]); + NSLog(@"OnOffSwitchConfiguration.SwitchActions response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -4538,32 +3448,32 @@ class SubscribeAttributeOnOffStartUpOnOff : public SubscribeAttribute { /* * Attribute GeneratedCommandList */ -class ReadOnOffGeneratedCommandList : public ReadAttribute { +class ReadOnOffSwitchConfigurationGeneratedCommandList : public ReadAttribute { public: - ReadOnOffGeneratedCommandList() + ReadOnOffSwitchConfigurationGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadOnOffGeneratedCommandList() + ~ReadOnOffSwitchConfigurationGeneratedCommandList() { } 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; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::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]; + __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOff.GeneratedCommandList response %@", [value description]); + NSLog(@"OnOffSwitchConfiguration.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OnOff GeneratedCommandList read Error", error); + LogNSError("OnOffSwitchConfiguration GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -4572,25 +3482,25 @@ class ReadOnOffGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeOnOffGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeOnOffSwitchConfigurationGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOnOffGeneratedCommandList() + SubscribeAttributeOnOffSwitchConfigurationGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeOnOffGeneratedCommandList() + ~SubscribeAttributeOnOffSwitchConfigurationGeneratedCommandList() { } 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; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::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 * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -4604,7 +3514,7 @@ class SubscribeAttributeOnOffGeneratedCommandList : public SubscribeAttribute { [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOff.GeneratedCommandList response %@", [value description]); + NSLog(@"OnOffSwitchConfiguration.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -4620,32 +3530,32 @@ class SubscribeAttributeOnOffGeneratedCommandList : public SubscribeAttribute { /* * Attribute AcceptedCommandList */ -class ReadOnOffAcceptedCommandList : public ReadAttribute { +class ReadOnOffSwitchConfigurationAcceptedCommandList : public ReadAttribute { public: - ReadOnOffAcceptedCommandList() + ReadOnOffSwitchConfigurationAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadOnOffAcceptedCommandList() + ~ReadOnOffSwitchConfigurationAcceptedCommandList() { } 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; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::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]; + __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOff.AcceptedCommandList response %@", [value description]); + NSLog(@"OnOffSwitchConfiguration.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OnOff AcceptedCommandList read Error", error); + LogNSError("OnOffSwitchConfiguration AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -4654,25 +3564,25 @@ class ReadOnOffAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeOnOffAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeOnOffSwitchConfigurationAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOnOffAcceptedCommandList() + SubscribeAttributeOnOffSwitchConfigurationAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeOnOffAcceptedCommandList() + ~SubscribeAttributeOnOffSwitchConfigurationAcceptedCommandList() { } 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; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::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 * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -4686,7 +3596,7 @@ class SubscribeAttributeOnOffAcceptedCommandList : public SubscribeAttribute { [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOff.AcceptedCommandList response %@", [value description]); + NSLog(@"OnOffSwitchConfiguration.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -4704,32 +3614,32 @@ class SubscribeAttributeOnOffAcceptedCommandList : public SubscribeAttribute { /* * Attribute EventList */ -class ReadOnOffEventList : public ReadAttribute { +class ReadOnOffSwitchConfigurationEventList : public ReadAttribute { public: - ReadOnOffEventList() + ReadOnOffSwitchConfigurationEventList() : ReadAttribute("event-list") { } - ~ReadOnOffEventList() + ~ReadOnOffSwitchConfigurationEventList() { } 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; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::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]; + __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOff.EventList response %@", [value description]); + NSLog(@"OnOffSwitchConfiguration.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OnOff EventList read Error", error); + LogNSError("OnOffSwitchConfiguration EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -4738,25 +3648,25 @@ class ReadOnOffEventList : public ReadAttribute { } }; -class SubscribeAttributeOnOffEventList : public SubscribeAttribute { +class SubscribeAttributeOnOffSwitchConfigurationEventList : public SubscribeAttribute { public: - SubscribeAttributeOnOffEventList() + SubscribeAttributeOnOffSwitchConfigurationEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeOnOffEventList() + ~SubscribeAttributeOnOffSwitchConfigurationEventList() { } 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; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::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 * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -4770,7 +3680,7 @@ class SubscribeAttributeOnOffEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOff.EventList response %@", [value description]); + NSLog(@"OnOffSwitchConfiguration.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -4788,32 +3698,32 @@ class SubscribeAttributeOnOffEventList : public SubscribeAttribute { /* * Attribute AttributeList */ -class ReadOnOffAttributeList : public ReadAttribute { +class ReadOnOffSwitchConfigurationAttributeList : public ReadAttribute { public: - ReadOnOffAttributeList() + ReadOnOffSwitchConfigurationAttributeList() : ReadAttribute("attribute-list") { } - ~ReadOnOffAttributeList() + ~ReadOnOffSwitchConfigurationAttributeList() { } 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; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::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]; + __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOff.AttributeList response %@", [value description]); + NSLog(@"OnOffSwitchConfiguration.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OnOff AttributeList read Error", error); + LogNSError("OnOffSwitchConfiguration AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -4822,25 +3732,25 @@ class ReadOnOffAttributeList : public ReadAttribute { } }; -class SubscribeAttributeOnOffAttributeList : public SubscribeAttribute { +class SubscribeAttributeOnOffSwitchConfigurationAttributeList : public SubscribeAttribute { public: - SubscribeAttributeOnOffAttributeList() + SubscribeAttributeOnOffSwitchConfigurationAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeOnOffAttributeList() + ~SubscribeAttributeOnOffSwitchConfigurationAttributeList() { } 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; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::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 * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -4854,7 +3764,7 @@ class SubscribeAttributeOnOffAttributeList : public SubscribeAttribute { [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOff.AttributeList response %@", [value description]); + NSLog(@"OnOffSwitchConfiguration.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -4870,32 +3780,32 @@ class SubscribeAttributeOnOffAttributeList : public SubscribeAttribute { /* * Attribute FeatureMap */ -class ReadOnOffFeatureMap : public ReadAttribute { +class ReadOnOffSwitchConfigurationFeatureMap : public ReadAttribute { public: - ReadOnOffFeatureMap() + ReadOnOffSwitchConfigurationFeatureMap() : ReadAttribute("feature-map") { } - ~ReadOnOffFeatureMap() + ~ReadOnOffSwitchConfigurationFeatureMap() { } 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; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::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]; + __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOff.FeatureMap response %@", [value description]); + NSLog(@"OnOffSwitchConfiguration.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OnOff FeatureMap read Error", error); + LogNSError("OnOffSwitchConfiguration FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -4904,25 +3814,25 @@ class ReadOnOffFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeOnOffFeatureMap : public SubscribeAttribute { +class SubscribeAttributeOnOffSwitchConfigurationFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeOnOffFeatureMap() + SubscribeAttributeOnOffSwitchConfigurationFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeOnOffFeatureMap() + ~SubscribeAttributeOnOffSwitchConfigurationFeatureMap() { } 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; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::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 * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -4936,7 +3846,7 @@ class SubscribeAttributeOnOffFeatureMap : public SubscribeAttribute { [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOff.FeatureMap response %@", [value description]); + NSLog(@"OnOffSwitchConfiguration.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -4952,32 +3862,32 @@ class SubscribeAttributeOnOffFeatureMap : public SubscribeAttribute { /* * Attribute ClusterRevision */ -class ReadOnOffClusterRevision : public ReadAttribute { +class ReadOnOffSwitchConfigurationClusterRevision : public ReadAttribute { public: - ReadOnOffClusterRevision() + ReadOnOffSwitchConfigurationClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadOnOffClusterRevision() + ~ReadOnOffSwitchConfigurationClusterRevision() { } 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; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::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]; + __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOff.ClusterRevision response %@", [value description]); + NSLog(@"OnOffSwitchConfiguration.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OnOff ClusterRevision read Error", error); + LogNSError("OnOffSwitchConfiguration ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -4986,25 +3896,25 @@ class ReadOnOffClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeOnOffClusterRevision : public SubscribeAttribute { +class SubscribeAttributeOnOffSwitchConfigurationClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeOnOffClusterRevision() + SubscribeAttributeOnOffSwitchConfigurationClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeOnOffClusterRevision() + ~SubscribeAttributeOnOffSwitchConfigurationClusterRevision() { } 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; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::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 * cluster = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -5018,7 +3928,7 @@ class SubscribeAttributeOnOffClusterRevision : public SubscribeAttribute { [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOff.ClusterRevision response %@", [value description]); + NSLog(@"OnOffSwitchConfiguration.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -5032,13 +3942,34 @@ class SubscribeAttributeOnOffClusterRevision : public SubscribeAttribute { }; /*----------------------------------------------------------------------------*\ -| Cluster OnOffSwitchConfiguration | 0x0007 | +| Cluster LevelControl | 0x0008 | |------------------------------------------------------------------------------| | Commands: | | +| * MoveToLevel | 0x00 | +| * Move | 0x01 | +| * Step | 0x02 | +| * Stop | 0x03 | +| * MoveToLevelWithOnOff | 0x04 | +| * MoveWithOnOff | 0x05 | +| * StepWithOnOff | 0x06 | +| * StopWithOnOff | 0x07 | +| * MoveToClosestFrequency | 0x08 | |------------------------------------------------------------------------------| | Attributes: | | -| * SwitchType | 0x0000 | -| * SwitchActions | 0x0010 | +| * 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 | @@ -5050,823 +3981,83 @@ class SubscribeAttributeOnOffClusterRevision : public SubscribeAttribute { \*----------------------------------------------------------------------------*/ /* - * Attribute SwitchType + * Command MoveToLevel */ -class ReadOnOffSwitchConfigurationSwitchType : public ReadAttribute { +class LevelControlMoveToLevel : public ClusterCommand { public: - ReadOnOffSwitchConfigurationSwitchType() - : ReadAttribute("switch-type") - { - } - - ~ReadOnOffSwitchConfigurationSwitchType() + LevelControlMoveToLevel() + : ClusterCommand("move-to-level") { + 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(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); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeOnOffSwitchConfigurationSwitchType : public SubscribeAttribute { -public: - SubscribeAttributeOnOffSwitchConfigurationSwitchType() - : SubscribeAttribute("switch-type") - { - } - - ~SubscribeAttributeOnOffSwitchConfigurationSwitchType() - { - } + constexpr chip::ClusterId clusterId = chip::app::Clusters::LevelControl::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::LevelControl::Commands::MoveToLevel::Id; - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; - constexpr chip::CommandId 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 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration 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 = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.level = [NSNumber numberWithUnsignedChar:mRequest.level]; + if (mRequest.transitionTime.IsNull()) { + params.transitionTime = nil; + } else { + params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime.Value()]; } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; + params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster moveToLevelWithParams: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 subscribeAttributeSwitchTypeWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOffSwitchConfiguration.SwitchType 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::LevelControl::Commands::MoveToLevel::Type mRequest; }; /* - * Attribute SwitchActions + * Command Move */ -class ReadOnOffSwitchConfigurationSwitchActions : public ReadAttribute { +class LevelControlMove : public ClusterCommand { public: - ReadOnOffSwitchConfigurationSwitchActions() - : ReadAttribute("switch-actions") - { - } - - ~ReadOnOffSwitchConfigurationSwitchActions() + LevelControlMove() + : ClusterCommand("move") { + 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(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::SwitchActions::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 ") ReadAttribute (0x%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 readAttributeSwitchActionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOffSwitchConfiguration.SwitchActions response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OnOffSwitchConfiguration SwitchActions read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteOnOffSwitchConfigurationSwitchActions : public WriteAttribute { -public: - WriteOnOffSwitchConfigurationSwitchActions() - : WriteAttribute("switch-actions") - { - AddArgument("attr-name", "switch-actions"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteOnOffSwitchConfigurationSwitchActions() - { - } - - 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::SwitchActions::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 = [[MTRBaseClusterOnOffSwitchConfiguration 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 writeAttributeSwitchActionsWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OnOffSwitchConfiguration SwitchActions write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint8_t mValue; -}; - -class SubscribeAttributeOnOffSwitchConfigurationSwitchActions : public SubscribeAttribute { -public: - SubscribeAttributeOnOffSwitchConfigurationSwitchActions() - : SubscribeAttribute("switch-actions") - { - } - - ~SubscribeAttributeOnOffSwitchConfigurationSwitchActions() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::Attributes::SwitchActions::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOnOffSwitchConfiguration 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 subscribeAttributeSwitchActionsWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOffSwitchConfiguration.SwitchActions 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 ReadOnOffSwitchConfigurationGeneratedCommandList : public ReadAttribute { -public: - ReadOnOffSwitchConfigurationGeneratedCommandList() - : ReadAttribute("generated-command-list") - { - } - - ~ReadOnOffSwitchConfigurationGeneratedCommandList() - { - } - - 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::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 = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOffSwitchConfiguration.GeneratedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OnOffSwitchConfiguration GeneratedCommandList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeOnOffSwitchConfigurationGeneratedCommandList : public SubscribeAttribute { -public: - SubscribeAttributeOnOffSwitchConfigurationGeneratedCommandList() - : SubscribeAttribute("generated-command-list") - { - } - - ~SubscribeAttributeOnOffSwitchConfigurationGeneratedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::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 = [[MTRBaseClusterOnOffSwitchConfiguration 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(@"OnOffSwitchConfiguration.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 ReadOnOffSwitchConfigurationAcceptedCommandList : public ReadAttribute { -public: - ReadOnOffSwitchConfigurationAcceptedCommandList() - : ReadAttribute("accepted-command-list") - { - } - - ~ReadOnOffSwitchConfigurationAcceptedCommandList() - { - } - - 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::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 = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOffSwitchConfiguration.AcceptedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OnOffSwitchConfiguration AcceptedCommandList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeOnOffSwitchConfigurationAcceptedCommandList : public SubscribeAttribute { -public: - SubscribeAttributeOnOffSwitchConfigurationAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") - { - } - - ~SubscribeAttributeOnOffSwitchConfigurationAcceptedCommandList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::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 = [[MTRBaseClusterOnOffSwitchConfiguration 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(@"OnOffSwitchConfiguration.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 ReadOnOffSwitchConfigurationEventList : public ReadAttribute { -public: - ReadOnOffSwitchConfigurationEventList() - : ReadAttribute("event-list") - { - } - - ~ReadOnOffSwitchConfigurationEventList() - { - } - - 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::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 = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOffSwitchConfiguration.EventList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OnOffSwitchConfiguration EventList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeOnOffSwitchConfigurationEventList : public SubscribeAttribute { -public: - SubscribeAttributeOnOffSwitchConfigurationEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeOnOffSwitchConfigurationEventList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::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 = [[MTRBaseClusterOnOffSwitchConfiguration 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(@"OnOffSwitchConfiguration.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 ReadOnOffSwitchConfigurationAttributeList : public ReadAttribute { -public: - ReadOnOffSwitchConfigurationAttributeList() - : ReadAttribute("attribute-list") - { - } - - ~ReadOnOffSwitchConfigurationAttributeList() - { - } - - 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::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 = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOffSwitchConfiguration.AttributeList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OnOffSwitchConfiguration AttributeList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeOnOffSwitchConfigurationAttributeList : public SubscribeAttribute { -public: - SubscribeAttributeOnOffSwitchConfigurationAttributeList() - : SubscribeAttribute("attribute-list") - { - } - - ~SubscribeAttributeOnOffSwitchConfigurationAttributeList() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::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 = [[MTRBaseClusterOnOffSwitchConfiguration 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(@"OnOffSwitchConfiguration.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 ReadOnOffSwitchConfigurationFeatureMap : public ReadAttribute { -public: - ReadOnOffSwitchConfigurationFeatureMap() - : ReadAttribute("feature-map") - { - } - - ~ReadOnOffSwitchConfigurationFeatureMap() - { - } - - 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::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 = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOffSwitchConfiguration.FeatureMap response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OnOffSwitchConfiguration FeatureMap read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeOnOffSwitchConfigurationFeatureMap : public SubscribeAttribute { -public: - SubscribeAttributeOnOffSwitchConfigurationFeatureMap() - : SubscribeAttribute("feature-map") - { - } - - ~SubscribeAttributeOnOffSwitchConfigurationFeatureMap() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::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 = [[MTRBaseClusterOnOffSwitchConfiguration 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(@"OnOffSwitchConfiguration.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 ReadOnOffSwitchConfigurationClusterRevision : public ReadAttribute { -public: - ReadOnOffSwitchConfigurationClusterRevision() - : ReadAttribute("cluster-revision") - { - } - - ~ReadOnOffSwitchConfigurationClusterRevision() - { - } - - 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::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 = [[MTRBaseClusterOnOffSwitchConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OnOffSwitchConfiguration.ClusterRevision response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("OnOffSwitchConfiguration ClusterRevision read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeOnOffSwitchConfigurationClusterRevision : public SubscribeAttribute { -public: - SubscribeAttributeOnOffSwitchConfigurationClusterRevision() - : SubscribeAttribute("cluster-revision") - { - } - - ~SubscribeAttributeOnOffSwitchConfigurationClusterRevision() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OnOffSwitchConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OnOffSwitchConfiguration::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 = [[MTRBaseClusterOnOffSwitchConfiguration 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(@"OnOffSwitchConfiguration.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 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 MoveToLevel - */ -class LevelControlMoveToLevel : public ClusterCommand { -public: - LevelControlMoveToLevel() - : ClusterCommand("move-to-level") - { - 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(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - 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, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRLevelControlClusterMoveToLevelParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.level = [NSNumber numberWithUnsignedChar:mRequest.level]; - if (mRequest.transitionTime.IsNull()) { - params.transitionTime = nil; - } else { - params.transitionTime = [NSNumber numberWithUnsignedShort:mRequest.transitionTime.Value()]; - } - params.optionsMask = [NSNumber numberWithUnsignedChar:mRequest.optionsMask.Raw()]; - params.optionsOverride = [NSNumber numberWithUnsignedChar:mRequest.optionsOverride.Raw()]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster moveToLevelWithParams: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::LevelControl::Commands::MoveToLevel::Type mRequest; -}; - -/* - * Command Move - */ -class LevelControlMove : public ClusterCommand { -public: - LevelControlMove() - : ClusterCommand("move") - { - 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(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - 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, endpointId); + 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 = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; @@ -14125,34 +12316,3635 @@ class SubscribeAttributeActionsEventList : public SubscribeAttribute { #endif // MTR_ENABLE_PROVISIONAL /* - * Attribute AttributeList + * Attribute AttributeList + */ +class ReadActionsAttributeList : public ReadAttribute { +public: + ReadActionsAttributeList() + : ReadAttribute("attribute-list") + { + } + + ~ReadActionsAttributeList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Actions::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 = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Actions.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("Actions AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeActionsAttributeList : public SubscribeAttribute { +public: + SubscribeAttributeActionsAttributeList() + : SubscribeAttribute("attribute-list") + { + } + + ~SubscribeAttributeActionsAttributeList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Actions::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 = [[MTRBaseClusterActions 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(@"Actions.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 ReadActionsFeatureMap : public ReadAttribute { +public: + ReadActionsFeatureMap() + : ReadAttribute("feature-map") + { + } + + ~ReadActionsFeatureMap() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Actions::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 = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Actions.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("Actions FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeActionsFeatureMap : public SubscribeAttribute { +public: + SubscribeAttributeActionsFeatureMap() + : SubscribeAttribute("feature-map") + { + } + + ~SubscribeAttributeActionsFeatureMap() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Actions::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 = [[MTRBaseClusterActions 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(@"Actions.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 ReadActionsClusterRevision : public ReadAttribute { +public: + ReadActionsClusterRevision() + : ReadAttribute("cluster-revision") + { + } + + ~ReadActionsClusterRevision() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Actions::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 = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Actions.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("Actions ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeActionsClusterRevision : public SubscribeAttribute { +public: + SubscribeAttributeActionsClusterRevision() + : SubscribeAttribute("cluster-revision") + { + } + + ~SubscribeAttributeActionsClusterRevision() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Actions::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 = [[MTRBaseClusterActions 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(@"Actions.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 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 | +\*----------------------------------------------------------------------------*/ + +/* + * Attribute DataModelRevision + */ +class ReadBasicInformationDataModelRevision : public ReadAttribute { +public: + ReadBasicInformationDataModelRevision() + : ReadAttribute("data-model-revision") + { + } + + ~ReadBasicInformationDataModelRevision() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::DataModelRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDataModelRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.DataModelRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BasicInformation DataModelRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBasicInformationDataModelRevision : public SubscribeAttribute { +public: + SubscribeAttributeBasicInformationDataModelRevision() + : SubscribeAttribute("data-model-revision") + { + } + + ~SubscribeAttributeBasicInformationDataModelRevision() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::DataModelRevision::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBasicInformation 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 subscribeAttributeDataModelRevisionWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.DataModelRevision 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 VendorName + */ +class ReadBasicInformationVendorName : public ReadAttribute { +public: + ReadBasicInformationVendorName() + : ReadAttribute("vendor-name") + { + } + + ~ReadBasicInformationVendorName() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::VendorName::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeVendorNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.VendorName response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BasicInformation VendorName read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBasicInformationVendorName : public SubscribeAttribute { +public: + SubscribeAttributeBasicInformationVendorName() + : SubscribeAttribute("vendor-name") + { + } + + ~SubscribeAttributeBasicInformationVendorName() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::VendorName::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBasicInformation 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 subscribeAttributeVendorNameWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.VendorName 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 VendorID + */ +class ReadBasicInformationVendorID : public ReadAttribute { +public: + ReadBasicInformationVendorID() + : ReadAttribute("vendor-id") + { + } + + ~ReadBasicInformationVendorID() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::VendorID::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeVendorIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.VendorID response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BasicInformation VendorID read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBasicInformationVendorID : public SubscribeAttribute { +public: + SubscribeAttributeBasicInformationVendorID() + : SubscribeAttribute("vendor-id") + { + } + + ~SubscribeAttributeBasicInformationVendorID() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::VendorID::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBasicInformation 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 subscribeAttributeVendorIDWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.VendorID 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 ProductName + */ +class ReadBasicInformationProductName : public ReadAttribute { +public: + ReadBasicInformationProductName() + : ReadAttribute("product-name") + { + } + + ~ReadBasicInformationProductName() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::ProductName::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeProductNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.ProductName response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BasicInformation ProductName read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBasicInformationProductName : public SubscribeAttribute { +public: + SubscribeAttributeBasicInformationProductName() + : SubscribeAttribute("product-name") + { + } + + ~SubscribeAttributeBasicInformationProductName() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::ProductName::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBasicInformation 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 subscribeAttributeProductNameWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.ProductName 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 ProductID + */ +class ReadBasicInformationProductID : public ReadAttribute { +public: + ReadBasicInformationProductID() + : ReadAttribute("product-id") + { + } + + ~ReadBasicInformationProductID() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::ProductID::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeProductIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.ProductID response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BasicInformation ProductID read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBasicInformationProductID : public SubscribeAttribute { +public: + SubscribeAttributeBasicInformationProductID() + : SubscribeAttribute("product-id") + { + } + + ~SubscribeAttributeBasicInformationProductID() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::ProductID::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBasicInformation 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 subscribeAttributeProductIDWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.ProductID 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 NodeLabel + */ +class ReadBasicInformationNodeLabel : public ReadAttribute { +public: + ReadBasicInformationNodeLabel() + : ReadAttribute("node-label") + { + } + + ~ReadBasicInformationNodeLabel() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::NodeLabel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNodeLabelWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.NodeLabel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BasicInformation NodeLabel read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteBasicInformationNodeLabel : public WriteAttribute { +public: + WriteBasicInformationNodeLabel() + : WriteAttribute("node-label") + { + AddArgument("attr-name", "node-label"); + AddArgument("attr-value", &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteBasicInformationNodeLabel() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::NodeLabel::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 = [[MTRBaseClusterBasicInformation 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; + NSString * _Nonnull value = [[NSString alloc] initWithBytes:mValue.data() length:mValue.size() encoding:NSUTF8StringEncoding]; + + [cluster writeAttributeNodeLabelWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BasicInformation NodeLabel write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::ByteSpan mValue; +}; + +class SubscribeAttributeBasicInformationNodeLabel : public SubscribeAttribute { +public: + SubscribeAttributeBasicInformationNodeLabel() + : SubscribeAttribute("node-label") + { + } + + ~SubscribeAttributeBasicInformationNodeLabel() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::NodeLabel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBasicInformation 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 subscribeAttributeNodeLabelWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.NodeLabel 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 Location + */ +class ReadBasicInformationLocation : public ReadAttribute { +public: + ReadBasicInformationLocation() + : ReadAttribute("location") + { + } + + ~ReadBasicInformationLocation() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::Location::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLocationWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.Location response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BasicInformation Location read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteBasicInformationLocation : public WriteAttribute { +public: + WriteBasicInformationLocation() + : WriteAttribute("location") + { + AddArgument("attr-name", "location"); + AddArgument("attr-value", &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteBasicInformationLocation() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::Location::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 = [[MTRBaseClusterBasicInformation 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; + NSString * _Nonnull value = [[NSString alloc] initWithBytes:mValue.data() length:mValue.size() encoding:NSUTF8StringEncoding]; + + [cluster writeAttributeLocationWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BasicInformation Location write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::ByteSpan mValue; +}; + +class SubscribeAttributeBasicInformationLocation : public SubscribeAttribute { +public: + SubscribeAttributeBasicInformationLocation() + : SubscribeAttribute("location") + { + } + + ~SubscribeAttributeBasicInformationLocation() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::Location::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBasicInformation 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 subscribeAttributeLocationWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.Location 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 HardwareVersion + */ +class ReadBasicInformationHardwareVersion : public ReadAttribute { +public: + ReadBasicInformationHardwareVersion() + : ReadAttribute("hardware-version") + { + } + + ~ReadBasicInformationHardwareVersion() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::HardwareVersion::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeHardwareVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.HardwareVersion response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BasicInformation HardwareVersion read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBasicInformationHardwareVersion : public SubscribeAttribute { +public: + SubscribeAttributeBasicInformationHardwareVersion() + : SubscribeAttribute("hardware-version") + { + } + + ~SubscribeAttributeBasicInformationHardwareVersion() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::HardwareVersion::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBasicInformation 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 subscribeAttributeHardwareVersionWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.HardwareVersion 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 HardwareVersionString + */ +class ReadBasicInformationHardwareVersionString : public ReadAttribute { +public: + ReadBasicInformationHardwareVersionString() + : ReadAttribute("hardware-version-string") + { + } + + ~ReadBasicInformationHardwareVersionString() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::HardwareVersionString::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeHardwareVersionStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.HardwareVersionString response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BasicInformation HardwareVersionString read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBasicInformationHardwareVersionString : public SubscribeAttribute { +public: + SubscribeAttributeBasicInformationHardwareVersionString() + : SubscribeAttribute("hardware-version-string") + { + } + + ~SubscribeAttributeBasicInformationHardwareVersionString() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::HardwareVersionString::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBasicInformation 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 subscribeAttributeHardwareVersionStringWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.HardwareVersionString 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 SoftwareVersion + */ +class ReadBasicInformationSoftwareVersion : public ReadAttribute { +public: + ReadBasicInformationSoftwareVersion() + : ReadAttribute("software-version") + { + } + + ~ReadBasicInformationSoftwareVersion() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::SoftwareVersion::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSoftwareVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.SoftwareVersion response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BasicInformation SoftwareVersion read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBasicInformationSoftwareVersion : public SubscribeAttribute { +public: + SubscribeAttributeBasicInformationSoftwareVersion() + : SubscribeAttribute("software-version") + { + } + + ~SubscribeAttributeBasicInformationSoftwareVersion() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::SoftwareVersion::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBasicInformation 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 subscribeAttributeSoftwareVersionWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.SoftwareVersion 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 SoftwareVersionString + */ +class ReadBasicInformationSoftwareVersionString : public ReadAttribute { +public: + ReadBasicInformationSoftwareVersionString() + : ReadAttribute("software-version-string") + { + } + + ~ReadBasicInformationSoftwareVersionString() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::SoftwareVersionString::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSoftwareVersionStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.SoftwareVersionString response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BasicInformation SoftwareVersionString read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBasicInformationSoftwareVersionString : public SubscribeAttribute { +public: + SubscribeAttributeBasicInformationSoftwareVersionString() + : SubscribeAttribute("software-version-string") + { + } + + ~SubscribeAttributeBasicInformationSoftwareVersionString() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::SoftwareVersionString::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBasicInformation 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 subscribeAttributeSoftwareVersionStringWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.SoftwareVersionString 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 ManufacturingDate + */ +class ReadBasicInformationManufacturingDate : public ReadAttribute { +public: + ReadBasicInformationManufacturingDate() + : ReadAttribute("manufacturing-date") + { + } + + ~ReadBasicInformationManufacturingDate() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::ManufacturingDate::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeManufacturingDateWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.ManufacturingDate response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BasicInformation ManufacturingDate read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBasicInformationManufacturingDate : public SubscribeAttribute { +public: + SubscribeAttributeBasicInformationManufacturingDate() + : SubscribeAttribute("manufacturing-date") + { + } + + ~SubscribeAttributeBasicInformationManufacturingDate() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::ManufacturingDate::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBasicInformation 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 subscribeAttributeManufacturingDateWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.ManufacturingDate 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 PartNumber + */ +class ReadBasicInformationPartNumber : public ReadAttribute { +public: + ReadBasicInformationPartNumber() + : ReadAttribute("part-number") + { + } + + ~ReadBasicInformationPartNumber() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::PartNumber::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePartNumberWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.PartNumber response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BasicInformation PartNumber read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBasicInformationPartNumber : public SubscribeAttribute { +public: + SubscribeAttributeBasicInformationPartNumber() + : SubscribeAttribute("part-number") + { + } + + ~SubscribeAttributeBasicInformationPartNumber() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::PartNumber::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBasicInformation 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 subscribeAttributePartNumberWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.PartNumber 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 ProductURL + */ +class ReadBasicInformationProductURL : public ReadAttribute { +public: + ReadBasicInformationProductURL() + : ReadAttribute("product-url") + { + } + + ~ReadBasicInformationProductURL() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::ProductURL::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeProductURLWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.ProductURL response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BasicInformation ProductURL read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBasicInformationProductURL : public SubscribeAttribute { +public: + SubscribeAttributeBasicInformationProductURL() + : SubscribeAttribute("product-url") + { + } + + ~SubscribeAttributeBasicInformationProductURL() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::ProductURL::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBasicInformation 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 subscribeAttributeProductURLWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.ProductURL 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 ProductLabel + */ +class ReadBasicInformationProductLabel : public ReadAttribute { +public: + ReadBasicInformationProductLabel() + : ReadAttribute("product-label") + { + } + + ~ReadBasicInformationProductLabel() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::ProductLabel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeProductLabelWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.ProductLabel response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BasicInformation ProductLabel read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBasicInformationProductLabel : public SubscribeAttribute { +public: + SubscribeAttributeBasicInformationProductLabel() + : SubscribeAttribute("product-label") + { + } + + ~SubscribeAttributeBasicInformationProductLabel() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::ProductLabel::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBasicInformation 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 subscribeAttributeProductLabelWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.ProductLabel 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 SerialNumber + */ +class ReadBasicInformationSerialNumber : public ReadAttribute { +public: + ReadBasicInformationSerialNumber() + : ReadAttribute("serial-number") + { + } + + ~ReadBasicInformationSerialNumber() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::SerialNumber::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSerialNumberWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.SerialNumber response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BasicInformation SerialNumber read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBasicInformationSerialNumber : public SubscribeAttribute { +public: + SubscribeAttributeBasicInformationSerialNumber() + : SubscribeAttribute("serial-number") + { + } + + ~SubscribeAttributeBasicInformationSerialNumber() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::SerialNumber::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBasicInformation 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 subscribeAttributeSerialNumberWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.SerialNumber 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 LocalConfigDisabled + */ +class ReadBasicInformationLocalConfigDisabled : public ReadAttribute { +public: + ReadBasicInformationLocalConfigDisabled() + : ReadAttribute("local-config-disabled") + { + } + + ~ReadBasicInformationLocalConfigDisabled() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::LocalConfigDisabled::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLocalConfigDisabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.LocalConfigDisabled response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BasicInformation LocalConfigDisabled read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteBasicInformationLocalConfigDisabled : public WriteAttribute { +public: + WriteBasicInformationLocalConfigDisabled() + : WriteAttribute("local-config-disabled") + { + AddArgument("attr-name", "local-config-disabled"); + AddArgument("attr-value", 0, 1, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteBasicInformationLocalConfigDisabled() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::LocalConfigDisabled::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 = [[MTRBaseClusterBasicInformation 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 numberWithBool:mValue]; + + [cluster writeAttributeLocalConfigDisabledWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BasicInformation LocalConfigDisabled write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + bool mValue; +}; + +class SubscribeAttributeBasicInformationLocalConfigDisabled : public SubscribeAttribute { +public: + SubscribeAttributeBasicInformationLocalConfigDisabled() + : SubscribeAttribute("local-config-disabled") + { + } + + ~SubscribeAttributeBasicInformationLocalConfigDisabled() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::LocalConfigDisabled::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBasicInformation 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 subscribeAttributeLocalConfigDisabledWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.LocalConfigDisabled 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 Reachable + */ +class ReadBasicInformationReachable : public ReadAttribute { +public: + ReadBasicInformationReachable() + : ReadAttribute("reachable") + { + } + + ~ReadBasicInformationReachable() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::Reachable::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeReachableWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.Reachable response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BasicInformation Reachable read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBasicInformationReachable : public SubscribeAttribute { +public: + SubscribeAttributeBasicInformationReachable() + : SubscribeAttribute("reachable") + { + } + + ~SubscribeAttributeBasicInformationReachable() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::Reachable::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBasicInformation 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 subscribeAttributeReachableWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.Reachable 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 UniqueID + */ +class ReadBasicInformationUniqueID : public ReadAttribute { +public: + ReadBasicInformationUniqueID() + : ReadAttribute("unique-id") + { + } + + ~ReadBasicInformationUniqueID() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::UniqueID::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUniqueIDWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.UniqueID response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BasicInformation UniqueID read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBasicInformationUniqueID : public SubscribeAttribute { +public: + SubscribeAttributeBasicInformationUniqueID() + : SubscribeAttribute("unique-id") + { + } + + ~SubscribeAttributeBasicInformationUniqueID() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::UniqueID::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBasicInformation 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 subscribeAttributeUniqueIDWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.UniqueID 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 CapabilityMinima + */ +class ReadBasicInformationCapabilityMinima : public ReadAttribute { +public: + ReadBasicInformationCapabilityMinima() + : ReadAttribute("capability-minima") + { + } + + ~ReadBasicInformationCapabilityMinima() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::CapabilityMinima::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCapabilityMinimaWithCompletion:^(MTRBasicInformationClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.CapabilityMinima response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BasicInformation CapabilityMinima read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBasicInformationCapabilityMinima : public SubscribeAttribute { +public: + SubscribeAttributeBasicInformationCapabilityMinima() + : SubscribeAttribute("capability-minima") + { + } + + ~SubscribeAttributeBasicInformationCapabilityMinima() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::CapabilityMinima::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBasicInformation 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 subscribeAttributeCapabilityMinimaWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(MTRBasicInformationClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.CapabilityMinima 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 ProductAppearance + */ +class ReadBasicInformationProductAppearance : public ReadAttribute { +public: + ReadBasicInformationProductAppearance() + : ReadAttribute("product-appearance") + { + } + + ~ReadBasicInformationProductAppearance() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::ProductAppearance::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeProductAppearanceWithCompletion:^(MTRBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.ProductAppearance response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BasicInformation ProductAppearance read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBasicInformationProductAppearance : public SubscribeAttribute { +public: + SubscribeAttributeBasicInformationProductAppearance() + : SubscribeAttribute("product-appearance") + { + } + + ~SubscribeAttributeBasicInformationProductAppearance() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::ProductAppearance::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBasicInformation 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 subscribeAttributeProductAppearanceWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(MTRBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.ProductAppearance 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 SpecificationVersion + */ +class ReadBasicInformationSpecificationVersion : public ReadAttribute { +public: + ReadBasicInformationSpecificationVersion() + : ReadAttribute("specification-version") + { + } + + ~ReadBasicInformationSpecificationVersion() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::SpecificationVersion::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSpecificationVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.SpecificationVersion response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BasicInformation SpecificationVersion read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBasicInformationSpecificationVersion : public SubscribeAttribute { +public: + SubscribeAttributeBasicInformationSpecificationVersion() + : SubscribeAttribute("specification-version") + { + } + + ~SubscribeAttributeBasicInformationSpecificationVersion() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::SpecificationVersion::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBasicInformation 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 subscribeAttributeSpecificationVersionWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.SpecificationVersion 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 MaxPathsPerInvoke + */ +class ReadBasicInformationMaxPathsPerInvoke : public ReadAttribute { +public: + ReadBasicInformationMaxPathsPerInvoke() + : ReadAttribute("max-paths-per-invoke") + { + } + + ~ReadBasicInformationMaxPathsPerInvoke() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::MaxPathsPerInvoke::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxPathsPerInvokeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.MaxPathsPerInvoke response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BasicInformation MaxPathsPerInvoke read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBasicInformationMaxPathsPerInvoke : public SubscribeAttribute { +public: + SubscribeAttributeBasicInformationMaxPathsPerInvoke() + : SubscribeAttribute("max-paths-per-invoke") + { + } + + ~SubscribeAttributeBasicInformationMaxPathsPerInvoke() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::MaxPathsPerInvoke::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterBasicInformation 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 subscribeAttributeMaxPathsPerInvokeWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.MaxPathsPerInvoke 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 GeneratedCommandList + */ +class ReadBasicInformationGeneratedCommandList : public ReadAttribute { +public: + ReadBasicInformationGeneratedCommandList() + : ReadAttribute("generated-command-list") + { + } + + ~ReadBasicInformationGeneratedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::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 = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BasicInformation GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBasicInformationGeneratedCommandList : public SubscribeAttribute { +public: + SubscribeAttributeBasicInformationGeneratedCommandList() + : SubscribeAttribute("generated-command-list") + { + } + + ~SubscribeAttributeBasicInformationGeneratedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::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 = [[MTRBaseClusterBasicInformation 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(@"BasicInformation.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 ReadBasicInformationAcceptedCommandList : public ReadAttribute { +public: + ReadBasicInformationAcceptedCommandList() + : ReadAttribute("accepted-command-list") + { + } + + ~ReadBasicInformationAcceptedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::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 = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BasicInformation AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBasicInformationAcceptedCommandList : public SubscribeAttribute { +public: + SubscribeAttributeBasicInformationAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") + { + } + + ~SubscribeAttributeBasicInformationAcceptedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::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 = [[MTRBaseClusterBasicInformation 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(@"BasicInformation.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 ReadBasicInformationEventList : public ReadAttribute { +public: + ReadBasicInformationEventList() + : ReadAttribute("event-list") + { + } + + ~ReadBasicInformationEventList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::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 = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BasicInformation EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBasicInformationEventList : public SubscribeAttribute { +public: + SubscribeAttributeBasicInformationEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributeBasicInformationEventList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::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 = [[MTRBaseClusterBasicInformation 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(@"BasicInformation.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 ReadBasicInformationAttributeList : public ReadAttribute { +public: + ReadBasicInformationAttributeList() + : ReadAttribute("attribute-list") + { + } + + ~ReadBasicInformationAttributeList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::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 = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BasicInformation AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBasicInformationAttributeList : public SubscribeAttribute { +public: + SubscribeAttributeBasicInformationAttributeList() + : SubscribeAttribute("attribute-list") + { + } + + ~SubscribeAttributeBasicInformationAttributeList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::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 = [[MTRBaseClusterBasicInformation 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(@"BasicInformation.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 ReadBasicInformationFeatureMap : public ReadAttribute { +public: + ReadBasicInformationFeatureMap() + : ReadAttribute("feature-map") + { + } + + ~ReadBasicInformationFeatureMap() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::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 = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BasicInformation FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBasicInformationFeatureMap : public SubscribeAttribute { +public: + SubscribeAttributeBasicInformationFeatureMap() + : SubscribeAttribute("feature-map") + { + } + + ~SubscribeAttributeBasicInformationFeatureMap() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::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 = [[MTRBaseClusterBasicInformation 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(@"BasicInformation.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 ReadBasicInformationClusterRevision : public ReadAttribute { +public: + ReadBasicInformationClusterRevision() + : ReadAttribute("cluster-revision") + { + } + + ~ReadBasicInformationClusterRevision() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::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 = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BasicInformation.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BasicInformation ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeBasicInformationClusterRevision : public SubscribeAttribute { +public: + SubscribeAttributeBasicInformationClusterRevision() + : SubscribeAttribute("cluster-revision") + { + } + + ~SubscribeAttributeBasicInformationClusterRevision() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::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 = [[MTRBaseClusterBasicInformation 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(@"BasicInformation.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 OtaSoftwareUpdateProvider | 0x0029 | +|------------------------------------------------------------------------------| +| Commands: | | +| * QueryImage | 0x00 | +| * ApplyUpdateRequest | 0x02 | +| * NotifyUpdateApplied | 0x04 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/* + * Command QueryImage + */ +class OtaSoftwareUpdateProviderQueryImage : public ClusterCommand { +public: + OtaSoftwareUpdateProviderQueryImage() + : ClusterCommand("query-image") + , mComplex_ProtocolsSupported(&mRequest.protocolsSupported) + { + 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(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + 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, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROTASoftwareUpdateProviderClusterQueryImageParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.vendorID = [NSNumber numberWithUnsignedShort:chip::to_underlying(mRequest.vendorID)]; + params.productID = [NSNumber numberWithUnsignedShort:mRequest.productID]; + params.softwareVersion = [NSNumber numberWithUnsignedInt:mRequest.softwareVersion]; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + for (auto & entry_0 : mRequest.protocolsSupported) { + NSNumber * newElement_0; + newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; + [array_0 addObject:newElement_0]; + } + params.protocolsSupported = array_0; + } + if (mRequest.hardwareVersion.HasValue()) { + params.hardwareVersion = [NSNumber numberWithUnsignedShort:mRequest.hardwareVersion.Value()]; + } else { + params.hardwareVersion = nil; + } + if (mRequest.location.HasValue()) { + params.location = [[NSString alloc] initWithBytes:mRequest.location.Value().data() length:mRequest.location.Value().size() encoding:NSUTF8StringEncoding]; + } else { + params.location = nil; + } + if (mRequest.requestorCanConsent.HasValue()) { + params.requestorCanConsent = [NSNumber numberWithBool:mRequest.requestorCanConsent.Value()]; + } else { + params.requestorCanConsent = nil; + } + if (mRequest.metadataForProvider.HasValue()) { + params.metadataForProvider = [NSData dataWithBytes:mRequest.metadataForProvider.Value().data() length:mRequest.metadataForProvider.Value().size()]; + } else { + params.metadataForProvider = nil; + } + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster queryImageWithParams:params completion: + ^(MTROTASoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImageResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImageResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImage::Type mRequest; + TypedComplexArgument> mComplex_ProtocolsSupported; +}; + +/* + * Command ApplyUpdateRequest + */ +class OtaSoftwareUpdateProviderApplyUpdateRequest : public ClusterCommand { +public: + OtaSoftwareUpdateProviderApplyUpdateRequest() + : ClusterCommand("apply-update-request") + { + AddArgument("UpdateToken", &mRequest.updateToken); + AddArgument("NewVersion", 0, UINT32_MAX, &mRequest.newVersion); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + 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, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROTASoftwareUpdateProviderClusterApplyUpdateRequestParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.updateToken = [NSData dataWithBytes:mRequest.updateToken.data() length:mRequest.updateToken.size()]; + params.newVersion = [NSNumber numberWithUnsignedInt:mRequest.newVersion]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster applyUpdateRequestWithParams:params completion: + ^(MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::Type mRequest; +}; + +/* + * Command NotifyUpdateApplied + */ +class OtaSoftwareUpdateProviderNotifyUpdateApplied : public ClusterCommand { +public: + OtaSoftwareUpdateProviderNotifyUpdateApplied() + : ClusterCommand("notify-update-applied") + { + AddArgument("UpdateToken", &mRequest.updateToken); + AddArgument("SoftwareVersion", 0, UINT32_MAX, &mRequest.softwareVersion); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + 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, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROTASoftwareUpdateProviderClusterNotifyUpdateAppliedParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.updateToken = [NSData dataWithBytes:mRequest.updateToken.data() length:mRequest.updateToken.size()]; + params.softwareVersion = [NSNumber numberWithUnsignedInt:mRequest.softwareVersion]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster notifyUpdateAppliedWithParams: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::OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::Type mRequest; +}; + +/* + * Attribute GeneratedCommandList + */ +class ReadOtaSoftwareUpdateProviderGeneratedCommandList : public ReadAttribute { +public: + ReadOtaSoftwareUpdateProviderGeneratedCommandList() + : ReadAttribute("generated-command-list") + { + } + + ~ReadOtaSoftwareUpdateProviderGeneratedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::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 = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OTASoftwareUpdateProvider.GeneratedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("OTASoftwareUpdateProvider GeneratedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeOtaSoftwareUpdateProviderGeneratedCommandList : public SubscribeAttribute { +public: + SubscribeAttributeOtaSoftwareUpdateProviderGeneratedCommandList() + : SubscribeAttribute("generated-command-list") + { + } + + ~SubscribeAttributeOtaSoftwareUpdateProviderGeneratedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::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 = [[MTRBaseClusterOTASoftwareUpdateProvider 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(@"OTASoftwareUpdateProvider.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 ReadOtaSoftwareUpdateProviderAcceptedCommandList : public ReadAttribute { +public: + ReadOtaSoftwareUpdateProviderAcceptedCommandList() + : ReadAttribute("accepted-command-list") + { + } + + ~ReadOtaSoftwareUpdateProviderAcceptedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::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 = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OTASoftwareUpdateProvider.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("OTASoftwareUpdateProvider AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeOtaSoftwareUpdateProviderAcceptedCommandList : public SubscribeAttribute { +public: + SubscribeAttributeOtaSoftwareUpdateProviderAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") + { + } + + ~SubscribeAttributeOtaSoftwareUpdateProviderAcceptedCommandList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::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 = [[MTRBaseClusterOTASoftwareUpdateProvider 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(@"OTASoftwareUpdateProvider.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 ReadOtaSoftwareUpdateProviderEventList : public ReadAttribute { +public: + ReadOtaSoftwareUpdateProviderEventList() + : ReadAttribute("event-list") + { + } + + ~ReadOtaSoftwareUpdateProviderEventList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::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 = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OTASoftwareUpdateProvider.EventList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("OTASoftwareUpdateProvider EventList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeOtaSoftwareUpdateProviderEventList : public SubscribeAttribute { +public: + SubscribeAttributeOtaSoftwareUpdateProviderEventList() + : SubscribeAttribute("event-list") + { + } + + ~SubscribeAttributeOtaSoftwareUpdateProviderEventList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::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 = [[MTRBaseClusterOTASoftwareUpdateProvider 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(@"OTASoftwareUpdateProvider.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 ReadOtaSoftwareUpdateProviderAttributeList : public ReadAttribute { +public: + ReadOtaSoftwareUpdateProviderAttributeList() + : ReadAttribute("attribute-list") + { + } + + ~ReadOtaSoftwareUpdateProviderAttributeList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::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 = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OTASoftwareUpdateProvider.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("OTASoftwareUpdateProvider AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeOtaSoftwareUpdateProviderAttributeList : public SubscribeAttribute { +public: + SubscribeAttributeOtaSoftwareUpdateProviderAttributeList() + : SubscribeAttribute("attribute-list") + { + } + + ~SubscribeAttributeOtaSoftwareUpdateProviderAttributeList() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::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 = [[MTRBaseClusterOTASoftwareUpdateProvider 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(@"OTASoftwareUpdateProvider.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 ReadOtaSoftwareUpdateProviderFeatureMap : public ReadAttribute { +public: + ReadOtaSoftwareUpdateProviderFeatureMap() + : ReadAttribute("feature-map") + { + } + + ~ReadOtaSoftwareUpdateProviderFeatureMap() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::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 = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OTASoftwareUpdateProvider.FeatureMap response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("OTASoftwareUpdateProvider FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeOtaSoftwareUpdateProviderFeatureMap : public SubscribeAttribute { +public: + SubscribeAttributeOtaSoftwareUpdateProviderFeatureMap() + : SubscribeAttribute("feature-map") + { + } + + ~SubscribeAttributeOtaSoftwareUpdateProviderFeatureMap() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::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 = [[MTRBaseClusterOTASoftwareUpdateProvider 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(@"OTASoftwareUpdateProvider.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 ReadOtaSoftwareUpdateProviderClusterRevision : public ReadAttribute { +public: + ReadOtaSoftwareUpdateProviderClusterRevision() + : ReadAttribute("cluster-revision") + { + } + + ~ReadOtaSoftwareUpdateProviderClusterRevision() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::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 = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OTASoftwareUpdateProvider.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("OTASoftwareUpdateProvider ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeOtaSoftwareUpdateProviderClusterRevision : public SubscribeAttribute { +public: + SubscribeAttributeOtaSoftwareUpdateProviderClusterRevision() + : SubscribeAttribute("cluster-revision") + { + } + + ~SubscribeAttributeOtaSoftwareUpdateProviderClusterRevision() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::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 = [[MTRBaseClusterOTASoftwareUpdateProvider 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(@"OTASoftwareUpdateProvider.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 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 AnnounceOTAProvider + */ +class OtaSoftwareUpdateRequestorAnnounceOTAProvider : public ClusterCommand { +public: + OtaSoftwareUpdateRequestorAnnounceOTAProvider() + : ClusterCommand("announce-otaprovider") + { + 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(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + 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, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTROTASoftwareUpdateRequestorClusterAnnounceOTAProviderParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.providerNodeID = [NSNumber numberWithUnsignedLongLong:mRequest.providerNodeID]; + params.vendorID = [NSNumber numberWithUnsignedShort:chip::to_underlying(mRequest.vendorID)]; + params.announcementReason = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.announcementReason)]; + if (mRequest.metadataForNode.HasValue()) { + params.metadataForNode = [NSData dataWithBytes:mRequest.metadataForNode.Value().data() length:mRequest.metadataForNode.Value().size()]; + } else { + params.metadataForNode = nil; + } + params.endpoint = [NSNumber numberWithUnsignedShort:mRequest.endpoint]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster announceOTAProviderWithParams: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::OtaSoftwareUpdateRequestor::Commands::AnnounceOTAProvider::Type mRequest; +}; + +/* + * Attribute DefaultOTAProviders */ -class ReadActionsAttributeList : public ReadAttribute { +class ReadOtaSoftwareUpdateRequestorDefaultOTAProviders : public ReadAttribute { public: - ReadActionsAttributeList() - : ReadAttribute("attribute-list") + ReadOtaSoftwareUpdateRequestorDefaultOTAProviders() + : ReadAttribute("default-otaproviders") { } - ~ReadActionsAttributeList() + ~ReadOtaSoftwareUpdateRequestorDefaultOTAProviders() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Actions::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::DefaultOTAProviders::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Actions.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRReadParams alloc] init]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + [cluster readAttributeDefaultOTAProvidersWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OTASoftwareUpdateRequestor.DefaultOTAProviders response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Actions AttributeList read Error", error); + LogNSError("OTASoftwareUpdateRequestor DefaultOTAProviders read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -14161,107 +15953,80 @@ class ReadActionsAttributeList : public ReadAttribute { } }; -class SubscribeAttributeActionsAttributeList : public SubscribeAttribute { +class WriteOtaSoftwareUpdateRequestorDefaultOTAProviders : public WriteAttribute { public: - SubscribeAttributeActionsAttributeList() - : SubscribeAttribute("attribute-list") + WriteOtaSoftwareUpdateRequestorDefaultOTAProviders() + : WriteAttribute("default-otaproviders") + , mComplex(&mValue) { + AddArgument("attr-name", "default-otaproviders"); + AddArgument("attr-value", &mComplex); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeActionsAttributeList() + ~WriteOtaSoftwareUpdateRequestorDefaultOTAProviders() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Actions::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::DefaultOTAProviders::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 = [[MTRBaseClusterActions 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 = [[MTRBaseClusterOTASoftwareUpdateRequestor 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) { + MTROTASoftwareUpdateRequestorClusterProviderLocation * newElement_0; + newElement_0 = [MTROTASoftwareUpdateRequestorClusterProviderLocation new]; + newElement_0.providerNodeID = [NSNumber numberWithUnsignedLongLong:entry_0.providerNodeID]; + newElement_0.endpoint = [NSNumber numberWithUnsignedShort:entry_0.endpoint]; + newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; + [array_0 addObject:newElement_0]; + } + value = array_0; } - [cluster subscribeAttributeAttributeListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Actions.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 ReadActionsFeatureMap : public ReadAttribute { -public: - ReadActionsFeatureMap() - : ReadAttribute("feature-map") - { - } - - ~ReadActionsFeatureMap() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Actions::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 = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Actions.FeatureMap response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("Actions FeatureMap read Error", error); + [cluster writeAttributeDefaultOTAProvidersWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("OTASoftwareUpdateRequestor DefaultOTAProviders write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + chip::app::DataModel::List mValue; + TypedComplexArgument> mComplex; }; -class SubscribeAttributeActionsFeatureMap : public SubscribeAttribute { +class SubscribeAttributeOtaSoftwareUpdateRequestorDefaultOTAProviders : public SubscribeAttribute { public: - SubscribeAttributeActionsFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeOtaSoftwareUpdateRequestorDefaultOTAProviders() + : SubscribeAttribute("default-otaproviders") { } - ~SubscribeAttributeActionsFeatureMap() + ~SubscribeAttributeOtaSoftwareUpdateRequestorDefaultOTAProviders() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Actions::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::DefaultOTAProviders::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -14272,10 +16037,10 @@ class SubscribeAttributeActionsFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeDefaultOTAProvidersWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Actions.FeatureMap response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OTASoftwareUpdateRequestor.DefaultOTAProviders response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -14289,34 +16054,34 @@ class SubscribeAttributeActionsFeatureMap : public SubscribeAttribute { }; /* - * Attribute ClusterRevision + * Attribute UpdatePossible */ -class ReadActionsClusterRevision : public ReadAttribute { +class ReadOtaSoftwareUpdateRequestorUpdatePossible : public ReadAttribute { public: - ReadActionsClusterRevision() - : ReadAttribute("cluster-revision") + ReadOtaSoftwareUpdateRequestorUpdatePossible() + : ReadAttribute("update-possible") { } - ~ReadActionsClusterRevision() + ~ReadOtaSoftwareUpdateRequestorUpdatePossible() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Actions::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Actions.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUpdatePossibleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OTASoftwareUpdateRequestor.UpdatePossible response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Actions ClusterRevision read Error", error); + LogNSError("OTASoftwareUpdateRequestor UpdatePossible read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -14325,25 +16090,25 @@ class ReadActionsClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeActionsClusterRevision : public SubscribeAttribute { +class SubscribeAttributeOtaSoftwareUpdateRequestorUpdatePossible : public SubscribeAttribute { public: - SubscribeAttributeActionsClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeOtaSoftwareUpdateRequestorUpdatePossible() + : SubscribeAttribute("update-possible") { } - ~SubscribeAttributeActionsClusterRevision() + ~SubscribeAttributeOtaSoftwareUpdateRequestorUpdatePossible() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Actions::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Actions::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterActions alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -14354,10 +16119,10 @@ class SubscribeAttributeActionsClusterRevision : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeUpdatePossibleWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Actions.ClusterRevision response %@", [value description]); + NSLog(@"OTASoftwareUpdateRequestor.UpdatePossible response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -14370,79 +16135,35 @@ class SubscribeAttributeActionsClusterRevision : public SubscribeAttribute { } }; -/*----------------------------------------------------------------------------*\ -| 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 | -\*----------------------------------------------------------------------------*/ - /* - * Attribute DataModelRevision + * Attribute UpdateState */ -class ReadBasicInformationDataModelRevision : public ReadAttribute { +class ReadOtaSoftwareUpdateRequestorUpdateState : public ReadAttribute { public: - ReadBasicInformationDataModelRevision() - : ReadAttribute("data-model-revision") + ReadOtaSoftwareUpdateRequestorUpdateState() + : ReadAttribute("update-state") { } - ~ReadBasicInformationDataModelRevision() + ~ReadOtaSoftwareUpdateRequestorUpdateState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::DataModelRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::UpdateState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDataModelRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.DataModelRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUpdateStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OTASoftwareUpdateRequestor.UpdateState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation DataModelRevision read Error", error); + LogNSError("OTASoftwareUpdateRequestor UpdateState read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -14451,25 +16172,25 @@ class ReadBasicInformationDataModelRevision : public ReadAttribute { } }; -class SubscribeAttributeBasicInformationDataModelRevision : public SubscribeAttribute { +class SubscribeAttributeOtaSoftwareUpdateRequestorUpdateState : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationDataModelRevision() - : SubscribeAttribute("data-model-revision") + SubscribeAttributeOtaSoftwareUpdateRequestorUpdateState() + : SubscribeAttribute("update-state") { } - ~SubscribeAttributeBasicInformationDataModelRevision() + ~SubscribeAttributeOtaSoftwareUpdateRequestorUpdateState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::DataModelRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::UpdateState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -14480,10 +16201,10 @@ class SubscribeAttributeBasicInformationDataModelRevision : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDataModelRevisionWithParams:params + [cluster subscribeAttributeUpdateStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.DataModelRevision response %@", [value description]); + NSLog(@"OTASoftwareUpdateRequestor.UpdateState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -14497,34 +16218,34 @@ class SubscribeAttributeBasicInformationDataModelRevision : public SubscribeAttr }; /* - * Attribute VendorName + * Attribute UpdateStateProgress */ -class ReadBasicInformationVendorName : public ReadAttribute { +class ReadOtaSoftwareUpdateRequestorUpdateStateProgress : public ReadAttribute { public: - ReadBasicInformationVendorName() - : ReadAttribute("vendor-name") + ReadOtaSoftwareUpdateRequestorUpdateStateProgress() + : ReadAttribute("update-state-progress") { } - ~ReadBasicInformationVendorName() + ~ReadOtaSoftwareUpdateRequestorUpdateStateProgress() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::VendorName::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeVendorNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.VendorName response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUpdateStateProgressWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OTASoftwareUpdateRequestor.UpdateStateProgress response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation VendorName read Error", error); + LogNSError("OTASoftwareUpdateRequestor UpdateStateProgress read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -14533,25 +16254,25 @@ class ReadBasicInformationVendorName : public ReadAttribute { } }; -class SubscribeAttributeBasicInformationVendorName : public SubscribeAttribute { +class SubscribeAttributeOtaSoftwareUpdateRequestorUpdateStateProgress : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationVendorName() - : SubscribeAttribute("vendor-name") + SubscribeAttributeOtaSoftwareUpdateRequestorUpdateStateProgress() + : SubscribeAttribute("update-state-progress") { } - ~SubscribeAttributeBasicInformationVendorName() + ~SubscribeAttributeOtaSoftwareUpdateRequestorUpdateStateProgress() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::VendorName::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -14562,10 +16283,10 @@ class SubscribeAttributeBasicInformationVendorName : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeVendorNameWithParams:params + [cluster subscribeAttributeUpdateStateProgressWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.VendorName response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OTASoftwareUpdateRequestor.UpdateStateProgress response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -14579,34 +16300,34 @@ class SubscribeAttributeBasicInformationVendorName : public SubscribeAttribute { }; /* - * Attribute VendorID + * Attribute GeneratedCommandList */ -class ReadBasicInformationVendorID : public ReadAttribute { +class ReadOtaSoftwareUpdateRequestorGeneratedCommandList : public ReadAttribute { public: - ReadBasicInformationVendorID() - : ReadAttribute("vendor-id") + ReadOtaSoftwareUpdateRequestorGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadBasicInformationVendorID() + ~ReadOtaSoftwareUpdateRequestorGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::VendorID::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::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 = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeVendorIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.VendorID response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OTASoftwareUpdateRequestor.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation VendorID read Error", error); + LogNSError("OTASoftwareUpdateRequestor GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -14615,25 +16336,25 @@ class ReadBasicInformationVendorID : public ReadAttribute { } }; -class SubscribeAttributeBasicInformationVendorID : public SubscribeAttribute { +class SubscribeAttributeOtaSoftwareUpdateRequestorGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationVendorID() - : SubscribeAttribute("vendor-id") + SubscribeAttributeOtaSoftwareUpdateRequestorGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeBasicInformationVendorID() + ~SubscribeAttributeOtaSoftwareUpdateRequestorGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::VendorID::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::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 = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -14644,10 +16365,10 @@ class SubscribeAttributeBasicInformationVendorID : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeVendorIDWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.VendorID response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OTASoftwareUpdateRequestor.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -14661,34 +16382,34 @@ class SubscribeAttributeBasicInformationVendorID : public SubscribeAttribute { }; /* - * Attribute ProductName + * Attribute AcceptedCommandList */ -class ReadBasicInformationProductName : public ReadAttribute { +class ReadOtaSoftwareUpdateRequestorAcceptedCommandList : public ReadAttribute { public: - ReadBasicInformationProductName() - : ReadAttribute("product-name") + ReadOtaSoftwareUpdateRequestorAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadBasicInformationProductName() + ~ReadOtaSoftwareUpdateRequestorAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::ProductName::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::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 = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeProductNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.ProductName response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OTASoftwareUpdateRequestor.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation ProductName read Error", error); + LogNSError("OTASoftwareUpdateRequestor AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -14697,25 +16418,25 @@ class ReadBasicInformationProductName : public ReadAttribute { } }; -class SubscribeAttributeBasicInformationProductName : public SubscribeAttribute { +class SubscribeAttributeOtaSoftwareUpdateRequestorAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationProductName() - : SubscribeAttribute("product-name") + SubscribeAttributeOtaSoftwareUpdateRequestorAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeBasicInformationProductName() + ~SubscribeAttributeOtaSoftwareUpdateRequestorAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::ProductName::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::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 = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -14726,10 +16447,10 @@ class SubscribeAttributeBasicInformationProductName : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeProductNameWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.ProductName response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OTASoftwareUpdateRequestor.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -14742,35 +16463,37 @@ class SubscribeAttributeBasicInformationProductName : public SubscribeAttribute } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ProductID + * Attribute EventList */ -class ReadBasicInformationProductID : public ReadAttribute { +class ReadOtaSoftwareUpdateRequestorEventList : public ReadAttribute { public: - ReadBasicInformationProductID() - : ReadAttribute("product-id") + ReadOtaSoftwareUpdateRequestorEventList() + : ReadAttribute("event-list") { } - ~ReadBasicInformationProductID() + ~ReadOtaSoftwareUpdateRequestorEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::ProductID::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::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 = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeProductIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.ProductID response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OTASoftwareUpdateRequestor.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation ProductID read Error", error); + LogNSError("OTASoftwareUpdateRequestor EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -14779,25 +16502,25 @@ class ReadBasicInformationProductID : public ReadAttribute { } }; -class SubscribeAttributeBasicInformationProductID : public SubscribeAttribute { +class SubscribeAttributeOtaSoftwareUpdateRequestorEventList : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationProductID() - : SubscribeAttribute("product-id") + SubscribeAttributeOtaSoftwareUpdateRequestorEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeBasicInformationProductID() + ~SubscribeAttributeOtaSoftwareUpdateRequestorEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::ProductID::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::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 = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -14808,10 +16531,10 @@ class SubscribeAttributeBasicInformationProductID : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeProductIDWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.ProductID response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OTASoftwareUpdateRequestor.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -14824,103 +16547,64 @@ class SubscribeAttributeBasicInformationProductID : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute NodeLabel + * Attribute AttributeList */ -class ReadBasicInformationNodeLabel : public ReadAttribute { +class ReadOtaSoftwareUpdateRequestorAttributeList : public ReadAttribute { public: - ReadBasicInformationNodeLabel() - : ReadAttribute("node-label") + ReadOtaSoftwareUpdateRequestorAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadBasicInformationNodeLabel() + ~ReadOtaSoftwareUpdateRequestorAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::NodeLabel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::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 = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNodeLabelWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.NodeLabel response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OTASoftwareUpdateRequestor.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation NodeLabel read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteBasicInformationNodeLabel : public WriteAttribute { -public: - WriteBasicInformationNodeLabel() - : WriteAttribute("node-label") - { - AddArgument("attr-name", "node-label"); - AddArgument("attr-value", &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBasicInformationNodeLabel() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::NodeLabel::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 = [[MTRBaseClusterBasicInformation 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; - NSString * _Nonnull value = [[NSString alloc] initWithBytes:mValue.data() length:mValue.size() encoding:NSUTF8StringEncoding]; - - [cluster writeAttributeNodeLabelWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BasicInformation NodeLabel write Error", error); + LogNSError("OTASoftwareUpdateRequestor AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - chip::ByteSpan mValue; }; -class SubscribeAttributeBasicInformationNodeLabel : public SubscribeAttribute { +class SubscribeAttributeOtaSoftwareUpdateRequestorAttributeList : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationNodeLabel() - : SubscribeAttribute("node-label") + SubscribeAttributeOtaSoftwareUpdateRequestorAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeBasicInformationNodeLabel() + ~SubscribeAttributeOtaSoftwareUpdateRequestorAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::NodeLabel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::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 = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -14931,10 +16615,10 @@ class SubscribeAttributeBasicInformationNodeLabel : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNodeLabelWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.NodeLabel response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OTASoftwareUpdateRequestor.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -14948,102 +16632,61 @@ class SubscribeAttributeBasicInformationNodeLabel : public SubscribeAttribute { }; /* - * Attribute Location + * Attribute FeatureMap */ -class ReadBasicInformationLocation : public ReadAttribute { +class ReadOtaSoftwareUpdateRequestorFeatureMap : public ReadAttribute { public: - ReadBasicInformationLocation() - : ReadAttribute("location") + ReadOtaSoftwareUpdateRequestorFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadBasicInformationLocation() + ~ReadOtaSoftwareUpdateRequestorFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::Location::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::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 = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLocationWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.Location response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OTASoftwareUpdateRequestor.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation Location read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteBasicInformationLocation : public WriteAttribute { -public: - WriteBasicInformationLocation() - : WriteAttribute("location") - { - AddArgument("attr-name", "location"); - AddArgument("attr-value", &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBasicInformationLocation() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::Location::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 = [[MTRBaseClusterBasicInformation 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; - NSString * _Nonnull value = [[NSString alloc] initWithBytes:mValue.data() length:mValue.size() encoding:NSUTF8StringEncoding]; - - [cluster writeAttributeLocationWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BasicInformation Location write Error", error); + LogNSError("OTASoftwareUpdateRequestor FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - chip::ByteSpan mValue; }; -class SubscribeAttributeBasicInformationLocation : public SubscribeAttribute { +class SubscribeAttributeOtaSoftwareUpdateRequestorFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationLocation() - : SubscribeAttribute("location") + SubscribeAttributeOtaSoftwareUpdateRequestorFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeBasicInformationLocation() + ~SubscribeAttributeOtaSoftwareUpdateRequestorFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::Location::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::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 = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -15054,10 +16697,10 @@ class SubscribeAttributeBasicInformationLocation : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLocationWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.Location response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OTASoftwareUpdateRequestor.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -15071,34 +16714,34 @@ class SubscribeAttributeBasicInformationLocation : public SubscribeAttribute { }; /* - * Attribute HardwareVersion + * Attribute ClusterRevision */ -class ReadBasicInformationHardwareVersion : public ReadAttribute { +class ReadOtaSoftwareUpdateRequestorClusterRevision : public ReadAttribute { public: - ReadBasicInformationHardwareVersion() - : ReadAttribute("hardware-version") + ReadOtaSoftwareUpdateRequestorClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadBasicInformationHardwareVersion() + ~ReadOtaSoftwareUpdateRequestorClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::HardwareVersion::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::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 = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeHardwareVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.HardwareVersion response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OTASoftwareUpdateRequestor.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation HardwareVersion read Error", error); + LogNSError("OTASoftwareUpdateRequestor ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -15107,25 +16750,25 @@ class ReadBasicInformationHardwareVersion : public ReadAttribute { } }; -class SubscribeAttributeBasicInformationHardwareVersion : public SubscribeAttribute { +class SubscribeAttributeOtaSoftwareUpdateRequestorClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationHardwareVersion() - : SubscribeAttribute("hardware-version") + SubscribeAttributeOtaSoftwareUpdateRequestorClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeBasicInformationHardwareVersion() + ~SubscribeAttributeOtaSoftwareUpdateRequestorClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::HardwareVersion::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::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 = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -15136,10 +16779,10 @@ class SubscribeAttributeBasicInformationHardwareVersion : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeHardwareVersionWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.HardwareVersion response %@", [value description]); + NSLog(@"OTASoftwareUpdateRequestor.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -15152,35 +16795,53 @@ class SubscribeAttributeBasicInformationHardwareVersion : public SubscribeAttrib } }; +/*----------------------------------------------------------------------------*\ +| Cluster LocalizationConfiguration | 0x002B | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * ActiveLocale | 0x0000 | +| * SupportedLocales | 0x0001 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute HardwareVersionString + * Attribute ActiveLocale */ -class ReadBasicInformationHardwareVersionString : public ReadAttribute { +class ReadLocalizationConfigurationActiveLocale : public ReadAttribute { public: - ReadBasicInformationHardwareVersionString() - : ReadAttribute("hardware-version-string") + ReadLocalizationConfigurationActiveLocale() + : ReadAttribute("active-locale") { } - ~ReadBasicInformationHardwareVersionString() + ~ReadLocalizationConfigurationActiveLocale() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::HardwareVersionString::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::ActiveLocale::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeHardwareVersionStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.HardwareVersionString response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeActiveLocaleWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"LocalizationConfiguration.ActiveLocale response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation HardwareVersionString read Error", error); + LogNSError("LocalizationConfiguration ActiveLocale read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -15189,25 +16850,66 @@ class ReadBasicInformationHardwareVersionString : public ReadAttribute { } }; -class SubscribeAttributeBasicInformationHardwareVersionString : public SubscribeAttribute { +class WriteLocalizationConfigurationActiveLocale : public WriteAttribute { public: - SubscribeAttributeBasicInformationHardwareVersionString() - : SubscribeAttribute("hardware-version-string") + WriteLocalizationConfigurationActiveLocale() + : WriteAttribute("active-locale") { + AddArgument("attr-name", "active-locale"); + AddArgument("attr-value", &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeBasicInformationHardwareVersionString() + ~WriteLocalizationConfigurationActiveLocale() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::HardwareVersionString::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::ActiveLocale::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 = [[MTRBaseClusterLocalizationConfiguration 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; + NSString * _Nonnull value = [[NSString alloc] initWithBytes:mValue.data() length:mValue.size() encoding:NSUTF8StringEncoding]; + + [cluster writeAttributeActiveLocaleWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("LocalizationConfiguration ActiveLocale write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::ByteSpan mValue; +}; + +class SubscribeAttributeLocalizationConfigurationActiveLocale : public SubscribeAttribute { +public: + SubscribeAttributeLocalizationConfigurationActiveLocale() + : SubscribeAttribute("active-locale") + { + } + + ~SubscribeAttributeLocalizationConfigurationActiveLocale() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::ActiveLocale::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -15218,10 +16920,10 @@ class SubscribeAttributeBasicInformationHardwareVersionString : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeHardwareVersionStringWithParams:params + [cluster subscribeAttributeActiveLocaleWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.HardwareVersionString response %@", [value description]); + NSLog(@"LocalizationConfiguration.ActiveLocale response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -15235,34 +16937,34 @@ class SubscribeAttributeBasicInformationHardwareVersionString : public Subscribe }; /* - * Attribute SoftwareVersion + * Attribute SupportedLocales */ -class ReadBasicInformationSoftwareVersion : public ReadAttribute { +class ReadLocalizationConfigurationSupportedLocales : public ReadAttribute { public: - ReadBasicInformationSoftwareVersion() - : ReadAttribute("software-version") + ReadLocalizationConfigurationSupportedLocales() + : ReadAttribute("supported-locales") { } - ~ReadBasicInformationSoftwareVersion() + ~ReadLocalizationConfigurationSupportedLocales() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::SoftwareVersion::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::SupportedLocales::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSoftwareVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.SoftwareVersion response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedLocalesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LocalizationConfiguration.SupportedLocales response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation SoftwareVersion read Error", error); + LogNSError("LocalizationConfiguration SupportedLocales read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -15271,25 +16973,25 @@ class ReadBasicInformationSoftwareVersion : public ReadAttribute { } }; -class SubscribeAttributeBasicInformationSoftwareVersion : public SubscribeAttribute { +class SubscribeAttributeLocalizationConfigurationSupportedLocales : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationSoftwareVersion() - : SubscribeAttribute("software-version") + SubscribeAttributeLocalizationConfigurationSupportedLocales() + : SubscribeAttribute("supported-locales") { } - ~SubscribeAttributeBasicInformationSoftwareVersion() + ~SubscribeAttributeLocalizationConfigurationSupportedLocales() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::SoftwareVersion::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::SupportedLocales::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -15300,10 +17002,10 @@ class SubscribeAttributeBasicInformationSoftwareVersion : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSoftwareVersionWithParams:params + [cluster subscribeAttributeSupportedLocalesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.SoftwareVersion response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LocalizationConfiguration.SupportedLocales response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -15317,34 +17019,34 @@ class SubscribeAttributeBasicInformationSoftwareVersion : public SubscribeAttrib }; /* - * Attribute SoftwareVersionString + * Attribute GeneratedCommandList */ -class ReadBasicInformationSoftwareVersionString : public ReadAttribute { +class ReadLocalizationConfigurationGeneratedCommandList : public ReadAttribute { public: - ReadBasicInformationSoftwareVersionString() - : ReadAttribute("software-version-string") + ReadLocalizationConfigurationGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadBasicInformationSoftwareVersionString() + ~ReadLocalizationConfigurationGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::SoftwareVersionString::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LocalizationConfiguration::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 = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSoftwareVersionStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.SoftwareVersionString response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LocalizationConfiguration.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation SoftwareVersionString read Error", error); + LogNSError("LocalizationConfiguration GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -15353,25 +17055,25 @@ class ReadBasicInformationSoftwareVersionString : public ReadAttribute { } }; -class SubscribeAttributeBasicInformationSoftwareVersionString : public SubscribeAttribute { +class SubscribeAttributeLocalizationConfigurationGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationSoftwareVersionString() - : SubscribeAttribute("software-version-string") + SubscribeAttributeLocalizationConfigurationGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeBasicInformationSoftwareVersionString() + ~SubscribeAttributeLocalizationConfigurationGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::SoftwareVersionString::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LocalizationConfiguration::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 = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -15382,10 +17084,10 @@ class SubscribeAttributeBasicInformationSoftwareVersionString : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSoftwareVersionStringWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.SoftwareVersionString response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LocalizationConfiguration.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -15399,34 +17101,34 @@ class SubscribeAttributeBasicInformationSoftwareVersionString : public Subscribe }; /* - * Attribute ManufacturingDate + * Attribute AcceptedCommandList */ -class ReadBasicInformationManufacturingDate : public ReadAttribute { +class ReadLocalizationConfigurationAcceptedCommandList : public ReadAttribute { public: - ReadBasicInformationManufacturingDate() - : ReadAttribute("manufacturing-date") + ReadLocalizationConfigurationAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadBasicInformationManufacturingDate() + ~ReadLocalizationConfigurationAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::ManufacturingDate::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LocalizationConfiguration::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 = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeManufacturingDateWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.ManufacturingDate response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LocalizationConfiguration.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation ManufacturingDate read Error", error); + LogNSError("LocalizationConfiguration AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -15435,25 +17137,25 @@ class ReadBasicInformationManufacturingDate : public ReadAttribute { } }; -class SubscribeAttributeBasicInformationManufacturingDate : public SubscribeAttribute { +class SubscribeAttributeLocalizationConfigurationAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationManufacturingDate() - : SubscribeAttribute("manufacturing-date") + SubscribeAttributeLocalizationConfigurationAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeBasicInformationManufacturingDate() + ~SubscribeAttributeLocalizationConfigurationAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::ManufacturingDate::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LocalizationConfiguration::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 = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -15464,10 +17166,10 @@ class SubscribeAttributeBasicInformationManufacturingDate : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeManufacturingDateWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.ManufacturingDate response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LocalizationConfiguration.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -15480,35 +17182,37 @@ class SubscribeAttributeBasicInformationManufacturingDate : public SubscribeAttr } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute PartNumber + * Attribute EventList */ -class ReadBasicInformationPartNumber : public ReadAttribute { +class ReadLocalizationConfigurationEventList : public ReadAttribute { public: - ReadBasicInformationPartNumber() - : ReadAttribute("part-number") + ReadLocalizationConfigurationEventList() + : ReadAttribute("event-list") { } - ~ReadBasicInformationPartNumber() + ~ReadLocalizationConfigurationEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::PartNumber::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LocalizationConfiguration::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 = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePartNumberWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.PartNumber response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LocalizationConfiguration.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation PartNumber read Error", error); + LogNSError("LocalizationConfiguration EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -15517,25 +17221,25 @@ class ReadBasicInformationPartNumber : public ReadAttribute { } }; -class SubscribeAttributeBasicInformationPartNumber : public SubscribeAttribute { +class SubscribeAttributeLocalizationConfigurationEventList : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationPartNumber() - : SubscribeAttribute("part-number") + SubscribeAttributeLocalizationConfigurationEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeBasicInformationPartNumber() + ~SubscribeAttributeLocalizationConfigurationEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::PartNumber::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LocalizationConfiguration::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 = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -15546,10 +17250,10 @@ class SubscribeAttributeBasicInformationPartNumber : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePartNumberWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.PartNumber response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LocalizationConfiguration.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -15562,35 +17266,37 @@ class SubscribeAttributeBasicInformationPartNumber : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute ProductURL + * Attribute AttributeList */ -class ReadBasicInformationProductURL : public ReadAttribute { +class ReadLocalizationConfigurationAttributeList : public ReadAttribute { public: - ReadBasicInformationProductURL() - : ReadAttribute("product-url") + ReadLocalizationConfigurationAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadBasicInformationProductURL() + ~ReadLocalizationConfigurationAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::ProductURL::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LocalizationConfiguration::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 = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeProductURLWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.ProductURL response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LocalizationConfiguration.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation ProductURL read Error", error); + LogNSError("LocalizationConfiguration AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -15599,25 +17305,25 @@ class ReadBasicInformationProductURL : public ReadAttribute { } }; -class SubscribeAttributeBasicInformationProductURL : public SubscribeAttribute { +class SubscribeAttributeLocalizationConfigurationAttributeList : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationProductURL() - : SubscribeAttribute("product-url") + SubscribeAttributeLocalizationConfigurationAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeBasicInformationProductURL() + ~SubscribeAttributeLocalizationConfigurationAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::ProductURL::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LocalizationConfiguration::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 = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -15628,10 +17334,10 @@ class SubscribeAttributeBasicInformationProductURL : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeProductURLWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.ProductURL response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LocalizationConfiguration.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -15645,34 +17351,34 @@ class SubscribeAttributeBasicInformationProductURL : public SubscribeAttribute { }; /* - * Attribute ProductLabel + * Attribute FeatureMap */ -class ReadBasicInformationProductLabel : public ReadAttribute { +class ReadLocalizationConfigurationFeatureMap : public ReadAttribute { public: - ReadBasicInformationProductLabel() - : ReadAttribute("product-label") + ReadLocalizationConfigurationFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadBasicInformationProductLabel() + ~ReadLocalizationConfigurationFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::ProductLabel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LocalizationConfiguration::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 = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeProductLabelWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.ProductLabel response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"LocalizationConfiguration.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation ProductLabel read Error", error); + LogNSError("LocalizationConfiguration FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -15681,25 +17387,25 @@ class ReadBasicInformationProductLabel : public ReadAttribute { } }; -class SubscribeAttributeBasicInformationProductLabel : public SubscribeAttribute { +class SubscribeAttributeLocalizationConfigurationFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationProductLabel() - : SubscribeAttribute("product-label") + SubscribeAttributeLocalizationConfigurationFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeBasicInformationProductLabel() + ~SubscribeAttributeLocalizationConfigurationFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::ProductLabel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LocalizationConfiguration::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 = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -15710,10 +17416,10 @@ class SubscribeAttributeBasicInformationProductLabel : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeProductLabelWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.ProductLabel response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"LocalizationConfiguration.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -15727,34 +17433,34 @@ class SubscribeAttributeBasicInformationProductLabel : public SubscribeAttribute }; /* - * Attribute SerialNumber + * Attribute ClusterRevision */ -class ReadBasicInformationSerialNumber : public ReadAttribute { +class ReadLocalizationConfigurationClusterRevision : public ReadAttribute { public: - ReadBasicInformationSerialNumber() - : ReadAttribute("serial-number") + ReadLocalizationConfigurationClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadBasicInformationSerialNumber() + ~ReadLocalizationConfigurationClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::SerialNumber::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LocalizationConfiguration::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 = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSerialNumberWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.SerialNumber response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"LocalizationConfiguration.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation SerialNumber read Error", error); + LogNSError("LocalizationConfiguration ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -15763,25 +17469,25 @@ class ReadBasicInformationSerialNumber : public ReadAttribute { } }; -class SubscribeAttributeBasicInformationSerialNumber : public SubscribeAttribute { +class SubscribeAttributeLocalizationConfigurationClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationSerialNumber() - : SubscribeAttribute("serial-number") + SubscribeAttributeLocalizationConfigurationClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeBasicInformationSerialNumber() + ~SubscribeAttributeLocalizationConfigurationClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::SerialNumber::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::LocalizationConfiguration::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 = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -15792,10 +17498,10 @@ class SubscribeAttributeBasicInformationSerialNumber : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSerialNumberWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.SerialNumber response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"LocalizationConfiguration.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -15808,35 +17514,54 @@ class SubscribeAttributeBasicInformationSerialNumber : public SubscribeAttribute } }; +/*----------------------------------------------------------------------------*\ +| Cluster TimeFormatLocalization | 0x002C | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * HourFormat | 0x0000 | +| * ActiveCalendarType | 0x0001 | +| * SupportedCalendarTypes | 0x0002 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute LocalConfigDisabled + * Attribute HourFormat */ -class ReadBasicInformationLocalConfigDisabled : public ReadAttribute { +class ReadTimeFormatLocalizationHourFormat : public ReadAttribute { public: - ReadBasicInformationLocalConfigDisabled() - : ReadAttribute("local-config-disabled") + ReadTimeFormatLocalizationHourFormat() + : ReadAttribute("hour-format") { } - ~ReadBasicInformationLocalConfigDisabled() + ~ReadTimeFormatLocalizationHourFormat() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::LocalConfigDisabled::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::HourFormat::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLocalConfigDisabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.LocalConfigDisabled response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeHourFormatWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeFormatLocalization.HourFormat response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation LocalConfigDisabled read Error", error); + LogNSError("TimeFormatLocalization HourFormat read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -15845,36 +17570,36 @@ class ReadBasicInformationLocalConfigDisabled : public ReadAttribute { } }; -class WriteBasicInformationLocalConfigDisabled : public WriteAttribute { +class WriteTimeFormatLocalizationHourFormat : public WriteAttribute { public: - WriteBasicInformationLocalConfigDisabled() - : WriteAttribute("local-config-disabled") + WriteTimeFormatLocalizationHourFormat() + : WriteAttribute("hour-format") { - AddArgument("attr-name", "local-config-disabled"); - AddArgument("attr-value", 0, 1, &mValue); + AddArgument("attr-name", "hour-format"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteBasicInformationLocalConfigDisabled() + ~WriteTimeFormatLocalizationHourFormat() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::LocalConfigDisabled::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::HourFormat::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 = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization 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 numberWithBool:mValue]; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeLocalConfigDisabledWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeHourFormatWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("BasicInformation LocalConfigDisabled write Error", error); + LogNSError("TimeFormatLocalization HourFormat write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -15883,28 +17608,28 @@ class WriteBasicInformationLocalConfigDisabled : public WriteAttribute { } private: - bool mValue; + uint8_t mValue; }; -class SubscribeAttributeBasicInformationLocalConfigDisabled : public SubscribeAttribute { +class SubscribeAttributeTimeFormatLocalizationHourFormat : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationLocalConfigDisabled() - : SubscribeAttribute("local-config-disabled") + SubscribeAttributeTimeFormatLocalizationHourFormat() + : SubscribeAttribute("hour-format") { } - ~SubscribeAttributeBasicInformationLocalConfigDisabled() + ~SubscribeAttributeTimeFormatLocalizationHourFormat() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::LocalConfigDisabled::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::HourFormat::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -15915,10 +17640,10 @@ class SubscribeAttributeBasicInformationLocalConfigDisabled : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLocalConfigDisabledWithParams:params + [cluster subscribeAttributeHourFormatWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.LocalConfigDisabled response %@", [value description]); + NSLog(@"TimeFormatLocalization.HourFormat response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -15932,34 +17657,34 @@ class SubscribeAttributeBasicInformationLocalConfigDisabled : public SubscribeAt }; /* - * Attribute Reachable + * Attribute ActiveCalendarType */ -class ReadBasicInformationReachable : public ReadAttribute { +class ReadTimeFormatLocalizationActiveCalendarType : public ReadAttribute { public: - ReadBasicInformationReachable() - : ReadAttribute("reachable") + ReadTimeFormatLocalizationActiveCalendarType() + : ReadAttribute("active-calendar-type") { } - ~ReadBasicInformationReachable() + ~ReadTimeFormatLocalizationActiveCalendarType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::Reachable::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::ActiveCalendarType::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeReachableWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.Reachable response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeActiveCalendarTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeFormatLocalization.ActiveCalendarType response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation Reachable read Error", error); + LogNSError("TimeFormatLocalization ActiveCalendarType read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -15968,25 +17693,66 @@ class ReadBasicInformationReachable : public ReadAttribute { } }; -class SubscribeAttributeBasicInformationReachable : public SubscribeAttribute { +class WriteTimeFormatLocalizationActiveCalendarType : public WriteAttribute { public: - SubscribeAttributeBasicInformationReachable() - : SubscribeAttribute("reachable") + WriteTimeFormatLocalizationActiveCalendarType() + : WriteAttribute("active-calendar-type") { + AddArgument("attr-name", "active-calendar-type"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeBasicInformationReachable() + ~WriteTimeFormatLocalizationActiveCalendarType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::Reachable::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::ActiveCalendarType::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 = [[MTRBaseClusterTimeFormatLocalization 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 writeAttributeActiveCalendarTypeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("TimeFormatLocalization ActiveCalendarType write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeTimeFormatLocalizationActiveCalendarType : public SubscribeAttribute { +public: + SubscribeAttributeTimeFormatLocalizationActiveCalendarType() + : SubscribeAttribute("active-calendar-type") + { + } + + ~SubscribeAttributeTimeFormatLocalizationActiveCalendarType() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::ActiveCalendarType::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -15997,10 +17763,10 @@ class SubscribeAttributeBasicInformationReachable : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeReachableWithParams:params + [cluster subscribeAttributeActiveCalendarTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.Reachable response %@", [value description]); + NSLog(@"TimeFormatLocalization.ActiveCalendarType response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -16014,34 +17780,34 @@ class SubscribeAttributeBasicInformationReachable : public SubscribeAttribute { }; /* - * Attribute UniqueID + * Attribute SupportedCalendarTypes */ -class ReadBasicInformationUniqueID : public ReadAttribute { +class ReadTimeFormatLocalizationSupportedCalendarTypes : public ReadAttribute { public: - ReadBasicInformationUniqueID() - : ReadAttribute("unique-id") + ReadTimeFormatLocalizationSupportedCalendarTypes() + : ReadAttribute("supported-calendar-types") { } - ~ReadBasicInformationUniqueID() + ~ReadTimeFormatLocalizationSupportedCalendarTypes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::UniqueID::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::SupportedCalendarTypes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUniqueIDWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.UniqueID response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedCalendarTypesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeFormatLocalization.SupportedCalendarTypes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation UniqueID read Error", error); + LogNSError("TimeFormatLocalization SupportedCalendarTypes read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -16050,25 +17816,25 @@ class ReadBasicInformationUniqueID : public ReadAttribute { } }; -class SubscribeAttributeBasicInformationUniqueID : public SubscribeAttribute { +class SubscribeAttributeTimeFormatLocalizationSupportedCalendarTypes : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationUniqueID() - : SubscribeAttribute("unique-id") + SubscribeAttributeTimeFormatLocalizationSupportedCalendarTypes() + : SubscribeAttribute("supported-calendar-types") { } - ~SubscribeAttributeBasicInformationUniqueID() + ~SubscribeAttributeTimeFormatLocalizationSupportedCalendarTypes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::UniqueID::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::SupportedCalendarTypes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -16079,10 +17845,10 @@ class SubscribeAttributeBasicInformationUniqueID : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUniqueIDWithParams:params + [cluster subscribeAttributeSupportedCalendarTypesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.UniqueID response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeFormatLocalization.SupportedCalendarTypes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -16096,34 +17862,34 @@ class SubscribeAttributeBasicInformationUniqueID : public SubscribeAttribute { }; /* - * Attribute CapabilityMinima + * Attribute GeneratedCommandList */ -class ReadBasicInformationCapabilityMinima : public ReadAttribute { +class ReadTimeFormatLocalizationGeneratedCommandList : public ReadAttribute { public: - ReadBasicInformationCapabilityMinima() - : ReadAttribute("capability-minima") + ReadTimeFormatLocalizationGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadBasicInformationCapabilityMinima() + ~ReadTimeFormatLocalizationGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::CapabilityMinima::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::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 = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCapabilityMinimaWithCompletion:^(MTRBasicInformationClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.CapabilityMinima response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeFormatLocalization.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation CapabilityMinima read Error", error); + LogNSError("TimeFormatLocalization GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -16132,25 +17898,25 @@ class ReadBasicInformationCapabilityMinima : public ReadAttribute { } }; -class SubscribeAttributeBasicInformationCapabilityMinima : public SubscribeAttribute { +class SubscribeAttributeTimeFormatLocalizationGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationCapabilityMinima() - : SubscribeAttribute("capability-minima") + SubscribeAttributeTimeFormatLocalizationGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeBasicInformationCapabilityMinima() + ~SubscribeAttributeTimeFormatLocalizationGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::CapabilityMinima::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeFormatLocalization::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 = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -16161,10 +17927,10 @@ class SubscribeAttributeBasicInformationCapabilityMinima : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCapabilityMinimaWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(MTRBasicInformationClusterCapabilityMinimaStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.CapabilityMinima response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeFormatLocalization.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -16178,34 +17944,34 @@ class SubscribeAttributeBasicInformationCapabilityMinima : public SubscribeAttri }; /* - * Attribute ProductAppearance + * Attribute AcceptedCommandList */ -class ReadBasicInformationProductAppearance : public ReadAttribute { +class ReadTimeFormatLocalizationAcceptedCommandList : public ReadAttribute { public: - ReadBasicInformationProductAppearance() - : ReadAttribute("product-appearance") + ReadTimeFormatLocalizationAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadBasicInformationProductAppearance() + ~ReadTimeFormatLocalizationAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::ProductAppearance::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::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 = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeProductAppearanceWithCompletion:^(MTRBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.ProductAppearance response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeFormatLocalization.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation ProductAppearance read Error", error); + LogNSError("TimeFormatLocalization AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -16214,25 +17980,25 @@ class ReadBasicInformationProductAppearance : public ReadAttribute { } }; -class SubscribeAttributeBasicInformationProductAppearance : public SubscribeAttribute { +class SubscribeAttributeTimeFormatLocalizationAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationProductAppearance() - : SubscribeAttribute("product-appearance") + SubscribeAttributeTimeFormatLocalizationAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeBasicInformationProductAppearance() + ~SubscribeAttributeTimeFormatLocalizationAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::ProductAppearance::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeFormatLocalization::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 = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -16243,10 +18009,10 @@ class SubscribeAttributeBasicInformationProductAppearance : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeProductAppearanceWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(MTRBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.ProductAppearance response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeFormatLocalization.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -16262,34 +18028,34 @@ class SubscribeAttributeBasicInformationProductAppearance : public SubscribeAttr #if MTR_ENABLE_PROVISIONAL /* - * Attribute SpecificationVersion + * Attribute EventList */ -class ReadBasicInformationSpecificationVersion : public ReadAttribute { +class ReadTimeFormatLocalizationEventList : public ReadAttribute { public: - ReadBasicInformationSpecificationVersion() - : ReadAttribute("specification-version") + ReadTimeFormatLocalizationEventList() + : ReadAttribute("event-list") { } - ~ReadBasicInformationSpecificationVersion() + ~ReadTimeFormatLocalizationEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::SpecificationVersion::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::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 = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSpecificationVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.SpecificationVersion response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeFormatLocalization.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation SpecificationVersion read Error", error); + LogNSError("TimeFormatLocalization EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -16298,25 +18064,25 @@ class ReadBasicInformationSpecificationVersion : public ReadAttribute { } }; -class SubscribeAttributeBasicInformationSpecificationVersion : public SubscribeAttribute { +class SubscribeAttributeTimeFormatLocalizationEventList : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationSpecificationVersion() - : SubscribeAttribute("specification-version") + SubscribeAttributeTimeFormatLocalizationEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeBasicInformationSpecificationVersion() + ~SubscribeAttributeTimeFormatLocalizationEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::SpecificationVersion::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeFormatLocalization::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 = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -16327,10 +18093,10 @@ class SubscribeAttributeBasicInformationSpecificationVersion : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSpecificationVersionWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.SpecificationVersion response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeFormatLocalization.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -16344,37 +18110,36 @@ class SubscribeAttributeBasicInformationSpecificationVersion : public SubscribeA }; #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* - * Attribute MaxPathsPerInvoke + * Attribute AttributeList */ -class ReadBasicInformationMaxPathsPerInvoke : public ReadAttribute { +class ReadTimeFormatLocalizationAttributeList : public ReadAttribute { public: - ReadBasicInformationMaxPathsPerInvoke() - : ReadAttribute("max-paths-per-invoke") + ReadTimeFormatLocalizationAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadBasicInformationMaxPathsPerInvoke() + ~ReadTimeFormatLocalizationAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::MaxPathsPerInvoke::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::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 = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxPathsPerInvokeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.MaxPathsPerInvoke response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeFormatLocalization.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation MaxPathsPerInvoke read Error", error); + LogNSError("TimeFormatLocalization AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -16383,25 +18148,25 @@ class ReadBasicInformationMaxPathsPerInvoke : public ReadAttribute { } }; -class SubscribeAttributeBasicInformationMaxPathsPerInvoke : public SubscribeAttribute { +class SubscribeAttributeTimeFormatLocalizationAttributeList : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationMaxPathsPerInvoke() - : SubscribeAttribute("max-paths-per-invoke") + SubscribeAttributeTimeFormatLocalizationAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeBasicInformationMaxPathsPerInvoke() + ~SubscribeAttributeTimeFormatLocalizationAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::MaxPathsPerInvoke::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeFormatLocalization::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 = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -16412,10 +18177,10 @@ class SubscribeAttributeBasicInformationMaxPathsPerInvoke : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxPathsPerInvokeWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.MaxPathsPerInvoke response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeFormatLocalization.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -16428,37 +18193,35 @@ class SubscribeAttributeBasicInformationMaxPathsPerInvoke : public SubscribeAttr } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute GeneratedCommandList + * Attribute FeatureMap */ -class ReadBasicInformationGeneratedCommandList : public ReadAttribute { +class ReadTimeFormatLocalizationFeatureMap : public ReadAttribute { public: - ReadBasicInformationGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadTimeFormatLocalizationFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadBasicInformationGeneratedCommandList() + ~ReadTimeFormatLocalizationFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::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 = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeFormatLocalization.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation GeneratedCommandList read Error", error); + LogNSError("TimeFormatLocalization FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -16467,25 +18230,25 @@ class ReadBasicInformationGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeBasicInformationGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeTimeFormatLocalizationFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeTimeFormatLocalizationFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeBasicInformationGeneratedCommandList() + ~SubscribeAttributeTimeFormatLocalizationFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeFormatLocalization::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 = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -16496,10 +18259,10 @@ class SubscribeAttributeBasicInformationGeneratedCommandList : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeFormatLocalization.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -16513,34 +18276,34 @@ class SubscribeAttributeBasicInformationGeneratedCommandList : public SubscribeA }; /* - * Attribute AcceptedCommandList + * Attribute ClusterRevision */ -class ReadBasicInformationAcceptedCommandList : public ReadAttribute { +class ReadTimeFormatLocalizationClusterRevision : public ReadAttribute { public: - ReadBasicInformationAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadTimeFormatLocalizationClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadBasicInformationAcceptedCommandList() + ~ReadTimeFormatLocalizationClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::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 = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeFormatLocalization.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation AcceptedCommandList read Error", error); + LogNSError("TimeFormatLocalization ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -16549,25 +18312,25 @@ class ReadBasicInformationAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeBasicInformationAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeTimeFormatLocalizationClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeTimeFormatLocalizationClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeBasicInformationAcceptedCommandList() + ~SubscribeAttributeTimeFormatLocalizationClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeFormatLocalization::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 = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -16578,10 +18341,10 @@ class SubscribeAttributeBasicInformationAcceptedCommandList : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeFormatLocalization.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -16594,37 +18357,52 @@ class SubscribeAttributeBasicInformationAcceptedCommandList : public SubscribeAt } }; -#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster UnitLocalization | 0x002D | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * TemperatureUnit | 0x0000 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ /* - * Attribute EventList + * Attribute TemperatureUnit */ -class ReadBasicInformationEventList : public ReadAttribute { +class ReadUnitLocalizationTemperatureUnit : public ReadAttribute { public: - ReadBasicInformationEventList() - : ReadAttribute("event-list") + ReadUnitLocalizationTemperatureUnit() + : ReadAttribute("temperature-unit") { } - ~ReadBasicInformationEventList() + ~ReadUnitLocalizationTemperatureUnit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitLocalization::Attributes::TemperatureUnit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTemperatureUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"UnitLocalization.TemperatureUnit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation EventList read Error", error); + LogNSError("UnitLocalization TemperatureUnit read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -16633,25 +18411,66 @@ class ReadBasicInformationEventList : public ReadAttribute { } }; -class SubscribeAttributeBasicInformationEventList : public SubscribeAttribute { +class WriteUnitLocalizationTemperatureUnit : public WriteAttribute { public: - SubscribeAttributeBasicInformationEventList() - : SubscribeAttribute("event-list") + WriteUnitLocalizationTemperatureUnit() + : WriteAttribute("temperature-unit") { + AddArgument("attr-name", "temperature-unit"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeBasicInformationEventList() + ~WriteUnitLocalizationTemperatureUnit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitLocalization::Attributes::TemperatureUnit::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 = [[MTRBaseClusterUnitLocalization 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 writeAttributeTemperatureUnitWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("UnitLocalization TemperatureUnit write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeUnitLocalizationTemperatureUnit : public SubscribeAttribute { +public: + SubscribeAttributeUnitLocalizationTemperatureUnit() + : SubscribeAttribute("temperature-unit") + { + } + + ~SubscribeAttributeUnitLocalizationTemperatureUnit() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitLocalization::Attributes::TemperatureUnit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -16662,10 +18481,10 @@ class SubscribeAttributeBasicInformationEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeTemperatureUnitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"UnitLocalization.TemperatureUnit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -16678,37 +18497,35 @@ class SubscribeAttributeBasicInformationEventList : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute GeneratedCommandList */ -class ReadBasicInformationAttributeList : public ReadAttribute { +class ReadUnitLocalizationGeneratedCommandList : public ReadAttribute { public: - ReadBasicInformationAttributeList() - : ReadAttribute("attribute-list") + ReadUnitLocalizationGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadBasicInformationAttributeList() + ~ReadUnitLocalizationGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitLocalization::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 = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"UnitLocalization.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation AttributeList read Error", error); + LogNSError("UnitLocalization GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -16717,25 +18534,25 @@ class ReadBasicInformationAttributeList : public ReadAttribute { } }; -class SubscribeAttributeBasicInformationAttributeList : public SubscribeAttribute { +class SubscribeAttributeUnitLocalizationGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeUnitLocalizationGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeBasicInformationAttributeList() + ~SubscribeAttributeUnitLocalizationGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitLocalization::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 = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -16746,10 +18563,10 @@ class SubscribeAttributeBasicInformationAttributeList : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.AttributeList response %@", [value description]); + NSLog(@"UnitLocalization.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -16763,34 +18580,34 @@ class SubscribeAttributeBasicInformationAttributeList : public SubscribeAttribut }; /* - * Attribute FeatureMap + * Attribute AcceptedCommandList */ -class ReadBasicInformationFeatureMap : public ReadAttribute { +class ReadUnitLocalizationAcceptedCommandList : public ReadAttribute { public: - ReadBasicInformationFeatureMap() - : ReadAttribute("feature-map") + ReadUnitLocalizationAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadBasicInformationFeatureMap() + ~ReadUnitLocalizationAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitLocalization::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 = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"UnitLocalization.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation FeatureMap read Error", error); + LogNSError("UnitLocalization AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -16799,25 +18616,25 @@ class ReadBasicInformationFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeBasicInformationFeatureMap : public SubscribeAttribute { +class SubscribeAttributeUnitLocalizationAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeUnitLocalizationAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeBasicInformationFeatureMap() + ~SubscribeAttributeUnitLocalizationAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitLocalization::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 = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -16828,10 +18645,10 @@ class SubscribeAttributeBasicInformationFeatureMap : 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(@"BasicInformation.FeatureMap response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"UnitLocalization.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -16844,35 +18661,37 @@ class SubscribeAttributeBasicInformationFeatureMap : public SubscribeAttribute { } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ClusterRevision + * Attribute EventList */ -class ReadBasicInformationClusterRevision : public ReadAttribute { +class ReadUnitLocalizationEventList : public ReadAttribute { public: - ReadBasicInformationClusterRevision() - : ReadAttribute("cluster-revision") + ReadUnitLocalizationEventList() + : ReadAttribute("event-list") { } - ~ReadBasicInformationClusterRevision() + ~ReadUnitLocalizationEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BasicInformation::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitLocalization::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 = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"UnitLocalization.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BasicInformation ClusterRevision read Error", error); + LogNSError("UnitLocalization EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -16881,25 +18700,25 @@ class ReadBasicInformationClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeBasicInformationClusterRevision : public SubscribeAttribute { +class SubscribeAttributeUnitLocalizationEventList : public SubscribeAttribute { public: - SubscribeAttributeBasicInformationClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeUnitLocalizationEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeBasicInformationClusterRevision() + ~SubscribeAttributeUnitLocalizationEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BasicInformation::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitLocalization::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 = [[MTRBaseClusterBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -16910,10 +18729,10 @@ class SubscribeAttributeBasicInformationClusterRevision : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BasicInformation.ClusterRevision response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"UnitLocalization.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -16926,251 +18745,119 @@ class SubscribeAttributeBasicInformationClusterRevision : public SubscribeAttrib } }; -/*----------------------------------------------------------------------------*\ -| Cluster OtaSoftwareUpdateProvider | 0x0029 | -|------------------------------------------------------------------------------| -| Commands: | | -| * QueryImage | 0x00 | -| * ApplyUpdateRequest | 0x02 | -| * NotifyUpdateApplied | 0x04 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ +#endif // MTR_ENABLE_PROVISIONAL /* - * Command QueryImage + * Attribute AttributeList */ -class OtaSoftwareUpdateProviderQueryImage : public ClusterCommand { +class ReadUnitLocalizationAttributeList : public ReadAttribute { public: - OtaSoftwareUpdateProviderQueryImage() - : ClusterCommand("query-image") - , mComplex_ProtocolsSupported(&mRequest.protocolsSupported) + ReadUnitLocalizationAttributeList() + : ReadAttribute("attribute-list") + { + } + + ~ReadUnitLocalizationAttributeList() { - 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(MTRBaseDevice * device, chip::EndpointId endpointId) 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::UnitLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitLocalization::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 = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROTASoftwareUpdateProviderClusterQueryImageParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.vendorID = [NSNumber numberWithUnsignedShort:chip::to_underlying(mRequest.vendorID)]; - params.productID = [NSNumber numberWithUnsignedShort:mRequest.productID]; - params.softwareVersion = [NSNumber numberWithUnsignedInt:mRequest.softwareVersion]; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - for (auto & entry_0 : mRequest.protocolsSupported) { - NSNumber * newElement_0; - newElement_0 = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0)]; - [array_0 addObject:newElement_0]; + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"UnitLocalization.AttributeList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("UnitLocalization AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } - params.protocolsSupported = array_0; - } - if (mRequest.hardwareVersion.HasValue()) { - params.hardwareVersion = [NSNumber numberWithUnsignedShort:mRequest.hardwareVersion.Value()]; - } else { - params.hardwareVersion = nil; - } - if (mRequest.location.HasValue()) { - params.location = [[NSString alloc] initWithBytes:mRequest.location.Value().data() length:mRequest.location.Value().size() encoding:NSUTF8StringEncoding]; - } else { - params.location = nil; - } - if (mRequest.requestorCanConsent.HasValue()) { - params.requestorCanConsent = [NSNumber numberWithBool:mRequest.requestorCanConsent.Value()]; - } else { - params.requestorCanConsent = nil; - } - if (mRequest.metadataForProvider.HasValue()) { - params.metadataForProvider = [NSData dataWithBytes:mRequest.metadataForProvider.Value().data() length:mRequest.metadataForProvider.Value().size()]; - } else { - params.metadataForProvider = nil; - } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster queryImageWithParams:params completion: - ^(MTROTASoftwareUpdateProviderClusterQueryImageResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImageResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImageResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::QueryImage::Type mRequest; - TypedComplexArgument> mComplex_ProtocolsSupported; }; -/* - * Command ApplyUpdateRequest - */ -class OtaSoftwareUpdateProviderApplyUpdateRequest : public ClusterCommand { +class SubscribeAttributeUnitLocalizationAttributeList : public SubscribeAttribute { public: - OtaSoftwareUpdateProviderApplyUpdateRequest() - : ClusterCommand("apply-update-request") - { - AddArgument("UpdateToken", &mRequest.updateToken); - AddArgument("NewVersion", 0, UINT32_MAX, &mRequest.newVersion); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + SubscribeAttributeUnitLocalizationAttributeList() + : SubscribeAttribute("attribute-list") { - 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, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROTASoftwareUpdateProviderClusterApplyUpdateRequestParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.updateToken = [NSData dataWithBytes:mRequest.updateToken.data() length:mRequest.updateToken.size()]; - params.newVersion = [NSNumber numberWithUnsignedInt:mRequest.newVersion]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster applyUpdateRequestWithParams:params completion: - ^(MTROTASoftwareUpdateProviderClusterApplyUpdateResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; } -private: - chip::app::Clusters::OtaSoftwareUpdateProvider::Commands::ApplyUpdateRequest::Type mRequest; -}; - -/* - * Command NotifyUpdateApplied - */ -class OtaSoftwareUpdateProviderNotifyUpdateApplied : public ClusterCommand { -public: - OtaSoftwareUpdateProviderNotifyUpdateApplied() - : ClusterCommand("notify-update-applied") + ~SubscribeAttributeUnitLocalizationAttributeList() { - AddArgument("UpdateToken", &mRequest.updateToken); - AddArgument("SoftwareVersion", 0, UINT32_MAX, &mRequest.softwareVersion); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - 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, endpointId); + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitLocalization::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 = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROTASoftwareUpdateProviderClusterNotifyUpdateAppliedParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.updateToken = [NSData dataWithBytes:mRequest.updateToken.data() length:mRequest.updateToken.size()]; - params.softwareVersion = [NSNumber numberWithUnsignedInt:mRequest.softwareVersion]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster notifyUpdateAppliedWithParams: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 = [[MTRBaseClusterUnitLocalization 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(@"UnitLocalization.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::OtaSoftwareUpdateProvider::Commands::NotifyUpdateApplied::Type mRequest; }; /* - * Attribute GeneratedCommandList + * Attribute FeatureMap */ -class ReadOtaSoftwareUpdateProviderGeneratedCommandList : public ReadAttribute { +class ReadUnitLocalizationFeatureMap : public ReadAttribute { public: - ReadOtaSoftwareUpdateProviderGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadUnitLocalizationFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadOtaSoftwareUpdateProviderGeneratedCommandList() + ~ReadUnitLocalizationFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitLocalization::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 = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateProvider.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"UnitLocalization.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OTASoftwareUpdateProvider GeneratedCommandList read Error", error); + LogNSError("UnitLocalization FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -17179,25 +18866,25 @@ class ReadOtaSoftwareUpdateProviderGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeOtaSoftwareUpdateProviderGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeUnitLocalizationFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeOtaSoftwareUpdateProviderGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeUnitLocalizationFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeOtaSoftwareUpdateProviderGeneratedCommandList() + ~SubscribeAttributeUnitLocalizationFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitLocalization::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 = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -17208,10 +18895,10 @@ class SubscribeAttributeOtaSoftwareUpdateProviderGeneratedCommandList : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateProvider.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"UnitLocalization.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -17225,34 +18912,34 @@ class SubscribeAttributeOtaSoftwareUpdateProviderGeneratedCommandList : public S }; /* - * Attribute AcceptedCommandList + * Attribute ClusterRevision */ -class ReadOtaSoftwareUpdateProviderAcceptedCommandList : public ReadAttribute { +class ReadUnitLocalizationClusterRevision : public ReadAttribute { public: - ReadOtaSoftwareUpdateProviderAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadUnitLocalizationClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadOtaSoftwareUpdateProviderAcceptedCommandList() + ~ReadUnitLocalizationClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitLocalization::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 = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateProvider.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"UnitLocalization.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OTASoftwareUpdateProvider AcceptedCommandList read Error", error); + LogNSError("UnitLocalization ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -17261,25 +18948,25 @@ class ReadOtaSoftwareUpdateProviderAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeOtaSoftwareUpdateProviderAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeUnitLocalizationClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeOtaSoftwareUpdateProviderAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeUnitLocalizationClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeOtaSoftwareUpdateProviderAcceptedCommandList() + ~SubscribeAttributeUnitLocalizationClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitLocalization::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 = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -17290,10 +18977,10 @@ class SubscribeAttributeOtaSoftwareUpdateProviderAcceptedCommandList : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateProvider.AcceptedCommandList response %@", [value description]); + [cluster subscribeAttributeClusterRevisionWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"UnitLocalization.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -17306,37 +18993,52 @@ class SubscribeAttributeOtaSoftwareUpdateProviderAcceptedCommandList : public Su } }; -#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster PowerSourceConfiguration | 0x002E | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Sources | 0x0000 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ /* - * Attribute EventList + * Attribute Sources */ -class ReadOtaSoftwareUpdateProviderEventList : public ReadAttribute { +class ReadPowerSourceConfigurationSources : public ReadAttribute { public: - ReadOtaSoftwareUpdateProviderEventList() - : ReadAttribute("event-list") + ReadPowerSourceConfigurationSources() + : ReadAttribute("sources") { } - ~ReadOtaSoftwareUpdateProviderEventList() + ~ReadPowerSourceConfigurationSources() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::Sources::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateProvider.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSourcesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSourceConfiguration.Sources response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OTASoftwareUpdateProvider EventList read Error", error); + LogNSError("PowerSourceConfiguration Sources read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -17345,25 +19047,25 @@ class ReadOtaSoftwareUpdateProviderEventList : public ReadAttribute { } }; -class SubscribeAttributeOtaSoftwareUpdateProviderEventList : public SubscribeAttribute { +class SubscribeAttributePowerSourceConfigurationSources : public SubscribeAttribute { public: - SubscribeAttributeOtaSoftwareUpdateProviderEventList() - : SubscribeAttribute("event-list") + SubscribeAttributePowerSourceConfigurationSources() + : SubscribeAttribute("sources") { } - ~SubscribeAttributeOtaSoftwareUpdateProviderEventList() + ~SubscribeAttributePowerSourceConfigurationSources() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::Sources::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -17374,10 +19076,10 @@ class SubscribeAttributeOtaSoftwareUpdateProviderEventList : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeSourcesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateProvider.EventList response %@", [value description]); + NSLog(@"PowerSourceConfiguration.Sources response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -17390,37 +19092,35 @@ class SubscribeAttributeOtaSoftwareUpdateProviderEventList : public SubscribeAtt } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute GeneratedCommandList */ -class ReadOtaSoftwareUpdateProviderAttributeList : public ReadAttribute { +class ReadPowerSourceConfigurationGeneratedCommandList : public ReadAttribute { public: - ReadOtaSoftwareUpdateProviderAttributeList() - : ReadAttribute("attribute-list") + ReadPowerSourceConfigurationGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadOtaSoftwareUpdateProviderAttributeList() + ~ReadPowerSourceConfigurationGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSourceConfiguration::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 = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateProvider.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSourceConfiguration.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OTASoftwareUpdateProvider AttributeList read Error", error); + LogNSError("PowerSourceConfiguration GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -17429,25 +19129,25 @@ class ReadOtaSoftwareUpdateProviderAttributeList : public ReadAttribute { } }; -class SubscribeAttributeOtaSoftwareUpdateProviderAttributeList : public SubscribeAttribute { +class SubscribeAttributePowerSourceConfigurationGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOtaSoftwareUpdateProviderAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributePowerSourceConfigurationGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeOtaSoftwareUpdateProviderAttributeList() + ~SubscribeAttributePowerSourceConfigurationGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSourceConfiguration::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 = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -17458,10 +19158,10 @@ class SubscribeAttributeOtaSoftwareUpdateProviderAttributeList : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateProvider.AttributeList response %@", [value description]); + NSLog(@"PowerSourceConfiguration.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -17475,34 +19175,34 @@ class SubscribeAttributeOtaSoftwareUpdateProviderAttributeList : public Subscrib }; /* - * Attribute FeatureMap + * Attribute AcceptedCommandList */ -class ReadOtaSoftwareUpdateProviderFeatureMap : public ReadAttribute { +class ReadPowerSourceConfigurationAcceptedCommandList : public ReadAttribute { public: - ReadOtaSoftwareUpdateProviderFeatureMap() - : ReadAttribute("feature-map") + ReadPowerSourceConfigurationAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadOtaSoftwareUpdateProviderFeatureMap() + ~ReadPowerSourceConfigurationAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSourceConfiguration::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 = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateProvider.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSourceConfiguration.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OTASoftwareUpdateProvider FeatureMap read Error", error); + LogNSError("PowerSourceConfiguration AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -17511,25 +19211,25 @@ class ReadOtaSoftwareUpdateProviderFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeOtaSoftwareUpdateProviderFeatureMap : public SubscribeAttribute { +class SubscribeAttributePowerSourceConfigurationAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOtaSoftwareUpdateProviderFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributePowerSourceConfigurationAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeOtaSoftwareUpdateProviderFeatureMap() + ~SubscribeAttributePowerSourceConfigurationAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSourceConfiguration::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 = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -17540,10 +19240,10 @@ class SubscribeAttributeOtaSoftwareUpdateProviderFeatureMap : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateProvider.FeatureMap response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSourceConfiguration.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -17556,35 +19256,37 @@ class SubscribeAttributeOtaSoftwareUpdateProviderFeatureMap : public SubscribeAt } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ClusterRevision + * Attribute EventList */ -class ReadOtaSoftwareUpdateProviderClusterRevision : public ReadAttribute { +class ReadPowerSourceConfigurationEventList : public ReadAttribute { public: - ReadOtaSoftwareUpdateProviderClusterRevision() - : ReadAttribute("cluster-revision") + ReadPowerSourceConfigurationEventList() + : ReadAttribute("event-list") { } - ~ReadOtaSoftwareUpdateProviderClusterRevision() + ~ReadPowerSourceConfigurationEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSourceConfiguration::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 = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateProvider.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSourceConfiguration.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OTASoftwareUpdateProvider ClusterRevision read Error", error); + LogNSError("PowerSourceConfiguration EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -17593,25 +19295,25 @@ class ReadOtaSoftwareUpdateProviderClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeOtaSoftwareUpdateProviderClusterRevision : public SubscribeAttribute { +class SubscribeAttributePowerSourceConfigurationEventList : public SubscribeAttribute { public: - SubscribeAttributeOtaSoftwareUpdateProviderClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributePowerSourceConfigurationEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeOtaSoftwareUpdateProviderClusterRevision() + ~SubscribeAttributePowerSourceConfigurationEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateProvider::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateProvider::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSourceConfiguration::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 = [[MTRBaseClusterOTASoftwareUpdateProvider alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -17622,10 +19324,10 @@ class SubscribeAttributeOtaSoftwareUpdateProviderClusterRevision : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateProvider.ClusterRevision response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSourceConfiguration.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -17638,204 +19340,64 @@ class SubscribeAttributeOtaSoftwareUpdateProviderClusterRevision : public Subscr } }; -/*----------------------------------------------------------------------------*\ -| 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 AnnounceOTAProvider - */ -class OtaSoftwareUpdateRequestorAnnounceOTAProvider : public ClusterCommand { -public: - OtaSoftwareUpdateRequestorAnnounceOTAProvider() - : ClusterCommand("announce-otaprovider") - { - 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(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - 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, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROTASoftwareUpdateRequestorClusterAnnounceOTAProviderParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.providerNodeID = [NSNumber numberWithUnsignedLongLong:mRequest.providerNodeID]; - params.vendorID = [NSNumber numberWithUnsignedShort:chip::to_underlying(mRequest.vendorID)]; - params.announcementReason = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.announcementReason)]; - if (mRequest.metadataForNode.HasValue()) { - params.metadataForNode = [NSData dataWithBytes:mRequest.metadataForNode.Value().data() length:mRequest.metadataForNode.Value().size()]; - } else { - params.metadataForNode = nil; - } - params.endpoint = [NSNumber numberWithUnsignedShort:mRequest.endpoint]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster announceOTAProviderWithParams: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::OtaSoftwareUpdateRequestor::Commands::AnnounceOTAProvider::Type mRequest; -}; +#endif // MTR_ENABLE_PROVISIONAL /* - * Attribute DefaultOTAProviders + * Attribute AttributeList */ -class ReadOtaSoftwareUpdateRequestorDefaultOTAProviders : public ReadAttribute { +class ReadPowerSourceConfigurationAttributeList : public ReadAttribute { public: - ReadOtaSoftwareUpdateRequestorDefaultOTAProviders() - : ReadAttribute("default-otaproviders") + ReadPowerSourceConfigurationAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadOtaSoftwareUpdateRequestorDefaultOTAProviders() + ~ReadPowerSourceConfigurationAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::DefaultOTAProviders::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSourceConfiguration::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 = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRReadParams alloc] init]; - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - [cluster readAttributeDefaultOTAProvidersWithParams:params completion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.DefaultOTAProviders response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSourceConfiguration.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OTASoftwareUpdateRequestor DefaultOTAProviders read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteOtaSoftwareUpdateRequestorDefaultOTAProviders : public WriteAttribute { -public: - WriteOtaSoftwareUpdateRequestorDefaultOTAProviders() - : WriteAttribute("default-otaproviders") - , mComplex(&mValue) - { - AddArgument("attr-name", "default-otaproviders"); - AddArgument("attr-value", &mComplex); - WriteAttribute::AddArguments(); - } - - ~WriteOtaSoftwareUpdateRequestorDefaultOTAProviders() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::DefaultOTAProviders::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 = [[MTRBaseClusterOTASoftwareUpdateRequestor 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) { - MTROTASoftwareUpdateRequestorClusterProviderLocation * newElement_0; - newElement_0 = [MTROTASoftwareUpdateRequestorClusterProviderLocation new]; - newElement_0.providerNodeID = [NSNumber numberWithUnsignedLongLong:entry_0.providerNodeID]; - newElement_0.endpoint = [NSNumber numberWithUnsignedShort:entry_0.endpoint]; - newElement_0.fabricIndex = [NSNumber numberWithUnsignedChar:entry_0.fabricIndex]; - [array_0 addObject:newElement_0]; - } - value = array_0; - } - - [cluster writeAttributeDefaultOTAProvidersWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("OTASoftwareUpdateRequestor DefaultOTAProviders write Error", error); + LogNSError("PowerSourceConfiguration 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 SubscribeAttributeOtaSoftwareUpdateRequestorDefaultOTAProviders : public SubscribeAttribute { +class SubscribeAttributePowerSourceConfigurationAttributeList : public SubscribeAttribute { public: - SubscribeAttributeOtaSoftwareUpdateRequestorDefaultOTAProviders() - : SubscribeAttribute("default-otaproviders") + SubscribeAttributePowerSourceConfigurationAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeOtaSoftwareUpdateRequestorDefaultOTAProviders() + ~SubscribeAttributePowerSourceConfigurationAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::DefaultOTAProviders::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSourceConfiguration::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 = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -17846,10 +19408,10 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorDefaultOTAProviders : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDefaultOTAProvidersWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.DefaultOTAProviders response %@", [value description]); + NSLog(@"PowerSourceConfiguration.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -17863,34 +19425,34 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorDefaultOTAProviders : public S }; /* - * Attribute UpdatePossible + * Attribute FeatureMap */ -class ReadOtaSoftwareUpdateRequestorUpdatePossible : public ReadAttribute { +class ReadPowerSourceConfigurationFeatureMap : public ReadAttribute { public: - ReadOtaSoftwareUpdateRequestorUpdatePossible() - : ReadAttribute("update-possible") + ReadPowerSourceConfigurationFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadOtaSoftwareUpdateRequestorUpdatePossible() + ~ReadPowerSourceConfigurationFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSourceConfiguration::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 = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUpdatePossibleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.UpdatePossible response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSourceConfiguration.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OTASoftwareUpdateRequestor UpdatePossible read Error", error); + LogNSError("PowerSourceConfiguration FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -17899,25 +19461,25 @@ class ReadOtaSoftwareUpdateRequestorUpdatePossible : public ReadAttribute { } }; -class SubscribeAttributeOtaSoftwareUpdateRequestorUpdatePossible : public SubscribeAttribute { +class SubscribeAttributePowerSourceConfigurationFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeOtaSoftwareUpdateRequestorUpdatePossible() - : SubscribeAttribute("update-possible") + SubscribeAttributePowerSourceConfigurationFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeOtaSoftwareUpdateRequestorUpdatePossible() + ~SubscribeAttributePowerSourceConfigurationFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::UpdatePossible::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSourceConfiguration::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 = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -17928,10 +19490,10 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorUpdatePossible : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUpdatePossibleWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.UpdatePossible response %@", [value description]); + NSLog(@"PowerSourceConfiguration.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -17945,34 +19507,34 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorUpdatePossible : public Subscr }; /* - * Attribute UpdateState + * Attribute ClusterRevision */ -class ReadOtaSoftwareUpdateRequestorUpdateState : public ReadAttribute { +class ReadPowerSourceConfigurationClusterRevision : public ReadAttribute { public: - ReadOtaSoftwareUpdateRequestorUpdateState() - : ReadAttribute("update-state") + ReadPowerSourceConfigurationClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadOtaSoftwareUpdateRequestorUpdateState() + ~ReadPowerSourceConfigurationClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::UpdateState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSourceConfiguration::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 = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUpdateStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.UpdateState response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSourceConfiguration.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OTASoftwareUpdateRequestor UpdateState read Error", error); + LogNSError("PowerSourceConfiguration ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -17981,25 +19543,25 @@ class ReadOtaSoftwareUpdateRequestorUpdateState : public ReadAttribute { } }; -class SubscribeAttributeOtaSoftwareUpdateRequestorUpdateState : public SubscribeAttribute { +class SubscribeAttributePowerSourceConfigurationClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeOtaSoftwareUpdateRequestorUpdateState() - : SubscribeAttribute("update-state") + SubscribeAttributePowerSourceConfigurationClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeOtaSoftwareUpdateRequestorUpdateState() + ~SubscribeAttributePowerSourceConfigurationClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::UpdateState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSourceConfiguration::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 = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -18010,10 +19572,10 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorUpdateState : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUpdateStateWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.UpdateState response %@", [value description]); + NSLog(@"PowerSourceConfiguration.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -18026,35 +19588,86 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorUpdateState : public Subscribe } }; +/*----------------------------------------------------------------------------*\ +| 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 | +\*----------------------------------------------------------------------------*/ + /* - * Attribute UpdateStateProgress + * Attribute Status */ -class ReadOtaSoftwareUpdateRequestorUpdateStateProgress : public ReadAttribute { +class ReadPowerSourceStatus : public ReadAttribute { public: - ReadOtaSoftwareUpdateRequestorUpdateStateProgress() - : ReadAttribute("update-state-progress") + ReadPowerSourceStatus() + : ReadAttribute("status") { } - ~ReadOtaSoftwareUpdateRequestorUpdateStateProgress() + ~ReadPowerSourceStatus() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::Status::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUpdateStateProgressWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.UpdateStateProgress response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.Status response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OTASoftwareUpdateRequestor UpdateStateProgress read Error", error); + LogNSError("PowerSource Status read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -18063,25 +19676,25 @@ class ReadOtaSoftwareUpdateRequestorUpdateStateProgress : public ReadAttribute { } }; -class SubscribeAttributeOtaSoftwareUpdateRequestorUpdateStateProgress : public SubscribeAttribute { +class SubscribeAttributePowerSourceStatus : public SubscribeAttribute { public: - SubscribeAttributeOtaSoftwareUpdateRequestorUpdateStateProgress() - : SubscribeAttribute("update-state-progress") + SubscribeAttributePowerSourceStatus() + : SubscribeAttribute("status") { } - ~SubscribeAttributeOtaSoftwareUpdateRequestorUpdateStateProgress() + ~SubscribeAttributePowerSourceStatus() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::UpdateStateProgress::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::Status::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -18092,10 +19705,10 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorUpdateStateProgress : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUpdateStateProgressWithParams:params + [cluster subscribeAttributeStatusWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.UpdateStateProgress response %@", [value description]); + NSLog(@"PowerSource.Status response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -18109,34 +19722,34 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorUpdateStateProgress : public S }; /* - * Attribute GeneratedCommandList + * Attribute Order */ -class ReadOtaSoftwareUpdateRequestorGeneratedCommandList : public ReadAttribute { +class ReadPowerSourceOrder : public ReadAttribute { public: - ReadOtaSoftwareUpdateRequestorGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadPowerSourceOrder() + : ReadAttribute("order") { } - ~ReadOtaSoftwareUpdateRequestorGeneratedCommandList() + ~ReadPowerSourceOrder() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::Order::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOrderWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.Order response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OTASoftwareUpdateRequestor GeneratedCommandList read Error", error); + LogNSError("PowerSource Order read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -18145,25 +19758,25 @@ class ReadOtaSoftwareUpdateRequestorGeneratedCommandList : public ReadAttribute } }; -class SubscribeAttributeOtaSoftwareUpdateRequestorGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributePowerSourceOrder : public SubscribeAttribute { public: - SubscribeAttributeOtaSoftwareUpdateRequestorGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributePowerSourceOrder() + : SubscribeAttribute("order") { } - ~SubscribeAttributeOtaSoftwareUpdateRequestorGeneratedCommandList() + ~SubscribeAttributePowerSourceOrder() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::Order::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -18174,10 +19787,10 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorGeneratedCommandList : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeOrderWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.Order response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -18191,34 +19804,34 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorGeneratedCommandList : public }; /* - * Attribute AcceptedCommandList + * Attribute Description */ -class ReadOtaSoftwareUpdateRequestorAcceptedCommandList : public ReadAttribute { +class ReadPowerSourceDescription : public ReadAttribute { public: - ReadOtaSoftwareUpdateRequestorAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadPowerSourceDescription() + : ReadAttribute("description") { } - ~ReadOtaSoftwareUpdateRequestorAcceptedCommandList() + ~ReadPowerSourceDescription() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::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 = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDescriptionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.Description response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OTASoftwareUpdateRequestor AcceptedCommandList read Error", error); + LogNSError("PowerSource Description read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -18227,25 +19840,25 @@ class ReadOtaSoftwareUpdateRequestorAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeOtaSoftwareUpdateRequestorAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributePowerSourceDescription : public SubscribeAttribute { public: - SubscribeAttributeOtaSoftwareUpdateRequestorAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributePowerSourceDescription() + : SubscribeAttribute("description") { } - ~SubscribeAttributeOtaSoftwareUpdateRequestorAcceptedCommandList() + ~SubscribeAttributePowerSourceDescription() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::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 = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -18256,10 +19869,10 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorAcceptedCommandList : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeDescriptionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.Description response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -18272,37 +19885,35 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorAcceptedCommandList : public S } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute WiredAssessedInputVoltage */ -class ReadOtaSoftwareUpdateRequestorEventList : public ReadAttribute { +class ReadPowerSourceWiredAssessedInputVoltage : public ReadAttribute { public: - ReadOtaSoftwareUpdateRequestorEventList() - : ReadAttribute("event-list") + ReadPowerSourceWiredAssessedInputVoltage() + : ReadAttribute("wired-assessed-input-voltage") { } - ~ReadOtaSoftwareUpdateRequestorEventList() + ~ReadPowerSourceWiredAssessedInputVoltage() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredAssessedInputVoltage::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeWiredAssessedInputVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.WiredAssessedInputVoltage response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OTASoftwareUpdateRequestor EventList read Error", error); + LogNSError("PowerSource WiredAssessedInputVoltage read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -18311,25 +19922,25 @@ class ReadOtaSoftwareUpdateRequestorEventList : public ReadAttribute { } }; -class SubscribeAttributeOtaSoftwareUpdateRequestorEventList : public SubscribeAttribute { +class SubscribeAttributePowerSourceWiredAssessedInputVoltage : public SubscribeAttribute { public: - SubscribeAttributeOtaSoftwareUpdateRequestorEventList() - : SubscribeAttribute("event-list") + SubscribeAttributePowerSourceWiredAssessedInputVoltage() + : SubscribeAttribute("wired-assessed-input-voltage") { } - ~SubscribeAttributeOtaSoftwareUpdateRequestorEventList() + ~SubscribeAttributePowerSourceWiredAssessedInputVoltage() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredAssessedInputVoltage::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -18340,10 +19951,10 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorEventList : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeWiredAssessedInputVoltageWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.WiredAssessedInputVoltage response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -18356,37 +19967,35 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorEventList : public SubscribeAt } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute WiredAssessedInputFrequency */ -class ReadOtaSoftwareUpdateRequestorAttributeList : public ReadAttribute { +class ReadPowerSourceWiredAssessedInputFrequency : public ReadAttribute { public: - ReadOtaSoftwareUpdateRequestorAttributeList() - : ReadAttribute("attribute-list") + ReadPowerSourceWiredAssessedInputFrequency() + : ReadAttribute("wired-assessed-input-frequency") { } - ~ReadOtaSoftwareUpdateRequestorAttributeList() + ~ReadPowerSourceWiredAssessedInputFrequency() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredAssessedInputFrequency::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeWiredAssessedInputFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.WiredAssessedInputFrequency response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OTASoftwareUpdateRequestor AttributeList read Error", error); + LogNSError("PowerSource WiredAssessedInputFrequency read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -18395,25 +20004,25 @@ class ReadOtaSoftwareUpdateRequestorAttributeList : public ReadAttribute { } }; -class SubscribeAttributeOtaSoftwareUpdateRequestorAttributeList : public SubscribeAttribute { +class SubscribeAttributePowerSourceWiredAssessedInputFrequency : public SubscribeAttribute { public: - SubscribeAttributeOtaSoftwareUpdateRequestorAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributePowerSourceWiredAssessedInputFrequency() + : SubscribeAttribute("wired-assessed-input-frequency") { } - ~SubscribeAttributeOtaSoftwareUpdateRequestorAttributeList() + ~SubscribeAttributePowerSourceWiredAssessedInputFrequency() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredAssessedInputFrequency::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -18424,10 +20033,10 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorAttributeList : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeWiredAssessedInputFrequencyWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.WiredAssessedInputFrequency response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -18441,34 +20050,34 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorAttributeList : public Subscri }; /* - * Attribute FeatureMap + * Attribute WiredCurrentType */ -class ReadOtaSoftwareUpdateRequestorFeatureMap : public ReadAttribute { +class ReadPowerSourceWiredCurrentType : public ReadAttribute { public: - ReadOtaSoftwareUpdateRequestorFeatureMap() - : ReadAttribute("feature-map") + ReadPowerSourceWiredCurrentType() + : ReadAttribute("wired-current-type") { } - ~ReadOtaSoftwareUpdateRequestorFeatureMap() + ~ReadPowerSourceWiredCurrentType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredCurrentType::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeWiredCurrentTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.WiredCurrentType response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OTASoftwareUpdateRequestor FeatureMap read Error", error); + LogNSError("PowerSource WiredCurrentType read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -18477,25 +20086,25 @@ class ReadOtaSoftwareUpdateRequestorFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeOtaSoftwareUpdateRequestorFeatureMap : public SubscribeAttribute { +class SubscribeAttributePowerSourceWiredCurrentType : public SubscribeAttribute { public: - SubscribeAttributeOtaSoftwareUpdateRequestorFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributePowerSourceWiredCurrentType() + : SubscribeAttribute("wired-current-type") { } - ~SubscribeAttributeOtaSoftwareUpdateRequestorFeatureMap() + ~SubscribeAttributePowerSourceWiredCurrentType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredCurrentType::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -18506,10 +20115,10 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorFeatureMap : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeWiredCurrentTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.FeatureMap response %@", [value description]); + NSLog(@"PowerSource.WiredCurrentType response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -18523,34 +20132,34 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorFeatureMap : public SubscribeA }; /* - * Attribute ClusterRevision + * Attribute WiredAssessedCurrent */ -class ReadOtaSoftwareUpdateRequestorClusterRevision : public ReadAttribute { +class ReadPowerSourceWiredAssessedCurrent : public ReadAttribute { public: - ReadOtaSoftwareUpdateRequestorClusterRevision() - : ReadAttribute("cluster-revision") + ReadPowerSourceWiredAssessedCurrent() + : ReadAttribute("wired-assessed-current") { } - ~ReadOtaSoftwareUpdateRequestorClusterRevision() + ~ReadPowerSourceWiredAssessedCurrent() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredAssessedCurrent::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeWiredAssessedCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.WiredAssessedCurrent response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OTASoftwareUpdateRequestor ClusterRevision read Error", error); + LogNSError("PowerSource WiredAssessedCurrent read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -18559,25 +20168,25 @@ class ReadOtaSoftwareUpdateRequestorClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeOtaSoftwareUpdateRequestorClusterRevision : public SubscribeAttribute { +class SubscribeAttributePowerSourceWiredAssessedCurrent : public SubscribeAttribute { public: - SubscribeAttributeOtaSoftwareUpdateRequestorClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributePowerSourceWiredAssessedCurrent() + : SubscribeAttribute("wired-assessed-current") { } - ~SubscribeAttributeOtaSoftwareUpdateRequestorClusterRevision() + ~SubscribeAttributePowerSourceWiredAssessedCurrent() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::OtaSoftwareUpdateRequestor::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredAssessedCurrent::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterOTASoftwareUpdateRequestor alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -18588,10 +20197,10 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorClusterRevision : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeWiredAssessedCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OTASoftwareUpdateRequestor.ClusterRevision response %@", [value description]); + NSLog(@"PowerSource.WiredAssessedCurrent response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -18604,121 +20213,62 @@ class SubscribeAttributeOtaSoftwareUpdateRequestorClusterRevision : public Subsc } }; -/*----------------------------------------------------------------------------*\ -| Cluster LocalizationConfiguration | 0x002B | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * ActiveLocale | 0x0000 | -| * SupportedLocales | 0x0001 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Attribute ActiveLocale + * Attribute WiredNominalVoltage */ -class ReadLocalizationConfigurationActiveLocale : public ReadAttribute { +class ReadPowerSourceWiredNominalVoltage : public ReadAttribute { public: - ReadLocalizationConfigurationActiveLocale() - : ReadAttribute("active-locale") + ReadPowerSourceWiredNominalVoltage() + : ReadAttribute("wired-nominal-voltage") { } - ~ReadLocalizationConfigurationActiveLocale() + ~ReadPowerSourceWiredNominalVoltage() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::ActiveLocale::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredNominalVoltage::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActiveLocaleWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"LocalizationConfiguration.ActiveLocale response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeWiredNominalVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.WiredNominalVoltage response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LocalizationConfiguration ActiveLocale read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteLocalizationConfigurationActiveLocale : public WriteAttribute { -public: - WriteLocalizationConfigurationActiveLocale() - : WriteAttribute("active-locale") - { - AddArgument("attr-name", "active-locale"); - AddArgument("attr-value", &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteLocalizationConfigurationActiveLocale() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::ActiveLocale::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 = [[MTRBaseClusterLocalizationConfiguration 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; - NSString * _Nonnull value = [[NSString alloc] initWithBytes:mValue.data() length:mValue.size() encoding:NSUTF8StringEncoding]; - - [cluster writeAttributeActiveLocaleWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("LocalizationConfiguration ActiveLocale write Error", error); + LogNSError("PowerSource WiredNominalVoltage read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - chip::ByteSpan mValue; }; -class SubscribeAttributeLocalizationConfigurationActiveLocale : public SubscribeAttribute { +class SubscribeAttributePowerSourceWiredNominalVoltage : public SubscribeAttribute { public: - SubscribeAttributeLocalizationConfigurationActiveLocale() - : SubscribeAttribute("active-locale") + SubscribeAttributePowerSourceWiredNominalVoltage() + : SubscribeAttribute("wired-nominal-voltage") { } - ~SubscribeAttributeLocalizationConfigurationActiveLocale() + ~SubscribeAttributePowerSourceWiredNominalVoltage() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::ActiveLocale::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredNominalVoltage::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -18729,10 +20279,10 @@ class SubscribeAttributeLocalizationConfigurationActiveLocale : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActiveLocaleWithParams:params + [cluster subscribeAttributeWiredNominalVoltageWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"LocalizationConfiguration.ActiveLocale response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.WiredNominalVoltage response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -18746,34 +20296,34 @@ class SubscribeAttributeLocalizationConfigurationActiveLocale : public Subscribe }; /* - * Attribute SupportedLocales + * Attribute WiredMaximumCurrent */ -class ReadLocalizationConfigurationSupportedLocales : public ReadAttribute { +class ReadPowerSourceWiredMaximumCurrent : public ReadAttribute { public: - ReadLocalizationConfigurationSupportedLocales() - : ReadAttribute("supported-locales") + ReadPowerSourceWiredMaximumCurrent() + : ReadAttribute("wired-maximum-current") { } - ~ReadLocalizationConfigurationSupportedLocales() + ~ReadPowerSourceWiredMaximumCurrent() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::SupportedLocales::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredMaximumCurrent::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedLocalesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LocalizationConfiguration.SupportedLocales response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeWiredMaximumCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.WiredMaximumCurrent response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LocalizationConfiguration SupportedLocales read Error", error); + LogNSError("PowerSource WiredMaximumCurrent read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -18782,25 +20332,25 @@ class ReadLocalizationConfigurationSupportedLocales : public ReadAttribute { } }; -class SubscribeAttributeLocalizationConfigurationSupportedLocales : public SubscribeAttribute { +class SubscribeAttributePowerSourceWiredMaximumCurrent : public SubscribeAttribute { public: - SubscribeAttributeLocalizationConfigurationSupportedLocales() - : SubscribeAttribute("supported-locales") + SubscribeAttributePowerSourceWiredMaximumCurrent() + : SubscribeAttribute("wired-maximum-current") { } - ~SubscribeAttributeLocalizationConfigurationSupportedLocales() + ~SubscribeAttributePowerSourceWiredMaximumCurrent() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::SupportedLocales::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredMaximumCurrent::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -18811,10 +20361,10 @@ class SubscribeAttributeLocalizationConfigurationSupportedLocales : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedLocalesWithParams:params + [cluster subscribeAttributeWiredMaximumCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LocalizationConfiguration.SupportedLocales response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.WiredMaximumCurrent response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -18828,34 +20378,34 @@ class SubscribeAttributeLocalizationConfigurationSupportedLocales : public Subsc }; /* - * Attribute GeneratedCommandList + * Attribute WiredPresent */ -class ReadLocalizationConfigurationGeneratedCommandList : public ReadAttribute { +class ReadPowerSourceWiredPresent : public ReadAttribute { public: - ReadLocalizationConfigurationGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadPowerSourceWiredPresent() + : ReadAttribute("wired-present") { } - ~ReadLocalizationConfigurationGeneratedCommandList() + ~ReadPowerSourceWiredPresent() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredPresent::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LocalizationConfiguration.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeWiredPresentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.WiredPresent response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LocalizationConfiguration GeneratedCommandList read Error", error); + LogNSError("PowerSource WiredPresent read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -18864,25 +20414,25 @@ class ReadLocalizationConfigurationGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeLocalizationConfigurationGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributePowerSourceWiredPresent : public SubscribeAttribute { public: - SubscribeAttributeLocalizationConfigurationGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributePowerSourceWiredPresent() + : SubscribeAttribute("wired-present") { } - ~SubscribeAttributeLocalizationConfigurationGeneratedCommandList() + ~SubscribeAttributePowerSourceWiredPresent() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredPresent::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -18893,10 +20443,10 @@ class SubscribeAttributeLocalizationConfigurationGeneratedCommandList : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeWiredPresentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LocalizationConfiguration.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.WiredPresent response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -18910,34 +20460,34 @@ class SubscribeAttributeLocalizationConfigurationGeneratedCommandList : public S }; /* - * Attribute AcceptedCommandList + * Attribute ActiveWiredFaults */ -class ReadLocalizationConfigurationAcceptedCommandList : public ReadAttribute { +class ReadPowerSourceActiveWiredFaults : public ReadAttribute { public: - ReadLocalizationConfigurationAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadPowerSourceActiveWiredFaults() + : ReadAttribute("active-wired-faults") { } - ~ReadLocalizationConfigurationAcceptedCommandList() + ~ReadPowerSourceActiveWiredFaults() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::ActiveWiredFaults::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LocalizationConfiguration.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeActiveWiredFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.ActiveWiredFaults response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LocalizationConfiguration AcceptedCommandList read Error", error); + LogNSError("PowerSource ActiveWiredFaults read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -18946,25 +20496,25 @@ class ReadLocalizationConfigurationAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeLocalizationConfigurationAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributePowerSourceActiveWiredFaults : public SubscribeAttribute { public: - SubscribeAttributeLocalizationConfigurationAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributePowerSourceActiveWiredFaults() + : SubscribeAttribute("active-wired-faults") { } - ~SubscribeAttributeLocalizationConfigurationAcceptedCommandList() + ~SubscribeAttributePowerSourceActiveWiredFaults() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::ActiveWiredFaults::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -18975,10 +20525,10 @@ class SubscribeAttributeLocalizationConfigurationAcceptedCommandList : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeActiveWiredFaultsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LocalizationConfiguration.AcceptedCommandList response %@", [value description]); + NSLog(@"PowerSource.ActiveWiredFaults response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -18991,37 +20541,35 @@ class SubscribeAttributeLocalizationConfigurationAcceptedCommandList : public Su } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute BatVoltage */ -class ReadLocalizationConfigurationEventList : public ReadAttribute { +class ReadPowerSourceBatVoltage : public ReadAttribute { public: - ReadLocalizationConfigurationEventList() - : ReadAttribute("event-list") + ReadPowerSourceBatVoltage() + : ReadAttribute("bat-voltage") { } - ~ReadLocalizationConfigurationEventList() + ~ReadPowerSourceBatVoltage() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatVoltage::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LocalizationConfiguration.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBatVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatVoltage response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LocalizationConfiguration EventList read Error", error); + LogNSError("PowerSource BatVoltage read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -19030,25 +20578,25 @@ class ReadLocalizationConfigurationEventList : public ReadAttribute { } }; -class SubscribeAttributeLocalizationConfigurationEventList : public SubscribeAttribute { +class SubscribeAttributePowerSourceBatVoltage : public SubscribeAttribute { public: - SubscribeAttributeLocalizationConfigurationEventList() - : SubscribeAttribute("event-list") + SubscribeAttributePowerSourceBatVoltage() + : SubscribeAttribute("bat-voltage") { } - ~SubscribeAttributeLocalizationConfigurationEventList() + ~SubscribeAttributePowerSourceBatVoltage() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatVoltage::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -19059,10 +20607,10 @@ class SubscribeAttributeLocalizationConfigurationEventList : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeBatVoltageWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LocalizationConfiguration.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatVoltage response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -19075,37 +20623,35 @@ class SubscribeAttributeLocalizationConfigurationEventList : public SubscribeAtt } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute BatPercentRemaining */ -class ReadLocalizationConfigurationAttributeList : public ReadAttribute { +class ReadPowerSourceBatPercentRemaining : public ReadAttribute { public: - ReadLocalizationConfigurationAttributeList() - : ReadAttribute("attribute-list") + ReadPowerSourceBatPercentRemaining() + : ReadAttribute("bat-percent-remaining") { } - ~ReadLocalizationConfigurationAttributeList() + ~ReadPowerSourceBatPercentRemaining() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatPercentRemaining::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LocalizationConfiguration.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBatPercentRemainingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatPercentRemaining response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LocalizationConfiguration AttributeList read Error", error); + LogNSError("PowerSource BatPercentRemaining read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -19114,25 +20660,25 @@ class ReadLocalizationConfigurationAttributeList : public ReadAttribute { } }; -class SubscribeAttributeLocalizationConfigurationAttributeList : public SubscribeAttribute { +class SubscribeAttributePowerSourceBatPercentRemaining : public SubscribeAttribute { public: - SubscribeAttributeLocalizationConfigurationAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributePowerSourceBatPercentRemaining() + : SubscribeAttribute("bat-percent-remaining") { } - ~SubscribeAttributeLocalizationConfigurationAttributeList() + ~SubscribeAttributePowerSourceBatPercentRemaining() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatPercentRemaining::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -19143,10 +20689,10 @@ class SubscribeAttributeLocalizationConfigurationAttributeList : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeBatPercentRemainingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LocalizationConfiguration.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatPercentRemaining response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -19160,34 +20706,34 @@ class SubscribeAttributeLocalizationConfigurationAttributeList : public Subscrib }; /* - * Attribute FeatureMap + * Attribute BatTimeRemaining */ -class ReadLocalizationConfigurationFeatureMap : public ReadAttribute { +class ReadPowerSourceBatTimeRemaining : public ReadAttribute { public: - ReadLocalizationConfigurationFeatureMap() - : ReadAttribute("feature-map") + ReadPowerSourceBatTimeRemaining() + : ReadAttribute("bat-time-remaining") { } - ~ReadLocalizationConfigurationFeatureMap() + ~ReadPowerSourceBatTimeRemaining() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatTimeRemaining::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LocalizationConfiguration.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBatTimeRemainingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatTimeRemaining response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LocalizationConfiguration FeatureMap read Error", error); + LogNSError("PowerSource BatTimeRemaining read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -19196,25 +20742,25 @@ class ReadLocalizationConfigurationFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeLocalizationConfigurationFeatureMap : public SubscribeAttribute { +class SubscribeAttributePowerSourceBatTimeRemaining : public SubscribeAttribute { public: - SubscribeAttributeLocalizationConfigurationFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributePowerSourceBatTimeRemaining() + : SubscribeAttribute("bat-time-remaining") { } - ~SubscribeAttributeLocalizationConfigurationFeatureMap() + ~SubscribeAttributePowerSourceBatTimeRemaining() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatTimeRemaining::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -19225,10 +20771,10 @@ class SubscribeAttributeLocalizationConfigurationFeatureMap : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeBatTimeRemainingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LocalizationConfiguration.FeatureMap response %@", [value description]); + NSLog(@"PowerSource.BatTimeRemaining response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -19242,34 +20788,34 @@ class SubscribeAttributeLocalizationConfigurationFeatureMap : public SubscribeAt }; /* - * Attribute ClusterRevision + * Attribute BatChargeLevel */ -class ReadLocalizationConfigurationClusterRevision : public ReadAttribute { +class ReadPowerSourceBatChargeLevel : public ReadAttribute { public: - ReadLocalizationConfigurationClusterRevision() - : ReadAttribute("cluster-revision") + ReadPowerSourceBatChargeLevel() + : ReadAttribute("bat-charge-level") { } - ~ReadLocalizationConfigurationClusterRevision() + ~ReadPowerSourceBatChargeLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatChargeLevel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LocalizationConfiguration.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBatChargeLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatChargeLevel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LocalizationConfiguration ClusterRevision read Error", error); + LogNSError("PowerSource BatChargeLevel read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -19278,25 +20824,25 @@ class ReadLocalizationConfigurationClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeLocalizationConfigurationClusterRevision : public SubscribeAttribute { +class SubscribeAttributePowerSourceBatChargeLevel : public SubscribeAttribute { public: - SubscribeAttributeLocalizationConfigurationClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributePowerSourceBatChargeLevel() + : SubscribeAttribute("bat-charge-level") { } - ~SubscribeAttributeLocalizationConfigurationClusterRevision() + ~SubscribeAttributePowerSourceBatChargeLevel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::LocalizationConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::LocalizationConfiguration::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatChargeLevel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterLocalizationConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -19307,10 +20853,10 @@ class SubscribeAttributeLocalizationConfigurationClusterRevision : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeBatChargeLevelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LocalizationConfiguration.ClusterRevision response %@", [value description]); + NSLog(@"PowerSource.BatChargeLevel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -19323,122 +20869,62 @@ class SubscribeAttributeLocalizationConfigurationClusterRevision : public Subscr } }; -/*----------------------------------------------------------------------------*\ -| Cluster TimeFormatLocalization | 0x002C | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * HourFormat | 0x0000 | -| * ActiveCalendarType | 0x0001 | -| * SupportedCalendarTypes | 0x0002 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Attribute HourFormat + * Attribute BatReplacementNeeded */ -class ReadTimeFormatLocalizationHourFormat : public ReadAttribute { +class ReadPowerSourceBatReplacementNeeded : public ReadAttribute { public: - ReadTimeFormatLocalizationHourFormat() - : ReadAttribute("hour-format") + ReadPowerSourceBatReplacementNeeded() + : ReadAttribute("bat-replacement-needed") { } - ~ReadTimeFormatLocalizationHourFormat() + ~ReadPowerSourceBatReplacementNeeded() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::HourFormat::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatReplacementNeeded::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeHourFormatWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeFormatLocalization.HourFormat response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBatReplacementNeededWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatReplacementNeeded response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TimeFormatLocalization HourFormat read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteTimeFormatLocalizationHourFormat : public WriteAttribute { -public: - WriteTimeFormatLocalizationHourFormat() - : WriteAttribute("hour-format") - { - AddArgument("attr-name", "hour-format"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteTimeFormatLocalizationHourFormat() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::HourFormat::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 = [[MTRBaseClusterTimeFormatLocalization 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 writeAttributeHourFormatWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TimeFormatLocalization HourFormat write Error", error); + LogNSError("PowerSource BatReplacementNeeded read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeTimeFormatLocalizationHourFormat : public SubscribeAttribute { +class SubscribeAttributePowerSourceBatReplacementNeeded : public SubscribeAttribute { public: - SubscribeAttributeTimeFormatLocalizationHourFormat() - : SubscribeAttribute("hour-format") + SubscribeAttributePowerSourceBatReplacementNeeded() + : SubscribeAttribute("bat-replacement-needed") { } - ~SubscribeAttributeTimeFormatLocalizationHourFormat() + ~SubscribeAttributePowerSourceBatReplacementNeeded() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::HourFormat::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatReplacementNeeded::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -19449,10 +20935,10 @@ class SubscribeAttributeTimeFormatLocalizationHourFormat : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeHourFormatWithParams:params + [cluster subscribeAttributeBatReplacementNeededWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeFormatLocalization.HourFormat response %@", [value description]); + NSLog(@"PowerSource.BatReplacementNeeded response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -19466,102 +20952,61 @@ class SubscribeAttributeTimeFormatLocalizationHourFormat : public SubscribeAttri }; /* - * Attribute ActiveCalendarType + * Attribute BatReplaceability */ -class ReadTimeFormatLocalizationActiveCalendarType : public ReadAttribute { +class ReadPowerSourceBatReplaceability : public ReadAttribute { public: - ReadTimeFormatLocalizationActiveCalendarType() - : ReadAttribute("active-calendar-type") + ReadPowerSourceBatReplaceability() + : ReadAttribute("bat-replaceability") { } - ~ReadTimeFormatLocalizationActiveCalendarType() + ~ReadPowerSourceBatReplaceability() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::ActiveCalendarType::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatReplaceability::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActiveCalendarTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeFormatLocalization.ActiveCalendarType response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBatReplaceabilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatReplaceability response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TimeFormatLocalization ActiveCalendarType read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteTimeFormatLocalizationActiveCalendarType : public WriteAttribute { -public: - WriteTimeFormatLocalizationActiveCalendarType() - : WriteAttribute("active-calendar-type") - { - AddArgument("attr-name", "active-calendar-type"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteTimeFormatLocalizationActiveCalendarType() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::ActiveCalendarType::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 = [[MTRBaseClusterTimeFormatLocalization 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 writeAttributeActiveCalendarTypeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("TimeFormatLocalization ActiveCalendarType write Error", error); + LogNSError("PowerSource BatReplaceability read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeTimeFormatLocalizationActiveCalendarType : public SubscribeAttribute { +class SubscribeAttributePowerSourceBatReplaceability : public SubscribeAttribute { public: - SubscribeAttributeTimeFormatLocalizationActiveCalendarType() - : SubscribeAttribute("active-calendar-type") + SubscribeAttributePowerSourceBatReplaceability() + : SubscribeAttribute("bat-replaceability") { } - ~SubscribeAttributeTimeFormatLocalizationActiveCalendarType() + ~SubscribeAttributePowerSourceBatReplaceability() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::ActiveCalendarType::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatReplaceability::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -19572,10 +21017,10 @@ class SubscribeAttributeTimeFormatLocalizationActiveCalendarType : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActiveCalendarTypeWithParams:params + [cluster subscribeAttributeBatReplaceabilityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeFormatLocalization.ActiveCalendarType response %@", [value description]); + NSLog(@"PowerSource.BatReplaceability response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -19589,34 +21034,34 @@ class SubscribeAttributeTimeFormatLocalizationActiveCalendarType : public Subscr }; /* - * Attribute SupportedCalendarTypes + * Attribute BatPresent */ -class ReadTimeFormatLocalizationSupportedCalendarTypes : public ReadAttribute { +class ReadPowerSourceBatPresent : public ReadAttribute { public: - ReadTimeFormatLocalizationSupportedCalendarTypes() - : ReadAttribute("supported-calendar-types") + ReadPowerSourceBatPresent() + : ReadAttribute("bat-present") { } - ~ReadTimeFormatLocalizationSupportedCalendarTypes() + ~ReadPowerSourceBatPresent() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::SupportedCalendarTypes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatPresent::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedCalendarTypesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeFormatLocalization.SupportedCalendarTypes response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBatPresentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatPresent response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TimeFormatLocalization SupportedCalendarTypes read Error", error); + LogNSError("PowerSource BatPresent read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -19625,25 +21070,25 @@ class ReadTimeFormatLocalizationSupportedCalendarTypes : public ReadAttribute { } }; -class SubscribeAttributeTimeFormatLocalizationSupportedCalendarTypes : public SubscribeAttribute { +class SubscribeAttributePowerSourceBatPresent : public SubscribeAttribute { public: - SubscribeAttributeTimeFormatLocalizationSupportedCalendarTypes() - : SubscribeAttribute("supported-calendar-types") + SubscribeAttributePowerSourceBatPresent() + : SubscribeAttribute("bat-present") { } - ~SubscribeAttributeTimeFormatLocalizationSupportedCalendarTypes() + ~SubscribeAttributePowerSourceBatPresent() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::SupportedCalendarTypes::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatPresent::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -19654,10 +21099,10 @@ class SubscribeAttributeTimeFormatLocalizationSupportedCalendarTypes : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedCalendarTypesWithParams:params + [cluster subscribeAttributeBatPresentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeFormatLocalization.SupportedCalendarTypes response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatPresent response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -19671,34 +21116,34 @@ class SubscribeAttributeTimeFormatLocalizationSupportedCalendarTypes : public Su }; /* - * Attribute GeneratedCommandList + * Attribute ActiveBatFaults */ -class ReadTimeFormatLocalizationGeneratedCommandList : public ReadAttribute { +class ReadPowerSourceActiveBatFaults : public ReadAttribute { public: - ReadTimeFormatLocalizationGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadPowerSourceActiveBatFaults() + : ReadAttribute("active-bat-faults") { } - ~ReadTimeFormatLocalizationGeneratedCommandList() + ~ReadPowerSourceActiveBatFaults() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::ActiveBatFaults::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeFormatLocalization.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeActiveBatFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.ActiveBatFaults response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TimeFormatLocalization GeneratedCommandList read Error", error); + LogNSError("PowerSource ActiveBatFaults read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -19707,25 +21152,25 @@ class ReadTimeFormatLocalizationGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeTimeFormatLocalizationGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributePowerSourceActiveBatFaults : public SubscribeAttribute { public: - SubscribeAttributeTimeFormatLocalizationGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributePowerSourceActiveBatFaults() + : SubscribeAttribute("active-bat-faults") { } - ~SubscribeAttributeTimeFormatLocalizationGeneratedCommandList() + ~SubscribeAttributePowerSourceActiveBatFaults() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::ActiveBatFaults::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -19736,10 +21181,10 @@ class SubscribeAttributeTimeFormatLocalizationGeneratedCommandList : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeActiveBatFaultsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeFormatLocalization.GeneratedCommandList response %@", [value description]); + NSLog(@"PowerSource.ActiveBatFaults response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -19753,34 +21198,34 @@ class SubscribeAttributeTimeFormatLocalizationGeneratedCommandList : public Subs }; /* - * Attribute AcceptedCommandList + * Attribute BatReplacementDescription */ -class ReadTimeFormatLocalizationAcceptedCommandList : public ReadAttribute { +class ReadPowerSourceBatReplacementDescription : public ReadAttribute { public: - ReadTimeFormatLocalizationAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadPowerSourceBatReplacementDescription() + : ReadAttribute("bat-replacement-description") { } - ~ReadTimeFormatLocalizationAcceptedCommandList() + ~ReadPowerSourceBatReplacementDescription() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatReplacementDescription::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeFormatLocalization.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBatReplacementDescriptionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatReplacementDescription response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TimeFormatLocalization AcceptedCommandList read Error", error); + LogNSError("PowerSource BatReplacementDescription read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -19789,25 +21234,25 @@ class ReadTimeFormatLocalizationAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeTimeFormatLocalizationAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributePowerSourceBatReplacementDescription : public SubscribeAttribute { public: - SubscribeAttributeTimeFormatLocalizationAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributePowerSourceBatReplacementDescription() + : SubscribeAttribute("bat-replacement-description") { } - ~SubscribeAttributeTimeFormatLocalizationAcceptedCommandList() + ~SubscribeAttributePowerSourceBatReplacementDescription() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatReplacementDescription::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -19818,10 +21263,10 @@ class SubscribeAttributeTimeFormatLocalizationAcceptedCommandList : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeBatReplacementDescriptionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeFormatLocalization.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatReplacementDescription response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -19834,37 +21279,35 @@ class SubscribeAttributeTimeFormatLocalizationAcceptedCommandList : public Subsc } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute BatCommonDesignation */ -class ReadTimeFormatLocalizationEventList : public ReadAttribute { +class ReadPowerSourceBatCommonDesignation : public ReadAttribute { public: - ReadTimeFormatLocalizationEventList() - : ReadAttribute("event-list") + ReadPowerSourceBatCommonDesignation() + : ReadAttribute("bat-common-designation") { } - ~ReadTimeFormatLocalizationEventList() + ~ReadPowerSourceBatCommonDesignation() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatCommonDesignation::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeFormatLocalization.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBatCommonDesignationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatCommonDesignation response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TimeFormatLocalization EventList read Error", error); + LogNSError("PowerSource BatCommonDesignation read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -19873,25 +21316,25 @@ class ReadTimeFormatLocalizationEventList : public ReadAttribute { } }; -class SubscribeAttributeTimeFormatLocalizationEventList : public SubscribeAttribute { +class SubscribeAttributePowerSourceBatCommonDesignation : public SubscribeAttribute { public: - SubscribeAttributeTimeFormatLocalizationEventList() - : SubscribeAttribute("event-list") + SubscribeAttributePowerSourceBatCommonDesignation() + : SubscribeAttribute("bat-common-designation") { } - ~SubscribeAttributeTimeFormatLocalizationEventList() + ~SubscribeAttributePowerSourceBatCommonDesignation() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatCommonDesignation::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -19902,10 +21345,10 @@ class SubscribeAttributeTimeFormatLocalizationEventList : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeBatCommonDesignationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeFormatLocalization.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatCommonDesignation response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -19918,37 +21361,35 @@ class SubscribeAttributeTimeFormatLocalizationEventList : public SubscribeAttrib } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute BatANSIDesignation */ -class ReadTimeFormatLocalizationAttributeList : public ReadAttribute { +class ReadPowerSourceBatANSIDesignation : public ReadAttribute { public: - ReadTimeFormatLocalizationAttributeList() - : ReadAttribute("attribute-list") + ReadPowerSourceBatANSIDesignation() + : ReadAttribute("bat-ansidesignation") { } - ~ReadTimeFormatLocalizationAttributeList() + ~ReadPowerSourceBatANSIDesignation() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatANSIDesignation::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeFormatLocalization.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBatANSIDesignationWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatANSIDesignation response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TimeFormatLocalization AttributeList read Error", error); + LogNSError("PowerSource BatANSIDesignation read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -19957,25 +21398,25 @@ class ReadTimeFormatLocalizationAttributeList : public ReadAttribute { } }; -class SubscribeAttributeTimeFormatLocalizationAttributeList : public SubscribeAttribute { +class SubscribeAttributePowerSourceBatANSIDesignation : public SubscribeAttribute { public: - SubscribeAttributeTimeFormatLocalizationAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributePowerSourceBatANSIDesignation() + : SubscribeAttribute("bat-ansidesignation") { } - ~SubscribeAttributeTimeFormatLocalizationAttributeList() + ~SubscribeAttributePowerSourceBatANSIDesignation() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatANSIDesignation::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -19986,10 +21427,10 @@ class SubscribeAttributeTimeFormatLocalizationAttributeList : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeBatANSIDesignationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeFormatLocalization.AttributeList response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatANSIDesignation response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -20003,34 +21444,34 @@ class SubscribeAttributeTimeFormatLocalizationAttributeList : public SubscribeAt }; /* - * Attribute FeatureMap + * Attribute BatIECDesignation */ -class ReadTimeFormatLocalizationFeatureMap : public ReadAttribute { +class ReadPowerSourceBatIECDesignation : public ReadAttribute { public: - ReadTimeFormatLocalizationFeatureMap() - : ReadAttribute("feature-map") + ReadPowerSourceBatIECDesignation() + : ReadAttribute("bat-iecdesignation") { } - ~ReadTimeFormatLocalizationFeatureMap() + ~ReadPowerSourceBatIECDesignation() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatIECDesignation::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeFormatLocalization.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBatIECDesignationWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatIECDesignation response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TimeFormatLocalization FeatureMap read Error", error); + LogNSError("PowerSource BatIECDesignation read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -20039,25 +21480,25 @@ class ReadTimeFormatLocalizationFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeTimeFormatLocalizationFeatureMap : public SubscribeAttribute { +class SubscribeAttributePowerSourceBatIECDesignation : public SubscribeAttribute { public: - SubscribeAttributeTimeFormatLocalizationFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributePowerSourceBatIECDesignation() + : SubscribeAttribute("bat-iecdesignation") { } - ~SubscribeAttributeTimeFormatLocalizationFeatureMap() + ~SubscribeAttributePowerSourceBatIECDesignation() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatIECDesignation::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -20068,10 +21509,10 @@ class SubscribeAttributeTimeFormatLocalizationFeatureMap : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeBatIECDesignationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeFormatLocalization.FeatureMap response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatIECDesignation response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -20085,34 +21526,34 @@ class SubscribeAttributeTimeFormatLocalizationFeatureMap : public SubscribeAttri }; /* - * Attribute ClusterRevision + * Attribute BatApprovedChemistry */ -class ReadTimeFormatLocalizationClusterRevision : public ReadAttribute { +class ReadPowerSourceBatApprovedChemistry : public ReadAttribute { public: - ReadTimeFormatLocalizationClusterRevision() - : ReadAttribute("cluster-revision") + ReadPowerSourceBatApprovedChemistry() + : ReadAttribute("bat-approved-chemistry") { } - ~ReadTimeFormatLocalizationClusterRevision() + ~ReadPowerSourceBatApprovedChemistry() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatApprovedChemistry::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeFormatLocalization.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBatApprovedChemistryWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatApprovedChemistry response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TimeFormatLocalization ClusterRevision read Error", error); + LogNSError("PowerSource BatApprovedChemistry read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -20121,25 +21562,25 @@ class ReadTimeFormatLocalizationClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeTimeFormatLocalizationClusterRevision : public SubscribeAttribute { +class SubscribeAttributePowerSourceBatApprovedChemistry : public SubscribeAttribute { public: - SubscribeAttributeTimeFormatLocalizationClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributePowerSourceBatApprovedChemistry() + : SubscribeAttribute("bat-approved-chemistry") { } - ~SubscribeAttributeTimeFormatLocalizationClusterRevision() + ~SubscribeAttributePowerSourceBatApprovedChemistry() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeFormatLocalization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeFormatLocalization::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatApprovedChemistry::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeFormatLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -20150,10 +21591,10 @@ class SubscribeAttributeTimeFormatLocalizationClusterRevision : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeBatApprovedChemistryWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeFormatLocalization.ClusterRevision response %@", [value description]); + NSLog(@"PowerSource.BatApprovedChemistry response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -20166,120 +21607,62 @@ class SubscribeAttributeTimeFormatLocalizationClusterRevision : public Subscribe } }; -/*----------------------------------------------------------------------------*\ -| Cluster UnitLocalization | 0x002D | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * TemperatureUnit | 0x0000 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Attribute TemperatureUnit + * Attribute BatCapacity */ -class ReadUnitLocalizationTemperatureUnit : public ReadAttribute { +class ReadPowerSourceBatCapacity : public ReadAttribute { public: - ReadUnitLocalizationTemperatureUnit() - : ReadAttribute("temperature-unit") + ReadPowerSourceBatCapacity() + : ReadAttribute("bat-capacity") { } - ~ReadUnitLocalizationTemperatureUnit() + ~ReadPowerSourceBatCapacity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitLocalization::Attributes::TemperatureUnit::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatCapacity::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTemperatureUnitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"UnitLocalization.TemperatureUnit response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBatCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatCapacity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("UnitLocalization TemperatureUnit read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteUnitLocalizationTemperatureUnit : public WriteAttribute { -public: - WriteUnitLocalizationTemperatureUnit() - : WriteAttribute("temperature-unit") - { - AddArgument("attr-name", "temperature-unit"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteUnitLocalizationTemperatureUnit() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitLocalization::Attributes::TemperatureUnit::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 = [[MTRBaseClusterUnitLocalization 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 writeAttributeTemperatureUnitWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("UnitLocalization TemperatureUnit write Error", error); + LogNSError("PowerSource BatCapacity read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeUnitLocalizationTemperatureUnit : public SubscribeAttribute { +class SubscribeAttributePowerSourceBatCapacity : public SubscribeAttribute { public: - SubscribeAttributeUnitLocalizationTemperatureUnit() - : SubscribeAttribute("temperature-unit") + SubscribeAttributePowerSourceBatCapacity() + : SubscribeAttribute("bat-capacity") { } - ~SubscribeAttributeUnitLocalizationTemperatureUnit() + ~SubscribeAttributePowerSourceBatCapacity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::UnitLocalization::Attributes::TemperatureUnit::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatCapacity::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -20290,10 +21673,10 @@ class SubscribeAttributeUnitLocalizationTemperatureUnit : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTemperatureUnitWithParams:params + [cluster subscribeAttributeBatCapacityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"UnitLocalization.TemperatureUnit response %@", [value description]); + NSLog(@"PowerSource.BatCapacity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -20307,34 +21690,34 @@ class SubscribeAttributeUnitLocalizationTemperatureUnit : public SubscribeAttrib }; /* - * Attribute GeneratedCommandList + * Attribute BatQuantity */ -class ReadUnitLocalizationGeneratedCommandList : public ReadAttribute { +class ReadPowerSourceBatQuantity : public ReadAttribute { public: - ReadUnitLocalizationGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadPowerSourceBatQuantity() + : ReadAttribute("bat-quantity") { } - ~ReadUnitLocalizationGeneratedCommandList() + ~ReadPowerSourceBatQuantity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitLocalization::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatQuantity::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UnitLocalization.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBatQuantityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatQuantity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("UnitLocalization GeneratedCommandList read Error", error); + LogNSError("PowerSource BatQuantity read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -20343,25 +21726,25 @@ class ReadUnitLocalizationGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeUnitLocalizationGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributePowerSourceBatQuantity : public SubscribeAttribute { public: - SubscribeAttributeUnitLocalizationGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributePowerSourceBatQuantity() + : SubscribeAttribute("bat-quantity") { } - ~SubscribeAttributeUnitLocalizationGeneratedCommandList() + ~SubscribeAttributePowerSourceBatQuantity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::UnitLocalization::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatQuantity::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -20372,10 +21755,10 @@ class SubscribeAttributeUnitLocalizationGeneratedCommandList : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeBatQuantityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UnitLocalization.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatQuantity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -20389,34 +21772,34 @@ class SubscribeAttributeUnitLocalizationGeneratedCommandList : public SubscribeA }; /* - * Attribute AcceptedCommandList + * Attribute BatChargeState */ -class ReadUnitLocalizationAcceptedCommandList : public ReadAttribute { +class ReadPowerSourceBatChargeState : public ReadAttribute { public: - ReadUnitLocalizationAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadPowerSourceBatChargeState() + : ReadAttribute("bat-charge-state") { } - ~ReadUnitLocalizationAcceptedCommandList() + ~ReadPowerSourceBatChargeState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitLocalization::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatChargeState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UnitLocalization.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBatChargeStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatChargeState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("UnitLocalization AcceptedCommandList read Error", error); + LogNSError("PowerSource BatChargeState read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -20425,25 +21808,25 @@ class ReadUnitLocalizationAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeUnitLocalizationAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributePowerSourceBatChargeState : public SubscribeAttribute { public: - SubscribeAttributeUnitLocalizationAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributePowerSourceBatChargeState() + : SubscribeAttribute("bat-charge-state") { } - ~SubscribeAttributeUnitLocalizationAcceptedCommandList() + ~SubscribeAttributePowerSourceBatChargeState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::UnitLocalization::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatChargeState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -20454,10 +21837,10 @@ class SubscribeAttributeUnitLocalizationAcceptedCommandList : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeBatChargeStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UnitLocalization.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatChargeState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -20470,37 +21853,35 @@ class SubscribeAttributeUnitLocalizationAcceptedCommandList : public SubscribeAt } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute BatTimeToFullCharge */ -class ReadUnitLocalizationEventList : public ReadAttribute { +class ReadPowerSourceBatTimeToFullCharge : public ReadAttribute { public: - ReadUnitLocalizationEventList() - : ReadAttribute("event-list") + ReadPowerSourceBatTimeToFullCharge() + : ReadAttribute("bat-time-to-full-charge") { } - ~ReadUnitLocalizationEventList() + ~ReadPowerSourceBatTimeToFullCharge() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitLocalization::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatTimeToFullCharge::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UnitLocalization.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBatTimeToFullChargeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatTimeToFullCharge response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("UnitLocalization EventList read Error", error); + LogNSError("PowerSource BatTimeToFullCharge read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -20509,25 +21890,25 @@ class ReadUnitLocalizationEventList : public ReadAttribute { } }; -class SubscribeAttributeUnitLocalizationEventList : public SubscribeAttribute { +class SubscribeAttributePowerSourceBatTimeToFullCharge : public SubscribeAttribute { public: - SubscribeAttributeUnitLocalizationEventList() - : SubscribeAttribute("event-list") + SubscribeAttributePowerSourceBatTimeToFullCharge() + : SubscribeAttribute("bat-time-to-full-charge") { } - ~SubscribeAttributeUnitLocalizationEventList() + ~SubscribeAttributePowerSourceBatTimeToFullCharge() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::UnitLocalization::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatTimeToFullCharge::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -20538,10 +21919,10 @@ class SubscribeAttributeUnitLocalizationEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeBatTimeToFullChargeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UnitLocalization.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatTimeToFullCharge response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -20554,37 +21935,35 @@ class SubscribeAttributeUnitLocalizationEventList : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute BatFunctionalWhileCharging */ -class ReadUnitLocalizationAttributeList : public ReadAttribute { +class ReadPowerSourceBatFunctionalWhileCharging : public ReadAttribute { public: - ReadUnitLocalizationAttributeList() - : ReadAttribute("attribute-list") + ReadPowerSourceBatFunctionalWhileCharging() + : ReadAttribute("bat-functional-while-charging") { } - ~ReadUnitLocalizationAttributeList() + ~ReadPowerSourceBatFunctionalWhileCharging() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitLocalization::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatFunctionalWhileCharging::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UnitLocalization.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBatFunctionalWhileChargingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatFunctionalWhileCharging response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("UnitLocalization AttributeList read Error", error); + LogNSError("PowerSource BatFunctionalWhileCharging read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -20593,25 +21972,25 @@ class ReadUnitLocalizationAttributeList : public ReadAttribute { } }; -class SubscribeAttributeUnitLocalizationAttributeList : public SubscribeAttribute { +class SubscribeAttributePowerSourceBatFunctionalWhileCharging : public SubscribeAttribute { public: - SubscribeAttributeUnitLocalizationAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributePowerSourceBatFunctionalWhileCharging() + : SubscribeAttribute("bat-functional-while-charging") { } - ~SubscribeAttributeUnitLocalizationAttributeList() + ~SubscribeAttributePowerSourceBatFunctionalWhileCharging() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::UnitLocalization::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatFunctionalWhileCharging::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -20622,10 +22001,10 @@ class SubscribeAttributeUnitLocalizationAttributeList : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeBatFunctionalWhileChargingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UnitLocalization.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatFunctionalWhileCharging response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -20639,34 +22018,34 @@ class SubscribeAttributeUnitLocalizationAttributeList : public SubscribeAttribut }; /* - * Attribute FeatureMap + * Attribute BatChargingCurrent */ -class ReadUnitLocalizationFeatureMap : public ReadAttribute { +class ReadPowerSourceBatChargingCurrent : public ReadAttribute { public: - ReadUnitLocalizationFeatureMap() - : ReadAttribute("feature-map") + ReadPowerSourceBatChargingCurrent() + : ReadAttribute("bat-charging-current") { } - ~ReadUnitLocalizationFeatureMap() + ~ReadPowerSourceBatChargingCurrent() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitLocalization::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatChargingCurrent::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"UnitLocalization.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBatChargingCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.BatChargingCurrent response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("UnitLocalization FeatureMap read Error", error); + LogNSError("PowerSource BatChargingCurrent read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -20675,25 +22054,25 @@ class ReadUnitLocalizationFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeUnitLocalizationFeatureMap : public SubscribeAttribute { +class SubscribeAttributePowerSourceBatChargingCurrent : public SubscribeAttribute { public: - SubscribeAttributeUnitLocalizationFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributePowerSourceBatChargingCurrent() + : SubscribeAttribute("bat-charging-current") { } - ~SubscribeAttributeUnitLocalizationFeatureMap() + ~SubscribeAttributePowerSourceBatChargingCurrent() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::UnitLocalization::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatChargingCurrent::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -20704,10 +22083,10 @@ class SubscribeAttributeUnitLocalizationFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeBatChargingCurrentWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"UnitLocalization.FeatureMap response %@", [value description]); + NSLog(@"PowerSource.BatChargingCurrent response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -20721,34 +22100,34 @@ class SubscribeAttributeUnitLocalizationFeatureMap : public SubscribeAttribute { }; /* - * Attribute ClusterRevision + * Attribute ActiveBatChargeFaults */ -class ReadUnitLocalizationClusterRevision : public ReadAttribute { +class ReadPowerSourceActiveBatChargeFaults : public ReadAttribute { public: - ReadUnitLocalizationClusterRevision() - : ReadAttribute("cluster-revision") + ReadPowerSourceActiveBatChargeFaults() + : ReadAttribute("active-bat-charge-faults") { } - ~ReadUnitLocalizationClusterRevision() + ~ReadPowerSourceActiveBatChargeFaults() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitLocalization::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::ActiveBatChargeFaults::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"UnitLocalization.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeActiveBatChargeFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.ActiveBatChargeFaults response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("UnitLocalization ClusterRevision read Error", error); + LogNSError("PowerSource ActiveBatChargeFaults read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -20757,25 +22136,25 @@ class ReadUnitLocalizationClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeUnitLocalizationClusterRevision : public SubscribeAttribute { +class SubscribeAttributePowerSourceActiveBatChargeFaults : public SubscribeAttribute { public: - SubscribeAttributeUnitLocalizationClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributePowerSourceActiveBatChargeFaults() + : SubscribeAttribute("active-bat-charge-faults") { } - ~SubscribeAttributeUnitLocalizationClusterRevision() + ~SubscribeAttributePowerSourceActiveBatChargeFaults() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitLocalization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::UnitLocalization::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::ActiveBatChargeFaults::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterUnitLocalization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -20786,10 +22165,10 @@ class SubscribeAttributeUnitLocalizationClusterRevision : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeActiveBatChargeFaultsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"UnitLocalization.ClusterRevision response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.ActiveBatChargeFaults response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -20802,52 +22181,35 @@ class SubscribeAttributeUnitLocalizationClusterRevision : public SubscribeAttrib } }; -/*----------------------------------------------------------------------------*\ -| Cluster PowerSourceConfiguration | 0x002E | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * Sources | 0x0000 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Attribute Sources + * Attribute EndpointList */ -class ReadPowerSourceConfigurationSources : public ReadAttribute { +class ReadPowerSourceEndpointList : public ReadAttribute { public: - ReadPowerSourceConfigurationSources() - : ReadAttribute("sources") + ReadPowerSourceEndpointList() + : ReadAttribute("endpoint-list") { } - ~ReadPowerSourceConfigurationSources() + ~ReadPowerSourceEndpointList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::Sources::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::EndpointList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSourcesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSourceConfiguration.Sources response %@", [value description]); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEndpointListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PowerSource.EndpointList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSourceConfiguration Sources read Error", error); + LogNSError("PowerSource EndpointList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -20856,25 +22218,25 @@ class ReadPowerSourceConfigurationSources : public ReadAttribute { } }; -class SubscribeAttributePowerSourceConfigurationSources : public SubscribeAttribute { +class SubscribeAttributePowerSourceEndpointList : public SubscribeAttribute { public: - SubscribeAttributePowerSourceConfigurationSources() - : SubscribeAttribute("sources") + SubscribeAttributePowerSourceEndpointList() + : SubscribeAttribute("endpoint-list") { } - ~SubscribeAttributePowerSourceConfigurationSources() + ~SubscribeAttributePowerSourceEndpointList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::Sources::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::EndpointList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -20885,10 +22247,10 @@ class SubscribeAttributePowerSourceConfigurationSources : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSourcesWithParams:params + [cluster subscribeAttributeEndpointListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSourceConfiguration.Sources response %@", [value description]); + NSLog(@"PowerSource.EndpointList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -20904,32 +22266,32 @@ class SubscribeAttributePowerSourceConfigurationSources : public SubscribeAttrib /* * Attribute GeneratedCommandList */ -class ReadPowerSourceConfigurationGeneratedCommandList : public ReadAttribute { +class ReadPowerSourceGeneratedCommandList : public ReadAttribute { public: - ReadPowerSourceConfigurationGeneratedCommandList() + ReadPowerSourceGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadPowerSourceConfigurationGeneratedCommandList() + ~ReadPowerSourceGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::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 = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSourceConfiguration.GeneratedCommandList response %@", [value description]); + NSLog(@"PowerSource.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSourceConfiguration GeneratedCommandList read Error", error); + LogNSError("PowerSource GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -20938,25 +22300,25 @@ class ReadPowerSourceConfigurationGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributePowerSourceConfigurationGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributePowerSourceGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributePowerSourceConfigurationGeneratedCommandList() + SubscribeAttributePowerSourceGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributePowerSourceConfigurationGeneratedCommandList() + ~SubscribeAttributePowerSourceGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::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 = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -20970,7 +22332,7 @@ class SubscribeAttributePowerSourceConfigurationGeneratedCommandList : public Su [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSourceConfiguration.GeneratedCommandList response %@", [value description]); + NSLog(@"PowerSource.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -20986,32 +22348,32 @@ class SubscribeAttributePowerSourceConfigurationGeneratedCommandList : public Su /* * Attribute AcceptedCommandList */ -class ReadPowerSourceConfigurationAcceptedCommandList : public ReadAttribute { +class ReadPowerSourceAcceptedCommandList : public ReadAttribute { public: - ReadPowerSourceConfigurationAcceptedCommandList() + ReadPowerSourceAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadPowerSourceConfigurationAcceptedCommandList() + ~ReadPowerSourceAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::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 = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSourceConfiguration.AcceptedCommandList response %@", [value description]); + NSLog(@"PowerSource.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSourceConfiguration AcceptedCommandList read Error", error); + LogNSError("PowerSource AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -21020,25 +22382,25 @@ class ReadPowerSourceConfigurationAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributePowerSourceConfigurationAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributePowerSourceAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributePowerSourceConfigurationAcceptedCommandList() + SubscribeAttributePowerSourceAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributePowerSourceConfigurationAcceptedCommandList() + ~SubscribeAttributePowerSourceAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::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 = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -21052,7 +22414,7 @@ class SubscribeAttributePowerSourceConfigurationAcceptedCommandList : public Sub [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSourceConfiguration.AcceptedCommandList response %@", [value description]); + NSLog(@"PowerSource.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -21070,32 +22432,32 @@ class SubscribeAttributePowerSourceConfigurationAcceptedCommandList : public Sub /* * Attribute EventList */ -class ReadPowerSourceConfigurationEventList : public ReadAttribute { +class ReadPowerSourceEventList : public ReadAttribute { public: - ReadPowerSourceConfigurationEventList() + ReadPowerSourceEventList() : ReadAttribute("event-list") { } - ~ReadPowerSourceConfigurationEventList() + ~ReadPowerSourceEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::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 = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSourceConfiguration.EventList response %@", [value description]); + NSLog(@"PowerSource.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSourceConfiguration EventList read Error", error); + LogNSError("PowerSource EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -21104,25 +22466,25 @@ class ReadPowerSourceConfigurationEventList : public ReadAttribute { } }; -class SubscribeAttributePowerSourceConfigurationEventList : public SubscribeAttribute { +class SubscribeAttributePowerSourceEventList : public SubscribeAttribute { public: - SubscribeAttributePowerSourceConfigurationEventList() + SubscribeAttributePowerSourceEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributePowerSourceConfigurationEventList() + ~SubscribeAttributePowerSourceEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::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 = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -21136,7 +22498,7 @@ class SubscribeAttributePowerSourceConfigurationEventList : public SubscribeAttr [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSourceConfiguration.EventList response %@", [value description]); + NSLog(@"PowerSource.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -21154,32 +22516,32 @@ class SubscribeAttributePowerSourceConfigurationEventList : public SubscribeAttr /* * Attribute AttributeList */ -class ReadPowerSourceConfigurationAttributeList : public ReadAttribute { +class ReadPowerSourceAttributeList : public ReadAttribute { public: - ReadPowerSourceConfigurationAttributeList() + ReadPowerSourceAttributeList() : ReadAttribute("attribute-list") { } - ~ReadPowerSourceConfigurationAttributeList() + ~ReadPowerSourceAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::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 = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSourceConfiguration.AttributeList response %@", [value description]); + NSLog(@"PowerSource.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSourceConfiguration AttributeList read Error", error); + LogNSError("PowerSource AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -21188,25 +22550,25 @@ class ReadPowerSourceConfigurationAttributeList : public ReadAttribute { } }; -class SubscribeAttributePowerSourceConfigurationAttributeList : public SubscribeAttribute { +class SubscribeAttributePowerSourceAttributeList : public SubscribeAttribute { public: - SubscribeAttributePowerSourceConfigurationAttributeList() + SubscribeAttributePowerSourceAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributePowerSourceConfigurationAttributeList() + ~SubscribeAttributePowerSourceAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::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 = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -21220,7 +22582,7 @@ class SubscribeAttributePowerSourceConfigurationAttributeList : public Subscribe [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSourceConfiguration.AttributeList response %@", [value description]); + NSLog(@"PowerSource.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -21236,32 +22598,32 @@ class SubscribeAttributePowerSourceConfigurationAttributeList : public Subscribe /* * Attribute FeatureMap */ -class ReadPowerSourceConfigurationFeatureMap : public ReadAttribute { +class ReadPowerSourceFeatureMap : public ReadAttribute { public: - ReadPowerSourceConfigurationFeatureMap() + ReadPowerSourceFeatureMap() : ReadAttribute("feature-map") { } - ~ReadPowerSourceConfigurationFeatureMap() + ~ReadPowerSourceFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::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 = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSourceConfiguration.FeatureMap response %@", [value description]); + NSLog(@"PowerSource.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSourceConfiguration FeatureMap read Error", error); + LogNSError("PowerSource FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -21270,25 +22632,25 @@ class ReadPowerSourceConfigurationFeatureMap : public ReadAttribute { } }; -class SubscribeAttributePowerSourceConfigurationFeatureMap : public SubscribeAttribute { +class SubscribeAttributePowerSourceFeatureMap : public SubscribeAttribute { public: - SubscribeAttributePowerSourceConfigurationFeatureMap() + SubscribeAttributePowerSourceFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributePowerSourceConfigurationFeatureMap() + ~SubscribeAttributePowerSourceFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::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 = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -21302,7 +22664,7 @@ class SubscribeAttributePowerSourceConfigurationFeatureMap : public SubscribeAtt [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSourceConfiguration.FeatureMap response %@", [value description]); + NSLog(@"PowerSource.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -21318,32 +22680,32 @@ class SubscribeAttributePowerSourceConfigurationFeatureMap : public SubscribeAtt /* * Attribute ClusterRevision */ -class ReadPowerSourceConfigurationClusterRevision : public ReadAttribute { +class ReadPowerSourceClusterRevision : public ReadAttribute { public: - ReadPowerSourceConfigurationClusterRevision() + ReadPowerSourceClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadPowerSourceConfigurationClusterRevision() + ~ReadPowerSourceClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::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 = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSourceConfiguration.ClusterRevision response %@", [value description]); + NSLog(@"PowerSource.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSourceConfiguration ClusterRevision read Error", error); + LogNSError("PowerSource ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -21352,25 +22714,25 @@ class ReadPowerSourceConfigurationClusterRevision : public ReadAttribute { } }; -class SubscribeAttributePowerSourceConfigurationClusterRevision : public SubscribeAttribute { +class SubscribeAttributePowerSourceClusterRevision : public SubscribeAttribute { public: - SubscribeAttributePowerSourceConfigurationClusterRevision() + SubscribeAttributePowerSourceClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributePowerSourceConfigurationClusterRevision() + ~SubscribeAttributePowerSourceClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSourceConfiguration::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSourceConfiguration::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::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 = [[MTRBaseClusterPowerSourceConfiguration alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -21384,7 +22746,7 @@ class SubscribeAttributePowerSourceConfigurationClusterRevision : public Subscri [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSourceConfiguration.ClusterRevision response %@", [value description]); + NSLog(@"PowerSource.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -21398,43 +22760,19 @@ class SubscribeAttributePowerSourceConfigurationClusterRevision : public Subscri }; /*----------------------------------------------------------------------------*\ -| Cluster PowerSource | 0x002F | +| Cluster GeneralCommissioning | 0x0030 | |------------------------------------------------------------------------------| | Commands: | | +| * ArmFailSafe | 0x00 | +| * SetRegulatoryConfig | 0x02 | +| * CommissioningComplete | 0x04 | |------------------------------------------------------------------------------| | 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 | +| * Breadcrumb | 0x0000 | +| * BasicCommissioningInfo | 0x0001 | +| * RegulatoryConfig | 0x0002 | +| * LocationCapability | 0x0003 | +| * SupportsConcurrentConnection | 0x0004 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -21443,40 +22781,199 @@ class SubscribeAttributePowerSourceConfigurationClusterRevision : public Subscri | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | -| * WiredFaultChange | 0x0000 | -| * BatFaultChange | 0x0001 | -| * BatChargeFaultChange | 0x0002 | \*----------------------------------------------------------------------------*/ /* - * Attribute Status + * Command ArmFailSafe */ -class ReadPowerSourceStatus : public ReadAttribute { +class GeneralCommissioningArmFailSafe : public ClusterCommand { public: - ReadPowerSourceStatus() - : ReadAttribute("status") + GeneralCommissioningArmFailSafe() + : ClusterCommand("arm-fail-safe") { + AddArgument("ExpiryLengthSeconds", 0, UINT16_MAX, &mRequest.expiryLengthSeconds); + AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); + ClusterCommand::AddArguments(); } - ~ReadPowerSourceStatus() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + 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, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRGeneralCommissioningClusterArmFailSafeParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.expiryLengthSeconds = [NSNumber numberWithUnsignedShort:mRequest.expiryLengthSeconds]; + params.breadcrumb = [NSNumber numberWithUnsignedLongLong:mRequest.breadcrumb]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster armFailSafeWithParams:params completion: + ^(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafeResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafeResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafe::Type mRequest; +}; + +/* + * Command SetRegulatoryConfig + */ +class GeneralCommissioningSetRegulatoryConfig : public ClusterCommand { +public: + GeneralCommissioningSetRegulatoryConfig() + : ClusterCommand("set-regulatory-config") { + AddArgument("NewRegulatoryConfig", 0, UINT8_MAX, &mRequest.newRegulatoryConfig); + AddArgument("CountryCode", &mRequest.countryCode); + AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::Status::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, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRGeneralCommissioningClusterSetRegulatoryConfigParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.newRegulatoryConfig = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.newRegulatoryConfig)]; + params.countryCode = [[NSString alloc] initWithBytes:mRequest.countryCode.data() length:mRequest.countryCode.size() encoding:NSUTF8StringEncoding]; + params.breadcrumb = [NSNumber numberWithUnsignedLongLong:mRequest.breadcrumb]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setRegulatoryConfigWithParams:params completion: + ^(MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfigResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfigResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfig::Type mRequest; +}; + +/* + * Command CommissioningComplete + */ +class GeneralCommissioningCommissioningComplete : public ClusterCommand { +public: + GeneralCommissioningCommissioningComplete() + : ClusterCommand("commissioning-complete") + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) 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, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRGeneralCommissioningClusterCommissioningCompleteParams 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 commissioningCompleteWithParams:params completion: + ^(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::GeneralCommissioning::Commands::CommissioningCompleteResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::GeneralCommissioning::Commands::CommissioningCompleteResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: +}; + +/* + * Attribute Breadcrumb + */ +class ReadGeneralCommissioningBreadcrumb : public ReadAttribute { +public: + ReadGeneralCommissioningBreadcrumb() + : ReadAttribute("breadcrumb") + { + } + + ~ReadGeneralCommissioningBreadcrumb() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::Breadcrumb::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.Status response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBreadcrumbWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralCommissioning.Breadcrumb response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource Status read Error", error); + LogNSError("GeneralCommissioning Breadcrumb read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -21485,25 +22982,66 @@ class ReadPowerSourceStatus : public ReadAttribute { } }; -class SubscribeAttributePowerSourceStatus : public SubscribeAttribute { +class WriteGeneralCommissioningBreadcrumb : public WriteAttribute { public: - SubscribeAttributePowerSourceStatus() - : SubscribeAttribute("status") + WriteGeneralCommissioningBreadcrumb() + : WriteAttribute("breadcrumb") { + AddArgument("attr-name", "breadcrumb"); + AddArgument("attr-value", 0, UINT64_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributePowerSourceStatus() + ~WriteGeneralCommissioningBreadcrumb() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::Status::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::Breadcrumb::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 = [[MTRBaseClusterGeneralCommissioning 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 numberWithUnsignedLongLong:mValue]; + + [cluster writeAttributeBreadcrumbWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("GeneralCommissioning Breadcrumb write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint64_t mValue; +}; + +class SubscribeAttributeGeneralCommissioningBreadcrumb : public SubscribeAttribute { +public: + SubscribeAttributeGeneralCommissioningBreadcrumb() + : SubscribeAttribute("breadcrumb") + { + } + + ~SubscribeAttributeGeneralCommissioningBreadcrumb() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::Breadcrumb::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -21514,10 +23052,10 @@ class SubscribeAttributePowerSourceStatus : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeStatusWithParams:params + [cluster subscribeAttributeBreadcrumbWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.Status response %@", [value description]); + NSLog(@"GeneralCommissioning.Breadcrumb response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -21531,34 +23069,34 @@ class SubscribeAttributePowerSourceStatus : public SubscribeAttribute { }; /* - * Attribute Order + * Attribute BasicCommissioningInfo */ -class ReadPowerSourceOrder : public ReadAttribute { +class ReadGeneralCommissioningBasicCommissioningInfo : public ReadAttribute { public: - ReadPowerSourceOrder() - : ReadAttribute("order") + ReadGeneralCommissioningBasicCommissioningInfo() + : ReadAttribute("basic-commissioning-info") { } - ~ReadPowerSourceOrder() + ~ReadGeneralCommissioningBasicCommissioningInfo() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::Order::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::BasicCommissioningInfo::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOrderWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.Order response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBasicCommissioningInfoWithCompletion:^(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralCommissioning.BasicCommissioningInfo response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource Order read Error", error); + LogNSError("GeneralCommissioning BasicCommissioningInfo read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -21567,25 +23105,25 @@ class ReadPowerSourceOrder : public ReadAttribute { } }; -class SubscribeAttributePowerSourceOrder : public SubscribeAttribute { +class SubscribeAttributeGeneralCommissioningBasicCommissioningInfo : public SubscribeAttribute { public: - SubscribeAttributePowerSourceOrder() - : SubscribeAttribute("order") + SubscribeAttributeGeneralCommissioningBasicCommissioningInfo() + : SubscribeAttribute("basic-commissioning-info") { } - ~SubscribeAttributePowerSourceOrder() + ~SubscribeAttributeGeneralCommissioningBasicCommissioningInfo() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::Order::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::BasicCommissioningInfo::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -21596,10 +23134,10 @@ class SubscribeAttributePowerSourceOrder : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOrderWithParams:params + [cluster subscribeAttributeBasicCommissioningInfoWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.Order response %@", [value description]); + reportHandler:^(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralCommissioning.BasicCommissioningInfo response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -21613,34 +23151,34 @@ class SubscribeAttributePowerSourceOrder : public SubscribeAttribute { }; /* - * Attribute Description + * Attribute RegulatoryConfig */ -class ReadPowerSourceDescription : public ReadAttribute { +class ReadGeneralCommissioningRegulatoryConfig : public ReadAttribute { public: - ReadPowerSourceDescription() - : ReadAttribute("description") + ReadGeneralCommissioningRegulatoryConfig() + : ReadAttribute("regulatory-config") { } - ~ReadPowerSourceDescription() + ~ReadGeneralCommissioningRegulatoryConfig() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::Description::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::RegulatoryConfig::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDescriptionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.Description response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeRegulatoryConfigWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralCommissioning.RegulatoryConfig response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource Description read Error", error); + LogNSError("GeneralCommissioning RegulatoryConfig read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -21649,25 +23187,25 @@ class ReadPowerSourceDescription : public ReadAttribute { } }; -class SubscribeAttributePowerSourceDescription : public SubscribeAttribute { +class SubscribeAttributeGeneralCommissioningRegulatoryConfig : public SubscribeAttribute { public: - SubscribeAttributePowerSourceDescription() - : SubscribeAttribute("description") + SubscribeAttributeGeneralCommissioningRegulatoryConfig() + : SubscribeAttribute("regulatory-config") { } - ~SubscribeAttributePowerSourceDescription() + ~SubscribeAttributeGeneralCommissioningRegulatoryConfig() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::Description::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::RegulatoryConfig::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -21678,10 +23216,10 @@ class SubscribeAttributePowerSourceDescription : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDescriptionWithParams:params + [cluster subscribeAttributeRegulatoryConfigWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.Description response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralCommissioning.RegulatoryConfig response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -21695,34 +23233,34 @@ class SubscribeAttributePowerSourceDescription : public SubscribeAttribute { }; /* - * Attribute WiredAssessedInputVoltage + * Attribute LocationCapability */ -class ReadPowerSourceWiredAssessedInputVoltage : public ReadAttribute { +class ReadGeneralCommissioningLocationCapability : public ReadAttribute { public: - ReadPowerSourceWiredAssessedInputVoltage() - : ReadAttribute("wired-assessed-input-voltage") + ReadGeneralCommissioningLocationCapability() + : ReadAttribute("location-capability") { } - ~ReadPowerSourceWiredAssessedInputVoltage() + ~ReadGeneralCommissioningLocationCapability() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredAssessedInputVoltage::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::LocationCapability::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeWiredAssessedInputVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.WiredAssessedInputVoltage response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLocationCapabilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralCommissioning.LocationCapability response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource WiredAssessedInputVoltage read Error", error); + LogNSError("GeneralCommissioning LocationCapability read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -21731,25 +23269,25 @@ class ReadPowerSourceWiredAssessedInputVoltage : public ReadAttribute { } }; -class SubscribeAttributePowerSourceWiredAssessedInputVoltage : public SubscribeAttribute { +class SubscribeAttributeGeneralCommissioningLocationCapability : public SubscribeAttribute { public: - SubscribeAttributePowerSourceWiredAssessedInputVoltage() - : SubscribeAttribute("wired-assessed-input-voltage") + SubscribeAttributeGeneralCommissioningLocationCapability() + : SubscribeAttribute("location-capability") { } - ~SubscribeAttributePowerSourceWiredAssessedInputVoltage() + ~SubscribeAttributeGeneralCommissioningLocationCapability() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredAssessedInputVoltage::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::LocationCapability::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -21760,10 +23298,10 @@ class SubscribeAttributePowerSourceWiredAssessedInputVoltage : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeWiredAssessedInputVoltageWithParams:params + [cluster subscribeAttributeLocationCapabilityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.WiredAssessedInputVoltage response %@", [value description]); + NSLog(@"GeneralCommissioning.LocationCapability response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -21777,34 +23315,34 @@ class SubscribeAttributePowerSourceWiredAssessedInputVoltage : public SubscribeA }; /* - * Attribute WiredAssessedInputFrequency + * Attribute SupportsConcurrentConnection */ -class ReadPowerSourceWiredAssessedInputFrequency : public ReadAttribute { +class ReadGeneralCommissioningSupportsConcurrentConnection : public ReadAttribute { public: - ReadPowerSourceWiredAssessedInputFrequency() - : ReadAttribute("wired-assessed-input-frequency") + ReadGeneralCommissioningSupportsConcurrentConnection() + : ReadAttribute("supports-concurrent-connection") { } - ~ReadPowerSourceWiredAssessedInputFrequency() + ~ReadGeneralCommissioningSupportsConcurrentConnection() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredAssessedInputFrequency::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::SupportsConcurrentConnection::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeWiredAssessedInputFrequencyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.WiredAssessedInputFrequency response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportsConcurrentConnectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralCommissioning.SupportsConcurrentConnection response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource WiredAssessedInputFrequency read Error", error); + LogNSError("GeneralCommissioning SupportsConcurrentConnection read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -21813,25 +23351,25 @@ class ReadPowerSourceWiredAssessedInputFrequency : public ReadAttribute { } }; -class SubscribeAttributePowerSourceWiredAssessedInputFrequency : public SubscribeAttribute { +class SubscribeAttributeGeneralCommissioningSupportsConcurrentConnection : public SubscribeAttribute { public: - SubscribeAttributePowerSourceWiredAssessedInputFrequency() - : SubscribeAttribute("wired-assessed-input-frequency") + SubscribeAttributeGeneralCommissioningSupportsConcurrentConnection() + : SubscribeAttribute("supports-concurrent-connection") { } - ~SubscribeAttributePowerSourceWiredAssessedInputFrequency() + ~SubscribeAttributeGeneralCommissioningSupportsConcurrentConnection() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredAssessedInputFrequency::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::SupportsConcurrentConnection::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -21842,10 +23380,10 @@ class SubscribeAttributePowerSourceWiredAssessedInputFrequency : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeWiredAssessedInputFrequencyWithParams:params + [cluster subscribeAttributeSupportsConcurrentConnectionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.WiredAssessedInputFrequency response %@", [value description]); + NSLog(@"GeneralCommissioning.SupportsConcurrentConnection response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -21859,34 +23397,34 @@ class SubscribeAttributePowerSourceWiredAssessedInputFrequency : public Subscrib }; /* - * Attribute WiredCurrentType + * Attribute GeneratedCommandList */ -class ReadPowerSourceWiredCurrentType : public ReadAttribute { +class ReadGeneralCommissioningGeneratedCommandList : public ReadAttribute { public: - ReadPowerSourceWiredCurrentType() - : ReadAttribute("wired-current-type") + ReadGeneralCommissioningGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadPowerSourceWiredCurrentType() + ~ReadGeneralCommissioningGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredCurrentType::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::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 = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeWiredCurrentTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.WiredCurrentType response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralCommissioning.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource WiredCurrentType read Error", error); + LogNSError("GeneralCommissioning GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -21895,25 +23433,25 @@ class ReadPowerSourceWiredCurrentType : public ReadAttribute { } }; -class SubscribeAttributePowerSourceWiredCurrentType : public SubscribeAttribute { +class SubscribeAttributeGeneralCommissioningGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributePowerSourceWiredCurrentType() - : SubscribeAttribute("wired-current-type") + SubscribeAttributeGeneralCommissioningGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributePowerSourceWiredCurrentType() + ~SubscribeAttributeGeneralCommissioningGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredCurrentType::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::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 = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -21924,10 +23462,10 @@ class SubscribeAttributePowerSourceWiredCurrentType : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeWiredCurrentTypeWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.WiredCurrentType response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralCommissioning.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -21941,34 +23479,34 @@ class SubscribeAttributePowerSourceWiredCurrentType : public SubscribeAttribute }; /* - * Attribute WiredAssessedCurrent + * Attribute AcceptedCommandList */ -class ReadPowerSourceWiredAssessedCurrent : public ReadAttribute { +class ReadGeneralCommissioningAcceptedCommandList : public ReadAttribute { public: - ReadPowerSourceWiredAssessedCurrent() - : ReadAttribute("wired-assessed-current") + ReadGeneralCommissioningAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadPowerSourceWiredAssessedCurrent() + ~ReadGeneralCommissioningAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredAssessedCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::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 = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeWiredAssessedCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.WiredAssessedCurrent response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralCommissioning.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource WiredAssessedCurrent read Error", error); + LogNSError("GeneralCommissioning AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -21977,25 +23515,25 @@ class ReadPowerSourceWiredAssessedCurrent : public ReadAttribute { } }; -class SubscribeAttributePowerSourceWiredAssessedCurrent : public SubscribeAttribute { +class SubscribeAttributeGeneralCommissioningAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributePowerSourceWiredAssessedCurrent() - : SubscribeAttribute("wired-assessed-current") + SubscribeAttributeGeneralCommissioningAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributePowerSourceWiredAssessedCurrent() + ~SubscribeAttributeGeneralCommissioningAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredAssessedCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::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 = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -22006,10 +23544,10 @@ class SubscribeAttributePowerSourceWiredAssessedCurrent : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeWiredAssessedCurrentWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.WiredAssessedCurrent response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralCommissioning.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -22022,35 +23560,37 @@ class SubscribeAttributePowerSourceWiredAssessedCurrent : public SubscribeAttrib } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute WiredNominalVoltage + * Attribute EventList */ -class ReadPowerSourceWiredNominalVoltage : public ReadAttribute { +class ReadGeneralCommissioningEventList : public ReadAttribute { public: - ReadPowerSourceWiredNominalVoltage() - : ReadAttribute("wired-nominal-voltage") + ReadGeneralCommissioningEventList() + : ReadAttribute("event-list") { } - ~ReadPowerSourceWiredNominalVoltage() + ~ReadGeneralCommissioningEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredNominalVoltage::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::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 = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeWiredNominalVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.WiredNominalVoltage response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralCommissioning.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource WiredNominalVoltage read Error", error); + LogNSError("GeneralCommissioning EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -22059,25 +23599,25 @@ class ReadPowerSourceWiredNominalVoltage : public ReadAttribute { } }; -class SubscribeAttributePowerSourceWiredNominalVoltage : public SubscribeAttribute { +class SubscribeAttributeGeneralCommissioningEventList : public SubscribeAttribute { public: - SubscribeAttributePowerSourceWiredNominalVoltage() - : SubscribeAttribute("wired-nominal-voltage") + SubscribeAttributeGeneralCommissioningEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributePowerSourceWiredNominalVoltage() + ~SubscribeAttributeGeneralCommissioningEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredNominalVoltage::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::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 = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -22088,10 +23628,10 @@ class SubscribeAttributePowerSourceWiredNominalVoltage : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeWiredNominalVoltageWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.WiredNominalVoltage response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralCommissioning.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -22104,35 +23644,37 @@ class SubscribeAttributePowerSourceWiredNominalVoltage : public SubscribeAttribu } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute WiredMaximumCurrent + * Attribute AttributeList */ -class ReadPowerSourceWiredMaximumCurrent : public ReadAttribute { +class ReadGeneralCommissioningAttributeList : public ReadAttribute { public: - ReadPowerSourceWiredMaximumCurrent() - : ReadAttribute("wired-maximum-current") + ReadGeneralCommissioningAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadPowerSourceWiredMaximumCurrent() + ~ReadGeneralCommissioningAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredMaximumCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::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 = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeWiredMaximumCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.WiredMaximumCurrent response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralCommissioning.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource WiredMaximumCurrent read Error", error); + LogNSError("GeneralCommissioning AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -22141,25 +23683,25 @@ class ReadPowerSourceWiredMaximumCurrent : public ReadAttribute { } }; -class SubscribeAttributePowerSourceWiredMaximumCurrent : public SubscribeAttribute { +class SubscribeAttributeGeneralCommissioningAttributeList : public SubscribeAttribute { public: - SubscribeAttributePowerSourceWiredMaximumCurrent() - : SubscribeAttribute("wired-maximum-current") + SubscribeAttributeGeneralCommissioningAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributePowerSourceWiredMaximumCurrent() + ~SubscribeAttributeGeneralCommissioningAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredMaximumCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::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 = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -22170,10 +23712,10 @@ class SubscribeAttributePowerSourceWiredMaximumCurrent : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeWiredMaximumCurrentWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.WiredMaximumCurrent response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralCommissioning.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -22187,34 +23729,34 @@ class SubscribeAttributePowerSourceWiredMaximumCurrent : public SubscribeAttribu }; /* - * Attribute WiredPresent + * Attribute FeatureMap */ -class ReadPowerSourceWiredPresent : public ReadAttribute { +class ReadGeneralCommissioningFeatureMap : public ReadAttribute { public: - ReadPowerSourceWiredPresent() - : ReadAttribute("wired-present") + ReadGeneralCommissioningFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadPowerSourceWiredPresent() + ~ReadGeneralCommissioningFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredPresent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::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 = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeWiredPresentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.WiredPresent response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralCommissioning.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource WiredPresent read Error", error); + LogNSError("GeneralCommissioning FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -22223,25 +23765,25 @@ class ReadPowerSourceWiredPresent : public ReadAttribute { } }; -class SubscribeAttributePowerSourceWiredPresent : public SubscribeAttribute { +class SubscribeAttributeGeneralCommissioningFeatureMap : public SubscribeAttribute { public: - SubscribeAttributePowerSourceWiredPresent() - : SubscribeAttribute("wired-present") + SubscribeAttributeGeneralCommissioningFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributePowerSourceWiredPresent() + ~SubscribeAttributeGeneralCommissioningFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::WiredPresent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::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 = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -22252,10 +23794,10 @@ class SubscribeAttributePowerSourceWiredPresent : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeWiredPresentWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.WiredPresent response %@", [value description]); + NSLog(@"GeneralCommissioning.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -22269,34 +23811,34 @@ class SubscribeAttributePowerSourceWiredPresent : public SubscribeAttribute { }; /* - * Attribute ActiveWiredFaults + * Attribute ClusterRevision */ -class ReadPowerSourceActiveWiredFaults : public ReadAttribute { +class ReadGeneralCommissioningClusterRevision : public ReadAttribute { public: - ReadPowerSourceActiveWiredFaults() - : ReadAttribute("active-wired-faults") + ReadGeneralCommissioningClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadPowerSourceActiveWiredFaults() + ~ReadGeneralCommissioningClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::ActiveWiredFaults::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::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 = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActiveWiredFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.ActiveWiredFaults response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralCommissioning.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource ActiveWiredFaults read Error", error); + LogNSError("GeneralCommissioning ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -22305,25 +23847,25 @@ class ReadPowerSourceActiveWiredFaults : public ReadAttribute { } }; -class SubscribeAttributePowerSourceActiveWiredFaults : public SubscribeAttribute { +class SubscribeAttributeGeneralCommissioningClusterRevision : public SubscribeAttribute { public: - SubscribeAttributePowerSourceActiveWiredFaults() - : SubscribeAttribute("active-wired-faults") + SubscribeAttributeGeneralCommissioningClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributePowerSourceActiveWiredFaults() + ~SubscribeAttributeGeneralCommissioningClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::ActiveWiredFaults::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::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 = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -22334,10 +23876,10 @@ class SubscribeAttributePowerSourceActiveWiredFaults : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActiveWiredFaultsWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.ActiveWiredFaults response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralCommissioning.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -22350,281 +23892,535 @@ class SubscribeAttributePowerSourceActiveWiredFaults : public SubscribeAttribute } }; +/*----------------------------------------------------------------------------*\ +| 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: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute BatVoltage + * Command ScanNetworks */ -class ReadPowerSourceBatVoltage : public ReadAttribute { +class NetworkCommissioningScanNetworks : public ClusterCommand { public: - ReadPowerSourceBatVoltage() - : ReadAttribute("bat-voltage") + NetworkCommissioningScanNetworks() + : ClusterCommand("scan-networks") { + AddArgument("Ssid", &mRequest.ssid); + AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); + ClusterCommand::AddArguments(); } - ~ReadPowerSourceBatVoltage() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) 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, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRNetworkCommissioningClusterScanNetworksParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + if (mRequest.ssid.HasValue()) { + if (mRequest.ssid.Value().IsNull()) { + params.ssid = nil; + } else { + params.ssid = [NSData dataWithBytes:mRequest.ssid.Value().Value().data() length:mRequest.ssid.Value().Value().size()]; + } + } else { + params.ssid = nil; + } + if (mRequest.breadcrumb.HasValue()) { + params.breadcrumb = [NSNumber numberWithUnsignedLongLong:mRequest.breadcrumb.Value()]; + } else { + params.breadcrumb = nil; + } + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster scanNetworksWithParams:params completion: + ^(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworksResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworksResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworks::Type mRequest; +}; + +/* + * Command AddOrUpdateWiFiNetwork + */ +class NetworkCommissioningAddOrUpdateWiFiNetwork : public ClusterCommand { +public: + NetworkCommissioningAddOrUpdateWiFiNetwork() + : ClusterCommand("add-or-update-wi-fi-network") { + AddArgument("Ssid", &mRequest.ssid); + AddArgument("Credentials", &mRequest.credentials); + AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); +#if MTR_ENABLE_PROVISIONAL + AddArgument("NetworkIdentity", &mRequest.networkIdentity); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("ClientIdentifier", &mRequest.clientIdentifier); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("PossessionNonce", &mRequest.possessionNonce); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatVoltage::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 ") 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 = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatVoltageWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatVoltage response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("PowerSource BatVoltage read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.ssid = [NSData dataWithBytes:mRequest.ssid.data() length:mRequest.ssid.size()]; + params.credentials = [NSData dataWithBytes:mRequest.credentials.data() length:mRequest.credentials.size()]; + if (mRequest.breadcrumb.HasValue()) { + params.breadcrumb = [NSNumber numberWithUnsignedLongLong:mRequest.breadcrumb.Value()]; + } else { + params.breadcrumb = nil; + } +#if MTR_ENABLE_PROVISIONAL + if (mRequest.networkIdentity.HasValue()) { + params.networkIdentity = [NSData dataWithBytes:mRequest.networkIdentity.Value().data() length:mRequest.networkIdentity.Value().size()]; + } else { + params.networkIdentity = nil; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + if (mRequest.clientIdentifier.HasValue()) { + params.clientIdentifier = [NSData dataWithBytes:mRequest.clientIdentifier.Value().data() length:mRequest.clientIdentifier.Value().size()]; + } else { + params.clientIdentifier = nil; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + if (mRequest.possessionNonce.HasValue()) { + params.possessionNonce = [NSData dataWithBytes:mRequest.possessionNonce.Value().data() length:mRequest.possessionNonce.Value().size()]; + } else { + params.possessionNonce = nil; + } +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster addOrUpdateWiFiNetworkWithParams:params completion: + ^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::NetworkCommissioning::Commands::AddOrUpdateWiFiNetwork::Type mRequest; }; -class SubscribeAttributePowerSourceBatVoltage : public SubscribeAttribute { +/* + * Command AddOrUpdateThreadNetwork + */ +class NetworkCommissioningAddOrUpdateThreadNetwork : public ClusterCommand { public: - SubscribeAttributePowerSourceBatVoltage() - : SubscribeAttribute("bat-voltage") - { - } - - ~SubscribeAttributePowerSourceBatVoltage() + NetworkCommissioningAddOrUpdateThreadNetwork() + : ClusterCommand("add-or-update-thread-network") { + AddArgument("OperationalDataset", &mRequest.operationalDataset); + AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatVoltage::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, 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 = [[MTRBaseClusterPowerSource 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 = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.operationalDataset = [NSData dataWithBytes:mRequest.operationalDataset.data() length:mRequest.operationalDataset.size()]; + if (mRequest.breadcrumb.HasValue()) { + params.breadcrumb = [NSNumber numberWithUnsignedLongLong:mRequest.breadcrumb.Value()]; + } else { + params.breadcrumb = nil; } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster addOrUpdateThreadNetworkWithParams:params completion: + ^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeBatVoltageWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatVoltage 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::NetworkCommissioning::Commands::AddOrUpdateThreadNetwork::Type mRequest; }; /* - * Attribute BatPercentRemaining + * Command RemoveNetwork */ -class ReadPowerSourceBatPercentRemaining : public ReadAttribute { +class NetworkCommissioningRemoveNetwork : public ClusterCommand { public: - ReadPowerSourceBatPercentRemaining() - : ReadAttribute("bat-percent-remaining") - { - } - - ~ReadPowerSourceBatPercentRemaining() + NetworkCommissioningRemoveNetwork() + : ClusterCommand("remove-network") { + AddArgument("NetworkID", &mRequest.networkID); + AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatPercentRemaining::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::RemoveNetwork::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 = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatPercentRemainingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatPercentRemaining response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("PowerSource BatPercentRemaining read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRNetworkCommissioningClusterRemoveNetworkParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.networkID = [NSData dataWithBytes:mRequest.networkID.data() length:mRequest.networkID.size()]; + if (mRequest.breadcrumb.HasValue()) { + params.breadcrumb = [NSNumber numberWithUnsignedLongLong:mRequest.breadcrumb.Value()]; + } else { + params.breadcrumb = nil; + } + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster removeNetworkWithParams:params completion: + ^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::NetworkCommissioning::Commands::RemoveNetwork::Type mRequest; }; -class SubscribeAttributePowerSourceBatPercentRemaining : public SubscribeAttribute { +/* + * Command ConnectNetwork + */ +class NetworkCommissioningConnectNetwork : public ClusterCommand { public: - SubscribeAttributePowerSourceBatPercentRemaining() - : SubscribeAttribute("bat-percent-remaining") - { - } - - ~SubscribeAttributePowerSourceBatPercentRemaining() + NetworkCommissioningConnectNetwork() + : ClusterCommand("connect-network") { + AddArgument("NetworkID", &mRequest.networkID); + AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatPercentRemaining::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetwork::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 = [[MTRBaseClusterPowerSource 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 = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRNetworkCommissioningClusterConnectNetworkParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.networkID = [NSData dataWithBytes:mRequest.networkID.data() length:mRequest.networkID.size()]; + if (mRequest.breadcrumb.HasValue()) { + params.breadcrumb = [NSNumber numberWithUnsignedLongLong:mRequest.breadcrumb.Value()]; + } else { + params.breadcrumb = nil; } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster connectNetworkWithParams:params completion: + ^(MTRNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetworkResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetworkResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeBatPercentRemainingWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatPercentRemaining 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::NetworkCommissioning::Commands::ConnectNetwork::Type mRequest; }; /* - * Attribute BatTimeRemaining + * Command ReorderNetwork */ -class ReadPowerSourceBatTimeRemaining : public ReadAttribute { +class NetworkCommissioningReorderNetwork : public ClusterCommand { public: - ReadPowerSourceBatTimeRemaining() - : ReadAttribute("bat-time-remaining") - { - } - - ~ReadPowerSourceBatTimeRemaining() + NetworkCommissioningReorderNetwork() + : ClusterCommand("reorder-network") { + AddArgument("NetworkID", &mRequest.networkID); + AddArgument("NetworkIndex", 0, UINT8_MAX, &mRequest.networkIndex); + AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatTimeRemaining::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::ReorderNetwork::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 = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatTimeRemainingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatTimeRemaining response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("PowerSource BatTimeRemaining read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRNetworkCommissioningClusterReorderNetworkParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.networkID = [NSData dataWithBytes:mRequest.networkID.data() length:mRequest.networkID.size()]; + params.networkIndex = [NSNumber numberWithUnsignedChar:mRequest.networkIndex]; + if (mRequest.breadcrumb.HasValue()) { + params.breadcrumb = [NSNumber numberWithUnsignedLongLong:mRequest.breadcrumb.Value()]; + } else { + params.breadcrumb = nil; + } + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster reorderNetworkWithParams:params completion: + ^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::NetworkCommissioning::Commands::ReorderNetwork::Type mRequest; }; -class SubscribeAttributePowerSourceBatTimeRemaining : public SubscribeAttribute { +#if MTR_ENABLE_PROVISIONAL +/* + * Command QueryIdentity + */ +class NetworkCommissioningQueryIdentity : public ClusterCommand { public: - SubscribeAttributePowerSourceBatTimeRemaining() - : SubscribeAttribute("bat-time-remaining") - { - } - - ~SubscribeAttributePowerSourceBatTimeRemaining() + NetworkCommissioningQueryIdentity() + : ClusterCommand("query-identity") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("KeyIdentifier", &mRequest.keyIdentifier); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("PossessionNonce", &mRequest.possessionNonce); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatTimeRemaining::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::QueryIdentity::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 = [[MTRBaseClusterPowerSource 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 = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRNetworkCommissioningClusterQueryIdentityParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.keyIdentifier = [NSData dataWithBytes:mRequest.keyIdentifier.data() length:mRequest.keyIdentifier.size()]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + if (mRequest.possessionNonce.HasValue()) { + params.possessionNonce = [NSData dataWithBytes:mRequest.possessionNonce.Value().data() length:mRequest.possessionNonce.Value().size()]; + } else { + params.possessionNonce = 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 queryIdentityWithParams:params completion: + ^(MTRNetworkCommissioningClusterQueryIdentityResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::QueryIdentityResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::QueryIdentityResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeBatTimeRemainingWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatTimeRemaining 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::NetworkCommissioning::Commands::QueryIdentity::Type mRequest; }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute BatChargeLevel + * Attribute MaxNetworks */ -class ReadPowerSourceBatChargeLevel : public ReadAttribute { +class ReadNetworkCommissioningMaxNetworks : public ReadAttribute { public: - ReadPowerSourceBatChargeLevel() - : ReadAttribute("bat-charge-level") + ReadNetworkCommissioningMaxNetworks() + : ReadAttribute("max-networks") { } - ~ReadPowerSourceBatChargeLevel() + ~ReadNetworkCommissioningMaxNetworks() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatChargeLevel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::MaxNetworks::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatChargeLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatChargeLevel response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxNetworksWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.MaxNetworks response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource BatChargeLevel read Error", error); + LogNSError("NetworkCommissioning MaxNetworks read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -22633,25 +24429,25 @@ class ReadPowerSourceBatChargeLevel : public ReadAttribute { } }; -class SubscribeAttributePowerSourceBatChargeLevel : public SubscribeAttribute { +class SubscribeAttributeNetworkCommissioningMaxNetworks : public SubscribeAttribute { public: - SubscribeAttributePowerSourceBatChargeLevel() - : SubscribeAttribute("bat-charge-level") + SubscribeAttributeNetworkCommissioningMaxNetworks() + : SubscribeAttribute("max-networks") { } - ~SubscribeAttributePowerSourceBatChargeLevel() + ~SubscribeAttributeNetworkCommissioningMaxNetworks() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatChargeLevel::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::MaxNetworks::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -22662,10 +24458,10 @@ class SubscribeAttributePowerSourceBatChargeLevel : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBatChargeLevelWithParams:params + [cluster subscribeAttributeMaxNetworksWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatChargeLevel response %@", [value description]); + NSLog(@"NetworkCommissioning.MaxNetworks response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -22679,34 +24475,34 @@ class SubscribeAttributePowerSourceBatChargeLevel : public SubscribeAttribute { }; /* - * Attribute BatReplacementNeeded + * Attribute Networks */ -class ReadPowerSourceBatReplacementNeeded : public ReadAttribute { +class ReadNetworkCommissioningNetworks : public ReadAttribute { public: - ReadPowerSourceBatReplacementNeeded() - : ReadAttribute("bat-replacement-needed") + ReadNetworkCommissioningNetworks() + : ReadAttribute("networks") { } - ~ReadPowerSourceBatReplacementNeeded() + ~ReadNetworkCommissioningNetworks() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatReplacementNeeded::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::Networks::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatReplacementNeededWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatReplacementNeeded response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNetworksWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.Networks response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource BatReplacementNeeded read Error", error); + LogNSError("NetworkCommissioning Networks read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -22715,25 +24511,25 @@ class ReadPowerSourceBatReplacementNeeded : public ReadAttribute { } }; -class SubscribeAttributePowerSourceBatReplacementNeeded : public SubscribeAttribute { +class SubscribeAttributeNetworkCommissioningNetworks : public SubscribeAttribute { public: - SubscribeAttributePowerSourceBatReplacementNeeded() - : SubscribeAttribute("bat-replacement-needed") + SubscribeAttributeNetworkCommissioningNetworks() + : SubscribeAttribute("networks") { } - ~SubscribeAttributePowerSourceBatReplacementNeeded() + ~SubscribeAttributeNetworkCommissioningNetworks() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatReplacementNeeded::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::Networks::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -22744,10 +24540,10 @@ class SubscribeAttributePowerSourceBatReplacementNeeded : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBatReplacementNeededWithParams:params + [cluster subscribeAttributeNetworksWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatReplacementNeeded response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.Networks response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -22761,34 +24557,34 @@ class SubscribeAttributePowerSourceBatReplacementNeeded : public SubscribeAttrib }; /* - * Attribute BatReplaceability + * Attribute ScanMaxTimeSeconds */ -class ReadPowerSourceBatReplaceability : public ReadAttribute { +class ReadNetworkCommissioningScanMaxTimeSeconds : public ReadAttribute { public: - ReadPowerSourceBatReplaceability() - : ReadAttribute("bat-replaceability") + ReadNetworkCommissioningScanMaxTimeSeconds() + : ReadAttribute("scan-max-time-seconds") { } - ~ReadPowerSourceBatReplaceability() + ~ReadNetworkCommissioningScanMaxTimeSeconds() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatReplaceability::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::ScanMaxTimeSeconds::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatReplaceabilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatReplaceability response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeScanMaxTimeSecondsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.ScanMaxTimeSeconds response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource BatReplaceability read Error", error); + LogNSError("NetworkCommissioning ScanMaxTimeSeconds read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -22797,25 +24593,25 @@ class ReadPowerSourceBatReplaceability : public ReadAttribute { } }; -class SubscribeAttributePowerSourceBatReplaceability : public SubscribeAttribute { +class SubscribeAttributeNetworkCommissioningScanMaxTimeSeconds : public SubscribeAttribute { public: - SubscribeAttributePowerSourceBatReplaceability() - : SubscribeAttribute("bat-replaceability") + SubscribeAttributeNetworkCommissioningScanMaxTimeSeconds() + : SubscribeAttribute("scan-max-time-seconds") { } - ~SubscribeAttributePowerSourceBatReplaceability() + ~SubscribeAttributeNetworkCommissioningScanMaxTimeSeconds() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatReplaceability::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::ScanMaxTimeSeconds::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -22826,10 +24622,10 @@ class SubscribeAttributePowerSourceBatReplaceability : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBatReplaceabilityWithParams:params + [cluster subscribeAttributeScanMaxTimeSecondsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatReplaceability response %@", [value description]); + NSLog(@"NetworkCommissioning.ScanMaxTimeSeconds response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -22843,34 +24639,34 @@ class SubscribeAttributePowerSourceBatReplaceability : public SubscribeAttribute }; /* - * Attribute BatPresent + * Attribute ConnectMaxTimeSeconds */ -class ReadPowerSourceBatPresent : public ReadAttribute { +class ReadNetworkCommissioningConnectMaxTimeSeconds : public ReadAttribute { public: - ReadPowerSourceBatPresent() - : ReadAttribute("bat-present") + ReadNetworkCommissioningConnectMaxTimeSeconds() + : ReadAttribute("connect-max-time-seconds") { } - ~ReadPowerSourceBatPresent() + ~ReadNetworkCommissioningConnectMaxTimeSeconds() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatPresent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatPresentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatPresent response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeConnectMaxTimeSecondsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.ConnectMaxTimeSeconds response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource BatPresent read Error", error); + LogNSError("NetworkCommissioning ConnectMaxTimeSeconds read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -22879,25 +24675,25 @@ class ReadPowerSourceBatPresent : public ReadAttribute { } }; -class SubscribeAttributePowerSourceBatPresent : public SubscribeAttribute { +class SubscribeAttributeNetworkCommissioningConnectMaxTimeSeconds : public SubscribeAttribute { public: - SubscribeAttributePowerSourceBatPresent() - : SubscribeAttribute("bat-present") + SubscribeAttributeNetworkCommissioningConnectMaxTimeSeconds() + : SubscribeAttribute("connect-max-time-seconds") { } - ~SubscribeAttributePowerSourceBatPresent() + ~SubscribeAttributeNetworkCommissioningConnectMaxTimeSeconds() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatPresent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -22908,10 +24704,10 @@ class SubscribeAttributePowerSourceBatPresent : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBatPresentWithParams:params + [cluster subscribeAttributeConnectMaxTimeSecondsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatPresent response %@", [value description]); + NSLog(@"NetworkCommissioning.ConnectMaxTimeSeconds response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -22925,34 +24721,34 @@ class SubscribeAttributePowerSourceBatPresent : public SubscribeAttribute { }; /* - * Attribute ActiveBatFaults + * Attribute InterfaceEnabled */ -class ReadPowerSourceActiveBatFaults : public ReadAttribute { +class ReadNetworkCommissioningInterfaceEnabled : public ReadAttribute { public: - ReadPowerSourceActiveBatFaults() - : ReadAttribute("active-bat-faults") + ReadNetworkCommissioningInterfaceEnabled() + : ReadAttribute("interface-enabled") { } - ~ReadPowerSourceActiveBatFaults() + ~ReadNetworkCommissioningInterfaceEnabled() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::ActiveBatFaults::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::InterfaceEnabled::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActiveBatFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.ActiveBatFaults response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeInterfaceEnabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.InterfaceEnabled response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource ActiveBatFaults read Error", error); + LogNSError("NetworkCommissioning InterfaceEnabled read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -22961,107 +24757,66 @@ class ReadPowerSourceActiveBatFaults : public ReadAttribute { } }; -class SubscribeAttributePowerSourceActiveBatFaults : public SubscribeAttribute { +class WriteNetworkCommissioningInterfaceEnabled : public WriteAttribute { public: - SubscribeAttributePowerSourceActiveBatFaults() - : SubscribeAttribute("active-bat-faults") + WriteNetworkCommissioningInterfaceEnabled() + : WriteAttribute("interface-enabled") { + AddArgument("attr-name", "interface-enabled"); + AddArgument("attr-value", 0, 1, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributePowerSourceActiveBatFaults() + ~WriteNetworkCommissioningInterfaceEnabled() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::ActiveBatFaults::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::InterfaceEnabled::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 = [[MTRBaseClusterPowerSource 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 subscribeAttributeActiveBatFaultsWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.ActiveBatFaults 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 BatReplacementDescription - */ -class ReadPowerSourceBatReplacementDescription : public ReadAttribute { -public: - ReadPowerSourceBatReplacementDescription() - : ReadAttribute("bat-replacement-description") - { - } - - ~ReadPowerSourceBatReplacementDescription() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatReplacementDescription::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning 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 numberWithBool:mValue]; - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatReplacementDescriptionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatReplacementDescription response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("PowerSource BatReplacementDescription read Error", error); + [cluster writeAttributeInterfaceEnabledWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("NetworkCommissioning InterfaceEnabled write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + bool mValue; }; -class SubscribeAttributePowerSourceBatReplacementDescription : public SubscribeAttribute { +class SubscribeAttributeNetworkCommissioningInterfaceEnabled : public SubscribeAttribute { public: - SubscribeAttributePowerSourceBatReplacementDescription() - : SubscribeAttribute("bat-replacement-description") + SubscribeAttributeNetworkCommissioningInterfaceEnabled() + : SubscribeAttribute("interface-enabled") { } - ~SubscribeAttributePowerSourceBatReplacementDescription() + ~SubscribeAttributeNetworkCommissioningInterfaceEnabled() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatReplacementDescription::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::InterfaceEnabled::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -23072,10 +24827,10 @@ class SubscribeAttributePowerSourceBatReplacementDescription : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBatReplacementDescriptionWithParams:params + [cluster subscribeAttributeInterfaceEnabledWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatReplacementDescription response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.InterfaceEnabled response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -23089,34 +24844,34 @@ class SubscribeAttributePowerSourceBatReplacementDescription : public SubscribeA }; /* - * Attribute BatCommonDesignation + * Attribute LastNetworkingStatus */ -class ReadPowerSourceBatCommonDesignation : public ReadAttribute { +class ReadNetworkCommissioningLastNetworkingStatus : public ReadAttribute { public: - ReadPowerSourceBatCommonDesignation() - : ReadAttribute("bat-common-designation") + ReadNetworkCommissioningLastNetworkingStatus() + : ReadAttribute("last-networking-status") { } - ~ReadPowerSourceBatCommonDesignation() + ~ReadNetworkCommissioningLastNetworkingStatus() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatCommonDesignation::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::LastNetworkingStatus::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatCommonDesignationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatCommonDesignation response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLastNetworkingStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.LastNetworkingStatus response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource BatCommonDesignation read Error", error); + LogNSError("NetworkCommissioning LastNetworkingStatus read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -23125,25 +24880,25 @@ class ReadPowerSourceBatCommonDesignation : public ReadAttribute { } }; -class SubscribeAttributePowerSourceBatCommonDesignation : public SubscribeAttribute { +class SubscribeAttributeNetworkCommissioningLastNetworkingStatus : public SubscribeAttribute { public: - SubscribeAttributePowerSourceBatCommonDesignation() - : SubscribeAttribute("bat-common-designation") + SubscribeAttributeNetworkCommissioningLastNetworkingStatus() + : SubscribeAttribute("last-networking-status") { } - ~SubscribeAttributePowerSourceBatCommonDesignation() + ~SubscribeAttributeNetworkCommissioningLastNetworkingStatus() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatCommonDesignation::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::LastNetworkingStatus::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -23154,10 +24909,10 @@ class SubscribeAttributePowerSourceBatCommonDesignation : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBatCommonDesignationWithParams:params + [cluster subscribeAttributeLastNetworkingStatusWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatCommonDesignation response %@", [value description]); + NSLog(@"NetworkCommissioning.LastNetworkingStatus response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -23171,34 +24926,34 @@ class SubscribeAttributePowerSourceBatCommonDesignation : public SubscribeAttrib }; /* - * Attribute BatANSIDesignation + * Attribute LastNetworkID */ -class ReadPowerSourceBatANSIDesignation : public ReadAttribute { +class ReadNetworkCommissioningLastNetworkID : public ReadAttribute { public: - ReadPowerSourceBatANSIDesignation() - : ReadAttribute("bat-ansidesignation") + ReadNetworkCommissioningLastNetworkID() + : ReadAttribute("last-network-id") { } - ~ReadPowerSourceBatANSIDesignation() + ~ReadNetworkCommissioningLastNetworkID() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatANSIDesignation::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::LastNetworkID::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatANSIDesignationWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatANSIDesignation response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLastNetworkIDWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.LastNetworkID response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource BatANSIDesignation read Error", error); + LogNSError("NetworkCommissioning LastNetworkID read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -23207,25 +24962,25 @@ class ReadPowerSourceBatANSIDesignation : public ReadAttribute { } }; -class SubscribeAttributePowerSourceBatANSIDesignation : public SubscribeAttribute { +class SubscribeAttributeNetworkCommissioningLastNetworkID : public SubscribeAttribute { public: - SubscribeAttributePowerSourceBatANSIDesignation() - : SubscribeAttribute("bat-ansidesignation") + SubscribeAttributeNetworkCommissioningLastNetworkID() + : SubscribeAttribute("last-network-id") { } - ~SubscribeAttributePowerSourceBatANSIDesignation() + ~SubscribeAttributeNetworkCommissioningLastNetworkID() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatANSIDesignation::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::LastNetworkID::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -23236,10 +24991,10 @@ class SubscribeAttributePowerSourceBatANSIDesignation : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBatANSIDesignationWithParams:params + [cluster subscribeAttributeLastNetworkIDWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatANSIDesignation response %@", [value description]); + reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.LastNetworkID response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -23253,34 +25008,34 @@ class SubscribeAttributePowerSourceBatANSIDesignation : public SubscribeAttribut }; /* - * Attribute BatIECDesignation + * Attribute LastConnectErrorValue */ -class ReadPowerSourceBatIECDesignation : public ReadAttribute { +class ReadNetworkCommissioningLastConnectErrorValue : public ReadAttribute { public: - ReadPowerSourceBatIECDesignation() - : ReadAttribute("bat-iecdesignation") + ReadNetworkCommissioningLastConnectErrorValue() + : ReadAttribute("last-connect-error-value") { } - ~ReadPowerSourceBatIECDesignation() + ~ReadNetworkCommissioningLastConnectErrorValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatIECDesignation::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::LastConnectErrorValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatIECDesignationWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatIECDesignation response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLastConnectErrorValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.LastConnectErrorValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource BatIECDesignation read Error", error); + LogNSError("NetworkCommissioning LastConnectErrorValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -23289,25 +25044,25 @@ class ReadPowerSourceBatIECDesignation : public ReadAttribute { } }; -class SubscribeAttributePowerSourceBatIECDesignation : public SubscribeAttribute { +class SubscribeAttributeNetworkCommissioningLastConnectErrorValue : public SubscribeAttribute { public: - SubscribeAttributePowerSourceBatIECDesignation() - : SubscribeAttribute("bat-iecdesignation") + SubscribeAttributeNetworkCommissioningLastConnectErrorValue() + : SubscribeAttribute("last-connect-error-value") { } - ~SubscribeAttributePowerSourceBatIECDesignation() + ~SubscribeAttributeNetworkCommissioningLastConnectErrorValue() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatIECDesignation::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::LastConnectErrorValue::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -23318,10 +25073,10 @@ class SubscribeAttributePowerSourceBatIECDesignation : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBatIECDesignationWithParams:params + [cluster subscribeAttributeLastConnectErrorValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatIECDesignation response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.LastConnectErrorValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -23334,35 +25089,37 @@ class SubscribeAttributePowerSourceBatIECDesignation : public SubscribeAttribute } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute BatApprovedChemistry + * Attribute SupportedWiFiBands */ -class ReadPowerSourceBatApprovedChemistry : public ReadAttribute { +class ReadNetworkCommissioningSupportedWiFiBands : public ReadAttribute { public: - ReadPowerSourceBatApprovedChemistry() - : ReadAttribute("bat-approved-chemistry") + ReadNetworkCommissioningSupportedWiFiBands() + : ReadAttribute("supported-wi-fi-bands") { } - ~ReadPowerSourceBatApprovedChemistry() + ~ReadNetworkCommissioningSupportedWiFiBands() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatApprovedChemistry::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::SupportedWiFiBands::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatApprovedChemistryWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatApprovedChemistry response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedWiFiBandsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.SupportedWiFiBands response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource BatApprovedChemistry read Error", error); + LogNSError("NetworkCommissioning SupportedWiFiBands read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -23371,25 +25128,25 @@ class ReadPowerSourceBatApprovedChemistry : public ReadAttribute { } }; -class SubscribeAttributePowerSourceBatApprovedChemistry : public SubscribeAttribute { +class SubscribeAttributeNetworkCommissioningSupportedWiFiBands : public SubscribeAttribute { public: - SubscribeAttributePowerSourceBatApprovedChemistry() - : SubscribeAttribute("bat-approved-chemistry") + SubscribeAttributeNetworkCommissioningSupportedWiFiBands() + : SubscribeAttribute("supported-wi-fi-bands") { } - ~SubscribeAttributePowerSourceBatApprovedChemistry() + ~SubscribeAttributeNetworkCommissioningSupportedWiFiBands() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatApprovedChemistry::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::SupportedWiFiBands::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -23400,10 +25157,10 @@ class SubscribeAttributePowerSourceBatApprovedChemistry : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBatApprovedChemistryWithParams:params + [cluster subscribeAttributeSupportedWiFiBandsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatApprovedChemistry response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.SupportedWiFiBands response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -23416,35 +25173,38 @@ class SubscribeAttributePowerSourceBatApprovedChemistry : public SubscribeAttrib } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute BatCapacity + * Attribute SupportedThreadFeatures */ -class ReadPowerSourceBatCapacity : public ReadAttribute { +class ReadNetworkCommissioningSupportedThreadFeatures : public ReadAttribute { public: - ReadPowerSourceBatCapacity() - : ReadAttribute("bat-capacity") + ReadNetworkCommissioningSupportedThreadFeatures() + : ReadAttribute("supported-thread-features") { } - ~ReadPowerSourceBatCapacity() + ~ReadNetworkCommissioningSupportedThreadFeatures() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatCapacity::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::SupportedThreadFeatures::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatCapacity response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedThreadFeaturesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.SupportedThreadFeatures response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource BatCapacity read Error", error); + LogNSError("NetworkCommissioning SupportedThreadFeatures read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -23453,25 +25213,25 @@ class ReadPowerSourceBatCapacity : public ReadAttribute { } }; -class SubscribeAttributePowerSourceBatCapacity : public SubscribeAttribute { +class SubscribeAttributeNetworkCommissioningSupportedThreadFeatures : public SubscribeAttribute { public: - SubscribeAttributePowerSourceBatCapacity() - : SubscribeAttribute("bat-capacity") + SubscribeAttributeNetworkCommissioningSupportedThreadFeatures() + : SubscribeAttribute("supported-thread-features") { } - ~SubscribeAttributePowerSourceBatCapacity() + ~SubscribeAttributeNetworkCommissioningSupportedThreadFeatures() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatCapacity::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::SupportedThreadFeatures::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -23482,10 +25242,10 @@ class SubscribeAttributePowerSourceBatCapacity : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBatCapacityWithParams:params + [cluster subscribeAttributeSupportedThreadFeaturesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatCapacity response %@", [value description]); + NSLog(@"NetworkCommissioning.SupportedThreadFeatures response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -23498,35 +25258,38 @@ class SubscribeAttributePowerSourceBatCapacity : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute BatQuantity + * Attribute ThreadVersion */ -class ReadPowerSourceBatQuantity : public ReadAttribute { +class ReadNetworkCommissioningThreadVersion : public ReadAttribute { public: - ReadPowerSourceBatQuantity() - : ReadAttribute("bat-quantity") + ReadNetworkCommissioningThreadVersion() + : ReadAttribute("thread-version") { } - ~ReadPowerSourceBatQuantity() + ~ReadNetworkCommissioningThreadVersion() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatQuantity::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::ThreadVersion::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatQuantityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatQuantity response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeThreadVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.ThreadVersion response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource BatQuantity read Error", error); + LogNSError("NetworkCommissioning ThreadVersion read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -23535,25 +25298,25 @@ class ReadPowerSourceBatQuantity : public ReadAttribute { } }; -class SubscribeAttributePowerSourceBatQuantity : public SubscribeAttribute { +class SubscribeAttributeNetworkCommissioningThreadVersion : public SubscribeAttribute { public: - SubscribeAttributePowerSourceBatQuantity() - : SubscribeAttribute("bat-quantity") + SubscribeAttributeNetworkCommissioningThreadVersion() + : SubscribeAttribute("thread-version") { } - ~SubscribeAttributePowerSourceBatQuantity() + ~SubscribeAttributeNetworkCommissioningThreadVersion() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatQuantity::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::ThreadVersion::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -23564,10 +25327,10 @@ class SubscribeAttributePowerSourceBatQuantity : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBatQuantityWithParams:params + [cluster subscribeAttributeThreadVersionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatQuantity response %@", [value description]); + NSLog(@"NetworkCommissioning.ThreadVersion response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -23580,35 +25343,37 @@ class SubscribeAttributePowerSourceBatQuantity : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute BatChargeState + * Attribute GeneratedCommandList */ -class ReadPowerSourceBatChargeState : public ReadAttribute { +class ReadNetworkCommissioningGeneratedCommandList : public ReadAttribute { public: - ReadPowerSourceBatChargeState() - : ReadAttribute("bat-charge-state") + ReadNetworkCommissioningGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadPowerSourceBatChargeState() + ~ReadNetworkCommissioningGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatChargeState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::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 = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatChargeStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatChargeState response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource BatChargeState read Error", error); + LogNSError("NetworkCommissioning GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -23617,25 +25382,25 @@ class ReadPowerSourceBatChargeState : public ReadAttribute { } }; -class SubscribeAttributePowerSourceBatChargeState : public SubscribeAttribute { +class SubscribeAttributeNetworkCommissioningGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributePowerSourceBatChargeState() - : SubscribeAttribute("bat-charge-state") + SubscribeAttributeNetworkCommissioningGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributePowerSourceBatChargeState() + ~SubscribeAttributeNetworkCommissioningGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatChargeState::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::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 = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -23646,10 +25411,10 @@ class SubscribeAttributePowerSourceBatChargeState : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBatChargeStateWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatChargeState response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -23663,34 +25428,34 @@ class SubscribeAttributePowerSourceBatChargeState : public SubscribeAttribute { }; /* - * Attribute BatTimeToFullCharge + * Attribute AcceptedCommandList */ -class ReadPowerSourceBatTimeToFullCharge : public ReadAttribute { +class ReadNetworkCommissioningAcceptedCommandList : public ReadAttribute { public: - ReadPowerSourceBatTimeToFullCharge() - : ReadAttribute("bat-time-to-full-charge") + ReadNetworkCommissioningAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadPowerSourceBatTimeToFullCharge() + ~ReadNetworkCommissioningAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatTimeToFullCharge::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::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 = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatTimeToFullChargeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatTimeToFullCharge response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource BatTimeToFullCharge read Error", error); + LogNSError("NetworkCommissioning AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -23699,25 +25464,25 @@ class ReadPowerSourceBatTimeToFullCharge : public ReadAttribute { } }; -class SubscribeAttributePowerSourceBatTimeToFullCharge : public SubscribeAttribute { +class SubscribeAttributeNetworkCommissioningAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributePowerSourceBatTimeToFullCharge() - : SubscribeAttribute("bat-time-to-full-charge") + SubscribeAttributeNetworkCommissioningAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributePowerSourceBatTimeToFullCharge() + ~SubscribeAttributeNetworkCommissioningAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatTimeToFullCharge::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::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 = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -23728,10 +25493,10 @@ class SubscribeAttributePowerSourceBatTimeToFullCharge : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBatTimeToFullChargeWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatTimeToFullCharge response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -23744,35 +25509,37 @@ class SubscribeAttributePowerSourceBatTimeToFullCharge : public SubscribeAttribu } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute BatFunctionalWhileCharging + * Attribute EventList */ -class ReadPowerSourceBatFunctionalWhileCharging : public ReadAttribute { +class ReadNetworkCommissioningEventList : public ReadAttribute { public: - ReadPowerSourceBatFunctionalWhileCharging() - : ReadAttribute("bat-functional-while-charging") + ReadNetworkCommissioningEventList() + : ReadAttribute("event-list") { } - ~ReadPowerSourceBatFunctionalWhileCharging() + ~ReadNetworkCommissioningEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatFunctionalWhileCharging::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::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 = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatFunctionalWhileChargingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatFunctionalWhileCharging response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource BatFunctionalWhileCharging read Error", error); + LogNSError("NetworkCommissioning EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -23781,25 +25548,25 @@ class ReadPowerSourceBatFunctionalWhileCharging : public ReadAttribute { } }; -class SubscribeAttributePowerSourceBatFunctionalWhileCharging : public SubscribeAttribute { +class SubscribeAttributeNetworkCommissioningEventList : public SubscribeAttribute { public: - SubscribeAttributePowerSourceBatFunctionalWhileCharging() - : SubscribeAttribute("bat-functional-while-charging") + SubscribeAttributeNetworkCommissioningEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributePowerSourceBatFunctionalWhileCharging() + ~SubscribeAttributeNetworkCommissioningEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatFunctionalWhileCharging::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::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 = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -23810,10 +25577,10 @@ class SubscribeAttributePowerSourceBatFunctionalWhileCharging : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBatFunctionalWhileChargingWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatFunctionalWhileCharging response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -23826,35 +25593,37 @@ class SubscribeAttributePowerSourceBatFunctionalWhileCharging : public Subscribe } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute BatChargingCurrent + * Attribute AttributeList */ -class ReadPowerSourceBatChargingCurrent : public ReadAttribute { +class ReadNetworkCommissioningAttributeList : public ReadAttribute { public: - ReadPowerSourceBatChargingCurrent() - : ReadAttribute("bat-charging-current") + ReadNetworkCommissioningAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadPowerSourceBatChargingCurrent() + ~ReadNetworkCommissioningAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::BatChargingCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::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 = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBatChargingCurrentWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatChargingCurrent response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource BatChargingCurrent read Error", error); + LogNSError("NetworkCommissioning AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -23863,25 +25632,25 @@ class ReadPowerSourceBatChargingCurrent : public ReadAttribute { } }; -class SubscribeAttributePowerSourceBatChargingCurrent : public SubscribeAttribute { +class SubscribeAttributeNetworkCommissioningAttributeList : public SubscribeAttribute { public: - SubscribeAttributePowerSourceBatChargingCurrent() - : SubscribeAttribute("bat-charging-current") + SubscribeAttributeNetworkCommissioningAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributePowerSourceBatChargingCurrent() + ~SubscribeAttributeNetworkCommissioningAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::BatChargingCurrent::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::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 = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -23892,10 +25661,10 @@ class SubscribeAttributePowerSourceBatChargingCurrent : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBatChargingCurrentWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.BatChargingCurrent response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -23909,34 +25678,34 @@ class SubscribeAttributePowerSourceBatChargingCurrent : public SubscribeAttribut }; /* - * Attribute ActiveBatChargeFaults + * Attribute FeatureMap */ -class ReadPowerSourceActiveBatChargeFaults : public ReadAttribute { +class ReadNetworkCommissioningFeatureMap : public ReadAttribute { public: - ReadPowerSourceActiveBatChargeFaults() - : ReadAttribute("active-bat-charge-faults") + ReadNetworkCommissioningFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadPowerSourceActiveBatChargeFaults() + ~ReadNetworkCommissioningFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::ActiveBatChargeFaults::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::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 = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActiveBatChargeFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.ActiveBatChargeFaults response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource ActiveBatChargeFaults read Error", error); + LogNSError("NetworkCommissioning FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -23945,25 +25714,25 @@ class ReadPowerSourceActiveBatChargeFaults : public ReadAttribute { } }; -class SubscribeAttributePowerSourceActiveBatChargeFaults : public SubscribeAttribute { +class SubscribeAttributeNetworkCommissioningFeatureMap : public SubscribeAttribute { public: - SubscribeAttributePowerSourceActiveBatChargeFaults() - : SubscribeAttribute("active-bat-charge-faults") + SubscribeAttributeNetworkCommissioningFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributePowerSourceActiveBatChargeFaults() + ~SubscribeAttributeNetworkCommissioningFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::ActiveBatChargeFaults::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::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 = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -23974,10 +25743,10 @@ class SubscribeAttributePowerSourceActiveBatChargeFaults : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActiveBatChargeFaultsWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.ActiveBatChargeFaults response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -23991,34 +25760,34 @@ class SubscribeAttributePowerSourceActiveBatChargeFaults : public SubscribeAttri }; /* - * Attribute EndpointList + * Attribute ClusterRevision */ -class ReadPowerSourceEndpointList : public ReadAttribute { +class ReadNetworkCommissioningClusterRevision : public ReadAttribute { public: - ReadPowerSourceEndpointList() - : ReadAttribute("endpoint-list") + ReadNetworkCommissioningClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadPowerSourceEndpointList() + ~ReadNetworkCommissioningClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::EndpointList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::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 = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEndpointListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.EndpointList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource EndpointList read Error", error); + LogNSError("NetworkCommissioning ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -24027,25 +25796,25 @@ class ReadPowerSourceEndpointList : public ReadAttribute { } }; -class SubscribeAttributePowerSourceEndpointList : public SubscribeAttribute { +class SubscribeAttributeNetworkCommissioningClusterRevision : public SubscribeAttribute { public: - SubscribeAttributePowerSourceEndpointList() - : SubscribeAttribute("endpoint-list") + SubscribeAttributeNetworkCommissioningClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributePowerSourceEndpointList() + ~SubscribeAttributeNetworkCommissioningClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::EndpointList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::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 = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -24056,10 +25825,10 @@ class SubscribeAttributePowerSourceEndpointList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEndpointListWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.EndpointList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"NetworkCommissioning.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -24072,35 +25841,113 @@ class SubscribeAttributePowerSourceEndpointList : public SubscribeAttribute { } }; +/*----------------------------------------------------------------------------*\ +| Cluster DiagnosticLogs | 0x0032 | +|------------------------------------------------------------------------------| +| Commands: | | +| * RetrieveLogsRequest | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + +/* + * Command RetrieveLogsRequest + */ +class DiagnosticLogsRetrieveLogsRequest : public ClusterCommand { +public: + DiagnosticLogsRetrieveLogsRequest() + : ClusterCommand("retrieve-logs-request") + { + AddArgument("Intent", 0, UINT8_MAX, &mRequest.intent); + AddArgument("RequestedProtocol", 0, UINT8_MAX, &mRequest.requestedProtocol); + AddArgument("TransferFileDesignator", &mRequest.transferFileDesignator); + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsRequest::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 = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRDiagnosticLogsClusterRetrieveLogsRequestParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.intent = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.intent)]; + params.requestedProtocol = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.requestedProtocol)]; + if (mRequest.transferFileDesignator.HasValue()) { + params.transferFileDesignator = [[NSString alloc] initWithBytes:mRequest.transferFileDesignator.Value().data() length:mRequest.transferFileDesignator.Value().size() encoding:NSUTF8StringEncoding]; + } else { + params.transferFileDesignator = nil; + } + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster retrieveLogsRequestWithParams:params completion: + ^(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsRequest::Type mRequest; +}; + /* * Attribute GeneratedCommandList */ -class ReadPowerSourceGeneratedCommandList : public ReadAttribute { +class ReadDiagnosticLogsGeneratedCommandList : public ReadAttribute { public: - ReadPowerSourceGeneratedCommandList() + ReadDiagnosticLogsGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadPowerSourceGeneratedCommandList() + ~ReadDiagnosticLogsGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DiagnosticLogs::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 = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.GeneratedCommandList response %@", [value description]); + NSLog(@"DiagnosticLogs.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource GeneratedCommandList read Error", error); + LogNSError("DiagnosticLogs GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -24109,25 +25956,25 @@ class ReadPowerSourceGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributePowerSourceGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeDiagnosticLogsGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributePowerSourceGeneratedCommandList() + SubscribeAttributeDiagnosticLogsGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributePowerSourceGeneratedCommandList() + ~SubscribeAttributeDiagnosticLogsGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DiagnosticLogs::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 = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -24141,7 +25988,7 @@ class SubscribeAttributePowerSourceGeneratedCommandList : public SubscribeAttrib [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.GeneratedCommandList response %@", [value description]); + NSLog(@"DiagnosticLogs.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -24157,32 +26004,32 @@ class SubscribeAttributePowerSourceGeneratedCommandList : public SubscribeAttrib /* * Attribute AcceptedCommandList */ -class ReadPowerSourceAcceptedCommandList : public ReadAttribute { +class ReadDiagnosticLogsAcceptedCommandList : public ReadAttribute { public: - ReadPowerSourceAcceptedCommandList() + ReadDiagnosticLogsAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadPowerSourceAcceptedCommandList() + ~ReadDiagnosticLogsAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DiagnosticLogs::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 = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.AcceptedCommandList response %@", [value description]); + NSLog(@"DiagnosticLogs.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource AcceptedCommandList read Error", error); + LogNSError("DiagnosticLogs AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -24191,25 +26038,25 @@ class ReadPowerSourceAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributePowerSourceAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeDiagnosticLogsAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributePowerSourceAcceptedCommandList() + SubscribeAttributeDiagnosticLogsAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributePowerSourceAcceptedCommandList() + ~SubscribeAttributeDiagnosticLogsAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DiagnosticLogs::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 = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -24223,7 +26070,7 @@ class SubscribeAttributePowerSourceAcceptedCommandList : public SubscribeAttribu [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.AcceptedCommandList response %@", [value description]); + NSLog(@"DiagnosticLogs.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -24241,32 +26088,32 @@ class SubscribeAttributePowerSourceAcceptedCommandList : public SubscribeAttribu /* * Attribute EventList */ -class ReadPowerSourceEventList : public ReadAttribute { +class ReadDiagnosticLogsEventList : public ReadAttribute { public: - ReadPowerSourceEventList() + ReadDiagnosticLogsEventList() : ReadAttribute("event-list") { } - ~ReadPowerSourceEventList() + ~ReadDiagnosticLogsEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DiagnosticLogs::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 = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.EventList response %@", [value description]); + NSLog(@"DiagnosticLogs.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource EventList read Error", error); + LogNSError("DiagnosticLogs EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -24275,25 +26122,25 @@ class ReadPowerSourceEventList : public ReadAttribute { } }; -class SubscribeAttributePowerSourceEventList : public SubscribeAttribute { +class SubscribeAttributeDiagnosticLogsEventList : public SubscribeAttribute { public: - SubscribeAttributePowerSourceEventList() + SubscribeAttributeDiagnosticLogsEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributePowerSourceEventList() + ~SubscribeAttributeDiagnosticLogsEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DiagnosticLogs::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 = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -24307,7 +26154,7 @@ class SubscribeAttributePowerSourceEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.EventList response %@", [value description]); + NSLog(@"DiagnosticLogs.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -24325,32 +26172,32 @@ class SubscribeAttributePowerSourceEventList : public SubscribeAttribute { /* * Attribute AttributeList */ -class ReadPowerSourceAttributeList : public ReadAttribute { +class ReadDiagnosticLogsAttributeList : public ReadAttribute { public: - ReadPowerSourceAttributeList() + ReadDiagnosticLogsAttributeList() : ReadAttribute("attribute-list") { } - ~ReadPowerSourceAttributeList() + ~ReadDiagnosticLogsAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DiagnosticLogs::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 = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.AttributeList response %@", [value description]); + NSLog(@"DiagnosticLogs.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource AttributeList read Error", error); + LogNSError("DiagnosticLogs AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -24359,25 +26206,25 @@ class ReadPowerSourceAttributeList : public ReadAttribute { } }; -class SubscribeAttributePowerSourceAttributeList : public SubscribeAttribute { +class SubscribeAttributeDiagnosticLogsAttributeList : public SubscribeAttribute { public: - SubscribeAttributePowerSourceAttributeList() + SubscribeAttributeDiagnosticLogsAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributePowerSourceAttributeList() + ~SubscribeAttributeDiagnosticLogsAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DiagnosticLogs::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 = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -24391,7 +26238,7 @@ class SubscribeAttributePowerSourceAttributeList : public SubscribeAttribute { [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.AttributeList response %@", [value description]); + NSLog(@"DiagnosticLogs.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -24407,32 +26254,32 @@ class SubscribeAttributePowerSourceAttributeList : public SubscribeAttribute { /* * Attribute FeatureMap */ -class ReadPowerSourceFeatureMap : public ReadAttribute { +class ReadDiagnosticLogsFeatureMap : public ReadAttribute { public: - ReadPowerSourceFeatureMap() + ReadDiagnosticLogsFeatureMap() : ReadAttribute("feature-map") { } - ~ReadPowerSourceFeatureMap() + ~ReadDiagnosticLogsFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DiagnosticLogs::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 = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.FeatureMap response %@", [value description]); + NSLog(@"DiagnosticLogs.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource FeatureMap read Error", error); + LogNSError("DiagnosticLogs FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -24441,25 +26288,25 @@ class ReadPowerSourceFeatureMap : public ReadAttribute { } }; -class SubscribeAttributePowerSourceFeatureMap : public SubscribeAttribute { +class SubscribeAttributeDiagnosticLogsFeatureMap : public SubscribeAttribute { public: - SubscribeAttributePowerSourceFeatureMap() + SubscribeAttributeDiagnosticLogsFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributePowerSourceFeatureMap() + ~SubscribeAttributeDiagnosticLogsFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DiagnosticLogs::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 = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -24473,7 +26320,7 @@ class SubscribeAttributePowerSourceFeatureMap : public SubscribeAttribute { [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.FeatureMap response %@", [value description]); + NSLog(@"DiagnosticLogs.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -24489,32 +26336,32 @@ class SubscribeAttributePowerSourceFeatureMap : public SubscribeAttribute { /* * Attribute ClusterRevision */ -class ReadPowerSourceClusterRevision : public ReadAttribute { +class ReadDiagnosticLogsClusterRevision : public ReadAttribute { public: - ReadPowerSourceClusterRevision() + ReadDiagnosticLogsClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadPowerSourceClusterRevision() + ~ReadDiagnosticLogsClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PowerSource::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DiagnosticLogs::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 = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.ClusterRevision response %@", [value description]); + NSLog(@"DiagnosticLogs.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PowerSource ClusterRevision read Error", error); + LogNSError("DiagnosticLogs ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -24523,25 +26370,25 @@ class ReadPowerSourceClusterRevision : public ReadAttribute { } }; -class SubscribeAttributePowerSourceClusterRevision : public SubscribeAttribute { +class SubscribeAttributeDiagnosticLogsClusterRevision : public SubscribeAttribute { public: - SubscribeAttributePowerSourceClusterRevision() + SubscribeAttributeDiagnosticLogsClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributePowerSourceClusterRevision() + ~SubscribeAttributeDiagnosticLogsClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PowerSource::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PowerSource::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::DiagnosticLogs::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 = [[MTRBaseClusterPowerSource alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -24555,7 +26402,7 @@ class SubscribeAttributePowerSourceClusterRevision : public SubscribeAttribute { [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PowerSource.ClusterRevision response %@", [value description]); + NSLog(@"DiagnosticLogs.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -24569,19 +26416,22 @@ class SubscribeAttributePowerSourceClusterRevision : public SubscribeAttribute { }; /*----------------------------------------------------------------------------*\ -| Cluster GeneralCommissioning | 0x0030 | +| Cluster GeneralDiagnostics | 0x0033 | |------------------------------------------------------------------------------| | Commands: | | -| * ArmFailSafe | 0x00 | -| * SetRegulatoryConfig | 0x02 | -| * CommissioningComplete | 0x04 | +| * TestEventTrigger | 0x00 | +| * TimeSnapshot | 0x01 | |------------------------------------------------------------------------------| | Attributes: | | -| * Breadcrumb | 0x0000 | -| * BasicCommissioningInfo | 0x0001 | -| * RegulatoryConfig | 0x0002 | -| * LocationCapability | 0x0003 | -| * SupportsConcurrentConnection | 0x0004 | +| * NetworkInterfaces | 0x0000 | +| * RebootCount | 0x0001 | +| * UpTime | 0x0002 | +| * TotalOperationalHours | 0x0003 | +| * BootReason | 0x0004 | +| * ActiveHardwareFaults | 0x0005 | +| * ActiveRadioFaults | 0x0006 | +| * ActiveNetworkFaults | 0x0007 | +| * TestEventTriggersEnabled | 0x0008 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -24590,163 +26440,105 @@ class SubscribeAttributePowerSourceClusterRevision : public SubscribeAttribute { | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | +| * HardwareFaultChange | 0x0000 | +| * RadioFaultChange | 0x0001 | +| * NetworkFaultChange | 0x0002 | +| * BootReason | 0x0003 | \*----------------------------------------------------------------------------*/ /* - * Command ArmFailSafe - */ -class GeneralCommissioningArmFailSafe : public ClusterCommand { -public: - GeneralCommissioningArmFailSafe() - : ClusterCommand("arm-fail-safe") - { - AddArgument("ExpiryLengthSeconds", 0, UINT16_MAX, &mRequest.expiryLengthSeconds); - AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - 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, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRGeneralCommissioningClusterArmFailSafeParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.expiryLengthSeconds = [NSNumber numberWithUnsignedShort:mRequest.expiryLengthSeconds]; - params.breadcrumb = [NSNumber numberWithUnsignedLongLong:mRequest.breadcrumb]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster armFailSafeWithParams:params completion: - ^(MTRGeneralCommissioningClusterArmFailSafeResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafeResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafeResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::GeneralCommissioning::Commands::ArmFailSafe::Type mRequest; -}; - -/* - * Command SetRegulatoryConfig + * Command TestEventTrigger */ -class GeneralCommissioningSetRegulatoryConfig : public ClusterCommand { +class GeneralDiagnosticsTestEventTrigger : public ClusterCommand { public: - GeneralCommissioningSetRegulatoryConfig() - : ClusterCommand("set-regulatory-config") + GeneralDiagnosticsTestEventTrigger() + : ClusterCommand("test-event-trigger") { - AddArgument("NewRegulatoryConfig", 0, UINT8_MAX, &mRequest.newRegulatoryConfig); - AddArgument("CountryCode", &mRequest.countryCode); - AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); + AddArgument("EnableKey", &mRequest.enableKey); + AddArgument("EventTrigger", 0, UINT64_MAX, &mRequest.eventTrigger); ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) 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::GeneralDiagnostics::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::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 = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRGeneralCommissioningClusterSetRegulatoryConfigParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRGeneralDiagnosticsClusterTestEventTriggerParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.newRegulatoryConfig = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.newRegulatoryConfig)]; - params.countryCode = [[NSString alloc] initWithBytes:mRequest.countryCode.data() length:mRequest.countryCode.size() encoding:NSUTF8StringEncoding]; - params.breadcrumb = [NSNumber numberWithUnsignedLongLong:mRequest.breadcrumb]; + params.enableKey = [NSData dataWithBytes:mRequest.enableKey.data() length:mRequest.enableKey.size()]; + params.eventTrigger = [NSNumber numberWithUnsignedLongLong:mRequest.eventTrigger]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster setRegulatoryConfigWithParams:params completion: - ^(MTRGeneralCommissioningClusterSetRegulatoryConfigResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfigResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::GeneralCommissioning::Commands::SetRegulatoryConfigResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster testEventTriggerWithParams: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::GeneralCommissioning::Commands::SetRegulatoryConfig::Type mRequest; + chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type mRequest; }; +#if MTR_ENABLE_PROVISIONAL /* - * Command CommissioningComplete + * Command TimeSnapshot */ -class GeneralCommissioningCommissioningComplete : public ClusterCommand { +class GeneralDiagnosticsTimeSnapshot : public ClusterCommand { public: - GeneralCommissioningCommissioningComplete() - : ClusterCommand("commissioning-complete") + GeneralDiagnosticsTimeSnapshot() + : ClusterCommand("time-snapshot") { ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::GeneralCommissioning::Commands::CommissioningComplete::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GeneralDiagnostics::Commands::TimeSnapshot::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 = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRGeneralCommissioningClusterCommissioningCompleteParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRGeneralDiagnosticsClusterTimeSnapshotParams 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 commissioningCompleteWithParams:params completion: - ^(MTRGeneralCommissioningClusterCommissioningCompleteResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::GeneralCommissioning::Commands::CommissioningCompleteResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::GeneralCommissioning::Commands::CommissioningCompleteResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + [cluster timeSnapshotWithParams:params completion: + ^(MTRGeneralDiagnosticsClusterTimeSnapshotResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::GeneralDiagnostics::Commands::TimeSnapshotResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::GeneralDiagnostics::Commands::TimeSnapshotResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } return CHIP_NO_ERROR; } @@ -24754,158 +26546,37 @@ class GeneralCommissioningCommissioningComplete : public ClusterCommand { private: }; -/* - * Attribute Breadcrumb - */ -class ReadGeneralCommissioningBreadcrumb : public ReadAttribute { -public: - ReadGeneralCommissioningBreadcrumb() - : ReadAttribute("breadcrumb") - { - } - - ~ReadGeneralCommissioningBreadcrumb() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::Breadcrumb::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBreadcrumbWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.Breadcrumb response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("GeneralCommissioning Breadcrumb read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteGeneralCommissioningBreadcrumb : public WriteAttribute { -public: - WriteGeneralCommissioningBreadcrumb() - : WriteAttribute("breadcrumb") - { - AddArgument("attr-name", "breadcrumb"); - AddArgument("attr-value", 0, UINT64_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteGeneralCommissioningBreadcrumb() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::Breadcrumb::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 = [[MTRBaseClusterGeneralCommissioning 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 numberWithUnsignedLongLong:mValue]; - - [cluster writeAttributeBreadcrumbWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("GeneralCommissioning Breadcrumb write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } - -private: - uint64_t mValue; -}; - -class SubscribeAttributeGeneralCommissioningBreadcrumb : public SubscribeAttribute { -public: - SubscribeAttributeGeneralCommissioningBreadcrumb() - : SubscribeAttribute("breadcrumb") - { - } - - ~SubscribeAttributeGeneralCommissioningBreadcrumb() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::Breadcrumb::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning 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 subscribeAttributeBreadcrumbWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.Breadcrumb 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 BasicCommissioningInfo + * Attribute NetworkInterfaces */ -class ReadGeneralCommissioningBasicCommissioningInfo : public ReadAttribute { +class ReadGeneralDiagnosticsNetworkInterfaces : public ReadAttribute { public: - ReadGeneralCommissioningBasicCommissioningInfo() - : ReadAttribute("basic-commissioning-info") + ReadGeneralDiagnosticsNetworkInterfaces() + : ReadAttribute("network-interfaces") { } - ~ReadGeneralCommissioningBasicCommissioningInfo() + ~ReadGeneralDiagnosticsNetworkInterfaces() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::BasicCommissioningInfo::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::NetworkInterfaces::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBasicCommissioningInfoWithCompletion:^(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.BasicCommissioningInfo response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNetworkInterfacesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralDiagnostics.NetworkInterfaces response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralCommissioning BasicCommissioningInfo read Error", error); + LogNSError("GeneralDiagnostics NetworkInterfaces read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -24914,25 +26585,25 @@ class ReadGeneralCommissioningBasicCommissioningInfo : public ReadAttribute { } }; -class SubscribeAttributeGeneralCommissioningBasicCommissioningInfo : public SubscribeAttribute { +class SubscribeAttributeGeneralDiagnosticsNetworkInterfaces : public SubscribeAttribute { public: - SubscribeAttributeGeneralCommissioningBasicCommissioningInfo() - : SubscribeAttribute("basic-commissioning-info") + SubscribeAttributeGeneralDiagnosticsNetworkInterfaces() + : SubscribeAttribute("network-interfaces") { } - ~SubscribeAttributeGeneralCommissioningBasicCommissioningInfo() + ~SubscribeAttributeGeneralDiagnosticsNetworkInterfaces() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::BasicCommissioningInfo::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::NetworkInterfaces::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -24943,10 +26614,10 @@ class SubscribeAttributeGeneralCommissioningBasicCommissioningInfo : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBasicCommissioningInfoWithParams:params + [cluster subscribeAttributeNetworkInterfacesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(MTRGeneralCommissioningClusterBasicCommissioningInfo * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.BasicCommissioningInfo response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralDiagnostics.NetworkInterfaces response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -24960,34 +26631,34 @@ class SubscribeAttributeGeneralCommissioningBasicCommissioningInfo : public Subs }; /* - * Attribute RegulatoryConfig + * Attribute RebootCount */ -class ReadGeneralCommissioningRegulatoryConfig : public ReadAttribute { +class ReadGeneralDiagnosticsRebootCount : public ReadAttribute { public: - ReadGeneralCommissioningRegulatoryConfig() - : ReadAttribute("regulatory-config") + ReadGeneralDiagnosticsRebootCount() + : ReadAttribute("reboot-count") { } - ~ReadGeneralCommissioningRegulatoryConfig() + ~ReadGeneralDiagnosticsRebootCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::RegulatoryConfig::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::RebootCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRegulatoryConfigWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.RegulatoryConfig response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeRebootCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralDiagnostics.RebootCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralCommissioning RegulatoryConfig read Error", error); + LogNSError("GeneralDiagnostics RebootCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -24996,25 +26667,25 @@ class ReadGeneralCommissioningRegulatoryConfig : public ReadAttribute { } }; -class SubscribeAttributeGeneralCommissioningRegulatoryConfig : public SubscribeAttribute { +class SubscribeAttributeGeneralDiagnosticsRebootCount : public SubscribeAttribute { public: - SubscribeAttributeGeneralCommissioningRegulatoryConfig() - : SubscribeAttribute("regulatory-config") + SubscribeAttributeGeneralDiagnosticsRebootCount() + : SubscribeAttribute("reboot-count") { } - ~SubscribeAttributeGeneralCommissioningRegulatoryConfig() + ~SubscribeAttributeGeneralDiagnosticsRebootCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::RegulatoryConfig::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::RebootCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -25025,10 +26696,10 @@ class SubscribeAttributeGeneralCommissioningRegulatoryConfig : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRegulatoryConfigWithParams:params + [cluster subscribeAttributeRebootCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.RegulatoryConfig response %@", [value description]); + NSLog(@"GeneralDiagnostics.RebootCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -25042,34 +26713,34 @@ class SubscribeAttributeGeneralCommissioningRegulatoryConfig : public SubscribeA }; /* - * Attribute LocationCapability + * Attribute UpTime */ -class ReadGeneralCommissioningLocationCapability : public ReadAttribute { +class ReadGeneralDiagnosticsUpTime : public ReadAttribute { public: - ReadGeneralCommissioningLocationCapability() - : ReadAttribute("location-capability") + ReadGeneralDiagnosticsUpTime() + : ReadAttribute("up-time") { } - ~ReadGeneralCommissioningLocationCapability() + ~ReadGeneralDiagnosticsUpTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::LocationCapability::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::UpTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLocationCapabilityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.LocationCapability response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUpTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralDiagnostics.UpTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralCommissioning LocationCapability read Error", error); + LogNSError("GeneralDiagnostics UpTime read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -25078,25 +26749,25 @@ class ReadGeneralCommissioningLocationCapability : public ReadAttribute { } }; -class SubscribeAttributeGeneralCommissioningLocationCapability : public SubscribeAttribute { +class SubscribeAttributeGeneralDiagnosticsUpTime : public SubscribeAttribute { public: - SubscribeAttributeGeneralCommissioningLocationCapability() - : SubscribeAttribute("location-capability") + SubscribeAttributeGeneralDiagnosticsUpTime() + : SubscribeAttribute("up-time") { } - ~SubscribeAttributeGeneralCommissioningLocationCapability() + ~SubscribeAttributeGeneralDiagnosticsUpTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::LocationCapability::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::UpTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -25107,10 +26778,10 @@ class SubscribeAttributeGeneralCommissioningLocationCapability : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLocationCapabilityWithParams:params + [cluster subscribeAttributeUpTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.LocationCapability response %@", [value description]); + NSLog(@"GeneralDiagnostics.UpTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -25124,34 +26795,34 @@ class SubscribeAttributeGeneralCommissioningLocationCapability : public Subscrib }; /* - * Attribute SupportsConcurrentConnection + * Attribute TotalOperationalHours */ -class ReadGeneralCommissioningSupportsConcurrentConnection : public ReadAttribute { +class ReadGeneralDiagnosticsTotalOperationalHours : public ReadAttribute { public: - ReadGeneralCommissioningSupportsConcurrentConnection() - : ReadAttribute("supports-concurrent-connection") + ReadGeneralDiagnosticsTotalOperationalHours() + : ReadAttribute("total-operational-hours") { } - ~ReadGeneralCommissioningSupportsConcurrentConnection() + ~ReadGeneralDiagnosticsTotalOperationalHours() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::SupportsConcurrentConnection::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::TotalOperationalHours::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportsConcurrentConnectionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.SupportsConcurrentConnection response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTotalOperationalHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralDiagnostics.TotalOperationalHours response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralCommissioning SupportsConcurrentConnection read Error", error); + LogNSError("GeneralDiagnostics TotalOperationalHours read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -25160,25 +26831,25 @@ class ReadGeneralCommissioningSupportsConcurrentConnection : public ReadAttribut } }; -class SubscribeAttributeGeneralCommissioningSupportsConcurrentConnection : public SubscribeAttribute { +class SubscribeAttributeGeneralDiagnosticsTotalOperationalHours : public SubscribeAttribute { public: - SubscribeAttributeGeneralCommissioningSupportsConcurrentConnection() - : SubscribeAttribute("supports-concurrent-connection") + SubscribeAttributeGeneralDiagnosticsTotalOperationalHours() + : SubscribeAttribute("total-operational-hours") { } - ~SubscribeAttributeGeneralCommissioningSupportsConcurrentConnection() + ~SubscribeAttributeGeneralDiagnosticsTotalOperationalHours() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::SupportsConcurrentConnection::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::TotalOperationalHours::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -25189,10 +26860,10 @@ class SubscribeAttributeGeneralCommissioningSupportsConcurrentConnection : publi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportsConcurrentConnectionWithParams:params + [cluster subscribeAttributeTotalOperationalHoursWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.SupportsConcurrentConnection response %@", [value description]); + NSLog(@"GeneralDiagnostics.TotalOperationalHours response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -25206,34 +26877,34 @@ class SubscribeAttributeGeneralCommissioningSupportsConcurrentConnection : publi }; /* - * Attribute GeneratedCommandList + * Attribute BootReason */ -class ReadGeneralCommissioningGeneratedCommandList : public ReadAttribute { +class ReadGeneralDiagnosticsBootReason : public ReadAttribute { public: - ReadGeneralCommissioningGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadGeneralDiagnosticsBootReason() + : ReadAttribute("boot-reason") { } - ~ReadGeneralCommissioningGeneratedCommandList() + ~ReadGeneralDiagnosticsBootReason() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::BootReason::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBootReasonWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralDiagnostics.BootReason response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralCommissioning GeneratedCommandList read Error", error); + LogNSError("GeneralDiagnostics BootReason read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -25242,25 +26913,25 @@ class ReadGeneralCommissioningGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeGeneralCommissioningGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeGeneralDiagnosticsBootReason : public SubscribeAttribute { public: - SubscribeAttributeGeneralCommissioningGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeGeneralDiagnosticsBootReason() + : SubscribeAttribute("boot-reason") { } - ~SubscribeAttributeGeneralCommissioningGeneratedCommandList() + ~SubscribeAttributeGeneralDiagnosticsBootReason() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::BootReason::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -25271,10 +26942,10 @@ class SubscribeAttributeGeneralCommissioningGeneratedCommandList : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeBootReasonWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralDiagnostics.BootReason response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -25288,34 +26959,34 @@ class SubscribeAttributeGeneralCommissioningGeneratedCommandList : public Subscr }; /* - * Attribute AcceptedCommandList + * Attribute ActiveHardwareFaults */ -class ReadGeneralCommissioningAcceptedCommandList : public ReadAttribute { +class ReadGeneralDiagnosticsActiveHardwareFaults : public ReadAttribute { public: - ReadGeneralCommissioningAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadGeneralDiagnosticsActiveHardwareFaults() + : ReadAttribute("active-hardware-faults") { } - ~ReadGeneralCommissioningAcceptedCommandList() + ~ReadGeneralDiagnosticsActiveHardwareFaults() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::ActiveHardwareFaults::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeActiveHardwareFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralDiagnostics.ActiveHardwareFaults response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralCommissioning AcceptedCommandList read Error", error); + LogNSError("GeneralDiagnostics ActiveHardwareFaults read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -25324,25 +26995,25 @@ class ReadGeneralCommissioningAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeGeneralCommissioningAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeGeneralDiagnosticsActiveHardwareFaults : public SubscribeAttribute { public: - SubscribeAttributeGeneralCommissioningAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeGeneralDiagnosticsActiveHardwareFaults() + : SubscribeAttribute("active-hardware-faults") { } - ~SubscribeAttributeGeneralCommissioningAcceptedCommandList() + ~SubscribeAttributeGeneralDiagnosticsActiveHardwareFaults() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::ActiveHardwareFaults::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -25353,10 +27024,10 @@ class SubscribeAttributeGeneralCommissioningAcceptedCommandList : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeActiveHardwareFaultsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.AcceptedCommandList response %@", [value description]); + NSLog(@"GeneralDiagnostics.ActiveHardwareFaults response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -25369,37 +27040,35 @@ class SubscribeAttributeGeneralCommissioningAcceptedCommandList : public Subscri } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute ActiveRadioFaults */ -class ReadGeneralCommissioningEventList : public ReadAttribute { +class ReadGeneralDiagnosticsActiveRadioFaults : public ReadAttribute { public: - ReadGeneralCommissioningEventList() - : ReadAttribute("event-list") + ReadGeneralDiagnosticsActiveRadioFaults() + : ReadAttribute("active-radio-faults") { } - ~ReadGeneralCommissioningEventList() + ~ReadGeneralDiagnosticsActiveRadioFaults() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::ActiveRadioFaults::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeActiveRadioFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralDiagnostics.ActiveRadioFaults response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralCommissioning EventList read Error", error); + LogNSError("GeneralDiagnostics ActiveRadioFaults read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -25408,25 +27077,25 @@ class ReadGeneralCommissioningEventList : public ReadAttribute { } }; -class SubscribeAttributeGeneralCommissioningEventList : public SubscribeAttribute { +class SubscribeAttributeGeneralDiagnosticsActiveRadioFaults : public SubscribeAttribute { public: - SubscribeAttributeGeneralCommissioningEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeGeneralDiagnosticsActiveRadioFaults() + : SubscribeAttribute("active-radio-faults") { } - ~SubscribeAttributeGeneralCommissioningEventList() + ~SubscribeAttributeGeneralDiagnosticsActiveRadioFaults() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::ActiveRadioFaults::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -25437,10 +27106,10 @@ class SubscribeAttributeGeneralCommissioningEventList : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeActiveRadioFaultsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.EventList response %@", [value description]); + NSLog(@"GeneralDiagnostics.ActiveRadioFaults response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -25453,37 +27122,35 @@ class SubscribeAttributeGeneralCommissioningEventList : public SubscribeAttribut } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute ActiveNetworkFaults */ -class ReadGeneralCommissioningAttributeList : public ReadAttribute { +class ReadGeneralDiagnosticsActiveNetworkFaults : public ReadAttribute { public: - ReadGeneralCommissioningAttributeList() - : ReadAttribute("attribute-list") + ReadGeneralDiagnosticsActiveNetworkFaults() + : ReadAttribute("active-network-faults") { } - ~ReadGeneralCommissioningAttributeList() + ~ReadGeneralDiagnosticsActiveNetworkFaults() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::ActiveNetworkFaults::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeActiveNetworkFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralDiagnostics.ActiveNetworkFaults response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralCommissioning AttributeList read Error", error); + LogNSError("GeneralDiagnostics ActiveNetworkFaults read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -25492,25 +27159,25 @@ class ReadGeneralCommissioningAttributeList : public ReadAttribute { } }; -class SubscribeAttributeGeneralCommissioningAttributeList : public SubscribeAttribute { +class SubscribeAttributeGeneralDiagnosticsActiveNetworkFaults : public SubscribeAttribute { public: - SubscribeAttributeGeneralCommissioningAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeGeneralDiagnosticsActiveNetworkFaults() + : SubscribeAttribute("active-network-faults") { } - ~SubscribeAttributeGeneralCommissioningAttributeList() + ~SubscribeAttributeGeneralDiagnosticsActiveNetworkFaults() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::ActiveNetworkFaults::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -25521,10 +27188,10 @@ class SubscribeAttributeGeneralCommissioningAttributeList : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeActiveNetworkFaultsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.AttributeList response %@", [value description]); + NSLog(@"GeneralDiagnostics.ActiveNetworkFaults response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -25538,34 +27205,34 @@ class SubscribeAttributeGeneralCommissioningAttributeList : public SubscribeAttr }; /* - * Attribute FeatureMap + * Attribute TestEventTriggersEnabled */ -class ReadGeneralCommissioningFeatureMap : public ReadAttribute { +class ReadGeneralDiagnosticsTestEventTriggersEnabled : public ReadAttribute { public: - ReadGeneralCommissioningFeatureMap() - : ReadAttribute("feature-map") + ReadGeneralDiagnosticsTestEventTriggersEnabled() + : ReadAttribute("test-event-triggers-enabled") { } - ~ReadGeneralCommissioningFeatureMap() + ~ReadGeneralDiagnosticsTestEventTriggersEnabled() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::TestEventTriggersEnabled::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTestEventTriggersEnabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralDiagnostics.TestEventTriggersEnabled response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralCommissioning FeatureMap read Error", error); + LogNSError("GeneralDiagnostics TestEventTriggersEnabled read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -25574,25 +27241,25 @@ class ReadGeneralCommissioningFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeGeneralCommissioningFeatureMap : public SubscribeAttribute { +class SubscribeAttributeGeneralDiagnosticsTestEventTriggersEnabled : public SubscribeAttribute { public: - SubscribeAttributeGeneralCommissioningFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeGeneralDiagnosticsTestEventTriggersEnabled() + : SubscribeAttribute("test-event-triggers-enabled") { } - ~SubscribeAttributeGeneralCommissioningFeatureMap() + ~SubscribeAttributeGeneralDiagnosticsTestEventTriggersEnabled() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::TestEventTriggersEnabled::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -25603,10 +27270,10 @@ class SubscribeAttributeGeneralCommissioningFeatureMap : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeTestEventTriggersEnabledWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.FeatureMap response %@", [value description]); + NSLog(@"GeneralDiagnostics.TestEventTriggersEnabled response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -25620,34 +27287,34 @@ class SubscribeAttributeGeneralCommissioningFeatureMap : public SubscribeAttribu }; /* - * Attribute ClusterRevision + * Attribute GeneratedCommandList */ -class ReadGeneralCommissioningClusterRevision : public ReadAttribute { +class ReadGeneralDiagnosticsGeneratedCommandList : public ReadAttribute { public: - ReadGeneralCommissioningClusterRevision() - : ReadAttribute("cluster-revision") + ReadGeneralDiagnosticsGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadGeneralCommissioningClusterRevision() + ~ReadGeneralDiagnosticsGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::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 = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralDiagnostics.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralCommissioning ClusterRevision read Error", error); + LogNSError("GeneralDiagnostics GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -25656,25 +27323,25 @@ class ReadGeneralCommissioningClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeGeneralCommissioningClusterRevision : public SubscribeAttribute { +class SubscribeAttributeGeneralDiagnosticsGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeGeneralCommissioningClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeGeneralDiagnosticsGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeGeneralCommissioningClusterRevision() + ~SubscribeAttributeGeneralDiagnosticsGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralCommissioning::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::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 = [[MTRBaseClusterGeneralCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -25685,10 +27352,10 @@ class SubscribeAttributeGeneralCommissioningClusterRevision : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralCommissioning.ClusterRevision response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralDiagnostics.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -25701,535 +27368,119 @@ class SubscribeAttributeGeneralCommissioningClusterRevision : public SubscribeAt } }; -/*----------------------------------------------------------------------------*\ -| 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 + * Attribute AcceptedCommandList */ -class NetworkCommissioningScanNetworks : public ClusterCommand { +class ReadGeneralDiagnosticsAcceptedCommandList : public ReadAttribute { public: - NetworkCommissioningScanNetworks() - : ClusterCommand("scan-networks") - { - AddArgument("Ssid", &mRequest.ssid); - AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ReadGeneralDiagnosticsAcceptedCommandList() + : ReadAttribute("accepted-command-list") { - 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, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRNetworkCommissioningClusterScanNetworksParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - if (mRequest.ssid.HasValue()) { - if (mRequest.ssid.Value().IsNull()) { - params.ssid = nil; - } else { - params.ssid = [NSData dataWithBytes:mRequest.ssid.Value().Value().data() length:mRequest.ssid.Value().Value().size()]; - } - } else { - params.ssid = nil; - } - if (mRequest.breadcrumb.HasValue()) { - params.breadcrumb = [NSNumber numberWithUnsignedLongLong:mRequest.breadcrumb.Value()]; - } else { - params.breadcrumb = nil; - } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster scanNetworksWithParams:params completion: - ^(MTRNetworkCommissioningClusterScanNetworksResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworksResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworksResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; } -private: - chip::app::Clusters::NetworkCommissioning::Commands::ScanNetworks::Type mRequest; -}; - -/* - * Command AddOrUpdateWiFiNetwork - */ -class NetworkCommissioningAddOrUpdateWiFiNetwork : public ClusterCommand { -public: - NetworkCommissioningAddOrUpdateWiFiNetwork() - : ClusterCommand("add-or-update-wi-fi-network") + ~ReadGeneralDiagnosticsAcceptedCommandList() { - AddArgument("Ssid", &mRequest.ssid); - AddArgument("Credentials", &mRequest.credentials); - AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); -#if MTR_ENABLE_PROVISIONAL - AddArgument("NetworkIdentity", &mRequest.networkIdentity); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("ClientIdentifier", &mRequest.clientIdentifier); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("PossessionNonce", &mRequest.possessionNonce); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::AddOrUpdateWiFiNetwork::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::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 = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRNetworkCommissioningClusterAddOrUpdateWiFiNetworkParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.ssid = [NSData dataWithBytes:mRequest.ssid.data() length:mRequest.ssid.size()]; - params.credentials = [NSData dataWithBytes:mRequest.credentials.data() length:mRequest.credentials.size()]; - if (mRequest.breadcrumb.HasValue()) { - params.breadcrumb = [NSNumber numberWithUnsignedLongLong:mRequest.breadcrumb.Value()]; - } else { - params.breadcrumb = nil; - } -#if MTR_ENABLE_PROVISIONAL - if (mRequest.networkIdentity.HasValue()) { - params.networkIdentity = [NSData dataWithBytes:mRequest.networkIdentity.Value().data() length:mRequest.networkIdentity.Value().size()]; - } else { - params.networkIdentity = nil; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - if (mRequest.clientIdentifier.HasValue()) { - params.clientIdentifier = [NSData dataWithBytes:mRequest.clientIdentifier.Value().data() length:mRequest.clientIdentifier.Value().size()]; - } else { - params.clientIdentifier = nil; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - if (mRequest.possessionNonce.HasValue()) { - params.possessionNonce = [NSData dataWithBytes:mRequest.possessionNonce.Value().data() length:mRequest.possessionNonce.Value().size()]; - } else { - params.possessionNonce = nil; - } -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster addOrUpdateWiFiNetworkWithParams:params completion: - ^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralDiagnostics.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("GeneralDiagnostics AcceptedCommandList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::NetworkCommissioning::Commands::AddOrUpdateWiFiNetwork::Type mRequest; }; -/* - * Command AddOrUpdateThreadNetwork - */ -class NetworkCommissioningAddOrUpdateThreadNetwork : public ClusterCommand { +class SubscribeAttributeGeneralDiagnosticsAcceptedCommandList : public SubscribeAttribute { public: - NetworkCommissioningAddOrUpdateThreadNetwork() - : ClusterCommand("add-or-update-thread-network") - { - AddArgument("OperationalDataset", &mRequest.operationalDataset); - AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + SubscribeAttributeGeneralDiagnosticsAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { - 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, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRNetworkCommissioningClusterAddOrUpdateThreadNetworkParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.operationalDataset = [NSData dataWithBytes:mRequest.operationalDataset.data() length:mRequest.operationalDataset.size()]; - if (mRequest.breadcrumb.HasValue()) { - params.breadcrumb = [NSNumber numberWithUnsignedLongLong:mRequest.breadcrumb.Value()]; - } else { - params.breadcrumb = nil; - } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster addOrUpdateThreadNetworkWithParams:params completion: - ^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; } -private: - chip::app::Clusters::NetworkCommissioning::Commands::AddOrUpdateThreadNetwork::Type mRequest; -}; - -/* - * Command RemoveNetwork - */ -class NetworkCommissioningRemoveNetwork : public ClusterCommand { -public: - NetworkCommissioningRemoveNetwork() - : ClusterCommand("remove-network") + ~SubscribeAttributeGeneralDiagnosticsAcceptedCommandList() { - AddArgument("NetworkID", &mRequest.networkID); - AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::RemoveNetwork::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::GeneralDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::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 = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRNetworkCommissioningClusterRemoveNetworkParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.networkID = [NSData dataWithBytes:mRequest.networkID.data() length:mRequest.networkID.size()]; - if (mRequest.breadcrumb.HasValue()) { - params.breadcrumb = [NSNumber numberWithUnsignedLongLong:mRequest.breadcrumb.Value()]; - } else { - params.breadcrumb = nil; - } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster removeNetworkWithParams:params completion: - ^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::NetworkCommissioning::Commands::RemoveNetwork::Type mRequest; -}; - -/* - * Command ConnectNetwork - */ -class NetworkCommissioningConnectNetwork : public ClusterCommand { -public: - NetworkCommissioningConnectNetwork() - : ClusterCommand("connect-network") - { - AddArgument("NetworkID", &mRequest.networkID); - AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetwork::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 = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRNetworkCommissioningClusterConnectNetworkParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.networkID = [NSData dataWithBytes:mRequest.networkID.data() length:mRequest.networkID.size()]; - if (mRequest.breadcrumb.HasValue()) { - params.breadcrumb = [NSNumber numberWithUnsignedLongLong:mRequest.breadcrumb.Value()]; - } else { - params.breadcrumb = nil; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster connectNetworkWithParams:params completion: - ^(MTRNetworkCommissioningClusterConnectNetworkResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetworkResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetworkResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::NetworkCommissioning::Commands::ConnectNetwork::Type mRequest; -}; - -/* - * Command ReorderNetwork - */ -class NetworkCommissioningReorderNetwork : public ClusterCommand { -public: - NetworkCommissioningReorderNetwork() - : ClusterCommand("reorder-network") - { - AddArgument("NetworkID", &mRequest.networkID); - AddArgument("NetworkIndex", 0, UINT8_MAX, &mRequest.networkIndex); - AddArgument("Breadcrumb", 0, UINT64_MAX, &mRequest.breadcrumb); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::ReorderNetwork::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + [cluster subscribeAttributeAcceptedCommandListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralDiagnostics.AcceptedCommandList response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRNetworkCommissioningClusterReorderNetworkParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.networkID = [NSData dataWithBytes:mRequest.networkID.data() length:mRequest.networkID.size()]; - params.networkIndex = [NSNumber numberWithUnsignedChar:mRequest.networkIndex]; - if (mRequest.breadcrumb.HasValue()) { - params.breadcrumb = [NSNumber numberWithUnsignedLongLong:mRequest.breadcrumb.Value()]; - } else { - params.breadcrumb = nil; - } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster reorderNetworkWithParams:params completion: - ^(MTRNetworkCommissioningClusterNetworkConfigResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::NetworkConfigResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::NetworkCommissioning::Commands::ReorderNetwork::Type mRequest; }; #if MTR_ENABLE_PROVISIONAL -/* - * Command QueryIdentity - */ -class NetworkCommissioningQueryIdentity : public ClusterCommand { -public: - NetworkCommissioningQueryIdentity() - : ClusterCommand("query-identity") - { -#if MTR_ENABLE_PROVISIONAL - AddArgument("KeyIdentifier", &mRequest.keyIdentifier); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("PossessionNonce", &mRequest.possessionNonce); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::NetworkCommissioning::Commands::QueryIdentity::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 = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRNetworkCommissioningClusterQueryIdentityParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - params.keyIdentifier = [NSData dataWithBytes:mRequest.keyIdentifier.data() length:mRequest.keyIdentifier.size()]; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - if (mRequest.possessionNonce.HasValue()) { - params.possessionNonce = [NSData dataWithBytes:mRequest.possessionNonce.Value().data() length:mRequest.possessionNonce.Value().size()]; - } else { - params.possessionNonce = nil; - } -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster queryIdentityWithParams:params completion: - ^(MTRNetworkCommissioningClusterQueryIdentityResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::QueryIdentityResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::NetworkCommissioning::Commands::QueryIdentityResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::NetworkCommissioning::Commands::QueryIdentity::Type mRequest; -}; - -#endif // MTR_ENABLE_PROVISIONAL /* - * Attribute MaxNetworks + * Attribute EventList */ -class ReadNetworkCommissioningMaxNetworks : public ReadAttribute { +class ReadGeneralDiagnosticsEventList : public ReadAttribute { public: - ReadNetworkCommissioningMaxNetworks() - : ReadAttribute("max-networks") + ReadGeneralDiagnosticsEventList() + : ReadAttribute("event-list") { } - ~ReadNetworkCommissioningMaxNetworks() + ~ReadGeneralDiagnosticsEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::MaxNetworks::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::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 = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxNetworksWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.MaxNetworks response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralDiagnostics.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NetworkCommissioning MaxNetworks read Error", error); + LogNSError("GeneralDiagnostics EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -26238,25 +27489,25 @@ class ReadNetworkCommissioningMaxNetworks : public ReadAttribute { } }; -class SubscribeAttributeNetworkCommissioningMaxNetworks : public SubscribeAttribute { +class SubscribeAttributeGeneralDiagnosticsEventList : public SubscribeAttribute { public: - SubscribeAttributeNetworkCommissioningMaxNetworks() - : SubscribeAttribute("max-networks") + SubscribeAttributeGeneralDiagnosticsEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeNetworkCommissioningMaxNetworks() + ~SubscribeAttributeGeneralDiagnosticsEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::MaxNetworks::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::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 = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -26267,10 +27518,10 @@ class SubscribeAttributeNetworkCommissioningMaxNetworks : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxNetworksWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.MaxNetworks response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralDiagnostics.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -26283,35 +27534,37 @@ class SubscribeAttributeNetworkCommissioningMaxNetworks : public SubscribeAttrib } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute Networks + * Attribute AttributeList */ -class ReadNetworkCommissioningNetworks : public ReadAttribute { +class ReadGeneralDiagnosticsAttributeList : public ReadAttribute { public: - ReadNetworkCommissioningNetworks() - : ReadAttribute("networks") + ReadGeneralDiagnosticsAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadNetworkCommissioningNetworks() + ~ReadGeneralDiagnosticsAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::Networks::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::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 = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNetworksWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.Networks response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralDiagnostics.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NetworkCommissioning Networks read Error", error); + LogNSError("GeneralDiagnostics AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -26320,25 +27573,25 @@ class ReadNetworkCommissioningNetworks : public ReadAttribute { } }; -class SubscribeAttributeNetworkCommissioningNetworks : public SubscribeAttribute { +class SubscribeAttributeGeneralDiagnosticsAttributeList : public SubscribeAttribute { public: - SubscribeAttributeNetworkCommissioningNetworks() - : SubscribeAttribute("networks") + SubscribeAttributeGeneralDiagnosticsAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeNetworkCommissioningNetworks() + ~SubscribeAttributeGeneralDiagnosticsAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::Networks::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::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 = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -26349,10 +27602,10 @@ class SubscribeAttributeNetworkCommissioningNetworks : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNetworksWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.Networks response %@", [value description]); + NSLog(@"GeneralDiagnostics.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -26366,34 +27619,34 @@ class SubscribeAttributeNetworkCommissioningNetworks : public SubscribeAttribute }; /* - * Attribute ScanMaxTimeSeconds + * Attribute FeatureMap */ -class ReadNetworkCommissioningScanMaxTimeSeconds : public ReadAttribute { +class ReadGeneralDiagnosticsFeatureMap : public ReadAttribute { public: - ReadNetworkCommissioningScanMaxTimeSeconds() - : ReadAttribute("scan-max-time-seconds") + ReadGeneralDiagnosticsFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadNetworkCommissioningScanMaxTimeSeconds() + ~ReadGeneralDiagnosticsFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::ScanMaxTimeSeconds::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::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 = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeScanMaxTimeSecondsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.ScanMaxTimeSeconds response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralDiagnostics.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NetworkCommissioning ScanMaxTimeSeconds read Error", error); + LogNSError("GeneralDiagnostics FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -26402,25 +27655,25 @@ class ReadNetworkCommissioningScanMaxTimeSeconds : public ReadAttribute { } }; -class SubscribeAttributeNetworkCommissioningScanMaxTimeSeconds : public SubscribeAttribute { +class SubscribeAttributeGeneralDiagnosticsFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeNetworkCommissioningScanMaxTimeSeconds() - : SubscribeAttribute("scan-max-time-seconds") + SubscribeAttributeGeneralDiagnosticsFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeNetworkCommissioningScanMaxTimeSeconds() + ~SubscribeAttributeGeneralDiagnosticsFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::ScanMaxTimeSeconds::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::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 = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -26431,10 +27684,10 @@ class SubscribeAttributeNetworkCommissioningScanMaxTimeSeconds : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeScanMaxTimeSecondsWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.ScanMaxTimeSeconds response %@", [value description]); + NSLog(@"GeneralDiagnostics.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -26448,34 +27701,34 @@ class SubscribeAttributeNetworkCommissioningScanMaxTimeSeconds : public Subscrib }; /* - * Attribute ConnectMaxTimeSeconds + * Attribute ClusterRevision */ -class ReadNetworkCommissioningConnectMaxTimeSeconds : public ReadAttribute { +class ReadGeneralDiagnosticsClusterRevision : public ReadAttribute { public: - ReadNetworkCommissioningConnectMaxTimeSeconds() - : ReadAttribute("connect-max-time-seconds") + ReadGeneralDiagnosticsClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadNetworkCommissioningConnectMaxTimeSeconds() + ~ReadGeneralDiagnosticsClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::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 = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeConnectMaxTimeSecondsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.ConnectMaxTimeSeconds response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GeneralDiagnostics.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NetworkCommissioning ConnectMaxTimeSeconds read Error", error); + LogNSError("GeneralDiagnostics ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -26484,25 +27737,25 @@ class ReadNetworkCommissioningConnectMaxTimeSeconds : public ReadAttribute { } }; -class SubscribeAttributeNetworkCommissioningConnectMaxTimeSeconds : public SubscribeAttribute { +class SubscribeAttributeGeneralDiagnosticsClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeNetworkCommissioningConnectMaxTimeSeconds() - : SubscribeAttribute("connect-max-time-seconds") + SubscribeAttributeGeneralDiagnosticsClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeNetworkCommissioningConnectMaxTimeSeconds() + ~SubscribeAttributeGeneralDiagnosticsClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::ConnectMaxTimeSeconds::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::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 = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -26513,10 +27766,10 @@ class SubscribeAttributeNetworkCommissioningConnectMaxTimeSeconds : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeConnectMaxTimeSecondsWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.ConnectMaxTimeSeconds response %@", [value description]); + NSLog(@"GeneralDiagnostics.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -26529,103 +27782,128 @@ class SubscribeAttributeNetworkCommissioningConnectMaxTimeSeconds : public Subsc } }; +/*----------------------------------------------------------------------------*\ +| Cluster SoftwareDiagnostics | 0x0034 | +|------------------------------------------------------------------------------| +| Commands: | | +| * ResetWatermarks | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * ThreadMetrics | 0x0000 | +| * CurrentHeapFree | 0x0001 | +| * CurrentHeapUsed | 0x0002 | +| * CurrentHeapHighWatermark | 0x0003 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * SoftwareFault | 0x0000 | +\*----------------------------------------------------------------------------*/ + /* - * Attribute InterfaceEnabled + * Command ResetWatermarks */ -class ReadNetworkCommissioningInterfaceEnabled : public ReadAttribute { +class SoftwareDiagnosticsResetWatermarks : public ClusterCommand { public: - ReadNetworkCommissioningInterfaceEnabled() - : ReadAttribute("interface-enabled") - { - } - - ~ReadNetworkCommissioningInterfaceEnabled() + SoftwareDiagnosticsResetWatermarks() + : ClusterCommand("reset-watermarks") { + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::InterfaceEnabled::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::SoftwareDiagnostics::Commands::ResetWatermarks::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 = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeInterfaceEnabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.InterfaceEnabled response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("NetworkCommissioning InterfaceEnabled read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSoftwareDiagnosticsClusterResetWatermarksParams 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 resetWatermarksWithParams: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 WriteNetworkCommissioningInterfaceEnabled : public WriteAttribute { +/* + * Attribute ThreadMetrics + */ +class ReadSoftwareDiagnosticsThreadMetrics : public ReadAttribute { public: - WriteNetworkCommissioningInterfaceEnabled() - : WriteAttribute("interface-enabled") + ReadSoftwareDiagnosticsThreadMetrics() + : ReadAttribute("thread-metrics") { - AddArgument("attr-name", "interface-enabled"); - AddArgument("attr-value", 0, 1, &mValue); - WriteAttribute::AddArguments(); } - ~WriteNetworkCommissioningInterfaceEnabled() + ~ReadSoftwareDiagnosticsThreadMetrics() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::InterfaceEnabled::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::ThreadMetrics::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 = [[MTRBaseClusterNetworkCommissioning 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 numberWithBool:mValue]; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - [cluster writeAttributeInterfaceEnabledWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("NetworkCommissioning InterfaceEnabled write Error", error); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeThreadMetricsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"SoftwareDiagnostics.ThreadMetrics response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("SoftwareDiagnostics ThreadMetrics read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - bool mValue; }; -class SubscribeAttributeNetworkCommissioningInterfaceEnabled : public SubscribeAttribute { +class SubscribeAttributeSoftwareDiagnosticsThreadMetrics : public SubscribeAttribute { public: - SubscribeAttributeNetworkCommissioningInterfaceEnabled() - : SubscribeAttribute("interface-enabled") + SubscribeAttributeSoftwareDiagnosticsThreadMetrics() + : SubscribeAttribute("thread-metrics") { } - ~SubscribeAttributeNetworkCommissioningInterfaceEnabled() + ~SubscribeAttributeSoftwareDiagnosticsThreadMetrics() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::InterfaceEnabled::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::ThreadMetrics::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -26636,10 +27914,10 @@ class SubscribeAttributeNetworkCommissioningInterfaceEnabled : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeInterfaceEnabledWithParams:params + [cluster subscribeAttributeThreadMetricsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.InterfaceEnabled response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"SoftwareDiagnostics.ThreadMetrics response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -26653,34 +27931,34 @@ class SubscribeAttributeNetworkCommissioningInterfaceEnabled : public SubscribeA }; /* - * Attribute LastNetworkingStatus + * Attribute CurrentHeapFree */ -class ReadNetworkCommissioningLastNetworkingStatus : public ReadAttribute { +class ReadSoftwareDiagnosticsCurrentHeapFree : public ReadAttribute { public: - ReadNetworkCommissioningLastNetworkingStatus() - : ReadAttribute("last-networking-status") + ReadSoftwareDiagnosticsCurrentHeapFree() + : ReadAttribute("current-heap-free") { } - ~ReadNetworkCommissioningLastNetworkingStatus() + ~ReadSoftwareDiagnosticsCurrentHeapFree() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::LastNetworkingStatus::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::CurrentHeapFree::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLastNetworkingStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.LastNetworkingStatus response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentHeapFreeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SoftwareDiagnostics.CurrentHeapFree response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NetworkCommissioning LastNetworkingStatus read Error", error); + LogNSError("SoftwareDiagnostics CurrentHeapFree read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -26689,25 +27967,25 @@ class ReadNetworkCommissioningLastNetworkingStatus : public ReadAttribute { } }; -class SubscribeAttributeNetworkCommissioningLastNetworkingStatus : public SubscribeAttribute { +class SubscribeAttributeSoftwareDiagnosticsCurrentHeapFree : public SubscribeAttribute { public: - SubscribeAttributeNetworkCommissioningLastNetworkingStatus() - : SubscribeAttribute("last-networking-status") + SubscribeAttributeSoftwareDiagnosticsCurrentHeapFree() + : SubscribeAttribute("current-heap-free") { } - ~SubscribeAttributeNetworkCommissioningLastNetworkingStatus() + ~SubscribeAttributeSoftwareDiagnosticsCurrentHeapFree() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::LastNetworkingStatus::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::CurrentHeapFree::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -26718,10 +27996,10 @@ class SubscribeAttributeNetworkCommissioningLastNetworkingStatus : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLastNetworkingStatusWithParams:params + [cluster subscribeAttributeCurrentHeapFreeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.LastNetworkingStatus response %@", [value description]); + NSLog(@"SoftwareDiagnostics.CurrentHeapFree response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -26735,34 +28013,34 @@ class SubscribeAttributeNetworkCommissioningLastNetworkingStatus : public Subscr }; /* - * Attribute LastNetworkID + * Attribute CurrentHeapUsed */ -class ReadNetworkCommissioningLastNetworkID : public ReadAttribute { +class ReadSoftwareDiagnosticsCurrentHeapUsed : public ReadAttribute { public: - ReadNetworkCommissioningLastNetworkID() - : ReadAttribute("last-network-id") + ReadSoftwareDiagnosticsCurrentHeapUsed() + : ReadAttribute("current-heap-used") { } - ~ReadNetworkCommissioningLastNetworkID() + ~ReadSoftwareDiagnosticsCurrentHeapUsed() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::LastNetworkID::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::CurrentHeapUsed::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLastNetworkIDWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.LastNetworkID response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentHeapUsedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SoftwareDiagnostics.CurrentHeapUsed response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NetworkCommissioning LastNetworkID read Error", error); + LogNSError("SoftwareDiagnostics CurrentHeapUsed read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -26771,25 +28049,25 @@ class ReadNetworkCommissioningLastNetworkID : public ReadAttribute { } }; -class SubscribeAttributeNetworkCommissioningLastNetworkID : public SubscribeAttribute { +class SubscribeAttributeSoftwareDiagnosticsCurrentHeapUsed : public SubscribeAttribute { public: - SubscribeAttributeNetworkCommissioningLastNetworkID() - : SubscribeAttribute("last-network-id") + SubscribeAttributeSoftwareDiagnosticsCurrentHeapUsed() + : SubscribeAttribute("current-heap-used") { } - ~SubscribeAttributeNetworkCommissioningLastNetworkID() + ~SubscribeAttributeSoftwareDiagnosticsCurrentHeapUsed() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::LastNetworkID::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::CurrentHeapUsed::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -26800,10 +28078,10 @@ class SubscribeAttributeNetworkCommissioningLastNetworkID : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLastNetworkIDWithParams:params + [cluster subscribeAttributeCurrentHeapUsedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.LastNetworkID response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SoftwareDiagnostics.CurrentHeapUsed response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -26817,34 +28095,34 @@ class SubscribeAttributeNetworkCommissioningLastNetworkID : public SubscribeAttr }; /* - * Attribute LastConnectErrorValue + * Attribute CurrentHeapHighWatermark */ -class ReadNetworkCommissioningLastConnectErrorValue : public ReadAttribute { +class ReadSoftwareDiagnosticsCurrentHeapHighWatermark : public ReadAttribute { public: - ReadNetworkCommissioningLastConnectErrorValue() - : ReadAttribute("last-connect-error-value") + ReadSoftwareDiagnosticsCurrentHeapHighWatermark() + : ReadAttribute("current-heap-high-watermark") { } - ~ReadNetworkCommissioningLastConnectErrorValue() + ~ReadSoftwareDiagnosticsCurrentHeapHighWatermark() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::LastConnectErrorValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLastConnectErrorValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.LastConnectErrorValue response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentHeapHighWatermarkWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SoftwareDiagnostics.CurrentHeapHighWatermark response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NetworkCommissioning LastConnectErrorValue read Error", error); + LogNSError("SoftwareDiagnostics CurrentHeapHighWatermark read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -26853,25 +28131,25 @@ class ReadNetworkCommissioningLastConnectErrorValue : public ReadAttribute { } }; -class SubscribeAttributeNetworkCommissioningLastConnectErrorValue : public SubscribeAttribute { +class SubscribeAttributeSoftwareDiagnosticsCurrentHeapHighWatermark : public SubscribeAttribute { public: - SubscribeAttributeNetworkCommissioningLastConnectErrorValue() - : SubscribeAttribute("last-connect-error-value") + SubscribeAttributeSoftwareDiagnosticsCurrentHeapHighWatermark() + : SubscribeAttribute("current-heap-high-watermark") { } - ~SubscribeAttributeNetworkCommissioningLastConnectErrorValue() + ~SubscribeAttributeSoftwareDiagnosticsCurrentHeapHighWatermark() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::LastConnectErrorValue::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -26882,10 +28160,10 @@ class SubscribeAttributeNetworkCommissioningLastConnectErrorValue : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLastConnectErrorValueWithParams:params + [cluster subscribeAttributeCurrentHeapHighWatermarkWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.LastConnectErrorValue response %@", [value description]); + NSLog(@"SoftwareDiagnostics.CurrentHeapHighWatermark response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -26898,37 +28176,35 @@ class SubscribeAttributeNetworkCommissioningLastConnectErrorValue : public Subsc } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute SupportedWiFiBands + * Attribute GeneratedCommandList */ -class ReadNetworkCommissioningSupportedWiFiBands : public ReadAttribute { +class ReadSoftwareDiagnosticsGeneratedCommandList : public ReadAttribute { public: - ReadNetworkCommissioningSupportedWiFiBands() - : ReadAttribute("supported-wi-fi-bands") + ReadSoftwareDiagnosticsGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadNetworkCommissioningSupportedWiFiBands() + ~ReadSoftwareDiagnosticsGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::SupportedWiFiBands::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SoftwareDiagnostics::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 = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedWiFiBandsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.SupportedWiFiBands response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"SoftwareDiagnostics.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NetworkCommissioning SupportedWiFiBands read Error", error); + LogNSError("SoftwareDiagnostics GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -26937,25 +28213,25 @@ class ReadNetworkCommissioningSupportedWiFiBands : public ReadAttribute { } }; -class SubscribeAttributeNetworkCommissioningSupportedWiFiBands : public SubscribeAttribute { +class SubscribeAttributeSoftwareDiagnosticsGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeNetworkCommissioningSupportedWiFiBands() - : SubscribeAttribute("supported-wi-fi-bands") + SubscribeAttributeSoftwareDiagnosticsGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeNetworkCommissioningSupportedWiFiBands() + ~SubscribeAttributeSoftwareDiagnosticsGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::SupportedWiFiBands::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SoftwareDiagnostics::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 = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -26966,10 +28242,10 @@ class SubscribeAttributeNetworkCommissioningSupportedWiFiBands : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedWiFiBandsWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.SupportedWiFiBands response %@", [value description]); + NSLog(@"SoftwareDiagnostics.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -26982,38 +28258,35 @@ class SubscribeAttributeNetworkCommissioningSupportedWiFiBands : public Subscrib } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute SupportedThreadFeatures + * Attribute AcceptedCommandList */ -class ReadNetworkCommissioningSupportedThreadFeatures : public ReadAttribute { +class ReadSoftwareDiagnosticsAcceptedCommandList : public ReadAttribute { public: - ReadNetworkCommissioningSupportedThreadFeatures() - : ReadAttribute("supported-thread-features") + ReadSoftwareDiagnosticsAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadNetworkCommissioningSupportedThreadFeatures() + ~ReadSoftwareDiagnosticsAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::SupportedThreadFeatures::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SoftwareDiagnostics::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 = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedThreadFeaturesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.SupportedThreadFeatures response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"SoftwareDiagnostics.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NetworkCommissioning SupportedThreadFeatures read Error", error); + LogNSError("SoftwareDiagnostics AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -27022,25 +28295,25 @@ class ReadNetworkCommissioningSupportedThreadFeatures : public ReadAttribute { } }; -class SubscribeAttributeNetworkCommissioningSupportedThreadFeatures : public SubscribeAttribute { +class SubscribeAttributeSoftwareDiagnosticsAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeNetworkCommissioningSupportedThreadFeatures() - : SubscribeAttribute("supported-thread-features") + SubscribeAttributeSoftwareDiagnosticsAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeNetworkCommissioningSupportedThreadFeatures() + ~SubscribeAttributeSoftwareDiagnosticsAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::SupportedThreadFeatures::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SoftwareDiagnostics::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 = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -27051,10 +28324,10 @@ class SubscribeAttributeNetworkCommissioningSupportedThreadFeatures : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedThreadFeaturesWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.SupportedThreadFeatures response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"SoftwareDiagnostics.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -27067,38 +28340,37 @@ class SubscribeAttributeNetworkCommissioningSupportedThreadFeatures : public Sub } }; -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* - * Attribute ThreadVersion + * Attribute EventList */ -class ReadNetworkCommissioningThreadVersion : public ReadAttribute { +class ReadSoftwareDiagnosticsEventList : public ReadAttribute { public: - ReadNetworkCommissioningThreadVersion() - : ReadAttribute("thread-version") + ReadSoftwareDiagnosticsEventList() + : ReadAttribute("event-list") { } - ~ReadNetworkCommissioningThreadVersion() + ~ReadSoftwareDiagnosticsEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::ThreadVersion::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SoftwareDiagnostics::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 = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeThreadVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.ThreadVersion response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"SoftwareDiagnostics.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NetworkCommissioning ThreadVersion read Error", error); + LogNSError("SoftwareDiagnostics EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -27107,25 +28379,25 @@ class ReadNetworkCommissioningThreadVersion : public ReadAttribute { } }; -class SubscribeAttributeNetworkCommissioningThreadVersion : public SubscribeAttribute { +class SubscribeAttributeSoftwareDiagnosticsEventList : public SubscribeAttribute { public: - SubscribeAttributeNetworkCommissioningThreadVersion() - : SubscribeAttribute("thread-version") + SubscribeAttributeSoftwareDiagnosticsEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeNetworkCommissioningThreadVersion() + ~SubscribeAttributeSoftwareDiagnosticsEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::ThreadVersion::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SoftwareDiagnostics::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 = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -27136,10 +28408,10 @@ class SubscribeAttributeNetworkCommissioningThreadVersion : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeThreadVersionWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.ThreadVersion response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"SoftwareDiagnostics.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -27155,34 +28427,34 @@ class SubscribeAttributeNetworkCommissioningThreadVersion : public SubscribeAttr #endif // MTR_ENABLE_PROVISIONAL /* - * Attribute GeneratedCommandList + * Attribute AttributeList */ -class ReadNetworkCommissioningGeneratedCommandList : public ReadAttribute { +class ReadSoftwareDiagnosticsAttributeList : public ReadAttribute { public: - ReadNetworkCommissioningGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadSoftwareDiagnosticsAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadNetworkCommissioningGeneratedCommandList() + ~ReadSoftwareDiagnosticsAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SoftwareDiagnostics::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 = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"SoftwareDiagnostics.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NetworkCommissioning GeneratedCommandList read Error", error); + LogNSError("SoftwareDiagnostics AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -27191,25 +28463,25 @@ class ReadNetworkCommissioningGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeNetworkCommissioningGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeSoftwareDiagnosticsAttributeList : public SubscribeAttribute { public: - SubscribeAttributeNetworkCommissioningGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeSoftwareDiagnosticsAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeNetworkCommissioningGeneratedCommandList() + ~SubscribeAttributeSoftwareDiagnosticsAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SoftwareDiagnostics::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 = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -27220,10 +28492,10 @@ class SubscribeAttributeNetworkCommissioningGeneratedCommandList : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.GeneratedCommandList response %@", [value description]); + NSLog(@"SoftwareDiagnostics.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -27237,34 +28509,34 @@ class SubscribeAttributeNetworkCommissioningGeneratedCommandList : public Subscr }; /* - * Attribute AcceptedCommandList + * Attribute FeatureMap */ -class ReadNetworkCommissioningAcceptedCommandList : public ReadAttribute { +class ReadSoftwareDiagnosticsFeatureMap : public ReadAttribute { public: - ReadNetworkCommissioningAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadSoftwareDiagnosticsFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadNetworkCommissioningAcceptedCommandList() + ~ReadSoftwareDiagnosticsFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SoftwareDiagnostics::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 = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SoftwareDiagnostics.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NetworkCommissioning AcceptedCommandList read Error", error); + LogNSError("SoftwareDiagnostics FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -27273,25 +28545,25 @@ class ReadNetworkCommissioningAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeNetworkCommissioningAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeSoftwareDiagnosticsFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeNetworkCommissioningAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeSoftwareDiagnosticsFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeNetworkCommissioningAcceptedCommandList() + ~SubscribeAttributeSoftwareDiagnosticsFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SoftwareDiagnostics::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 = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -27302,10 +28574,10 @@ class SubscribeAttributeNetworkCommissioningAcceptedCommandList : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SoftwareDiagnostics.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -27318,37 +28590,35 @@ class SubscribeAttributeNetworkCommissioningAcceptedCommandList : public Subscri } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute ClusterRevision */ -class ReadNetworkCommissioningEventList : public ReadAttribute { +class ReadSoftwareDiagnosticsClusterRevision : public ReadAttribute { public: - ReadNetworkCommissioningEventList() - : ReadAttribute("event-list") + ReadSoftwareDiagnosticsClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadNetworkCommissioningEventList() + ~ReadSoftwareDiagnosticsClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::SoftwareDiagnostics::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 = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SoftwareDiagnostics.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NetworkCommissioning EventList read Error", error); + LogNSError("SoftwareDiagnostics ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -27357,25 +28627,25 @@ class ReadNetworkCommissioningEventList : public ReadAttribute { } }; -class SubscribeAttributeNetworkCommissioningEventList : public SubscribeAttribute { +class SubscribeAttributeSoftwareDiagnosticsClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeNetworkCommissioningEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeSoftwareDiagnosticsClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeNetworkCommissioningEventList() + ~SubscribeAttributeSoftwareDiagnosticsClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SoftwareDiagnostics::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 = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -27386,10 +28656,10 @@ class SubscribeAttributeNetworkCommissioningEventList : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SoftwareDiagnostics.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -27402,37 +28672,161 @@ class SubscribeAttributeNetworkCommissioningEventList : public SubscribeAttribut } }; -#endif // MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster ThreadNetworkDiagnostics | 0x0035 | +|------------------------------------------------------------------------------| +| Commands: | | +| * ResetCounts | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Channel | 0x0000 | +| * RoutingRole | 0x0001 | +| * NetworkName | 0x0002 | +| * PanId | 0x0003 | +| * ExtendedPanId | 0x0004 | +| * MeshLocalPrefix | 0x0005 | +| * OverrunCount | 0x0006 | +| * NeighborTable | 0x0007 | +| * RouteTable | 0x0008 | +| * PartitionId | 0x0009 | +| * Weighting | 0x000A | +| * DataVersion | 0x000B | +| * StableDataVersion | 0x000C | +| * LeaderRouterId | 0x000D | +| * DetachedRoleCount | 0x000E | +| * ChildRoleCount | 0x000F | +| * RouterRoleCount | 0x0010 | +| * LeaderRoleCount | 0x0011 | +| * AttachAttemptCount | 0x0012 | +| * PartitionIdChangeCount | 0x0013 | +| * BetterPartitionAttachAttemptCount | 0x0014 | +| * ParentChangeCount | 0x0015 | +| * TxTotalCount | 0x0016 | +| * TxUnicastCount | 0x0017 | +| * TxBroadcastCount | 0x0018 | +| * TxAckRequestedCount | 0x0019 | +| * TxAckedCount | 0x001A | +| * TxNoAckRequestedCount | 0x001B | +| * TxDataCount | 0x001C | +| * TxDataPollCount | 0x001D | +| * TxBeaconCount | 0x001E | +| * TxBeaconRequestCount | 0x001F | +| * TxOtherCount | 0x0020 | +| * TxRetryCount | 0x0021 | +| * TxDirectMaxRetryExpiryCount | 0x0022 | +| * TxIndirectMaxRetryExpiryCount | 0x0023 | +| * TxErrCcaCount | 0x0024 | +| * TxErrAbortCount | 0x0025 | +| * TxErrBusyChannelCount | 0x0026 | +| * RxTotalCount | 0x0027 | +| * RxUnicastCount | 0x0028 | +| * RxBroadcastCount | 0x0029 | +| * RxDataCount | 0x002A | +| * RxDataPollCount | 0x002B | +| * RxBeaconCount | 0x002C | +| * RxBeaconRequestCount | 0x002D | +| * RxOtherCount | 0x002E | +| * RxAddressFilteredCount | 0x002F | +| * RxDestAddrFilteredCount | 0x0030 | +| * RxDuplicatedCount | 0x0031 | +| * RxErrNoFrameCount | 0x0032 | +| * RxErrUnknownNeighborCount | 0x0033 | +| * RxErrInvalidSrcAddrCount | 0x0034 | +| * RxErrSecCount | 0x0035 | +| * RxErrFcsCount | 0x0036 | +| * RxErrOtherCount | 0x0037 | +| * ActiveTimestamp | 0x0038 | +| * PendingTimestamp | 0x0039 | +| * Delay | 0x003A | +| * SecurityPolicy | 0x003B | +| * ChannelPage0Mask | 0x003C | +| * OperationalDatasetComponents | 0x003D | +| * ActiveNetworkFaultsList | 0x003E | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * ConnectionStatus | 0x0000 | +| * NetworkFaultChange | 0x0001 | +\*----------------------------------------------------------------------------*/ /* - * Attribute AttributeList + * Command ResetCounts */ -class ReadNetworkCommissioningAttributeList : public ReadAttribute { +class ThreadNetworkDiagnosticsResetCounts : public ClusterCommand { public: - ReadNetworkCommissioningAttributeList() - : ReadAttribute("attribute-list") + ThreadNetworkDiagnosticsResetCounts() + : ClusterCommand("reset-counts") { + ClusterCommand::AddArguments(); } - ~ReadNetworkCommissioningAttributeList() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::ThreadNetworkDiagnostics::Commands::ResetCounts::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 = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRThreadNetworkDiagnosticsClusterResetCountsParams 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 resetCountsWithParams: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 Channel + */ +class ReadThreadNetworkDiagnosticsChannel : public ReadAttribute { +public: + ReadThreadNetworkDiagnosticsChannel() + : ReadAttribute("channel") + { + } + + ~ReadThreadNetworkDiagnosticsChannel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::Channel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeChannelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.Channel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NetworkCommissioning AttributeList read Error", error); + LogNSError("ThreadNetworkDiagnostics Channel read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -27441,25 +28835,25 @@ class ReadNetworkCommissioningAttributeList : public ReadAttribute { } }; -class SubscribeAttributeNetworkCommissioningAttributeList : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsChannel : public SubscribeAttribute { public: - SubscribeAttributeNetworkCommissioningAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeThreadNetworkDiagnosticsChannel() + : SubscribeAttribute("channel") { } - ~SubscribeAttributeNetworkCommissioningAttributeList() + ~SubscribeAttributeThreadNetworkDiagnosticsChannel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::Channel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -27470,10 +28864,10 @@ class SubscribeAttributeNetworkCommissioningAttributeList : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeChannelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.Channel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -27487,34 +28881,34 @@ class SubscribeAttributeNetworkCommissioningAttributeList : public SubscribeAttr }; /* - * Attribute FeatureMap + * Attribute RoutingRole */ -class ReadNetworkCommissioningFeatureMap : public ReadAttribute { +class ReadThreadNetworkDiagnosticsRoutingRole : public ReadAttribute { public: - ReadNetworkCommissioningFeatureMap() - : ReadAttribute("feature-map") + ReadThreadNetworkDiagnosticsRoutingRole() + : ReadAttribute("routing-role") { } - ~ReadNetworkCommissioningFeatureMap() + ~ReadThreadNetworkDiagnosticsRoutingRole() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RoutingRole::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeRoutingRoleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.RoutingRole response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NetworkCommissioning FeatureMap read Error", error); + LogNSError("ThreadNetworkDiagnostics RoutingRole read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -27523,25 +28917,25 @@ class ReadNetworkCommissioningFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeNetworkCommissioningFeatureMap : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsRoutingRole : public SubscribeAttribute { public: - SubscribeAttributeNetworkCommissioningFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeThreadNetworkDiagnosticsRoutingRole() + : SubscribeAttribute("routing-role") { } - ~SubscribeAttributeNetworkCommissioningFeatureMap() + ~SubscribeAttributeThreadNetworkDiagnosticsRoutingRole() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RoutingRole::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -27552,10 +28946,10 @@ class SubscribeAttributeNetworkCommissioningFeatureMap : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeRoutingRoleWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.FeatureMap response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.RoutingRole response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -27569,34 +28963,34 @@ class SubscribeAttributeNetworkCommissioningFeatureMap : public SubscribeAttribu }; /* - * Attribute ClusterRevision + * Attribute NetworkName */ -class ReadNetworkCommissioningClusterRevision : public ReadAttribute { +class ReadThreadNetworkDiagnosticsNetworkName : public ReadAttribute { public: - ReadNetworkCommissioningClusterRevision() - : ReadAttribute("cluster-revision") + ReadThreadNetworkDiagnosticsNetworkName() + : ReadAttribute("network-name") { } - ~ReadNetworkCommissioningClusterRevision() + ~ReadThreadNetworkDiagnosticsNetworkName() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::NetworkName::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNetworkNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.NetworkName response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("NetworkCommissioning ClusterRevision read Error", error); + LogNSError("ThreadNetworkDiagnostics NetworkName read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -27605,25 +28999,25 @@ class ReadNetworkCommissioningClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeNetworkCommissioningClusterRevision : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsNetworkName : public SubscribeAttribute { public: - SubscribeAttributeNetworkCommissioningClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeThreadNetworkDiagnosticsNetworkName() + : SubscribeAttribute("network-name") { } - ~SubscribeAttributeNetworkCommissioningClusterRevision() + ~SubscribeAttributeThreadNetworkDiagnosticsNetworkName() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::NetworkCommissioning::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::NetworkCommissioning::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::NetworkName::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterNetworkCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -27634,10 +29028,10 @@ class SubscribeAttributeNetworkCommissioningClusterRevision : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeNetworkNameWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"NetworkCommissioning.ClusterRevision response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.NetworkName response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -27650,113 +29044,35 @@ class SubscribeAttributeNetworkCommissioningClusterRevision : public SubscribeAt } }; -/*----------------------------------------------------------------------------*\ -| Cluster DiagnosticLogs | 0x0032 | -|------------------------------------------------------------------------------| -| Commands: | | -| * RetrieveLogsRequest | 0x00 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - -/* - * Command RetrieveLogsRequest - */ -class DiagnosticLogsRetrieveLogsRequest : public ClusterCommand { -public: - DiagnosticLogsRetrieveLogsRequest() - : ClusterCommand("retrieve-logs-request") - { - AddArgument("Intent", 0, UINT8_MAX, &mRequest.intent); - AddArgument("RequestedProtocol", 0, UINT8_MAX, &mRequest.requestedProtocol); - AddArgument("TransferFileDesignator", &mRequest.transferFileDesignator); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsRequest::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 = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRDiagnosticLogsClusterRetrieveLogsRequestParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.intent = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.intent)]; - params.requestedProtocol = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.requestedProtocol)]; - if (mRequest.transferFileDesignator.HasValue()) { - params.transferFileDesignator = [[NSString alloc] initWithBytes:mRequest.transferFileDesignator.Value().data() length:mRequest.transferFileDesignator.Value().size() encoding:NSUTF8StringEncoding]; - } else { - params.transferFileDesignator = nil; - } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster retrieveLogsRequestWithParams:params completion: - ^(MTRDiagnosticLogsClusterRetrieveLogsResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::DiagnosticLogs::Commands::RetrieveLogsRequest::Type mRequest; -}; - /* - * Attribute GeneratedCommandList + * Attribute PanId */ -class ReadDiagnosticLogsGeneratedCommandList : public ReadAttribute { +class ReadThreadNetworkDiagnosticsPanId : public ReadAttribute { public: - ReadDiagnosticLogsGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadThreadNetworkDiagnosticsPanId() + : ReadAttribute("pan-id") { } - ~ReadDiagnosticLogsGeneratedCommandList() + ~ReadThreadNetworkDiagnosticsPanId() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DiagnosticLogs::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::PanId::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DiagnosticLogs.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePanIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.PanId response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DiagnosticLogs GeneratedCommandList read Error", error); + LogNSError("ThreadNetworkDiagnostics PanId read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -27765,25 +29081,25 @@ class ReadDiagnosticLogsGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeDiagnosticLogsGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsPanId : public SubscribeAttribute { public: - SubscribeAttributeDiagnosticLogsGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeThreadNetworkDiagnosticsPanId() + : SubscribeAttribute("pan-id") { } - ~SubscribeAttributeDiagnosticLogsGeneratedCommandList() + ~SubscribeAttributeThreadNetworkDiagnosticsPanId() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DiagnosticLogs::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::PanId::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -27794,10 +29110,10 @@ class SubscribeAttributeDiagnosticLogsGeneratedCommandList : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributePanIdWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DiagnosticLogs.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.PanId response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -27811,34 +29127,34 @@ class SubscribeAttributeDiagnosticLogsGeneratedCommandList : public SubscribeAtt }; /* - * Attribute AcceptedCommandList + * Attribute ExtendedPanId */ -class ReadDiagnosticLogsAcceptedCommandList : public ReadAttribute { +class ReadThreadNetworkDiagnosticsExtendedPanId : public ReadAttribute { public: - ReadDiagnosticLogsAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadThreadNetworkDiagnosticsExtendedPanId() + : ReadAttribute("extended-pan-id") { } - ~ReadDiagnosticLogsAcceptedCommandList() + ~ReadThreadNetworkDiagnosticsExtendedPanId() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DiagnosticLogs::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ExtendedPanId::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DiagnosticLogs.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeExtendedPanIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.ExtendedPanId response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DiagnosticLogs AcceptedCommandList read Error", error); + LogNSError("ThreadNetworkDiagnostics ExtendedPanId read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -27847,25 +29163,25 @@ class ReadDiagnosticLogsAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeDiagnosticLogsAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsExtendedPanId : public SubscribeAttribute { public: - SubscribeAttributeDiagnosticLogsAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeThreadNetworkDiagnosticsExtendedPanId() + : SubscribeAttribute("extended-pan-id") { } - ~SubscribeAttributeDiagnosticLogsAcceptedCommandList() + ~SubscribeAttributeThreadNetworkDiagnosticsExtendedPanId() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DiagnosticLogs::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ExtendedPanId::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -27876,10 +29192,10 @@ class SubscribeAttributeDiagnosticLogsAcceptedCommandList : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeExtendedPanIdWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DiagnosticLogs.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.ExtendedPanId response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -27892,37 +29208,35 @@ class SubscribeAttributeDiagnosticLogsAcceptedCommandList : public SubscribeAttr } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute MeshLocalPrefix */ -class ReadDiagnosticLogsEventList : public ReadAttribute { +class ReadThreadNetworkDiagnosticsMeshLocalPrefix : public ReadAttribute { public: - ReadDiagnosticLogsEventList() - : ReadAttribute("event-list") + ReadThreadNetworkDiagnosticsMeshLocalPrefix() + : ReadAttribute("mesh-local-prefix") { } - ~ReadDiagnosticLogsEventList() + ~ReadThreadNetworkDiagnosticsMeshLocalPrefix() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DiagnosticLogs::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DiagnosticLogs.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMeshLocalPrefixWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.MeshLocalPrefix response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DiagnosticLogs EventList read Error", error); + LogNSError("ThreadNetworkDiagnostics MeshLocalPrefix read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -27931,25 +29245,25 @@ class ReadDiagnosticLogsEventList : public ReadAttribute { } }; -class SubscribeAttributeDiagnosticLogsEventList : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsMeshLocalPrefix : public SubscribeAttribute { public: - SubscribeAttributeDiagnosticLogsEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeThreadNetworkDiagnosticsMeshLocalPrefix() + : SubscribeAttribute("mesh-local-prefix") { } - ~SubscribeAttributeDiagnosticLogsEventList() + ~SubscribeAttributeThreadNetworkDiagnosticsMeshLocalPrefix() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DiagnosticLogs::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -27960,10 +29274,10 @@ class SubscribeAttributeDiagnosticLogsEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeMeshLocalPrefixWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DiagnosticLogs.EventList response %@", [value description]); + reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.MeshLocalPrefix response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -27976,37 +29290,35 @@ class SubscribeAttributeDiagnosticLogsEventList : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute OverrunCount */ -class ReadDiagnosticLogsAttributeList : public ReadAttribute { +class ReadThreadNetworkDiagnosticsOverrunCount : public ReadAttribute { public: - ReadDiagnosticLogsAttributeList() - : ReadAttribute("attribute-list") + ReadThreadNetworkDiagnosticsOverrunCount() + : ReadAttribute("overrun-count") { } - ~ReadDiagnosticLogsAttributeList() + ~ReadThreadNetworkDiagnosticsOverrunCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DiagnosticLogs::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::OverrunCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DiagnosticLogs.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOverrunCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.OverrunCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DiagnosticLogs AttributeList read Error", error); + LogNSError("ThreadNetworkDiagnostics OverrunCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -28015,25 +29327,25 @@ class ReadDiagnosticLogsAttributeList : public ReadAttribute { } }; -class SubscribeAttributeDiagnosticLogsAttributeList : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsOverrunCount : public SubscribeAttribute { public: - SubscribeAttributeDiagnosticLogsAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeThreadNetworkDiagnosticsOverrunCount() + : SubscribeAttribute("overrun-count") { } - ~SubscribeAttributeDiagnosticLogsAttributeList() + ~SubscribeAttributeThreadNetworkDiagnosticsOverrunCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DiagnosticLogs::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::OverrunCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -28044,10 +29356,10 @@ class SubscribeAttributeDiagnosticLogsAttributeList : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeOverrunCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DiagnosticLogs.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.OverrunCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -28061,34 +29373,34 @@ class SubscribeAttributeDiagnosticLogsAttributeList : public SubscribeAttribute }; /* - * Attribute FeatureMap + * Attribute NeighborTable */ -class ReadDiagnosticLogsFeatureMap : public ReadAttribute { +class ReadThreadNetworkDiagnosticsNeighborTable : public ReadAttribute { public: - ReadDiagnosticLogsFeatureMap() - : ReadAttribute("feature-map") + ReadThreadNetworkDiagnosticsNeighborTable() + : ReadAttribute("neighbor-table") { } - ~ReadDiagnosticLogsFeatureMap() + ~ReadThreadNetworkDiagnosticsNeighborTable() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DiagnosticLogs::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::NeighborTable::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DiagnosticLogs.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNeighborTableWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.NeighborTable response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DiagnosticLogs FeatureMap read Error", error); + LogNSError("ThreadNetworkDiagnostics NeighborTable read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -28097,25 +29409,25 @@ class ReadDiagnosticLogsFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeDiagnosticLogsFeatureMap : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsNeighborTable : public SubscribeAttribute { public: - SubscribeAttributeDiagnosticLogsFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeThreadNetworkDiagnosticsNeighborTable() + : SubscribeAttribute("neighbor-table") { } - ~SubscribeAttributeDiagnosticLogsFeatureMap() + ~SubscribeAttributeThreadNetworkDiagnosticsNeighborTable() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DiagnosticLogs::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::NeighborTable::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -28126,10 +29438,10 @@ class SubscribeAttributeDiagnosticLogsFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeNeighborTableWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DiagnosticLogs.FeatureMap response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.NeighborTable response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -28143,34 +29455,34 @@ class SubscribeAttributeDiagnosticLogsFeatureMap : public SubscribeAttribute { }; /* - * Attribute ClusterRevision + * Attribute RouteTable */ -class ReadDiagnosticLogsClusterRevision : public ReadAttribute { +class ReadThreadNetworkDiagnosticsRouteTable : public ReadAttribute { public: - ReadDiagnosticLogsClusterRevision() - : ReadAttribute("cluster-revision") + ReadThreadNetworkDiagnosticsRouteTable() + : ReadAttribute("route-table") { } - ~ReadDiagnosticLogsClusterRevision() + ~ReadThreadNetworkDiagnosticsRouteTable() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::DiagnosticLogs::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RouteTable::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DiagnosticLogs.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeRouteTableWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.RouteTable response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DiagnosticLogs ClusterRevision read Error", error); + LogNSError("ThreadNetworkDiagnostics RouteTable read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -28179,25 +29491,25 @@ class ReadDiagnosticLogsClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeDiagnosticLogsClusterRevision : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsRouteTable : public SubscribeAttribute { public: - SubscribeAttributeDiagnosticLogsClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeThreadNetworkDiagnosticsRouteTable() + : SubscribeAttribute("route-table") { } - ~SubscribeAttributeDiagnosticLogsClusterRevision() + ~SubscribeAttributeThreadNetworkDiagnosticsRouteTable() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::DiagnosticLogs::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::DiagnosticLogs::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RouteTable::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -28208,10 +29520,10 @@ class SubscribeAttributeDiagnosticLogsClusterRevision : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeRouteTableWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DiagnosticLogs.ClusterRevision response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.RouteTable response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -28224,168 +29536,117 @@ class SubscribeAttributeDiagnosticLogsClusterRevision : public SubscribeAttribut } }; -/*----------------------------------------------------------------------------*\ -| Cluster GeneralDiagnostics | 0x0033 | -|------------------------------------------------------------------------------| -| Commands: | | -| * TestEventTrigger | 0x00 | -| * TimeSnapshot | 0x01 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * NetworkInterfaces | 0x0000 | -| * RebootCount | 0x0001 | -| * UpTime | 0x0002 | -| * TotalOperationalHours | 0x0003 | -| * BootReason | 0x0004 | -| * ActiveHardwareFaults | 0x0005 | -| * ActiveRadioFaults | 0x0006 | -| * ActiveNetworkFaults | 0x0007 | -| * TestEventTriggersEnabled | 0x0008 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * HardwareFaultChange | 0x0000 | -| * RadioFaultChange | 0x0001 | -| * NetworkFaultChange | 0x0002 | -| * BootReason | 0x0003 | -\*----------------------------------------------------------------------------*/ - /* - * Command TestEventTrigger + * Attribute PartitionId */ -class GeneralDiagnosticsTestEventTrigger : public ClusterCommand { +class ReadThreadNetworkDiagnosticsPartitionId : public ReadAttribute { public: - GeneralDiagnosticsTestEventTrigger() - : ClusterCommand("test-event-trigger") + ReadThreadNetworkDiagnosticsPartitionId() + : ReadAttribute("partition-id") + { + } + + ~ReadThreadNetworkDiagnosticsPartitionId() { - AddArgument("EnableKey", &mRequest.enableKey); - AddArgument("EventTrigger", 0, UINT64_MAX, &mRequest.eventTrigger); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::PartitionId::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 = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRGeneralDiagnosticsClusterTestEventTriggerParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.enableKey = [NSData dataWithBytes:mRequest.enableKey.data() length:mRequest.enableKey.size()]; - params.eventTrigger = [NSNumber numberWithUnsignedLongLong:mRequest.eventTrigger]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster testEventTriggerWithParams: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 = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePartitionIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.PartitionId response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ThreadNetworkDiagnostics PartitionId read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::GeneralDiagnostics::Commands::TestEventTrigger::Type mRequest; }; -#if MTR_ENABLE_PROVISIONAL -/* - * Command TimeSnapshot - */ -class GeneralDiagnosticsTimeSnapshot : public ClusterCommand { +class SubscribeAttributeThreadNetworkDiagnosticsPartitionId : public SubscribeAttribute { public: - GeneralDiagnosticsTimeSnapshot() - : ClusterCommand("time-snapshot") + SubscribeAttributeThreadNetworkDiagnosticsPartitionId() + : SubscribeAttribute("partition-id") + { + } + + ~SubscribeAttributeThreadNetworkDiagnosticsPartitionId() { - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::GeneralDiagnostics::Commands::TimeSnapshot::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::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::PartitionId::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRGeneralDiagnosticsClusterTimeSnapshotParams 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 timeSnapshotWithParams:params completion: - ^(MTRGeneralDiagnosticsClusterTimeSnapshotResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::GeneralDiagnostics::Commands::TimeSnapshotResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::GeneralDiagnostics::Commands::TimeSnapshotResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics 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 subscribeAttributePartitionIdWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.PartitionId 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 - /* - * Attribute NetworkInterfaces + * Attribute Weighting */ -class ReadGeneralDiagnosticsNetworkInterfaces : public ReadAttribute { +class ReadThreadNetworkDiagnosticsWeighting : public ReadAttribute { public: - ReadGeneralDiagnosticsNetworkInterfaces() - : ReadAttribute("network-interfaces") + ReadThreadNetworkDiagnosticsWeighting() + : ReadAttribute("weighting") { } - ~ReadGeneralDiagnosticsNetworkInterfaces() + ~ReadThreadNetworkDiagnosticsWeighting() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::NetworkInterfaces::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::Weighting::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNetworkInterfacesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.NetworkInterfaces response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeWeightingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.Weighting response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralDiagnostics NetworkInterfaces read Error", error); + LogNSError("ThreadNetworkDiagnostics Weighting read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -28394,25 +29655,25 @@ class ReadGeneralDiagnosticsNetworkInterfaces : public ReadAttribute { } }; -class SubscribeAttributeGeneralDiagnosticsNetworkInterfaces : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsWeighting : public SubscribeAttribute { public: - SubscribeAttributeGeneralDiagnosticsNetworkInterfaces() - : SubscribeAttribute("network-interfaces") + SubscribeAttributeThreadNetworkDiagnosticsWeighting() + : SubscribeAttribute("weighting") { } - ~SubscribeAttributeGeneralDiagnosticsNetworkInterfaces() + ~SubscribeAttributeThreadNetworkDiagnosticsWeighting() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::NetworkInterfaces::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::Weighting::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -28423,10 +29684,10 @@ class SubscribeAttributeGeneralDiagnosticsNetworkInterfaces : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNetworkInterfacesWithParams:params + [cluster subscribeAttributeWeightingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.NetworkInterfaces response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.Weighting response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -28440,34 +29701,34 @@ class SubscribeAttributeGeneralDiagnosticsNetworkInterfaces : public SubscribeAt }; /* - * Attribute RebootCount + * Attribute DataVersion */ -class ReadGeneralDiagnosticsRebootCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsDataVersion : public ReadAttribute { public: - ReadGeneralDiagnosticsRebootCount() - : ReadAttribute("reboot-count") + ReadThreadNetworkDiagnosticsDataVersion() + : ReadAttribute("data-version") { } - ~ReadGeneralDiagnosticsRebootCount() + ~ReadThreadNetworkDiagnosticsDataVersion() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::RebootCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::DataVersion::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRebootCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.RebootCount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDataVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.DataVersion response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralDiagnostics RebootCount read Error", error); + LogNSError("ThreadNetworkDiagnostics DataVersion read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -28476,25 +29737,25 @@ class ReadGeneralDiagnosticsRebootCount : public ReadAttribute { } }; -class SubscribeAttributeGeneralDiagnosticsRebootCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsDataVersion : public SubscribeAttribute { public: - SubscribeAttributeGeneralDiagnosticsRebootCount() - : SubscribeAttribute("reboot-count") + SubscribeAttributeThreadNetworkDiagnosticsDataVersion() + : SubscribeAttribute("data-version") { } - ~SubscribeAttributeGeneralDiagnosticsRebootCount() + ~SubscribeAttributeThreadNetworkDiagnosticsDataVersion() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::RebootCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::DataVersion::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -28505,10 +29766,10 @@ class SubscribeAttributeGeneralDiagnosticsRebootCount : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRebootCountWithParams:params + [cluster subscribeAttributeDataVersionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.RebootCount response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.DataVersion response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -28522,34 +29783,34 @@ class SubscribeAttributeGeneralDiagnosticsRebootCount : public SubscribeAttribut }; /* - * Attribute UpTime + * Attribute StableDataVersion */ -class ReadGeneralDiagnosticsUpTime : public ReadAttribute { +class ReadThreadNetworkDiagnosticsStableDataVersion : public ReadAttribute { public: - ReadGeneralDiagnosticsUpTime() - : ReadAttribute("up-time") + ReadThreadNetworkDiagnosticsStableDataVersion() + : ReadAttribute("stable-data-version") { } - ~ReadGeneralDiagnosticsUpTime() + ~ReadThreadNetworkDiagnosticsStableDataVersion() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::UpTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::StableDataVersion::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUpTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.UpTime response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeStableDataVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.StableDataVersion response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralDiagnostics UpTime read Error", error); + LogNSError("ThreadNetworkDiagnostics StableDataVersion read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -28558,25 +29819,25 @@ class ReadGeneralDiagnosticsUpTime : public ReadAttribute { } }; -class SubscribeAttributeGeneralDiagnosticsUpTime : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsStableDataVersion : public SubscribeAttribute { public: - SubscribeAttributeGeneralDiagnosticsUpTime() - : SubscribeAttribute("up-time") + SubscribeAttributeThreadNetworkDiagnosticsStableDataVersion() + : SubscribeAttribute("stable-data-version") { } - ~SubscribeAttributeGeneralDiagnosticsUpTime() + ~SubscribeAttributeThreadNetworkDiagnosticsStableDataVersion() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::UpTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::StableDataVersion::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -28587,10 +29848,10 @@ class SubscribeAttributeGeneralDiagnosticsUpTime : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUpTimeWithParams:params + [cluster subscribeAttributeStableDataVersionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.UpTime response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.StableDataVersion response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -28604,34 +29865,34 @@ class SubscribeAttributeGeneralDiagnosticsUpTime : public SubscribeAttribute { }; /* - * Attribute TotalOperationalHours + * Attribute LeaderRouterId */ -class ReadGeneralDiagnosticsTotalOperationalHours : public ReadAttribute { +class ReadThreadNetworkDiagnosticsLeaderRouterId : public ReadAttribute { public: - ReadGeneralDiagnosticsTotalOperationalHours() - : ReadAttribute("total-operational-hours") + ReadThreadNetworkDiagnosticsLeaderRouterId() + : ReadAttribute("leader-router-id") { } - ~ReadGeneralDiagnosticsTotalOperationalHours() + ~ReadThreadNetworkDiagnosticsLeaderRouterId() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::TotalOperationalHours::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::LeaderRouterId::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTotalOperationalHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.TotalOperationalHours response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLeaderRouterIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.LeaderRouterId response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralDiagnostics TotalOperationalHours read Error", error); + LogNSError("ThreadNetworkDiagnostics LeaderRouterId read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -28640,25 +29901,25 @@ class ReadGeneralDiagnosticsTotalOperationalHours : public ReadAttribute { } }; -class SubscribeAttributeGeneralDiagnosticsTotalOperationalHours : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsLeaderRouterId : public SubscribeAttribute { public: - SubscribeAttributeGeneralDiagnosticsTotalOperationalHours() - : SubscribeAttribute("total-operational-hours") + SubscribeAttributeThreadNetworkDiagnosticsLeaderRouterId() + : SubscribeAttribute("leader-router-id") { } - ~SubscribeAttributeGeneralDiagnosticsTotalOperationalHours() + ~SubscribeAttributeThreadNetworkDiagnosticsLeaderRouterId() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::TotalOperationalHours::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::LeaderRouterId::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -28669,10 +29930,10 @@ class SubscribeAttributeGeneralDiagnosticsTotalOperationalHours : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTotalOperationalHoursWithParams:params + [cluster subscribeAttributeLeaderRouterIdWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.TotalOperationalHours response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.LeaderRouterId response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -28686,34 +29947,34 @@ class SubscribeAttributeGeneralDiagnosticsTotalOperationalHours : public Subscri }; /* - * Attribute BootReason + * Attribute DetachedRoleCount */ -class ReadGeneralDiagnosticsBootReason : public ReadAttribute { +class ReadThreadNetworkDiagnosticsDetachedRoleCount : public ReadAttribute { public: - ReadGeneralDiagnosticsBootReason() - : ReadAttribute("boot-reason") + ReadThreadNetworkDiagnosticsDetachedRoleCount() + : ReadAttribute("detached-role-count") { } - ~ReadGeneralDiagnosticsBootReason() + ~ReadThreadNetworkDiagnosticsDetachedRoleCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::BootReason::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBootReasonWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.BootReason response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDetachedRoleCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.DetachedRoleCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralDiagnostics BootReason read Error", error); + LogNSError("ThreadNetworkDiagnostics DetachedRoleCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -28722,25 +29983,25 @@ class ReadGeneralDiagnosticsBootReason : public ReadAttribute { } }; -class SubscribeAttributeGeneralDiagnosticsBootReason : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsDetachedRoleCount : public SubscribeAttribute { public: - SubscribeAttributeGeneralDiagnosticsBootReason() - : SubscribeAttribute("boot-reason") + SubscribeAttributeThreadNetworkDiagnosticsDetachedRoleCount() + : SubscribeAttribute("detached-role-count") { } - ~SubscribeAttributeGeneralDiagnosticsBootReason() + ~SubscribeAttributeThreadNetworkDiagnosticsDetachedRoleCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::BootReason::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -28751,10 +30012,10 @@ class SubscribeAttributeGeneralDiagnosticsBootReason : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBootReasonWithParams:params + [cluster subscribeAttributeDetachedRoleCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.BootReason response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.DetachedRoleCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -28768,34 +30029,34 @@ class SubscribeAttributeGeneralDiagnosticsBootReason : public SubscribeAttribute }; /* - * Attribute ActiveHardwareFaults + * Attribute ChildRoleCount */ -class ReadGeneralDiagnosticsActiveHardwareFaults : public ReadAttribute { +class ReadThreadNetworkDiagnosticsChildRoleCount : public ReadAttribute { public: - ReadGeneralDiagnosticsActiveHardwareFaults() - : ReadAttribute("active-hardware-faults") + ReadThreadNetworkDiagnosticsChildRoleCount() + : ReadAttribute("child-role-count") { } - ~ReadGeneralDiagnosticsActiveHardwareFaults() + ~ReadThreadNetworkDiagnosticsChildRoleCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::ActiveHardwareFaults::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ChildRoleCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActiveHardwareFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.ActiveHardwareFaults response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeChildRoleCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.ChildRoleCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralDiagnostics ActiveHardwareFaults read Error", error); + LogNSError("ThreadNetworkDiagnostics ChildRoleCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -28804,25 +30065,25 @@ class ReadGeneralDiagnosticsActiveHardwareFaults : public ReadAttribute { } }; -class SubscribeAttributeGeneralDiagnosticsActiveHardwareFaults : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsChildRoleCount : public SubscribeAttribute { public: - SubscribeAttributeGeneralDiagnosticsActiveHardwareFaults() - : SubscribeAttribute("active-hardware-faults") + SubscribeAttributeThreadNetworkDiagnosticsChildRoleCount() + : SubscribeAttribute("child-role-count") { } - ~SubscribeAttributeGeneralDiagnosticsActiveHardwareFaults() + ~SubscribeAttributeThreadNetworkDiagnosticsChildRoleCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::ActiveHardwareFaults::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ChildRoleCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -28833,10 +30094,10 @@ class SubscribeAttributeGeneralDiagnosticsActiveHardwareFaults : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActiveHardwareFaultsWithParams:params + [cluster subscribeAttributeChildRoleCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.ActiveHardwareFaults response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.ChildRoleCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -28850,34 +30111,34 @@ class SubscribeAttributeGeneralDiagnosticsActiveHardwareFaults : public Subscrib }; /* - * Attribute ActiveRadioFaults + * Attribute RouterRoleCount */ -class ReadGeneralDiagnosticsActiveRadioFaults : public ReadAttribute { +class ReadThreadNetworkDiagnosticsRouterRoleCount : public ReadAttribute { public: - ReadGeneralDiagnosticsActiveRadioFaults() - : ReadAttribute("active-radio-faults") + ReadThreadNetworkDiagnosticsRouterRoleCount() + : ReadAttribute("router-role-count") { } - ~ReadGeneralDiagnosticsActiveRadioFaults() + ~ReadThreadNetworkDiagnosticsRouterRoleCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::ActiveRadioFaults::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RouterRoleCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActiveRadioFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.ActiveRadioFaults response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeRouterRoleCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.RouterRoleCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralDiagnostics ActiveRadioFaults read Error", error); + LogNSError("ThreadNetworkDiagnostics RouterRoleCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -28886,25 +30147,25 @@ class ReadGeneralDiagnosticsActiveRadioFaults : public ReadAttribute { } }; -class SubscribeAttributeGeneralDiagnosticsActiveRadioFaults : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsRouterRoleCount : public SubscribeAttribute { public: - SubscribeAttributeGeneralDiagnosticsActiveRadioFaults() - : SubscribeAttribute("active-radio-faults") + SubscribeAttributeThreadNetworkDiagnosticsRouterRoleCount() + : SubscribeAttribute("router-role-count") { } - ~SubscribeAttributeGeneralDiagnosticsActiveRadioFaults() + ~SubscribeAttributeThreadNetworkDiagnosticsRouterRoleCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::ActiveRadioFaults::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RouterRoleCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -28915,10 +30176,10 @@ class SubscribeAttributeGeneralDiagnosticsActiveRadioFaults : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActiveRadioFaultsWithParams:params + [cluster subscribeAttributeRouterRoleCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.ActiveRadioFaults response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.RouterRoleCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -28932,34 +30193,34 @@ class SubscribeAttributeGeneralDiagnosticsActiveRadioFaults : public SubscribeAt }; /* - * Attribute ActiveNetworkFaults + * Attribute LeaderRoleCount */ -class ReadGeneralDiagnosticsActiveNetworkFaults : public ReadAttribute { +class ReadThreadNetworkDiagnosticsLeaderRoleCount : public ReadAttribute { public: - ReadGeneralDiagnosticsActiveNetworkFaults() - : ReadAttribute("active-network-faults") + ReadThreadNetworkDiagnosticsLeaderRoleCount() + : ReadAttribute("leader-role-count") { } - ~ReadGeneralDiagnosticsActiveNetworkFaults() + ~ReadThreadNetworkDiagnosticsLeaderRoleCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::ActiveNetworkFaults::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActiveNetworkFaultsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.ActiveNetworkFaults response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLeaderRoleCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.LeaderRoleCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralDiagnostics ActiveNetworkFaults read Error", error); + LogNSError("ThreadNetworkDiagnostics LeaderRoleCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -28968,25 +30229,25 @@ class ReadGeneralDiagnosticsActiveNetworkFaults : public ReadAttribute { } }; -class SubscribeAttributeGeneralDiagnosticsActiveNetworkFaults : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsLeaderRoleCount : public SubscribeAttribute { public: - SubscribeAttributeGeneralDiagnosticsActiveNetworkFaults() - : SubscribeAttribute("active-network-faults") + SubscribeAttributeThreadNetworkDiagnosticsLeaderRoleCount() + : SubscribeAttribute("leader-role-count") { } - ~SubscribeAttributeGeneralDiagnosticsActiveNetworkFaults() + ~SubscribeAttributeThreadNetworkDiagnosticsLeaderRoleCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::ActiveNetworkFaults::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -28997,10 +30258,10 @@ class SubscribeAttributeGeneralDiagnosticsActiveNetworkFaults : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActiveNetworkFaultsWithParams:params + [cluster subscribeAttributeLeaderRoleCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.ActiveNetworkFaults response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.LeaderRoleCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -29014,34 +30275,34 @@ class SubscribeAttributeGeneralDiagnosticsActiveNetworkFaults : public Subscribe }; /* - * Attribute TestEventTriggersEnabled + * Attribute AttachAttemptCount */ -class ReadGeneralDiagnosticsTestEventTriggersEnabled : public ReadAttribute { +class ReadThreadNetworkDiagnosticsAttachAttemptCount : public ReadAttribute { public: - ReadGeneralDiagnosticsTestEventTriggersEnabled() - : ReadAttribute("test-event-triggers-enabled") + ReadThreadNetworkDiagnosticsAttachAttemptCount() + : ReadAttribute("attach-attempt-count") { } - ~ReadGeneralDiagnosticsTestEventTriggersEnabled() + ~ReadThreadNetworkDiagnosticsAttachAttemptCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::TestEventTriggersEnabled::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTestEventTriggersEnabledWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.TestEventTriggersEnabled response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttachAttemptCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.AttachAttemptCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralDiagnostics TestEventTriggersEnabled read Error", error); + LogNSError("ThreadNetworkDiagnostics AttachAttemptCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -29050,25 +30311,25 @@ class ReadGeneralDiagnosticsTestEventTriggersEnabled : public ReadAttribute { } }; -class SubscribeAttributeGeneralDiagnosticsTestEventTriggersEnabled : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsAttachAttemptCount : public SubscribeAttribute { public: - SubscribeAttributeGeneralDiagnosticsTestEventTriggersEnabled() - : SubscribeAttribute("test-event-triggers-enabled") + SubscribeAttributeThreadNetworkDiagnosticsAttachAttemptCount() + : SubscribeAttribute("attach-attempt-count") { } - ~SubscribeAttributeGeneralDiagnosticsTestEventTriggersEnabled() + ~SubscribeAttributeThreadNetworkDiagnosticsAttachAttemptCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::TestEventTriggersEnabled::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -29079,10 +30340,10 @@ class SubscribeAttributeGeneralDiagnosticsTestEventTriggersEnabled : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTestEventTriggersEnabledWithParams:params + [cluster subscribeAttributeAttachAttemptCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.TestEventTriggersEnabled response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.AttachAttemptCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -29096,34 +30357,34 @@ class SubscribeAttributeGeneralDiagnosticsTestEventTriggersEnabled : public Subs }; /* - * Attribute GeneratedCommandList + * Attribute PartitionIdChangeCount */ -class ReadGeneralDiagnosticsGeneratedCommandList : public ReadAttribute { +class ReadThreadNetworkDiagnosticsPartitionIdChangeCount : public ReadAttribute { public: - ReadGeneralDiagnosticsGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadThreadNetworkDiagnosticsPartitionIdChangeCount() + : ReadAttribute("partition-id-change-count") { } - ~ReadGeneralDiagnosticsGeneratedCommandList() + ~ReadThreadNetworkDiagnosticsPartitionIdChangeCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePartitionIdChangeCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.PartitionIdChangeCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralDiagnostics GeneratedCommandList read Error", error); + LogNSError("ThreadNetworkDiagnostics PartitionIdChangeCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -29132,25 +30393,25 @@ class ReadGeneralDiagnosticsGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeGeneralDiagnosticsGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsPartitionIdChangeCount : public SubscribeAttribute { public: - SubscribeAttributeGeneralDiagnosticsGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeThreadNetworkDiagnosticsPartitionIdChangeCount() + : SubscribeAttribute("partition-id-change-count") { } - ~SubscribeAttributeGeneralDiagnosticsGeneratedCommandList() + ~SubscribeAttributeThreadNetworkDiagnosticsPartitionIdChangeCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -29161,10 +30422,10 @@ class SubscribeAttributeGeneralDiagnosticsGeneratedCommandList : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributePartitionIdChangeCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.PartitionIdChangeCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -29178,34 +30439,34 @@ class SubscribeAttributeGeneralDiagnosticsGeneratedCommandList : public Subscrib }; /* - * Attribute AcceptedCommandList + * Attribute BetterPartitionAttachAttemptCount */ -class ReadGeneralDiagnosticsAcceptedCommandList : public ReadAttribute { +class ReadThreadNetworkDiagnosticsBetterPartitionAttachAttemptCount : public ReadAttribute { public: - ReadGeneralDiagnosticsAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadThreadNetworkDiagnosticsBetterPartitionAttachAttemptCount() + : ReadAttribute("better-partition-attach-attempt-count") { } - ~ReadGeneralDiagnosticsAcceptedCommandList() + ~ReadThreadNetworkDiagnosticsBetterPartitionAttachAttemptCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBetterPartitionAttachAttemptCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.BetterPartitionAttachAttemptCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralDiagnostics AcceptedCommandList read Error", error); + LogNSError("ThreadNetworkDiagnostics BetterPartitionAttachAttemptCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -29214,25 +30475,25 @@ class ReadGeneralDiagnosticsAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeGeneralDiagnosticsAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsBetterPartitionAttachAttemptCount : public SubscribeAttribute { public: - SubscribeAttributeGeneralDiagnosticsAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeThreadNetworkDiagnosticsBetterPartitionAttachAttemptCount() + : SubscribeAttribute("better-partition-attach-attempt-count") { } - ~SubscribeAttributeGeneralDiagnosticsAcceptedCommandList() + ~SubscribeAttributeThreadNetworkDiagnosticsBetterPartitionAttachAttemptCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -29243,10 +30504,10 @@ class SubscribeAttributeGeneralDiagnosticsAcceptedCommandList : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeBetterPartitionAttachAttemptCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.BetterPartitionAttachAttemptCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -29259,37 +30520,35 @@ class SubscribeAttributeGeneralDiagnosticsAcceptedCommandList : public Subscribe } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute ParentChangeCount */ -class ReadGeneralDiagnosticsEventList : public ReadAttribute { +class ReadThreadNetworkDiagnosticsParentChangeCount : public ReadAttribute { public: - ReadGeneralDiagnosticsEventList() - : ReadAttribute("event-list") + ReadThreadNetworkDiagnosticsParentChangeCount() + : ReadAttribute("parent-change-count") { } - ~ReadGeneralDiagnosticsEventList() + ~ReadThreadNetworkDiagnosticsParentChangeCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ParentChangeCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeParentChangeCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.ParentChangeCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralDiagnostics EventList read Error", error); + LogNSError("ThreadNetworkDiagnostics ParentChangeCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -29298,25 +30557,25 @@ class ReadGeneralDiagnosticsEventList : public ReadAttribute { } }; -class SubscribeAttributeGeneralDiagnosticsEventList : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsParentChangeCount : public SubscribeAttribute { public: - SubscribeAttributeGeneralDiagnosticsEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeThreadNetworkDiagnosticsParentChangeCount() + : SubscribeAttribute("parent-change-count") { } - ~SubscribeAttributeGeneralDiagnosticsEventList() + ~SubscribeAttributeThreadNetworkDiagnosticsParentChangeCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ParentChangeCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -29327,10 +30586,10 @@ class SubscribeAttributeGeneralDiagnosticsEventList : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeParentChangeCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.ParentChangeCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -29343,37 +30602,35 @@ class SubscribeAttributeGeneralDiagnosticsEventList : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute TxTotalCount */ -class ReadGeneralDiagnosticsAttributeList : public ReadAttribute { +class ReadThreadNetworkDiagnosticsTxTotalCount : public ReadAttribute { public: - ReadGeneralDiagnosticsAttributeList() - : ReadAttribute("attribute-list") + ReadThreadNetworkDiagnosticsTxTotalCount() + : ReadAttribute("tx-total-count") { } - ~ReadGeneralDiagnosticsAttributeList() + ~ReadThreadNetworkDiagnosticsTxTotalCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxTotalCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTxTotalCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.TxTotalCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralDiagnostics AttributeList read Error", error); + LogNSError("ThreadNetworkDiagnostics TxTotalCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -29382,25 +30639,25 @@ class ReadGeneralDiagnosticsAttributeList : public ReadAttribute { } }; -class SubscribeAttributeGeneralDiagnosticsAttributeList : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsTxTotalCount : public SubscribeAttribute { public: - SubscribeAttributeGeneralDiagnosticsAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeThreadNetworkDiagnosticsTxTotalCount() + : SubscribeAttribute("tx-total-count") { } - ~SubscribeAttributeGeneralDiagnosticsAttributeList() + ~SubscribeAttributeThreadNetworkDiagnosticsTxTotalCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxTotalCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -29411,10 +30668,10 @@ class SubscribeAttributeGeneralDiagnosticsAttributeList : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeTxTotalCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.TxTotalCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -29428,34 +30685,34 @@ class SubscribeAttributeGeneralDiagnosticsAttributeList : public SubscribeAttrib }; /* - * Attribute FeatureMap + * Attribute TxUnicastCount */ -class ReadGeneralDiagnosticsFeatureMap : public ReadAttribute { +class ReadThreadNetworkDiagnosticsTxUnicastCount : public ReadAttribute { public: - ReadGeneralDiagnosticsFeatureMap() - : ReadAttribute("feature-map") + ReadThreadNetworkDiagnosticsTxUnicastCount() + : ReadAttribute("tx-unicast-count") { } - ~ReadGeneralDiagnosticsFeatureMap() + ~ReadThreadNetworkDiagnosticsTxUnicastCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxUnicastCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTxUnicastCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.TxUnicastCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralDiagnostics FeatureMap read Error", error); + LogNSError("ThreadNetworkDiagnostics TxUnicastCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -29464,25 +30721,25 @@ class ReadGeneralDiagnosticsFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeGeneralDiagnosticsFeatureMap : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsTxUnicastCount : public SubscribeAttribute { public: - SubscribeAttributeGeneralDiagnosticsFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeThreadNetworkDiagnosticsTxUnicastCount() + : SubscribeAttribute("tx-unicast-count") { } - ~SubscribeAttributeGeneralDiagnosticsFeatureMap() + ~SubscribeAttributeThreadNetworkDiagnosticsTxUnicastCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxUnicastCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -29493,10 +30750,10 @@ class SubscribeAttributeGeneralDiagnosticsFeatureMap : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeTxUnicastCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.FeatureMap response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.TxUnicastCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -29510,34 +30767,34 @@ class SubscribeAttributeGeneralDiagnosticsFeatureMap : public SubscribeAttribute }; /* - * Attribute ClusterRevision + * Attribute TxBroadcastCount */ -class ReadGeneralDiagnosticsClusterRevision : public ReadAttribute { +class ReadThreadNetworkDiagnosticsTxBroadcastCount : public ReadAttribute { public: - ReadGeneralDiagnosticsClusterRevision() - : ReadAttribute("cluster-revision") + ReadThreadNetworkDiagnosticsTxBroadcastCount() + : ReadAttribute("tx-broadcast-count") { } - ~ReadGeneralDiagnosticsClusterRevision() + ~ReadThreadNetworkDiagnosticsTxBroadcastCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTxBroadcastCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.TxBroadcastCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("GeneralDiagnostics ClusterRevision read Error", error); + LogNSError("ThreadNetworkDiagnostics TxBroadcastCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -29546,25 +30803,25 @@ class ReadGeneralDiagnosticsClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeGeneralDiagnosticsClusterRevision : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsTxBroadcastCount : public SubscribeAttribute { public: - SubscribeAttributeGeneralDiagnosticsClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeThreadNetworkDiagnosticsTxBroadcastCount() + : SubscribeAttribute("tx-broadcast-count") { } - ~SubscribeAttributeGeneralDiagnosticsClusterRevision() + ~SubscribeAttributeThreadNetworkDiagnosticsTxBroadcastCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::GeneralDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::GeneralDiagnostics::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterGeneralDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -29575,10 +30832,10 @@ class SubscribeAttributeGeneralDiagnosticsClusterRevision : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeTxBroadcastCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GeneralDiagnostics.ClusterRevision response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.TxBroadcastCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -29591,101 +30848,117 @@ class SubscribeAttributeGeneralDiagnosticsClusterRevision : public SubscribeAttr } }; -/*----------------------------------------------------------------------------*\ -| Cluster SoftwareDiagnostics | 0x0034 | -|------------------------------------------------------------------------------| -| Commands: | | -| * ResetWatermarks | 0x00 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * ThreadMetrics | 0x0000 | -| * CurrentHeapFree | 0x0001 | -| * CurrentHeapUsed | 0x0002 | -| * CurrentHeapHighWatermark | 0x0003 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * SoftwareFault | 0x0000 | -\*----------------------------------------------------------------------------*/ - /* - * Command ResetWatermarks + * Attribute TxAckRequestedCount */ -class SoftwareDiagnosticsResetWatermarks : public ClusterCommand { +class ReadThreadNetworkDiagnosticsTxAckRequestedCount : public ReadAttribute { public: - SoftwareDiagnosticsResetWatermarks() - : ClusterCommand("reset-watermarks") + ReadThreadNetworkDiagnosticsTxAckRequestedCount() + : ReadAttribute("tx-ack-requested-count") + { + } + + ~ReadThreadNetworkDiagnosticsTxAckRequestedCount() { - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::SoftwareDiagnostics::Commands::ResetWatermarks::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::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 = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSoftwareDiagnosticsClusterResetWatermarksParams 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 resetWatermarksWithParams: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 = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTxAckRequestedCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.TxAckRequestedCount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ThreadNetworkDiagnostics TxAckRequestedCount read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } +}; -private: +class SubscribeAttributeThreadNetworkDiagnosticsTxAckRequestedCount : public SubscribeAttribute { +public: + SubscribeAttributeThreadNetworkDiagnosticsTxAckRequestedCount() + : SubscribeAttribute("tx-ack-requested-count") + { + } + + ~SubscribeAttributeThreadNetworkDiagnosticsTxAckRequestedCount() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics 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 subscribeAttributeTxAckRequestedCountWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.TxAckRequestedCount 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 ThreadMetrics + * Attribute TxAckedCount */ -class ReadSoftwareDiagnosticsThreadMetrics : public ReadAttribute { +class ReadThreadNetworkDiagnosticsTxAckedCount : public ReadAttribute { public: - ReadSoftwareDiagnosticsThreadMetrics() - : ReadAttribute("thread-metrics") + ReadThreadNetworkDiagnosticsTxAckedCount() + : ReadAttribute("tx-acked-count") { } - ~ReadSoftwareDiagnosticsThreadMetrics() + ~ReadThreadNetworkDiagnosticsTxAckedCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::ThreadMetrics::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxAckedCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeThreadMetricsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SoftwareDiagnostics.ThreadMetrics response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTxAckedCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.TxAckedCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SoftwareDiagnostics ThreadMetrics read Error", error); + LogNSError("ThreadNetworkDiagnostics TxAckedCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -29694,25 +30967,25 @@ class ReadSoftwareDiagnosticsThreadMetrics : public ReadAttribute { } }; -class SubscribeAttributeSoftwareDiagnosticsThreadMetrics : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsTxAckedCount : public SubscribeAttribute { public: - SubscribeAttributeSoftwareDiagnosticsThreadMetrics() - : SubscribeAttribute("thread-metrics") + SubscribeAttributeThreadNetworkDiagnosticsTxAckedCount() + : SubscribeAttribute("tx-acked-count") { } - ~SubscribeAttributeSoftwareDiagnosticsThreadMetrics() + ~SubscribeAttributeThreadNetworkDiagnosticsTxAckedCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::ThreadMetrics::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxAckedCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -29723,10 +30996,10 @@ class SubscribeAttributeSoftwareDiagnosticsThreadMetrics : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeThreadMetricsWithParams:params + [cluster subscribeAttributeTxAckedCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SoftwareDiagnostics.ThreadMetrics response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.TxAckedCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -29740,34 +31013,34 @@ class SubscribeAttributeSoftwareDiagnosticsThreadMetrics : public SubscribeAttri }; /* - * Attribute CurrentHeapFree + * Attribute TxNoAckRequestedCount */ -class ReadSoftwareDiagnosticsCurrentHeapFree : public ReadAttribute { +class ReadThreadNetworkDiagnosticsTxNoAckRequestedCount : public ReadAttribute { public: - ReadSoftwareDiagnosticsCurrentHeapFree() - : ReadAttribute("current-heap-free") + ReadThreadNetworkDiagnosticsTxNoAckRequestedCount() + : ReadAttribute("tx-no-ack-requested-count") { } - ~ReadSoftwareDiagnosticsCurrentHeapFree() + ~ReadThreadNetworkDiagnosticsTxNoAckRequestedCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::CurrentHeapFree::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentHeapFreeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SoftwareDiagnostics.CurrentHeapFree response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTxNoAckRequestedCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.TxNoAckRequestedCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SoftwareDiagnostics CurrentHeapFree read Error", error); + LogNSError("ThreadNetworkDiagnostics TxNoAckRequestedCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -29776,25 +31049,25 @@ class ReadSoftwareDiagnosticsCurrentHeapFree : public ReadAttribute { } }; -class SubscribeAttributeSoftwareDiagnosticsCurrentHeapFree : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsTxNoAckRequestedCount : public SubscribeAttribute { public: - SubscribeAttributeSoftwareDiagnosticsCurrentHeapFree() - : SubscribeAttribute("current-heap-free") + SubscribeAttributeThreadNetworkDiagnosticsTxNoAckRequestedCount() + : SubscribeAttribute("tx-no-ack-requested-count") { } - ~SubscribeAttributeSoftwareDiagnosticsCurrentHeapFree() + ~SubscribeAttributeThreadNetworkDiagnosticsTxNoAckRequestedCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::CurrentHeapFree::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -29805,10 +31078,10 @@ class SubscribeAttributeSoftwareDiagnosticsCurrentHeapFree : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentHeapFreeWithParams:params + [cluster subscribeAttributeTxNoAckRequestedCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SoftwareDiagnostics.CurrentHeapFree response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.TxNoAckRequestedCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -29822,34 +31095,34 @@ class SubscribeAttributeSoftwareDiagnosticsCurrentHeapFree : public SubscribeAtt }; /* - * Attribute CurrentHeapUsed + * Attribute TxDataCount */ -class ReadSoftwareDiagnosticsCurrentHeapUsed : public ReadAttribute { +class ReadThreadNetworkDiagnosticsTxDataCount : public ReadAttribute { public: - ReadSoftwareDiagnosticsCurrentHeapUsed() - : ReadAttribute("current-heap-used") + ReadThreadNetworkDiagnosticsTxDataCount() + : ReadAttribute("tx-data-count") { } - ~ReadSoftwareDiagnosticsCurrentHeapUsed() + ~ReadThreadNetworkDiagnosticsTxDataCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::CurrentHeapUsed::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxDataCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentHeapUsedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SoftwareDiagnostics.CurrentHeapUsed response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTxDataCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.TxDataCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SoftwareDiagnostics CurrentHeapUsed read Error", error); + LogNSError("ThreadNetworkDiagnostics TxDataCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -29858,25 +31131,25 @@ class ReadSoftwareDiagnosticsCurrentHeapUsed : public ReadAttribute { } }; -class SubscribeAttributeSoftwareDiagnosticsCurrentHeapUsed : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsTxDataCount : public SubscribeAttribute { public: - SubscribeAttributeSoftwareDiagnosticsCurrentHeapUsed() - : SubscribeAttribute("current-heap-used") + SubscribeAttributeThreadNetworkDiagnosticsTxDataCount() + : SubscribeAttribute("tx-data-count") { } - ~SubscribeAttributeSoftwareDiagnosticsCurrentHeapUsed() + ~SubscribeAttributeThreadNetworkDiagnosticsTxDataCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::CurrentHeapUsed::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxDataCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -29887,10 +31160,10 @@ class SubscribeAttributeSoftwareDiagnosticsCurrentHeapUsed : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentHeapUsedWithParams:params + [cluster subscribeAttributeTxDataCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SoftwareDiagnostics.CurrentHeapUsed response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.TxDataCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -29904,34 +31177,34 @@ class SubscribeAttributeSoftwareDiagnosticsCurrentHeapUsed : public SubscribeAtt }; /* - * Attribute CurrentHeapHighWatermark + * Attribute TxDataPollCount */ -class ReadSoftwareDiagnosticsCurrentHeapHighWatermark : public ReadAttribute { +class ReadThreadNetworkDiagnosticsTxDataPollCount : public ReadAttribute { public: - ReadSoftwareDiagnosticsCurrentHeapHighWatermark() - : ReadAttribute("current-heap-high-watermark") + ReadThreadNetworkDiagnosticsTxDataPollCount() + : ReadAttribute("tx-data-poll-count") { } - ~ReadSoftwareDiagnosticsCurrentHeapHighWatermark() + ~ReadThreadNetworkDiagnosticsTxDataPollCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxDataPollCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentHeapHighWatermarkWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SoftwareDiagnostics.CurrentHeapHighWatermark response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTxDataPollCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.TxDataPollCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SoftwareDiagnostics CurrentHeapHighWatermark read Error", error); + LogNSError("ThreadNetworkDiagnostics TxDataPollCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -29940,25 +31213,25 @@ class ReadSoftwareDiagnosticsCurrentHeapHighWatermark : public ReadAttribute { } }; -class SubscribeAttributeSoftwareDiagnosticsCurrentHeapHighWatermark : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsTxDataPollCount : public SubscribeAttribute { public: - SubscribeAttributeSoftwareDiagnosticsCurrentHeapHighWatermark() - : SubscribeAttribute("current-heap-high-watermark") + SubscribeAttributeThreadNetworkDiagnosticsTxDataPollCount() + : SubscribeAttribute("tx-data-poll-count") { } - ~SubscribeAttributeSoftwareDiagnosticsCurrentHeapHighWatermark() + ~SubscribeAttributeThreadNetworkDiagnosticsTxDataPollCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxDataPollCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -29969,10 +31242,10 @@ class SubscribeAttributeSoftwareDiagnosticsCurrentHeapHighWatermark : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentHeapHighWatermarkWithParams:params + [cluster subscribeAttributeTxDataPollCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SoftwareDiagnostics.CurrentHeapHighWatermark response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.TxDataPollCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -29986,34 +31259,34 @@ class SubscribeAttributeSoftwareDiagnosticsCurrentHeapHighWatermark : public Sub }; /* - * Attribute GeneratedCommandList + * Attribute TxBeaconCount */ -class ReadSoftwareDiagnosticsGeneratedCommandList : public ReadAttribute { +class ReadThreadNetworkDiagnosticsTxBeaconCount : public ReadAttribute { public: - ReadSoftwareDiagnosticsGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadThreadNetworkDiagnosticsTxBeaconCount() + : ReadAttribute("tx-beacon-count") { } - ~ReadSoftwareDiagnosticsGeneratedCommandList() + ~ReadThreadNetworkDiagnosticsTxBeaconCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxBeaconCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SoftwareDiagnostics.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTxBeaconCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.TxBeaconCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SoftwareDiagnostics GeneratedCommandList read Error", error); + LogNSError("ThreadNetworkDiagnostics TxBeaconCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -30022,25 +31295,25 @@ class ReadSoftwareDiagnosticsGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeSoftwareDiagnosticsGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsTxBeaconCount : public SubscribeAttribute { public: - SubscribeAttributeSoftwareDiagnosticsGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeThreadNetworkDiagnosticsTxBeaconCount() + : SubscribeAttribute("tx-beacon-count") { } - ~SubscribeAttributeSoftwareDiagnosticsGeneratedCommandList() + ~SubscribeAttributeThreadNetworkDiagnosticsTxBeaconCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxBeaconCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -30051,10 +31324,10 @@ class SubscribeAttributeSoftwareDiagnosticsGeneratedCommandList : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeTxBeaconCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SoftwareDiagnostics.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.TxBeaconCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -30068,34 +31341,34 @@ class SubscribeAttributeSoftwareDiagnosticsGeneratedCommandList : public Subscri }; /* - * Attribute AcceptedCommandList + * Attribute TxBeaconRequestCount */ -class ReadSoftwareDiagnosticsAcceptedCommandList : public ReadAttribute { +class ReadThreadNetworkDiagnosticsTxBeaconRequestCount : public ReadAttribute { public: - ReadSoftwareDiagnosticsAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadThreadNetworkDiagnosticsTxBeaconRequestCount() + : ReadAttribute("tx-beacon-request-count") { } - ~ReadSoftwareDiagnosticsAcceptedCommandList() + ~ReadThreadNetworkDiagnosticsTxBeaconRequestCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SoftwareDiagnostics.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTxBeaconRequestCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.TxBeaconRequestCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SoftwareDiagnostics AcceptedCommandList read Error", error); + LogNSError("ThreadNetworkDiagnostics TxBeaconRequestCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -30104,25 +31377,25 @@ class ReadSoftwareDiagnosticsAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeSoftwareDiagnosticsAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsTxBeaconRequestCount : public SubscribeAttribute { public: - SubscribeAttributeSoftwareDiagnosticsAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeThreadNetworkDiagnosticsTxBeaconRequestCount() + : SubscribeAttribute("tx-beacon-request-count") { } - ~SubscribeAttributeSoftwareDiagnosticsAcceptedCommandList() + ~SubscribeAttributeThreadNetworkDiagnosticsTxBeaconRequestCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -30133,10 +31406,10 @@ class SubscribeAttributeSoftwareDiagnosticsAcceptedCommandList : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeTxBeaconRequestCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SoftwareDiagnostics.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.TxBeaconRequestCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -30149,37 +31422,35 @@ class SubscribeAttributeSoftwareDiagnosticsAcceptedCommandList : public Subscrib } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute TxOtherCount */ -class ReadSoftwareDiagnosticsEventList : public ReadAttribute { +class ReadThreadNetworkDiagnosticsTxOtherCount : public ReadAttribute { public: - ReadSoftwareDiagnosticsEventList() - : ReadAttribute("event-list") + ReadThreadNetworkDiagnosticsTxOtherCount() + : ReadAttribute("tx-other-count") { } - ~ReadSoftwareDiagnosticsEventList() + ~ReadThreadNetworkDiagnosticsTxOtherCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxOtherCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SoftwareDiagnostics.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTxOtherCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.TxOtherCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SoftwareDiagnostics EventList read Error", error); + LogNSError("ThreadNetworkDiagnostics TxOtherCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -30188,25 +31459,25 @@ class ReadSoftwareDiagnosticsEventList : public ReadAttribute { } }; -class SubscribeAttributeSoftwareDiagnosticsEventList : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsTxOtherCount : public SubscribeAttribute { public: - SubscribeAttributeSoftwareDiagnosticsEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeThreadNetworkDiagnosticsTxOtherCount() + : SubscribeAttribute("tx-other-count") { } - ~SubscribeAttributeSoftwareDiagnosticsEventList() + ~SubscribeAttributeThreadNetworkDiagnosticsTxOtherCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxOtherCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -30217,10 +31488,10 @@ class SubscribeAttributeSoftwareDiagnosticsEventList : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeTxOtherCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SoftwareDiagnostics.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.TxOtherCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -30233,37 +31504,35 @@ class SubscribeAttributeSoftwareDiagnosticsEventList : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute TxRetryCount */ -class ReadSoftwareDiagnosticsAttributeList : public ReadAttribute { +class ReadThreadNetworkDiagnosticsTxRetryCount : public ReadAttribute { public: - ReadSoftwareDiagnosticsAttributeList() - : ReadAttribute("attribute-list") + ReadThreadNetworkDiagnosticsTxRetryCount() + : ReadAttribute("tx-retry-count") { } - ~ReadSoftwareDiagnosticsAttributeList() + ~ReadThreadNetworkDiagnosticsTxRetryCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxRetryCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SoftwareDiagnostics.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTxRetryCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.TxRetryCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SoftwareDiagnostics AttributeList read Error", error); + LogNSError("ThreadNetworkDiagnostics TxRetryCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -30272,25 +31541,25 @@ class ReadSoftwareDiagnosticsAttributeList : public ReadAttribute { } }; -class SubscribeAttributeSoftwareDiagnosticsAttributeList : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsTxRetryCount : public SubscribeAttribute { public: - SubscribeAttributeSoftwareDiagnosticsAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeThreadNetworkDiagnosticsTxRetryCount() + : SubscribeAttribute("tx-retry-count") { } - ~SubscribeAttributeSoftwareDiagnosticsAttributeList() + ~SubscribeAttributeThreadNetworkDiagnosticsTxRetryCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxRetryCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -30301,10 +31570,10 @@ class SubscribeAttributeSoftwareDiagnosticsAttributeList : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeTxRetryCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SoftwareDiagnostics.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.TxRetryCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -30318,34 +31587,34 @@ class SubscribeAttributeSoftwareDiagnosticsAttributeList : public SubscribeAttri }; /* - * Attribute FeatureMap + * Attribute TxDirectMaxRetryExpiryCount */ -class ReadSoftwareDiagnosticsFeatureMap : public ReadAttribute { +class ReadThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCount : public ReadAttribute { public: - ReadSoftwareDiagnosticsFeatureMap() - : ReadAttribute("feature-map") + ReadThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCount() + : ReadAttribute("tx-direct-max-retry-expiry-count") { } - ~ReadSoftwareDiagnosticsFeatureMap() + ~ReadThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SoftwareDiagnostics.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTxDirectMaxRetryExpiryCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.TxDirectMaxRetryExpiryCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SoftwareDiagnostics FeatureMap read Error", error); + LogNSError("ThreadNetworkDiagnostics TxDirectMaxRetryExpiryCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -30354,25 +31623,25 @@ class ReadSoftwareDiagnosticsFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeSoftwareDiagnosticsFeatureMap : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCount : public SubscribeAttribute { public: - SubscribeAttributeSoftwareDiagnosticsFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCount() + : SubscribeAttribute("tx-direct-max-retry-expiry-count") { } - ~SubscribeAttributeSoftwareDiagnosticsFeatureMap() + ~SubscribeAttributeThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -30383,10 +31652,10 @@ class SubscribeAttributeSoftwareDiagnosticsFeatureMap : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeTxDirectMaxRetryExpiryCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SoftwareDiagnostics.FeatureMap response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.TxDirectMaxRetryExpiryCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -30400,34 +31669,34 @@ class SubscribeAttributeSoftwareDiagnosticsFeatureMap : public SubscribeAttribut }; /* - * Attribute ClusterRevision + * Attribute TxIndirectMaxRetryExpiryCount */ -class ReadSoftwareDiagnosticsClusterRevision : public ReadAttribute { +class ReadThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCount : public ReadAttribute { public: - ReadSoftwareDiagnosticsClusterRevision() - : ReadAttribute("cluster-revision") + ReadThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCount() + : ReadAttribute("tx-indirect-max-retry-expiry-count") { } - ~ReadSoftwareDiagnosticsClusterRevision() + ~ReadThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SoftwareDiagnostics.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTxIndirectMaxRetryExpiryCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.TxIndirectMaxRetryExpiryCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SoftwareDiagnostics ClusterRevision read Error", error); + LogNSError("ThreadNetworkDiagnostics TxIndirectMaxRetryExpiryCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -30436,25 +31705,25 @@ class ReadSoftwareDiagnosticsClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeSoftwareDiagnosticsClusterRevision : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCount : public SubscribeAttribute { public: - SubscribeAttributeSoftwareDiagnosticsClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCount() + : SubscribeAttribute("tx-indirect-max-retry-expiry-count") { } - ~SubscribeAttributeSoftwareDiagnosticsClusterRevision() + ~SubscribeAttributeThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::SoftwareDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::SoftwareDiagnostics::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterSoftwareDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -30465,10 +31734,10 @@ class SubscribeAttributeSoftwareDiagnosticsClusterRevision : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeTxIndirectMaxRetryExpiryCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SoftwareDiagnostics.ClusterRevision response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.TxIndirectMaxRetryExpiryCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -30481,161 +31750,35 @@ class SubscribeAttributeSoftwareDiagnosticsClusterRevision : public SubscribeAtt } }; -/*----------------------------------------------------------------------------*\ -| Cluster ThreadNetworkDiagnostics | 0x0035 | -|------------------------------------------------------------------------------| -| Commands: | | -| * ResetCounts | 0x00 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * Channel | 0x0000 | -| * RoutingRole | 0x0001 | -| * NetworkName | 0x0002 | -| * PanId | 0x0003 | -| * ExtendedPanId | 0x0004 | -| * MeshLocalPrefix | 0x0005 | -| * OverrunCount | 0x0006 | -| * NeighborTable | 0x0007 | -| * RouteTable | 0x0008 | -| * PartitionId | 0x0009 | -| * Weighting | 0x000A | -| * DataVersion | 0x000B | -| * StableDataVersion | 0x000C | -| * LeaderRouterId | 0x000D | -| * DetachedRoleCount | 0x000E | -| * ChildRoleCount | 0x000F | -| * RouterRoleCount | 0x0010 | -| * LeaderRoleCount | 0x0011 | -| * AttachAttemptCount | 0x0012 | -| * PartitionIdChangeCount | 0x0013 | -| * BetterPartitionAttachAttemptCount | 0x0014 | -| * ParentChangeCount | 0x0015 | -| * TxTotalCount | 0x0016 | -| * TxUnicastCount | 0x0017 | -| * TxBroadcastCount | 0x0018 | -| * TxAckRequestedCount | 0x0019 | -| * TxAckedCount | 0x001A | -| * TxNoAckRequestedCount | 0x001B | -| * TxDataCount | 0x001C | -| * TxDataPollCount | 0x001D | -| * TxBeaconCount | 0x001E | -| * TxBeaconRequestCount | 0x001F | -| * TxOtherCount | 0x0020 | -| * TxRetryCount | 0x0021 | -| * TxDirectMaxRetryExpiryCount | 0x0022 | -| * TxIndirectMaxRetryExpiryCount | 0x0023 | -| * TxErrCcaCount | 0x0024 | -| * TxErrAbortCount | 0x0025 | -| * TxErrBusyChannelCount | 0x0026 | -| * RxTotalCount | 0x0027 | -| * RxUnicastCount | 0x0028 | -| * RxBroadcastCount | 0x0029 | -| * RxDataCount | 0x002A | -| * RxDataPollCount | 0x002B | -| * RxBeaconCount | 0x002C | -| * RxBeaconRequestCount | 0x002D | -| * RxOtherCount | 0x002E | -| * RxAddressFilteredCount | 0x002F | -| * RxDestAddrFilteredCount | 0x0030 | -| * RxDuplicatedCount | 0x0031 | -| * RxErrNoFrameCount | 0x0032 | -| * RxErrUnknownNeighborCount | 0x0033 | -| * RxErrInvalidSrcAddrCount | 0x0034 | -| * RxErrSecCount | 0x0035 | -| * RxErrFcsCount | 0x0036 | -| * RxErrOtherCount | 0x0037 | -| * ActiveTimestamp | 0x0038 | -| * PendingTimestamp | 0x0039 | -| * Delay | 0x003A | -| * SecurityPolicy | 0x003B | -| * ChannelPage0Mask | 0x003C | -| * OperationalDatasetComponents | 0x003D | -| * ActiveNetworkFaultsList | 0x003E | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * ConnectionStatus | 0x0000 | -| * NetworkFaultChange | 0x0001 | -\*----------------------------------------------------------------------------*/ - -/* - * Command ResetCounts - */ -class ThreadNetworkDiagnosticsResetCounts : public ClusterCommand { -public: - ThreadNetworkDiagnosticsResetCounts() - : ClusterCommand("reset-counts") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::ThreadNetworkDiagnostics::Commands::ResetCounts::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 = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRThreadNetworkDiagnosticsClusterResetCountsParams 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 resetCountsWithParams: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 Channel + * Attribute TxErrCcaCount */ -class ReadThreadNetworkDiagnosticsChannel : public ReadAttribute { +class ReadThreadNetworkDiagnosticsTxErrCcaCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsChannel() - : ReadAttribute("channel") + ReadThreadNetworkDiagnosticsTxErrCcaCount() + : ReadAttribute("tx-err-cca-count") { } - ~ReadThreadNetworkDiagnosticsChannel() + ~ReadThreadNetworkDiagnosticsTxErrCcaCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::Channel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeChannelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.Channel response %@", [value description]); + [cluster readAttributeTxErrCcaCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.TxErrCcaCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics Channel read Error", error); + LogNSError("ThreadNetworkDiagnostics TxErrCcaCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -30644,21 +31787,21 @@ class ReadThreadNetworkDiagnosticsChannel : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsChannel : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsTxErrCcaCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsChannel() - : SubscribeAttribute("channel") + SubscribeAttributeThreadNetworkDiagnosticsTxErrCcaCount() + : SubscribeAttribute("tx-err-cca-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsChannel() + ~SubscribeAttributeThreadNetworkDiagnosticsTxErrCcaCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::Channel::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -30673,10 +31816,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsChannel : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeChannelWithParams:params + [cluster subscribeAttributeTxErrCcaCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.Channel response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.TxErrCcaCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -30690,34 +31833,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsChannel : public SubscribeAttrib }; /* - * Attribute RoutingRole + * Attribute TxErrAbortCount */ -class ReadThreadNetworkDiagnosticsRoutingRole : public ReadAttribute { +class ReadThreadNetworkDiagnosticsTxErrAbortCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsRoutingRole() - : ReadAttribute("routing-role") + ReadThreadNetworkDiagnosticsTxErrAbortCount() + : ReadAttribute("tx-err-abort-count") { } - ~ReadThreadNetworkDiagnosticsRoutingRole() + ~ReadThreadNetworkDiagnosticsTxErrAbortCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RoutingRole::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRoutingRoleWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RoutingRole response %@", [value description]); + [cluster readAttributeTxErrAbortCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.TxErrAbortCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics RoutingRole read Error", error); + LogNSError("ThreadNetworkDiagnostics TxErrAbortCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -30726,21 +31869,21 @@ class ReadThreadNetworkDiagnosticsRoutingRole : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsRoutingRole : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsTxErrAbortCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsRoutingRole() - : SubscribeAttribute("routing-role") + SubscribeAttributeThreadNetworkDiagnosticsTxErrAbortCount() + : SubscribeAttribute("tx-err-abort-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsRoutingRole() + ~SubscribeAttributeThreadNetworkDiagnosticsTxErrAbortCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RoutingRole::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -30755,10 +31898,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsRoutingRole : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRoutingRoleWithParams:params + [cluster subscribeAttributeTxErrAbortCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RoutingRole response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.TxErrAbortCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -30772,34 +31915,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsRoutingRole : public SubscribeAt }; /* - * Attribute NetworkName + * Attribute TxErrBusyChannelCount */ -class ReadThreadNetworkDiagnosticsNetworkName : public ReadAttribute { +class ReadThreadNetworkDiagnosticsTxErrBusyChannelCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsNetworkName() - : ReadAttribute("network-name") + ReadThreadNetworkDiagnosticsTxErrBusyChannelCount() + : ReadAttribute("tx-err-busy-channel-count") { } - ~ReadThreadNetworkDiagnosticsNetworkName() + ~ReadThreadNetworkDiagnosticsTxErrBusyChannelCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::NetworkName::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNetworkNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.NetworkName response %@", [value description]); + [cluster readAttributeTxErrBusyChannelCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.TxErrBusyChannelCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics NetworkName read Error", error); + LogNSError("ThreadNetworkDiagnostics TxErrBusyChannelCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -30808,21 +31951,21 @@ class ReadThreadNetworkDiagnosticsNetworkName : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsNetworkName : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsTxErrBusyChannelCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsNetworkName() - : SubscribeAttribute("network-name") + SubscribeAttributeThreadNetworkDiagnosticsTxErrBusyChannelCount() + : SubscribeAttribute("tx-err-busy-channel-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsNetworkName() + ~SubscribeAttributeThreadNetworkDiagnosticsTxErrBusyChannelCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::NetworkName::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -30837,10 +31980,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsNetworkName : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNetworkNameWithParams:params + [cluster subscribeAttributeTxErrBusyChannelCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.NetworkName response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.TxErrBusyChannelCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -30854,34 +31997,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsNetworkName : public SubscribeAt }; /* - * Attribute PanId + * Attribute RxTotalCount */ -class ReadThreadNetworkDiagnosticsPanId : public ReadAttribute { +class ReadThreadNetworkDiagnosticsRxTotalCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsPanId() - : ReadAttribute("pan-id") + ReadThreadNetworkDiagnosticsRxTotalCount() + : ReadAttribute("rx-total-count") { } - ~ReadThreadNetworkDiagnosticsPanId() + ~ReadThreadNetworkDiagnosticsRxTotalCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::PanId::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxTotalCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePanIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.PanId response %@", [value description]); + [cluster readAttributeRxTotalCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.RxTotalCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics PanId read Error", error); + LogNSError("ThreadNetworkDiagnostics RxTotalCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -30890,21 +32033,21 @@ class ReadThreadNetworkDiagnosticsPanId : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsPanId : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsRxTotalCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsPanId() - : SubscribeAttribute("pan-id") + SubscribeAttributeThreadNetworkDiagnosticsRxTotalCount() + : SubscribeAttribute("rx-total-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsPanId() + ~SubscribeAttributeThreadNetworkDiagnosticsRxTotalCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::PanId::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxTotalCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -30919,10 +32062,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsPanId : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePanIdWithParams:params + [cluster subscribeAttributeRxTotalCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.PanId response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.RxTotalCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -30936,34 +32079,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsPanId : public SubscribeAttribut }; /* - * Attribute ExtendedPanId + * Attribute RxUnicastCount */ -class ReadThreadNetworkDiagnosticsExtendedPanId : public ReadAttribute { +class ReadThreadNetworkDiagnosticsRxUnicastCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsExtendedPanId() - : ReadAttribute("extended-pan-id") + ReadThreadNetworkDiagnosticsRxUnicastCount() + : ReadAttribute("rx-unicast-count") { } - ~ReadThreadNetworkDiagnosticsExtendedPanId() + ~ReadThreadNetworkDiagnosticsRxUnicastCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ExtendedPanId::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxUnicastCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeExtendedPanIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.ExtendedPanId response %@", [value description]); + [cluster readAttributeRxUnicastCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.RxUnicastCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics ExtendedPanId read Error", error); + LogNSError("ThreadNetworkDiagnostics RxUnicastCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -30972,21 +32115,21 @@ class ReadThreadNetworkDiagnosticsExtendedPanId : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsExtendedPanId : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsRxUnicastCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsExtendedPanId() - : SubscribeAttribute("extended-pan-id") + SubscribeAttributeThreadNetworkDiagnosticsRxUnicastCount() + : SubscribeAttribute("rx-unicast-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsExtendedPanId() + ~SubscribeAttributeThreadNetworkDiagnosticsRxUnicastCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ExtendedPanId::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxUnicastCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -31001,10 +32144,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsExtendedPanId : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeExtendedPanIdWithParams:params + [cluster subscribeAttributeRxUnicastCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.ExtendedPanId response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.RxUnicastCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -31018,34 +32161,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsExtendedPanId : public Subscribe }; /* - * Attribute MeshLocalPrefix + * Attribute RxBroadcastCount */ -class ReadThreadNetworkDiagnosticsMeshLocalPrefix : public ReadAttribute { +class ReadThreadNetworkDiagnosticsRxBroadcastCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsMeshLocalPrefix() - : ReadAttribute("mesh-local-prefix") + ReadThreadNetworkDiagnosticsRxBroadcastCount() + : ReadAttribute("rx-broadcast-count") { } - ~ReadThreadNetworkDiagnosticsMeshLocalPrefix() + ~ReadThreadNetworkDiagnosticsRxBroadcastCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMeshLocalPrefixWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.MeshLocalPrefix response %@", [value description]); + [cluster readAttributeRxBroadcastCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.RxBroadcastCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics MeshLocalPrefix read Error", error); + LogNSError("ThreadNetworkDiagnostics RxBroadcastCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -31054,21 +32197,21 @@ class ReadThreadNetworkDiagnosticsMeshLocalPrefix : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsMeshLocalPrefix : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsRxBroadcastCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsMeshLocalPrefix() - : SubscribeAttribute("mesh-local-prefix") + SubscribeAttributeThreadNetworkDiagnosticsRxBroadcastCount() + : SubscribeAttribute("rx-broadcast-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsMeshLocalPrefix() + ~SubscribeAttributeThreadNetworkDiagnosticsRxBroadcastCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::MeshLocalPrefix::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -31083,10 +32226,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsMeshLocalPrefix : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMeshLocalPrefixWithParams:params + [cluster subscribeAttributeRxBroadcastCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.MeshLocalPrefix response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.RxBroadcastCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -31100,34 +32243,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsMeshLocalPrefix : public Subscri }; /* - * Attribute OverrunCount + * Attribute RxDataCount */ -class ReadThreadNetworkDiagnosticsOverrunCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsRxDataCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsOverrunCount() - : ReadAttribute("overrun-count") + ReadThreadNetworkDiagnosticsRxDataCount() + : ReadAttribute("rx-data-count") { } - ~ReadThreadNetworkDiagnosticsOverrunCount() + ~ReadThreadNetworkDiagnosticsRxDataCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::OverrunCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxDataCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOverrunCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.OverrunCount response %@", [value description]); + [cluster readAttributeRxDataCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.RxDataCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics OverrunCount read Error", error); + LogNSError("ThreadNetworkDiagnostics RxDataCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -31136,21 +32279,21 @@ class ReadThreadNetworkDiagnosticsOverrunCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsOverrunCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsRxDataCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsOverrunCount() - : SubscribeAttribute("overrun-count") + SubscribeAttributeThreadNetworkDiagnosticsRxDataCount() + : SubscribeAttribute("rx-data-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsOverrunCount() + ~SubscribeAttributeThreadNetworkDiagnosticsRxDataCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::OverrunCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxDataCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -31165,10 +32308,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsOverrunCount : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOverrunCountWithParams:params + [cluster subscribeAttributeRxDataCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.OverrunCount response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.RxDataCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -31182,34 +32325,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsOverrunCount : public SubscribeA }; /* - * Attribute NeighborTable + * Attribute RxDataPollCount */ -class ReadThreadNetworkDiagnosticsNeighborTable : public ReadAttribute { +class ReadThreadNetworkDiagnosticsRxDataPollCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsNeighborTable() - : ReadAttribute("neighbor-table") + ReadThreadNetworkDiagnosticsRxDataPollCount() + : ReadAttribute("rx-data-poll-count") { } - ~ReadThreadNetworkDiagnosticsNeighborTable() + ~ReadThreadNetworkDiagnosticsRxDataPollCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::NeighborTable::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxDataPollCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNeighborTableWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.NeighborTable response %@", [value description]); + [cluster readAttributeRxDataPollCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.RxDataPollCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics NeighborTable read Error", error); + LogNSError("ThreadNetworkDiagnostics RxDataPollCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -31218,21 +32361,21 @@ class ReadThreadNetworkDiagnosticsNeighborTable : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsNeighborTable : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsRxDataPollCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsNeighborTable() - : SubscribeAttribute("neighbor-table") + SubscribeAttributeThreadNetworkDiagnosticsRxDataPollCount() + : SubscribeAttribute("rx-data-poll-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsNeighborTable() + ~SubscribeAttributeThreadNetworkDiagnosticsRxDataPollCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::NeighborTable::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxDataPollCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -31247,10 +32390,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsNeighborTable : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNeighborTableWithParams:params + [cluster subscribeAttributeRxDataPollCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.NeighborTable response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.RxDataPollCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -31264,34 +32407,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsNeighborTable : public Subscribe }; /* - * Attribute RouteTable + * Attribute RxBeaconCount */ -class ReadThreadNetworkDiagnosticsRouteTable : public ReadAttribute { +class ReadThreadNetworkDiagnosticsRxBeaconCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsRouteTable() - : ReadAttribute("route-table") + ReadThreadNetworkDiagnosticsRxBeaconCount() + : ReadAttribute("rx-beacon-count") { } - ~ReadThreadNetworkDiagnosticsRouteTable() + ~ReadThreadNetworkDiagnosticsRxBeaconCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RouteTable::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxBeaconCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRouteTableWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RouteTable response %@", [value description]); + [cluster readAttributeRxBeaconCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.RxBeaconCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics RouteTable read Error", error); + LogNSError("ThreadNetworkDiagnostics RxBeaconCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -31300,21 +32443,21 @@ class ReadThreadNetworkDiagnosticsRouteTable : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsRouteTable : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsRxBeaconCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsRouteTable() - : SubscribeAttribute("route-table") + SubscribeAttributeThreadNetworkDiagnosticsRxBeaconCount() + : SubscribeAttribute("rx-beacon-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsRouteTable() + ~SubscribeAttributeThreadNetworkDiagnosticsRxBeaconCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RouteTable::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxBeaconCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -31329,10 +32472,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsRouteTable : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRouteTableWithParams:params + [cluster subscribeAttributeRxBeaconCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RouteTable response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.RxBeaconCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -31346,34 +32489,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsRouteTable : public SubscribeAtt }; /* - * Attribute PartitionId + * Attribute RxBeaconRequestCount */ -class ReadThreadNetworkDiagnosticsPartitionId : public ReadAttribute { +class ReadThreadNetworkDiagnosticsRxBeaconRequestCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsPartitionId() - : ReadAttribute("partition-id") + ReadThreadNetworkDiagnosticsRxBeaconRequestCount() + : ReadAttribute("rx-beacon-request-count") { } - ~ReadThreadNetworkDiagnosticsPartitionId() + ~ReadThreadNetworkDiagnosticsRxBeaconRequestCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::PartitionId::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePartitionIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.PartitionId response %@", [value description]); + [cluster readAttributeRxBeaconRequestCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.RxBeaconRequestCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics PartitionId read Error", error); + LogNSError("ThreadNetworkDiagnostics RxBeaconRequestCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -31382,21 +32525,21 @@ class ReadThreadNetworkDiagnosticsPartitionId : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsPartitionId : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsRxBeaconRequestCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsPartitionId() - : SubscribeAttribute("partition-id") + SubscribeAttributeThreadNetworkDiagnosticsRxBeaconRequestCount() + : SubscribeAttribute("rx-beacon-request-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsPartitionId() + ~SubscribeAttributeThreadNetworkDiagnosticsRxBeaconRequestCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::PartitionId::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -31411,10 +32554,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsPartitionId : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePartitionIdWithParams:params + [cluster subscribeAttributeRxBeaconRequestCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.PartitionId response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.RxBeaconRequestCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -31428,34 +32571,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsPartitionId : public SubscribeAt }; /* - * Attribute Weighting + * Attribute RxOtherCount */ -class ReadThreadNetworkDiagnosticsWeighting : public ReadAttribute { +class ReadThreadNetworkDiagnosticsRxOtherCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsWeighting() - : ReadAttribute("weighting") + ReadThreadNetworkDiagnosticsRxOtherCount() + : ReadAttribute("rx-other-count") { } - ~ReadThreadNetworkDiagnosticsWeighting() + ~ReadThreadNetworkDiagnosticsRxOtherCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::Weighting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxOtherCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeWeightingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.Weighting response %@", [value description]); + [cluster readAttributeRxOtherCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.RxOtherCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics Weighting read Error", error); + LogNSError("ThreadNetworkDiagnostics RxOtherCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -31464,21 +32607,21 @@ class ReadThreadNetworkDiagnosticsWeighting : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsWeighting : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsRxOtherCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsWeighting() - : SubscribeAttribute("weighting") + SubscribeAttributeThreadNetworkDiagnosticsRxOtherCount() + : SubscribeAttribute("rx-other-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsWeighting() + ~SubscribeAttributeThreadNetworkDiagnosticsRxOtherCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::Weighting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxOtherCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -31493,10 +32636,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsWeighting : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeWeightingWithParams:params + [cluster subscribeAttributeRxOtherCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.Weighting response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.RxOtherCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -31510,34 +32653,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsWeighting : public SubscribeAttr }; /* - * Attribute DataVersion + * Attribute RxAddressFilteredCount */ -class ReadThreadNetworkDiagnosticsDataVersion : public ReadAttribute { +class ReadThreadNetworkDiagnosticsRxAddressFilteredCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsDataVersion() - : ReadAttribute("data-version") + ReadThreadNetworkDiagnosticsRxAddressFilteredCount() + : ReadAttribute("rx-address-filtered-count") { } - ~ReadThreadNetworkDiagnosticsDataVersion() + ~ReadThreadNetworkDiagnosticsRxAddressFilteredCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::DataVersion::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDataVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.DataVersion response %@", [value description]); + [cluster readAttributeRxAddressFilteredCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.RxAddressFilteredCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics DataVersion read Error", error); + LogNSError("ThreadNetworkDiagnostics RxAddressFilteredCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -31546,21 +32689,21 @@ class ReadThreadNetworkDiagnosticsDataVersion : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsDataVersion : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsRxAddressFilteredCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsDataVersion() - : SubscribeAttribute("data-version") + SubscribeAttributeThreadNetworkDiagnosticsRxAddressFilteredCount() + : SubscribeAttribute("rx-address-filtered-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsDataVersion() + ~SubscribeAttributeThreadNetworkDiagnosticsRxAddressFilteredCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::DataVersion::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -31575,10 +32718,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsDataVersion : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDataVersionWithParams:params + [cluster subscribeAttributeRxAddressFilteredCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.DataVersion response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.RxAddressFilteredCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -31592,34 +32735,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsDataVersion : public SubscribeAt }; /* - * Attribute StableDataVersion + * Attribute RxDestAddrFilteredCount */ -class ReadThreadNetworkDiagnosticsStableDataVersion : public ReadAttribute { +class ReadThreadNetworkDiagnosticsRxDestAddrFilteredCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsStableDataVersion() - : ReadAttribute("stable-data-version") + ReadThreadNetworkDiagnosticsRxDestAddrFilteredCount() + : ReadAttribute("rx-dest-addr-filtered-count") { } - ~ReadThreadNetworkDiagnosticsStableDataVersion() + ~ReadThreadNetworkDiagnosticsRxDestAddrFilteredCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::StableDataVersion::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStableDataVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.StableDataVersion response %@", [value description]); + [cluster readAttributeRxDestAddrFilteredCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.RxDestAddrFilteredCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics StableDataVersion read Error", error); + LogNSError("ThreadNetworkDiagnostics RxDestAddrFilteredCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -31628,21 +32771,21 @@ class ReadThreadNetworkDiagnosticsStableDataVersion : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsStableDataVersion : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsRxDestAddrFilteredCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsStableDataVersion() - : SubscribeAttribute("stable-data-version") + SubscribeAttributeThreadNetworkDiagnosticsRxDestAddrFilteredCount() + : SubscribeAttribute("rx-dest-addr-filtered-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsStableDataVersion() + ~SubscribeAttributeThreadNetworkDiagnosticsRxDestAddrFilteredCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::StableDataVersion::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -31657,10 +32800,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsStableDataVersion : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeStableDataVersionWithParams:params + [cluster subscribeAttributeRxDestAddrFilteredCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.StableDataVersion response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.RxDestAddrFilteredCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -31674,34 +32817,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsStableDataVersion : public Subsc }; /* - * Attribute LeaderRouterId + * Attribute RxDuplicatedCount */ -class ReadThreadNetworkDiagnosticsLeaderRouterId : public ReadAttribute { +class ReadThreadNetworkDiagnosticsRxDuplicatedCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsLeaderRouterId() - : ReadAttribute("leader-router-id") + ReadThreadNetworkDiagnosticsRxDuplicatedCount() + : ReadAttribute("rx-duplicated-count") { } - ~ReadThreadNetworkDiagnosticsLeaderRouterId() + ~ReadThreadNetworkDiagnosticsRxDuplicatedCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::LeaderRouterId::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLeaderRouterIdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.LeaderRouterId response %@", [value description]); + [cluster readAttributeRxDuplicatedCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.RxDuplicatedCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics LeaderRouterId read Error", error); + LogNSError("ThreadNetworkDiagnostics RxDuplicatedCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -31710,21 +32853,21 @@ class ReadThreadNetworkDiagnosticsLeaderRouterId : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsLeaderRouterId : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsRxDuplicatedCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsLeaderRouterId() - : SubscribeAttribute("leader-router-id") + SubscribeAttributeThreadNetworkDiagnosticsRxDuplicatedCount() + : SubscribeAttribute("rx-duplicated-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsLeaderRouterId() + ~SubscribeAttributeThreadNetworkDiagnosticsRxDuplicatedCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::LeaderRouterId::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -31739,10 +32882,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsLeaderRouterId : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLeaderRouterIdWithParams:params + [cluster subscribeAttributeRxDuplicatedCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.LeaderRouterId response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.RxDuplicatedCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -31756,34 +32899,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsLeaderRouterId : public Subscrib }; /* - * Attribute DetachedRoleCount + * Attribute RxErrNoFrameCount */ -class ReadThreadNetworkDiagnosticsDetachedRoleCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsRxErrNoFrameCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsDetachedRoleCount() - : ReadAttribute("detached-role-count") + ReadThreadNetworkDiagnosticsRxErrNoFrameCount() + : ReadAttribute("rx-err-no-frame-count") { } - ~ReadThreadNetworkDiagnosticsDetachedRoleCount() + ~ReadThreadNetworkDiagnosticsRxErrNoFrameCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDetachedRoleCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.DetachedRoleCount response %@", [value description]); + [cluster readAttributeRxErrNoFrameCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.RxErrNoFrameCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics DetachedRoleCount read Error", error); + LogNSError("ThreadNetworkDiagnostics RxErrNoFrameCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -31792,21 +32935,21 @@ class ReadThreadNetworkDiagnosticsDetachedRoleCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsDetachedRoleCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsRxErrNoFrameCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsDetachedRoleCount() - : SubscribeAttribute("detached-role-count") + SubscribeAttributeThreadNetworkDiagnosticsRxErrNoFrameCount() + : SubscribeAttribute("rx-err-no-frame-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsDetachedRoleCount() + ~SubscribeAttributeThreadNetworkDiagnosticsRxErrNoFrameCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::DetachedRoleCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -31821,10 +32964,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsDetachedRoleCount : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDetachedRoleCountWithParams:params + [cluster subscribeAttributeRxErrNoFrameCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.DetachedRoleCount response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.RxErrNoFrameCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -31838,34 +32981,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsDetachedRoleCount : public Subsc }; /* - * Attribute ChildRoleCount + * Attribute RxErrUnknownNeighborCount */ -class ReadThreadNetworkDiagnosticsChildRoleCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsRxErrUnknownNeighborCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsChildRoleCount() - : ReadAttribute("child-role-count") + ReadThreadNetworkDiagnosticsRxErrUnknownNeighborCount() + : ReadAttribute("rx-err-unknown-neighbor-count") { } - ~ReadThreadNetworkDiagnosticsChildRoleCount() + ~ReadThreadNetworkDiagnosticsRxErrUnknownNeighborCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ChildRoleCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeChildRoleCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.ChildRoleCount response %@", [value description]); + [cluster readAttributeRxErrUnknownNeighborCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.RxErrUnknownNeighborCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics ChildRoleCount read Error", error); + LogNSError("ThreadNetworkDiagnostics RxErrUnknownNeighborCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -31874,21 +33017,21 @@ class ReadThreadNetworkDiagnosticsChildRoleCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsChildRoleCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsRxErrUnknownNeighborCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsChildRoleCount() - : SubscribeAttribute("child-role-count") + SubscribeAttributeThreadNetworkDiagnosticsRxErrUnknownNeighborCount() + : SubscribeAttribute("rx-err-unknown-neighbor-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsChildRoleCount() + ~SubscribeAttributeThreadNetworkDiagnosticsRxErrUnknownNeighborCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ChildRoleCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -31903,10 +33046,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsChildRoleCount : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeChildRoleCountWithParams:params + [cluster subscribeAttributeRxErrUnknownNeighborCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.ChildRoleCount response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.RxErrUnknownNeighborCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -31920,34 +33063,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsChildRoleCount : public Subscrib }; /* - * Attribute RouterRoleCount + * Attribute RxErrInvalidSrcAddrCount */ -class ReadThreadNetworkDiagnosticsRouterRoleCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsRxErrInvalidSrcAddrCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsRouterRoleCount() - : ReadAttribute("router-role-count") + ReadThreadNetworkDiagnosticsRxErrInvalidSrcAddrCount() + : ReadAttribute("rx-err-invalid-src-addr-count") { } - ~ReadThreadNetworkDiagnosticsRouterRoleCount() + ~ReadThreadNetworkDiagnosticsRxErrInvalidSrcAddrCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RouterRoleCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRouterRoleCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RouterRoleCount response %@", [value description]); + [cluster readAttributeRxErrInvalidSrcAddrCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.RxErrInvalidSrcAddrCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics RouterRoleCount read Error", error); + LogNSError("ThreadNetworkDiagnostics RxErrInvalidSrcAddrCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -31956,21 +33099,21 @@ class ReadThreadNetworkDiagnosticsRouterRoleCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsRouterRoleCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsRxErrInvalidSrcAddrCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsRouterRoleCount() - : SubscribeAttribute("router-role-count") + SubscribeAttributeThreadNetworkDiagnosticsRxErrInvalidSrcAddrCount() + : SubscribeAttribute("rx-err-invalid-src-addr-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsRouterRoleCount() + ~SubscribeAttributeThreadNetworkDiagnosticsRxErrInvalidSrcAddrCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RouterRoleCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -31985,10 +33128,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsRouterRoleCount : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRouterRoleCountWithParams:params + [cluster subscribeAttributeRxErrInvalidSrcAddrCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RouterRoleCount response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.RxErrInvalidSrcAddrCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -32002,34 +33145,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsRouterRoleCount : public Subscri }; /* - * Attribute LeaderRoleCount + * Attribute RxErrSecCount */ -class ReadThreadNetworkDiagnosticsLeaderRoleCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsRxErrSecCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsLeaderRoleCount() - : ReadAttribute("leader-role-count") + ReadThreadNetworkDiagnosticsRxErrSecCount() + : ReadAttribute("rx-err-sec-count") { } - ~ReadThreadNetworkDiagnosticsLeaderRoleCount() + ~ReadThreadNetworkDiagnosticsRxErrSecCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrSecCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLeaderRoleCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.LeaderRoleCount response %@", [value description]); + [cluster readAttributeRxErrSecCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.RxErrSecCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics LeaderRoleCount read Error", error); + LogNSError("ThreadNetworkDiagnostics RxErrSecCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -32038,21 +33181,21 @@ class ReadThreadNetworkDiagnosticsLeaderRoleCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsLeaderRoleCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsRxErrSecCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsLeaderRoleCount() - : SubscribeAttribute("leader-role-count") + SubscribeAttributeThreadNetworkDiagnosticsRxErrSecCount() + : SubscribeAttribute("rx-err-sec-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsLeaderRoleCount() + ~SubscribeAttributeThreadNetworkDiagnosticsRxErrSecCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::LeaderRoleCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrSecCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -32067,10 +33210,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsLeaderRoleCount : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLeaderRoleCountWithParams:params + [cluster subscribeAttributeRxErrSecCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.LeaderRoleCount response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.RxErrSecCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -32084,34 +33227,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsLeaderRoleCount : public Subscri }; /* - * Attribute AttachAttemptCount + * Attribute RxErrFcsCount */ -class ReadThreadNetworkDiagnosticsAttachAttemptCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsRxErrFcsCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsAttachAttemptCount() - : ReadAttribute("attach-attempt-count") + ReadThreadNetworkDiagnosticsRxErrFcsCount() + : ReadAttribute("rx-err-fcs-count") { } - ~ReadThreadNetworkDiagnosticsAttachAttemptCount() + ~ReadThreadNetworkDiagnosticsRxErrFcsCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttachAttemptCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.AttachAttemptCount response %@", [value description]); + [cluster readAttributeRxErrFcsCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.RxErrFcsCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics AttachAttemptCount read Error", error); + LogNSError("ThreadNetworkDiagnostics RxErrFcsCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -32120,21 +33263,21 @@ class ReadThreadNetworkDiagnosticsAttachAttemptCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsAttachAttemptCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsRxErrFcsCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsAttachAttemptCount() - : SubscribeAttribute("attach-attempt-count") + SubscribeAttributeThreadNetworkDiagnosticsRxErrFcsCount() + : SubscribeAttribute("rx-err-fcs-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsAttachAttemptCount() + ~SubscribeAttributeThreadNetworkDiagnosticsRxErrFcsCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::AttachAttemptCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -32149,10 +33292,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsAttachAttemptCount : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttachAttemptCountWithParams:params + [cluster subscribeAttributeRxErrFcsCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.AttachAttemptCount response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.RxErrFcsCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -32166,34 +33309,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsAttachAttemptCount : public Subs }; /* - * Attribute PartitionIdChangeCount + * Attribute RxErrOtherCount */ -class ReadThreadNetworkDiagnosticsPartitionIdChangeCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsRxErrOtherCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsPartitionIdChangeCount() - : ReadAttribute("partition-id-change-count") + ReadThreadNetworkDiagnosticsRxErrOtherCount() + : ReadAttribute("rx-err-other-count") { } - ~ReadThreadNetworkDiagnosticsPartitionIdChangeCount() + ~ReadThreadNetworkDiagnosticsRxErrOtherCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePartitionIdChangeCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.PartitionIdChangeCount response %@", [value description]); + [cluster readAttributeRxErrOtherCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.RxErrOtherCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics PartitionIdChangeCount read Error", error); + LogNSError("ThreadNetworkDiagnostics RxErrOtherCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -32202,21 +33345,21 @@ class ReadThreadNetworkDiagnosticsPartitionIdChangeCount : public ReadAttribute } }; -class SubscribeAttributeThreadNetworkDiagnosticsPartitionIdChangeCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsRxErrOtherCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsPartitionIdChangeCount() - : SubscribeAttribute("partition-id-change-count") + SubscribeAttributeThreadNetworkDiagnosticsRxErrOtherCount() + : SubscribeAttribute("rx-err-other-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsPartitionIdChangeCount() + ~SubscribeAttributeThreadNetworkDiagnosticsRxErrOtherCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::PartitionIdChangeCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -32231,10 +33374,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsPartitionIdChangeCount : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePartitionIdChangeCountWithParams:params + [cluster subscribeAttributeRxErrOtherCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.PartitionIdChangeCount response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.RxErrOtherCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -32248,34 +33391,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsPartitionIdChangeCount : public }; /* - * Attribute BetterPartitionAttachAttemptCount + * Attribute ActiveTimestamp */ -class ReadThreadNetworkDiagnosticsBetterPartitionAttachAttemptCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsActiveTimestamp : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsBetterPartitionAttachAttemptCount() - : ReadAttribute("better-partition-attach-attempt-count") + ReadThreadNetworkDiagnosticsActiveTimestamp() + : ReadAttribute("active-timestamp") { } - ~ReadThreadNetworkDiagnosticsBetterPartitionAttachAttemptCount() + ~ReadThreadNetworkDiagnosticsActiveTimestamp() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBetterPartitionAttachAttemptCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.BetterPartitionAttachAttemptCount response %@", [value description]); + [cluster readAttributeActiveTimestampWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.ActiveTimestamp response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics BetterPartitionAttachAttemptCount read Error", error); + LogNSError("ThreadNetworkDiagnostics ActiveTimestamp read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -32284,21 +33427,21 @@ class ReadThreadNetworkDiagnosticsBetterPartitionAttachAttemptCount : public Rea } }; -class SubscribeAttributeThreadNetworkDiagnosticsBetterPartitionAttachAttemptCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsActiveTimestamp : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsBetterPartitionAttachAttemptCount() - : SubscribeAttribute("better-partition-attach-attempt-count") + SubscribeAttributeThreadNetworkDiagnosticsActiveTimestamp() + : SubscribeAttribute("active-timestamp") { } - ~SubscribeAttributeThreadNetworkDiagnosticsBetterPartitionAttachAttemptCount() + ~SubscribeAttributeThreadNetworkDiagnosticsActiveTimestamp() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::BetterPartitionAttachAttemptCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -32313,10 +33456,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsBetterPartitionAttachAttemptCoun if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBetterPartitionAttachAttemptCountWithParams:params + [cluster subscribeAttributeActiveTimestampWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.BetterPartitionAttachAttemptCount response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.ActiveTimestamp response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -32330,34 +33473,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsBetterPartitionAttachAttemptCoun }; /* - * Attribute ParentChangeCount + * Attribute PendingTimestamp */ -class ReadThreadNetworkDiagnosticsParentChangeCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsPendingTimestamp : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsParentChangeCount() - : ReadAttribute("parent-change-count") + ReadThreadNetworkDiagnosticsPendingTimestamp() + : ReadAttribute("pending-timestamp") { } - ~ReadThreadNetworkDiagnosticsParentChangeCount() + ~ReadThreadNetworkDiagnosticsPendingTimestamp() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ParentChangeCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::PendingTimestamp::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeParentChangeCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.ParentChangeCount response %@", [value description]); + [cluster readAttributePendingTimestampWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.PendingTimestamp response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics ParentChangeCount read Error", error); + LogNSError("ThreadNetworkDiagnostics PendingTimestamp read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -32366,21 +33509,21 @@ class ReadThreadNetworkDiagnosticsParentChangeCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsParentChangeCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsPendingTimestamp : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsParentChangeCount() - : SubscribeAttribute("parent-change-count") + SubscribeAttributeThreadNetworkDiagnosticsPendingTimestamp() + : SubscribeAttribute("pending-timestamp") { } - ~SubscribeAttributeThreadNetworkDiagnosticsParentChangeCount() + ~SubscribeAttributeThreadNetworkDiagnosticsPendingTimestamp() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ParentChangeCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::PendingTimestamp::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -32395,10 +33538,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsParentChangeCount : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeParentChangeCountWithParams:params + [cluster subscribeAttributePendingTimestampWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.ParentChangeCount response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.PendingTimestamp response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -32412,34 +33555,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsParentChangeCount : public Subsc }; /* - * Attribute TxTotalCount + * Attribute Delay */ -class ReadThreadNetworkDiagnosticsTxTotalCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsDelay : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsTxTotalCount() - : ReadAttribute("tx-total-count") + ReadThreadNetworkDiagnosticsDelay() + : ReadAttribute("delay") { } - ~ReadThreadNetworkDiagnosticsTxTotalCount() + ~ReadThreadNetworkDiagnosticsDelay() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxTotalCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::Delay::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxTotalCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxTotalCount response %@", [value description]); + [cluster readAttributeDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.Delay response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics TxTotalCount read Error", error); + LogNSError("ThreadNetworkDiagnostics Delay read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -32448,21 +33591,21 @@ class ReadThreadNetworkDiagnosticsTxTotalCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsTxTotalCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsDelay : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsTxTotalCount() - : SubscribeAttribute("tx-total-count") + SubscribeAttributeThreadNetworkDiagnosticsDelay() + : SubscribeAttribute("delay") { } - ~SubscribeAttributeThreadNetworkDiagnosticsTxTotalCount() + ~SubscribeAttributeThreadNetworkDiagnosticsDelay() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxTotalCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::Delay::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -32477,10 +33620,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxTotalCount : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTxTotalCountWithParams:params + [cluster subscribeAttributeDelayWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxTotalCount response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.Delay response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -32494,34 +33637,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxTotalCount : public SubscribeA }; /* - * Attribute TxUnicastCount + * Attribute SecurityPolicy */ -class ReadThreadNetworkDiagnosticsTxUnicastCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsSecurityPolicy : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsTxUnicastCount() - : ReadAttribute("tx-unicast-count") + ReadThreadNetworkDiagnosticsSecurityPolicy() + : ReadAttribute("security-policy") { } - ~ReadThreadNetworkDiagnosticsTxUnicastCount() + ~ReadThreadNetworkDiagnosticsSecurityPolicy() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxUnicastCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::SecurityPolicy::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxUnicastCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxUnicastCount response %@", [value description]); + [cluster readAttributeSecurityPolicyWithCompletion:^(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.SecurityPolicy response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics TxUnicastCount read Error", error); + LogNSError("ThreadNetworkDiagnostics SecurityPolicy read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -32530,21 +33673,21 @@ class ReadThreadNetworkDiagnosticsTxUnicastCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsTxUnicastCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsSecurityPolicy : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsTxUnicastCount() - : SubscribeAttribute("tx-unicast-count") + SubscribeAttributeThreadNetworkDiagnosticsSecurityPolicy() + : SubscribeAttribute("security-policy") { } - ~SubscribeAttributeThreadNetworkDiagnosticsTxUnicastCount() + ~SubscribeAttributeThreadNetworkDiagnosticsSecurityPolicy() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxUnicastCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::SecurityPolicy::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -32559,10 +33702,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxUnicastCount : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTxUnicastCountWithParams:params + [cluster subscribeAttributeSecurityPolicyWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxUnicastCount response %@", [value description]); + reportHandler:^(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.SecurityPolicy response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -32576,34 +33719,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxUnicastCount : public Subscrib }; /* - * Attribute TxBroadcastCount + * Attribute ChannelPage0Mask */ -class ReadThreadNetworkDiagnosticsTxBroadcastCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsChannelPage0Mask : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsTxBroadcastCount() - : ReadAttribute("tx-broadcast-count") + ReadThreadNetworkDiagnosticsChannelPage0Mask() + : ReadAttribute("channel-page0mask") { } - ~ReadThreadNetworkDiagnosticsTxBroadcastCount() + ~ReadThreadNetworkDiagnosticsChannelPage0Mask() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ChannelPage0Mask::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxBroadcastCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxBroadcastCount response %@", [value description]); + [cluster readAttributeChannelPage0MaskWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.ChannelPage0Mask response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics TxBroadcastCount read Error", error); + LogNSError("ThreadNetworkDiagnostics ChannelPage0Mask read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -32612,21 +33755,21 @@ class ReadThreadNetworkDiagnosticsTxBroadcastCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsTxBroadcastCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsChannelPage0Mask : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsTxBroadcastCount() - : SubscribeAttribute("tx-broadcast-count") + SubscribeAttributeThreadNetworkDiagnosticsChannelPage0Mask() + : SubscribeAttribute("channel-page0mask") { } - ~SubscribeAttributeThreadNetworkDiagnosticsTxBroadcastCount() + ~SubscribeAttributeThreadNetworkDiagnosticsChannelPage0Mask() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxBroadcastCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ChannelPage0Mask::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -32641,10 +33784,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxBroadcastCount : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTxBroadcastCountWithParams:params + [cluster subscribeAttributeChannelPage0MaskWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxBroadcastCount response %@", [value description]); + reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.ChannelPage0Mask response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -32658,34 +33801,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxBroadcastCount : public Subscr }; /* - * Attribute TxAckRequestedCount + * Attribute OperationalDatasetComponents */ -class ReadThreadNetworkDiagnosticsTxAckRequestedCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsOperationalDatasetComponents : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsTxAckRequestedCount() - : ReadAttribute("tx-ack-requested-count") + ReadThreadNetworkDiagnosticsOperationalDatasetComponents() + : ReadAttribute("operational-dataset-components") { } - ~ReadThreadNetworkDiagnosticsTxAckRequestedCount() + ~ReadThreadNetworkDiagnosticsOperationalDatasetComponents() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxAckRequestedCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxAckRequestedCount response %@", [value description]); + [cluster readAttributeOperationalDatasetComponentsWithCompletion:^(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.OperationalDatasetComponents response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics TxAckRequestedCount read Error", error); + LogNSError("ThreadNetworkDiagnostics OperationalDatasetComponents read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -32694,21 +33837,21 @@ class ReadThreadNetworkDiagnosticsTxAckRequestedCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsTxAckRequestedCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsOperationalDatasetComponents : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsTxAckRequestedCount() - : SubscribeAttribute("tx-ack-requested-count") + SubscribeAttributeThreadNetworkDiagnosticsOperationalDatasetComponents() + : SubscribeAttribute("operational-dataset-components") { } - ~SubscribeAttributeThreadNetworkDiagnosticsTxAckRequestedCount() + ~SubscribeAttributeThreadNetworkDiagnosticsOperationalDatasetComponents() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxAckRequestedCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -32723,10 +33866,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxAckRequestedCount : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTxAckRequestedCountWithParams:params + [cluster subscribeAttributeOperationalDatasetComponentsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxAckRequestedCount response %@", [value description]); + reportHandler:^(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.OperationalDatasetComponents response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -32740,34 +33883,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxAckRequestedCount : public Sub }; /* - * Attribute TxAckedCount + * Attribute ActiveNetworkFaultsList */ -class ReadThreadNetworkDiagnosticsTxAckedCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsActiveNetworkFaultsList : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsTxAckedCount() - : ReadAttribute("tx-acked-count") + ReadThreadNetworkDiagnosticsActiveNetworkFaultsList() + : ReadAttribute("active-network-faults-list") { } - ~ReadThreadNetworkDiagnosticsTxAckedCount() + ~ReadThreadNetworkDiagnosticsActiveNetworkFaultsList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxAckedCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxAckedCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxAckedCount response %@", [value description]); + [cluster readAttributeActiveNetworkFaultsListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.ActiveNetworkFaultsList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics TxAckedCount read Error", error); + LogNSError("ThreadNetworkDiagnostics ActiveNetworkFaultsList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -32776,21 +33919,21 @@ class ReadThreadNetworkDiagnosticsTxAckedCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsTxAckedCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsActiveNetworkFaultsList : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsTxAckedCount() - : SubscribeAttribute("tx-acked-count") + SubscribeAttributeThreadNetworkDiagnosticsActiveNetworkFaultsList() + : SubscribeAttribute("active-network-faults-list") { } - ~SubscribeAttributeThreadNetworkDiagnosticsTxAckedCount() + ~SubscribeAttributeThreadNetworkDiagnosticsActiveNetworkFaultsList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxAckedCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -32805,10 +33948,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxAckedCount : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTxAckedCountWithParams:params + [cluster subscribeAttributeActiveNetworkFaultsListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxAckedCount response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.ActiveNetworkFaultsList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -32822,34 +33965,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxAckedCount : public SubscribeA }; /* - * Attribute TxNoAckRequestedCount + * Attribute GeneratedCommandList */ -class ReadThreadNetworkDiagnosticsTxNoAckRequestedCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsGeneratedCommandList : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsTxNoAckRequestedCount() - : ReadAttribute("tx-no-ack-requested-count") + ReadThreadNetworkDiagnosticsGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadThreadNetworkDiagnosticsTxNoAckRequestedCount() + ~ReadThreadNetworkDiagnosticsGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::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 = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxNoAckRequestedCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxNoAckRequestedCount response %@", [value description]); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics TxNoAckRequestedCount read Error", error); + LogNSError("ThreadNetworkDiagnostics GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -32858,21 +34001,21 @@ class ReadThreadNetworkDiagnosticsTxNoAckRequestedCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsTxNoAckRequestedCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsTxNoAckRequestedCount() - : SubscribeAttribute("tx-no-ack-requested-count") + SubscribeAttributeThreadNetworkDiagnosticsGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeThreadNetworkDiagnosticsTxNoAckRequestedCount() + ~SubscribeAttributeThreadNetworkDiagnosticsGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxNoAckRequestedCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::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); @@ -32887,10 +34030,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxNoAckRequestedCount : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTxNoAckRequestedCountWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxNoAckRequestedCount response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -32904,34 +34047,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxNoAckRequestedCount : public S }; /* - * Attribute TxDataCount + * Attribute AcceptedCommandList */ -class ReadThreadNetworkDiagnosticsTxDataCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsAcceptedCommandList : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsTxDataCount() - : ReadAttribute("tx-data-count") + ReadThreadNetworkDiagnosticsAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadThreadNetworkDiagnosticsTxDataCount() + ~ReadThreadNetworkDiagnosticsAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxDataCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::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 = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxDataCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxDataCount response %@", [value description]); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics TxDataCount read Error", error); + LogNSError("ThreadNetworkDiagnostics AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -32940,21 +34083,21 @@ class ReadThreadNetworkDiagnosticsTxDataCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsTxDataCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsTxDataCount() - : SubscribeAttribute("tx-data-count") + SubscribeAttributeThreadNetworkDiagnosticsAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeThreadNetworkDiagnosticsTxDataCount() + ~SubscribeAttributeThreadNetworkDiagnosticsAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxDataCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::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); @@ -32969,10 +34112,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxDataCount : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTxDataCountWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxDataCount response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -32985,35 +34128,37 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxDataCount : public SubscribeAt } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute TxDataPollCount + * Attribute EventList */ -class ReadThreadNetworkDiagnosticsTxDataPollCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsEventList : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsTxDataPollCount() - : ReadAttribute("tx-data-poll-count") + ReadThreadNetworkDiagnosticsEventList() + : ReadAttribute("event-list") { } - ~ReadThreadNetworkDiagnosticsTxDataPollCount() + ~ReadThreadNetworkDiagnosticsEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxDataPollCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::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 = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxDataPollCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxDataPollCount response %@", [value description]); + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics TxDataPollCount read Error", error); + LogNSError("ThreadNetworkDiagnostics EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -33022,21 +34167,21 @@ class ReadThreadNetworkDiagnosticsTxDataPollCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsTxDataPollCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsEventList : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsTxDataPollCount() - : SubscribeAttribute("tx-data-poll-count") + SubscribeAttributeThreadNetworkDiagnosticsEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeThreadNetworkDiagnosticsTxDataPollCount() + ~SubscribeAttributeThreadNetworkDiagnosticsEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxDataPollCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::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); @@ -33051,10 +34196,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxDataPollCount : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTxDataPollCountWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxDataPollCount response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -33067,35 +34212,37 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxDataPollCount : public Subscri } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute TxBeaconCount + * Attribute AttributeList */ -class ReadThreadNetworkDiagnosticsTxBeaconCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsAttributeList : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsTxBeaconCount() - : ReadAttribute("tx-beacon-count") + ReadThreadNetworkDiagnosticsAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadThreadNetworkDiagnosticsTxBeaconCount() + ~ReadThreadNetworkDiagnosticsAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxBeaconCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::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 = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxBeaconCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxBeaconCount response %@", [value description]); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics TxBeaconCount read Error", error); + LogNSError("ThreadNetworkDiagnostics AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -33104,21 +34251,21 @@ class ReadThreadNetworkDiagnosticsTxBeaconCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsTxBeaconCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsAttributeList : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsTxBeaconCount() - : SubscribeAttribute("tx-beacon-count") + SubscribeAttributeThreadNetworkDiagnosticsAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeThreadNetworkDiagnosticsTxBeaconCount() + ~SubscribeAttributeThreadNetworkDiagnosticsAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxBeaconCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::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); @@ -33133,10 +34280,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxBeaconCount : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTxBeaconCountWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxBeaconCount response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -33150,34 +34297,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxBeaconCount : public Subscribe }; /* - * Attribute TxBeaconRequestCount + * Attribute FeatureMap */ -class ReadThreadNetworkDiagnosticsTxBeaconRequestCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsFeatureMap : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsTxBeaconRequestCount() - : ReadAttribute("tx-beacon-request-count") + ReadThreadNetworkDiagnosticsFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadThreadNetworkDiagnosticsTxBeaconRequestCount() + ~ReadThreadNetworkDiagnosticsFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::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 = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxBeaconRequestCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxBeaconRequestCount response %@", [value description]); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics TxBeaconRequestCount read Error", error); + LogNSError("ThreadNetworkDiagnostics FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -33186,21 +34333,21 @@ class ReadThreadNetworkDiagnosticsTxBeaconRequestCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsTxBeaconRequestCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsTxBeaconRequestCount() - : SubscribeAttribute("tx-beacon-request-count") + SubscribeAttributeThreadNetworkDiagnosticsFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeThreadNetworkDiagnosticsTxBeaconRequestCount() + ~SubscribeAttributeThreadNetworkDiagnosticsFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxBeaconRequestCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::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); @@ -33215,10 +34362,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxBeaconRequestCount : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTxBeaconRequestCountWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxBeaconRequestCount response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -33232,34 +34379,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxBeaconRequestCount : public Su }; /* - * Attribute TxOtherCount + * Attribute ClusterRevision */ -class ReadThreadNetworkDiagnosticsTxOtherCount : public ReadAttribute { +class ReadThreadNetworkDiagnosticsClusterRevision : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsTxOtherCount() - : ReadAttribute("tx-other-count") + ReadThreadNetworkDiagnosticsClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadThreadNetworkDiagnosticsTxOtherCount() + ~ReadThreadNetworkDiagnosticsClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxOtherCount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::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 = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxOtherCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxOtherCount response %@", [value description]); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ThreadNetworkDiagnostics.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics TxOtherCount read Error", error); + LogNSError("ThreadNetworkDiagnostics ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -33268,21 +34415,21 @@ class ReadThreadNetworkDiagnosticsTxOtherCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsTxOtherCount : public SubscribeAttribute { +class SubscribeAttributeThreadNetworkDiagnosticsClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsTxOtherCount() - : SubscribeAttribute("tx-other-count") + SubscribeAttributeThreadNetworkDiagnosticsClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeThreadNetworkDiagnosticsTxOtherCount() + ~SubscribeAttributeThreadNetworkDiagnosticsClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxOtherCount::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::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); @@ -33297,10 +34444,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxOtherCount : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTxOtherCountWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxOtherCount response %@", [value description]); + NSLog(@"ThreadNetworkDiagnostics.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -33313,35 +34460,112 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxOtherCount : public SubscribeA } }; +/*----------------------------------------------------------------------------*\ +| Cluster WiFiNetworkDiagnostics | 0x0036 | +|------------------------------------------------------------------------------| +| Commands: | | +| * ResetCounts | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * Bssid | 0x0000 | +| * SecurityType | 0x0001 | +| * WiFiVersion | 0x0002 | +| * ChannelNumber | 0x0003 | +| * Rssi | 0x0004 | +| * BeaconLostCount | 0x0005 | +| * BeaconRxCount | 0x0006 | +| * PacketMulticastRxCount | 0x0007 | +| * PacketMulticastTxCount | 0x0008 | +| * PacketUnicastRxCount | 0x0009 | +| * PacketUnicastTxCount | 0x000A | +| * CurrentMaxRate | 0x000B | +| * OverrunCount | 0x000C | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * Disconnection | 0x0000 | +| * AssociationFailure | 0x0001 | +| * ConnectionStatus | 0x0002 | +\*----------------------------------------------------------------------------*/ + +/* + * Command ResetCounts + */ +class WiFiNetworkDiagnosticsResetCounts : public ClusterCommand { +public: + WiFiNetworkDiagnosticsResetCounts() + : ClusterCommand("reset-counts") + { + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::WiFiNetworkDiagnostics::Commands::ResetCounts::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 = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWiFiNetworkDiagnosticsClusterResetCountsParams 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 resetCountsWithParams: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 TxRetryCount + * Attribute Bssid */ -class ReadThreadNetworkDiagnosticsTxRetryCount : public ReadAttribute { +class ReadWiFiNetworkDiagnosticsBssid : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsTxRetryCount() - : ReadAttribute("tx-retry-count") + ReadWiFiNetworkDiagnosticsBssid() + : ReadAttribute("bssid") { } - ~ReadThreadNetworkDiagnosticsTxRetryCount() + ~ReadWiFiNetworkDiagnosticsBssid() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxRetryCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::Bssid::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxRetryCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxRetryCount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBSSIDWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.BSSID response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics TxRetryCount read Error", error); + LogNSError("WiFiNetworkDiagnostics BSSID read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -33350,25 +34574,25 @@ class ReadThreadNetworkDiagnosticsTxRetryCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsTxRetryCount : public SubscribeAttribute { +class SubscribeAttributeWiFiNetworkDiagnosticsBssid : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsTxRetryCount() - : SubscribeAttribute("tx-retry-count") + SubscribeAttributeWiFiNetworkDiagnosticsBssid() + : SubscribeAttribute("bssid") { } - ~SubscribeAttributeThreadNetworkDiagnosticsTxRetryCount() + ~SubscribeAttributeWiFiNetworkDiagnosticsBssid() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxRetryCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::Bssid::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -33379,10 +34603,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxRetryCount : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTxRetryCountWithParams:params + [cluster subscribeAttributeBSSIDWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxRetryCount response %@", [value description]); + reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.BSSID response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -33396,34 +34620,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxRetryCount : public SubscribeA }; /* - * Attribute TxDirectMaxRetryExpiryCount + * Attribute SecurityType */ -class ReadThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCount : public ReadAttribute { +class ReadWiFiNetworkDiagnosticsSecurityType : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCount() - : ReadAttribute("tx-direct-max-retry-expiry-count") + ReadWiFiNetworkDiagnosticsSecurityType() + : ReadAttribute("security-type") { } - ~ReadThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCount() + ~ReadWiFiNetworkDiagnosticsSecurityType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::SecurityType::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxDirectMaxRetryExpiryCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxDirectMaxRetryExpiryCount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSecurityTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.SecurityType response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics TxDirectMaxRetryExpiryCount read Error", error); + LogNSError("WiFiNetworkDiagnostics SecurityType read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -33432,25 +34656,25 @@ class ReadThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCount : public ReadAttri } }; -class SubscribeAttributeThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCount : public SubscribeAttribute { +class SubscribeAttributeWiFiNetworkDiagnosticsSecurityType : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCount() - : SubscribeAttribute("tx-direct-max-retry-expiry-count") + SubscribeAttributeWiFiNetworkDiagnosticsSecurityType() + : SubscribeAttribute("security-type") { } - ~SubscribeAttributeThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCount() + ~SubscribeAttributeWiFiNetworkDiagnosticsSecurityType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxDirectMaxRetryExpiryCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::SecurityType::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -33461,10 +34685,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCount : pu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTxDirectMaxRetryExpiryCountWithParams:params + [cluster subscribeAttributeSecurityTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxDirectMaxRetryExpiryCount response %@", [value description]); + NSLog(@"WiFiNetworkDiagnostics.SecurityType response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -33478,34 +34702,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxDirectMaxRetryExpiryCount : pu }; /* - * Attribute TxIndirectMaxRetryExpiryCount + * Attribute WiFiVersion */ -class ReadThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCount : public ReadAttribute { +class ReadWiFiNetworkDiagnosticsWiFiVersion : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCount() - : ReadAttribute("tx-indirect-max-retry-expiry-count") + ReadWiFiNetworkDiagnosticsWiFiVersion() + : ReadAttribute("wi-fi-version") { } - ~ReadThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCount() + ~ReadWiFiNetworkDiagnosticsWiFiVersion() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::WiFiVersion::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxIndirectMaxRetryExpiryCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxIndirectMaxRetryExpiryCount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeWiFiVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.WiFiVersion response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics TxIndirectMaxRetryExpiryCount read Error", error); + LogNSError("WiFiNetworkDiagnostics WiFiVersion read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -33514,25 +34738,25 @@ class ReadThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCount : public ReadAtt } }; -class SubscribeAttributeThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCount : public SubscribeAttribute { +class SubscribeAttributeWiFiNetworkDiagnosticsWiFiVersion : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCount() - : SubscribeAttribute("tx-indirect-max-retry-expiry-count") + SubscribeAttributeWiFiNetworkDiagnosticsWiFiVersion() + : SubscribeAttribute("wi-fi-version") { } - ~SubscribeAttributeThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCount() + ~SubscribeAttributeWiFiNetworkDiagnosticsWiFiVersion() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxIndirectMaxRetryExpiryCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::WiFiVersion::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -33543,10 +34767,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCount : if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTxIndirectMaxRetryExpiryCountWithParams:params + [cluster subscribeAttributeWiFiVersionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxIndirectMaxRetryExpiryCount response %@", [value description]); + NSLog(@"WiFiNetworkDiagnostics.WiFiVersion response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -33560,34 +34784,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxIndirectMaxRetryExpiryCount : }; /* - * Attribute TxErrCcaCount + * Attribute ChannelNumber */ -class ReadThreadNetworkDiagnosticsTxErrCcaCount : public ReadAttribute { +class ReadWiFiNetworkDiagnosticsChannelNumber : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsTxErrCcaCount() - : ReadAttribute("tx-err-cca-count") + ReadWiFiNetworkDiagnosticsChannelNumber() + : ReadAttribute("channel-number") { } - ~ReadThreadNetworkDiagnosticsTxErrCcaCount() + ~ReadWiFiNetworkDiagnosticsChannelNumber() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::ChannelNumber::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxErrCcaCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxErrCcaCount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeChannelNumberWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.ChannelNumber response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics TxErrCcaCount read Error", error); + LogNSError("WiFiNetworkDiagnostics ChannelNumber read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -33596,25 +34820,25 @@ class ReadThreadNetworkDiagnosticsTxErrCcaCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsTxErrCcaCount : public SubscribeAttribute { +class SubscribeAttributeWiFiNetworkDiagnosticsChannelNumber : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsTxErrCcaCount() - : SubscribeAttribute("tx-err-cca-count") + SubscribeAttributeWiFiNetworkDiagnosticsChannelNumber() + : SubscribeAttribute("channel-number") { } - ~SubscribeAttributeThreadNetworkDiagnosticsTxErrCcaCount() + ~SubscribeAttributeWiFiNetworkDiagnosticsChannelNumber() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxErrCcaCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::ChannelNumber::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -33625,10 +34849,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxErrCcaCount : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTxErrCcaCountWithParams:params + [cluster subscribeAttributeChannelNumberWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxErrCcaCount response %@", [value description]); + NSLog(@"WiFiNetworkDiagnostics.ChannelNumber response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -33642,34 +34866,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxErrCcaCount : public Subscribe }; /* - * Attribute TxErrAbortCount + * Attribute Rssi */ -class ReadThreadNetworkDiagnosticsTxErrAbortCount : public ReadAttribute { +class ReadWiFiNetworkDiagnosticsRssi : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsTxErrAbortCount() - : ReadAttribute("tx-err-abort-count") + ReadWiFiNetworkDiagnosticsRssi() + : ReadAttribute("rssi") { } - ~ReadThreadNetworkDiagnosticsTxErrAbortCount() + ~ReadWiFiNetworkDiagnosticsRssi() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::Rssi::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxErrAbortCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxErrAbortCount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeRSSIWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.RSSI response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics TxErrAbortCount read Error", error); + LogNSError("WiFiNetworkDiagnostics RSSI read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -33678,25 +34902,25 @@ class ReadThreadNetworkDiagnosticsTxErrAbortCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsTxErrAbortCount : public SubscribeAttribute { +class SubscribeAttributeWiFiNetworkDiagnosticsRssi : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsTxErrAbortCount() - : SubscribeAttribute("tx-err-abort-count") + SubscribeAttributeWiFiNetworkDiagnosticsRssi() + : SubscribeAttribute("rssi") { } - ~SubscribeAttributeThreadNetworkDiagnosticsTxErrAbortCount() + ~SubscribeAttributeWiFiNetworkDiagnosticsRssi() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxErrAbortCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::Rssi::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -33707,10 +34931,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxErrAbortCount : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTxErrAbortCountWithParams:params + [cluster subscribeAttributeRSSIWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxErrAbortCount response %@", [value description]); + NSLog(@"WiFiNetworkDiagnostics.RSSI response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -33724,34 +34948,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxErrAbortCount : public Subscri }; /* - * Attribute TxErrBusyChannelCount + * Attribute BeaconLostCount */ -class ReadThreadNetworkDiagnosticsTxErrBusyChannelCount : public ReadAttribute { +class ReadWiFiNetworkDiagnosticsBeaconLostCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsTxErrBusyChannelCount() - : ReadAttribute("tx-err-busy-channel-count") + ReadWiFiNetworkDiagnosticsBeaconLostCount() + : ReadAttribute("beacon-lost-count") { } - ~ReadThreadNetworkDiagnosticsTxErrBusyChannelCount() + ~ReadWiFiNetworkDiagnosticsBeaconLostCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::BeaconLostCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxErrBusyChannelCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxErrBusyChannelCount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBeaconLostCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.BeaconLostCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics TxErrBusyChannelCount read Error", error); + LogNSError("WiFiNetworkDiagnostics BeaconLostCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -33760,25 +34984,25 @@ class ReadThreadNetworkDiagnosticsTxErrBusyChannelCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsTxErrBusyChannelCount : public SubscribeAttribute { +class SubscribeAttributeWiFiNetworkDiagnosticsBeaconLostCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsTxErrBusyChannelCount() - : SubscribeAttribute("tx-err-busy-channel-count") + SubscribeAttributeWiFiNetworkDiagnosticsBeaconLostCount() + : SubscribeAttribute("beacon-lost-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsTxErrBusyChannelCount() + ~SubscribeAttributeWiFiNetworkDiagnosticsBeaconLostCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::TxErrBusyChannelCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::BeaconLostCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -33789,10 +35013,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxErrBusyChannelCount : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTxErrBusyChannelCountWithParams:params + [cluster subscribeAttributeBeaconLostCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.TxErrBusyChannelCount response %@", [value description]); + NSLog(@"WiFiNetworkDiagnostics.BeaconLostCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -33806,34 +35030,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsTxErrBusyChannelCount : public S }; /* - * Attribute RxTotalCount + * Attribute BeaconRxCount */ -class ReadThreadNetworkDiagnosticsRxTotalCount : public ReadAttribute { +class ReadWiFiNetworkDiagnosticsBeaconRxCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsRxTotalCount() - : ReadAttribute("rx-total-count") + ReadWiFiNetworkDiagnosticsBeaconRxCount() + : ReadAttribute("beacon-rx-count") { } - ~ReadThreadNetworkDiagnosticsRxTotalCount() + ~ReadWiFiNetworkDiagnosticsBeaconRxCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxTotalCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::BeaconRxCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRxTotalCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxTotalCount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeBeaconRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.BeaconRxCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics RxTotalCount read Error", error); + LogNSError("WiFiNetworkDiagnostics BeaconRxCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -33842,25 +35066,25 @@ class ReadThreadNetworkDiagnosticsRxTotalCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsRxTotalCount : public SubscribeAttribute { +class SubscribeAttributeWiFiNetworkDiagnosticsBeaconRxCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsRxTotalCount() - : SubscribeAttribute("rx-total-count") + SubscribeAttributeWiFiNetworkDiagnosticsBeaconRxCount() + : SubscribeAttribute("beacon-rx-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsRxTotalCount() + ~SubscribeAttributeWiFiNetworkDiagnosticsBeaconRxCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxTotalCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::BeaconRxCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -33871,10 +35095,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxTotalCount : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRxTotalCountWithParams:params + [cluster subscribeAttributeBeaconRxCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxTotalCount response %@", [value description]); + NSLog(@"WiFiNetworkDiagnostics.BeaconRxCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -33888,34 +35112,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxTotalCount : public SubscribeA }; /* - * Attribute RxUnicastCount + * Attribute PacketMulticastRxCount */ -class ReadThreadNetworkDiagnosticsRxUnicastCount : public ReadAttribute { +class ReadWiFiNetworkDiagnosticsPacketMulticastRxCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsRxUnicastCount() - : ReadAttribute("rx-unicast-count") + ReadWiFiNetworkDiagnosticsPacketMulticastRxCount() + : ReadAttribute("packet-multicast-rx-count") { } - ~ReadThreadNetworkDiagnosticsRxUnicastCount() + ~ReadWiFiNetworkDiagnosticsPacketMulticastRxCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxUnicastCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRxUnicastCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxUnicastCount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePacketMulticastRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.PacketMulticastRxCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics RxUnicastCount read Error", error); + LogNSError("WiFiNetworkDiagnostics PacketMulticastRxCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -33924,25 +35148,25 @@ class ReadThreadNetworkDiagnosticsRxUnicastCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsRxUnicastCount : public SubscribeAttribute { +class SubscribeAttributeWiFiNetworkDiagnosticsPacketMulticastRxCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsRxUnicastCount() - : SubscribeAttribute("rx-unicast-count") + SubscribeAttributeWiFiNetworkDiagnosticsPacketMulticastRxCount() + : SubscribeAttribute("packet-multicast-rx-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsRxUnicastCount() + ~SubscribeAttributeWiFiNetworkDiagnosticsPacketMulticastRxCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxUnicastCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -33953,10 +35177,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxUnicastCount : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRxUnicastCountWithParams:params + [cluster subscribeAttributePacketMulticastRxCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxUnicastCount response %@", [value description]); + NSLog(@"WiFiNetworkDiagnostics.PacketMulticastRxCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -33970,34 +35194,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxUnicastCount : public Subscrib }; /* - * Attribute RxBroadcastCount + * Attribute PacketMulticastTxCount */ -class ReadThreadNetworkDiagnosticsRxBroadcastCount : public ReadAttribute { +class ReadWiFiNetworkDiagnosticsPacketMulticastTxCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsRxBroadcastCount() - : ReadAttribute("rx-broadcast-count") + ReadWiFiNetworkDiagnosticsPacketMulticastTxCount() + : ReadAttribute("packet-multicast-tx-count") { } - ~ReadThreadNetworkDiagnosticsRxBroadcastCount() + ~ReadWiFiNetworkDiagnosticsPacketMulticastTxCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRxBroadcastCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxBroadcastCount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePacketMulticastTxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.PacketMulticastTxCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics RxBroadcastCount read Error", error); + LogNSError("WiFiNetworkDiagnostics PacketMulticastTxCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -34006,25 +35230,25 @@ class ReadThreadNetworkDiagnosticsRxBroadcastCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsRxBroadcastCount : public SubscribeAttribute { +class SubscribeAttributeWiFiNetworkDiagnosticsPacketMulticastTxCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsRxBroadcastCount() - : SubscribeAttribute("rx-broadcast-count") + SubscribeAttributeWiFiNetworkDiagnosticsPacketMulticastTxCount() + : SubscribeAttribute("packet-multicast-tx-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsRxBroadcastCount() + ~SubscribeAttributeWiFiNetworkDiagnosticsPacketMulticastTxCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxBroadcastCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -34035,10 +35259,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxBroadcastCount : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRxBroadcastCountWithParams:params + [cluster subscribeAttributePacketMulticastTxCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxBroadcastCount response %@", [value description]); + NSLog(@"WiFiNetworkDiagnostics.PacketMulticastTxCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -34052,34 +35276,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxBroadcastCount : public Subscr }; /* - * Attribute RxDataCount + * Attribute PacketUnicastRxCount */ -class ReadThreadNetworkDiagnosticsRxDataCount : public ReadAttribute { +class ReadWiFiNetworkDiagnosticsPacketUnicastRxCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsRxDataCount() - : ReadAttribute("rx-data-count") + ReadWiFiNetworkDiagnosticsPacketUnicastRxCount() + : ReadAttribute("packet-unicast-rx-count") { } - ~ReadThreadNetworkDiagnosticsRxDataCount() + ~ReadWiFiNetworkDiagnosticsPacketUnicastRxCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxDataCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRxDataCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxDataCount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePacketUnicastRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.PacketUnicastRxCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics RxDataCount read Error", error); + LogNSError("WiFiNetworkDiagnostics PacketUnicastRxCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -34088,25 +35312,25 @@ class ReadThreadNetworkDiagnosticsRxDataCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsRxDataCount : public SubscribeAttribute { +class SubscribeAttributeWiFiNetworkDiagnosticsPacketUnicastRxCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsRxDataCount() - : SubscribeAttribute("rx-data-count") + SubscribeAttributeWiFiNetworkDiagnosticsPacketUnicastRxCount() + : SubscribeAttribute("packet-unicast-rx-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsRxDataCount() + ~SubscribeAttributeWiFiNetworkDiagnosticsPacketUnicastRxCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxDataCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -34117,10 +35341,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxDataCount : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRxDataCountWithParams:params + [cluster subscribeAttributePacketUnicastRxCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxDataCount response %@", [value description]); + NSLog(@"WiFiNetworkDiagnostics.PacketUnicastRxCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -34134,34 +35358,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxDataCount : public SubscribeAt }; /* - * Attribute RxDataPollCount + * Attribute PacketUnicastTxCount */ -class ReadThreadNetworkDiagnosticsRxDataPollCount : public ReadAttribute { +class ReadWiFiNetworkDiagnosticsPacketUnicastTxCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsRxDataPollCount() - : ReadAttribute("rx-data-poll-count") + ReadWiFiNetworkDiagnosticsPacketUnicastTxCount() + : ReadAttribute("packet-unicast-tx-count") { } - ~ReadThreadNetworkDiagnosticsRxDataPollCount() + ~ReadWiFiNetworkDiagnosticsPacketUnicastTxCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxDataPollCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRxDataPollCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxDataPollCount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePacketUnicastTxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.PacketUnicastTxCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics RxDataPollCount read Error", error); + LogNSError("WiFiNetworkDiagnostics PacketUnicastTxCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -34170,25 +35394,25 @@ class ReadThreadNetworkDiagnosticsRxDataPollCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsRxDataPollCount : public SubscribeAttribute { +class SubscribeAttributeWiFiNetworkDiagnosticsPacketUnicastTxCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsRxDataPollCount() - : SubscribeAttribute("rx-data-poll-count") + SubscribeAttributeWiFiNetworkDiagnosticsPacketUnicastTxCount() + : SubscribeAttribute("packet-unicast-tx-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsRxDataPollCount() + ~SubscribeAttributeWiFiNetworkDiagnosticsPacketUnicastTxCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxDataPollCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -34199,10 +35423,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxDataPollCount : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRxDataPollCountWithParams:params + [cluster subscribeAttributePacketUnicastTxCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxDataPollCount response %@", [value description]); + NSLog(@"WiFiNetworkDiagnostics.PacketUnicastTxCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -34216,34 +35440,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxDataPollCount : public Subscri }; /* - * Attribute RxBeaconCount + * Attribute CurrentMaxRate */ -class ReadThreadNetworkDiagnosticsRxBeaconCount : public ReadAttribute { +class ReadWiFiNetworkDiagnosticsCurrentMaxRate : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsRxBeaconCount() - : ReadAttribute("rx-beacon-count") + ReadWiFiNetworkDiagnosticsCurrentMaxRate() + : ReadAttribute("current-max-rate") { } - ~ReadThreadNetworkDiagnosticsRxBeaconCount() + ~ReadWiFiNetworkDiagnosticsCurrentMaxRate() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxBeaconCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRxBeaconCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxBeaconCount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentMaxRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.CurrentMaxRate response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics RxBeaconCount read Error", error); + LogNSError("WiFiNetworkDiagnostics CurrentMaxRate read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -34252,25 +35476,25 @@ class ReadThreadNetworkDiagnosticsRxBeaconCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsRxBeaconCount : public SubscribeAttribute { +class SubscribeAttributeWiFiNetworkDiagnosticsCurrentMaxRate : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsRxBeaconCount() - : SubscribeAttribute("rx-beacon-count") + SubscribeAttributeWiFiNetworkDiagnosticsCurrentMaxRate() + : SubscribeAttribute("current-max-rate") { } - ~SubscribeAttributeThreadNetworkDiagnosticsRxBeaconCount() + ~SubscribeAttributeWiFiNetworkDiagnosticsCurrentMaxRate() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxBeaconCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -34281,10 +35505,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxBeaconCount : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRxBeaconCountWithParams:params + [cluster subscribeAttributeCurrentMaxRateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxBeaconCount response %@", [value description]); + NSLog(@"WiFiNetworkDiagnostics.CurrentMaxRate response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -34298,34 +35522,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxBeaconCount : public Subscribe }; /* - * Attribute RxBeaconRequestCount + * Attribute OverrunCount */ -class ReadThreadNetworkDiagnosticsRxBeaconRequestCount : public ReadAttribute { +class ReadWiFiNetworkDiagnosticsOverrunCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsRxBeaconRequestCount() - : ReadAttribute("rx-beacon-request-count") + ReadWiFiNetworkDiagnosticsOverrunCount() + : ReadAttribute("overrun-count") { } - ~ReadThreadNetworkDiagnosticsRxBeaconRequestCount() + ~ReadWiFiNetworkDiagnosticsOverrunCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::OverrunCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRxBeaconRequestCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxBeaconRequestCount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOverrunCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.OverrunCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics RxBeaconRequestCount read Error", error); + LogNSError("WiFiNetworkDiagnostics OverrunCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -34334,25 +35558,25 @@ class ReadThreadNetworkDiagnosticsRxBeaconRequestCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsRxBeaconRequestCount : public SubscribeAttribute { +class SubscribeAttributeWiFiNetworkDiagnosticsOverrunCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsRxBeaconRequestCount() - : SubscribeAttribute("rx-beacon-request-count") + SubscribeAttributeWiFiNetworkDiagnosticsOverrunCount() + : SubscribeAttribute("overrun-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsRxBeaconRequestCount() + ~SubscribeAttributeWiFiNetworkDiagnosticsOverrunCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxBeaconRequestCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::OverrunCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -34363,10 +35587,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxBeaconRequestCount : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRxBeaconRequestCountWithParams:params + [cluster subscribeAttributeOverrunCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxBeaconRequestCount response %@", [value description]); + NSLog(@"WiFiNetworkDiagnostics.OverrunCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -34380,34 +35604,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxBeaconRequestCount : public Su }; /* - * Attribute RxOtherCount + * Attribute GeneratedCommandList */ -class ReadThreadNetworkDiagnosticsRxOtherCount : public ReadAttribute { +class ReadWiFiNetworkDiagnosticsGeneratedCommandList : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsRxOtherCount() - : ReadAttribute("rx-other-count") + ReadWiFiNetworkDiagnosticsGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadThreadNetworkDiagnosticsRxOtherCount() + ~ReadWiFiNetworkDiagnosticsGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxOtherCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::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 = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRxOtherCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxOtherCount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics RxOtherCount read Error", error); + LogNSError("WiFiNetworkDiagnostics GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -34416,25 +35640,25 @@ class ReadThreadNetworkDiagnosticsRxOtherCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsRxOtherCount : public SubscribeAttribute { +class SubscribeAttributeWiFiNetworkDiagnosticsGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsRxOtherCount() - : SubscribeAttribute("rx-other-count") + SubscribeAttributeWiFiNetworkDiagnosticsGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeThreadNetworkDiagnosticsRxOtherCount() + ~SubscribeAttributeWiFiNetworkDiagnosticsGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxOtherCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::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 = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -34445,10 +35669,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxOtherCount : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRxOtherCountWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxOtherCount response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -34462,34 +35686,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxOtherCount : public SubscribeA }; /* - * Attribute RxAddressFilteredCount + * Attribute AcceptedCommandList */ -class ReadThreadNetworkDiagnosticsRxAddressFilteredCount : public ReadAttribute { +class ReadWiFiNetworkDiagnosticsAcceptedCommandList : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsRxAddressFilteredCount() - : ReadAttribute("rx-address-filtered-count") + ReadWiFiNetworkDiagnosticsAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadThreadNetworkDiagnosticsRxAddressFilteredCount() + ~ReadWiFiNetworkDiagnosticsAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::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 = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRxAddressFilteredCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxAddressFilteredCount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics RxAddressFilteredCount read Error", error); + LogNSError("WiFiNetworkDiagnostics AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -34498,25 +35722,25 @@ class ReadThreadNetworkDiagnosticsRxAddressFilteredCount : public ReadAttribute } }; -class SubscribeAttributeThreadNetworkDiagnosticsRxAddressFilteredCount : public SubscribeAttribute { +class SubscribeAttributeWiFiNetworkDiagnosticsAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsRxAddressFilteredCount() - : SubscribeAttribute("rx-address-filtered-count") + SubscribeAttributeWiFiNetworkDiagnosticsAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeThreadNetworkDiagnosticsRxAddressFilteredCount() + ~SubscribeAttributeWiFiNetworkDiagnosticsAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxAddressFilteredCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::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 = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -34527,10 +35751,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxAddressFilteredCount : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRxAddressFilteredCountWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxAddressFilteredCount response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -34543,35 +35767,37 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxAddressFilteredCount : public } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute RxDestAddrFilteredCount + * Attribute EventList */ -class ReadThreadNetworkDiagnosticsRxDestAddrFilteredCount : public ReadAttribute { +class ReadWiFiNetworkDiagnosticsEventList : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsRxDestAddrFilteredCount() - : ReadAttribute("rx-dest-addr-filtered-count") + ReadWiFiNetworkDiagnosticsEventList() + : ReadAttribute("event-list") { } - ~ReadThreadNetworkDiagnosticsRxDestAddrFilteredCount() + ~ReadWiFiNetworkDiagnosticsEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::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 = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRxDestAddrFilteredCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxDestAddrFilteredCount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics RxDestAddrFilteredCount read Error", error); + LogNSError("WiFiNetworkDiagnostics EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -34580,25 +35806,25 @@ class ReadThreadNetworkDiagnosticsRxDestAddrFilteredCount : public ReadAttribute } }; -class SubscribeAttributeThreadNetworkDiagnosticsRxDestAddrFilteredCount : public SubscribeAttribute { +class SubscribeAttributeWiFiNetworkDiagnosticsEventList : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsRxDestAddrFilteredCount() - : SubscribeAttribute("rx-dest-addr-filtered-count") + SubscribeAttributeWiFiNetworkDiagnosticsEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeThreadNetworkDiagnosticsRxDestAddrFilteredCount() + ~SubscribeAttributeWiFiNetworkDiagnosticsEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxDestAddrFilteredCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::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 = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -34609,10 +35835,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxDestAddrFilteredCount : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRxDestAddrFilteredCountWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxDestAddrFilteredCount response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -34625,35 +35851,37 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxDestAddrFilteredCount : public } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute RxDuplicatedCount + * Attribute AttributeList */ -class ReadThreadNetworkDiagnosticsRxDuplicatedCount : public ReadAttribute { +class ReadWiFiNetworkDiagnosticsAttributeList : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsRxDuplicatedCount() - : ReadAttribute("rx-duplicated-count") + ReadWiFiNetworkDiagnosticsAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadThreadNetworkDiagnosticsRxDuplicatedCount() + ~ReadWiFiNetworkDiagnosticsAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::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 = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRxDuplicatedCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxDuplicatedCount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics RxDuplicatedCount read Error", error); + LogNSError("WiFiNetworkDiagnostics AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -34662,25 +35890,25 @@ class ReadThreadNetworkDiagnosticsRxDuplicatedCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsRxDuplicatedCount : public SubscribeAttribute { +class SubscribeAttributeWiFiNetworkDiagnosticsAttributeList : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsRxDuplicatedCount() - : SubscribeAttribute("rx-duplicated-count") + SubscribeAttributeWiFiNetworkDiagnosticsAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeThreadNetworkDiagnosticsRxDuplicatedCount() + ~SubscribeAttributeWiFiNetworkDiagnosticsAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxDuplicatedCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::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 = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -34691,10 +35919,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxDuplicatedCount : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRxDuplicatedCountWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxDuplicatedCount response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -34708,34 +35936,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxDuplicatedCount : public Subsc }; /* - * Attribute RxErrNoFrameCount + * Attribute FeatureMap */ -class ReadThreadNetworkDiagnosticsRxErrNoFrameCount : public ReadAttribute { +class ReadWiFiNetworkDiagnosticsFeatureMap : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsRxErrNoFrameCount() - : ReadAttribute("rx-err-no-frame-count") + ReadWiFiNetworkDiagnosticsFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadThreadNetworkDiagnosticsRxErrNoFrameCount() + ~ReadWiFiNetworkDiagnosticsFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::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 = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRxErrNoFrameCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxErrNoFrameCount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics RxErrNoFrameCount read Error", error); + LogNSError("WiFiNetworkDiagnostics FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -34744,25 +35972,25 @@ class ReadThreadNetworkDiagnosticsRxErrNoFrameCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsRxErrNoFrameCount : public SubscribeAttribute { +class SubscribeAttributeWiFiNetworkDiagnosticsFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsRxErrNoFrameCount() - : SubscribeAttribute("rx-err-no-frame-count") + SubscribeAttributeWiFiNetworkDiagnosticsFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeThreadNetworkDiagnosticsRxErrNoFrameCount() + ~SubscribeAttributeWiFiNetworkDiagnosticsFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrNoFrameCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::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 = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -34773,10 +36001,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrNoFrameCount : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRxErrNoFrameCountWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxErrNoFrameCount response %@", [value description]); + NSLog(@"WiFiNetworkDiagnostics.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -34790,34 +36018,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrNoFrameCount : public Subsc }; /* - * Attribute RxErrUnknownNeighborCount + * Attribute ClusterRevision */ -class ReadThreadNetworkDiagnosticsRxErrUnknownNeighborCount : public ReadAttribute { +class ReadWiFiNetworkDiagnosticsClusterRevision : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsRxErrUnknownNeighborCount() - : ReadAttribute("rx-err-unknown-neighbor-count") + ReadWiFiNetworkDiagnosticsClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadThreadNetworkDiagnosticsRxErrUnknownNeighborCount() + ~ReadWiFiNetworkDiagnosticsClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::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 = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRxErrUnknownNeighborCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxErrUnknownNeighborCount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"WiFiNetworkDiagnostics.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics RxErrUnknownNeighborCount read Error", error); + LogNSError("WiFiNetworkDiagnostics ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -34826,25 +36054,25 @@ class ReadThreadNetworkDiagnosticsRxErrUnknownNeighborCount : public ReadAttribu } }; -class SubscribeAttributeThreadNetworkDiagnosticsRxErrUnknownNeighborCount : public SubscribeAttribute { +class SubscribeAttributeWiFiNetworkDiagnosticsClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsRxErrUnknownNeighborCount() - : SubscribeAttribute("rx-err-unknown-neighbor-count") + SubscribeAttributeWiFiNetworkDiagnosticsClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeThreadNetworkDiagnosticsRxErrUnknownNeighborCount() + ~SubscribeAttributeWiFiNetworkDiagnosticsClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrUnknownNeighborCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::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 = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -34855,10 +36083,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrUnknownNeighborCount : publ if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRxErrUnknownNeighborCountWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxErrUnknownNeighborCount response %@", [value description]); + NSLog(@"WiFiNetworkDiagnostics.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -34871,35 +36099,105 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrUnknownNeighborCount : publ } }; +/*----------------------------------------------------------------------------*\ +| Cluster EthernetNetworkDiagnostics | 0x0037 | +|------------------------------------------------------------------------------| +| Commands: | | +| * ResetCounts | 0x00 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * PHYRate | 0x0000 | +| * FullDuplex | 0x0001 | +| * PacketRxCount | 0x0002 | +| * PacketTxCount | 0x0003 | +| * TxErrCount | 0x0004 | +| * CollisionCount | 0x0005 | +| * OverrunCount | 0x0006 | +| * CarrierDetect | 0x0007 | +| * TimeSinceReset | 0x0008 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute RxErrInvalidSrcAddrCount + * Command ResetCounts */ -class ReadThreadNetworkDiagnosticsRxErrInvalidSrcAddrCount : public ReadAttribute { +class EthernetNetworkDiagnosticsResetCounts : public ClusterCommand { public: - ReadThreadNetworkDiagnosticsRxErrInvalidSrcAddrCount() - : ReadAttribute("rx-err-invalid-src-addr-count") + EthernetNetworkDiagnosticsResetCounts() + : ClusterCommand("reset-counts") { + ClusterCommand::AddArguments(); } - ~ReadThreadNetworkDiagnosticsRxErrInvalidSrcAddrCount() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + 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 endpoint %u", clusterId, commandId, endpointId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTREthernetNetworkDiagnosticsClusterResetCountsParams 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 resetCountsWithParams: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 PHYRate + */ +class ReadEthernetNetworkDiagnosticsPHYRate : public ReadAttribute { +public: + ReadEthernetNetworkDiagnosticsPHYRate() + : ReadAttribute("phyrate") + { + } + + ~ReadEthernetNetworkDiagnosticsPHYRate() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::PHYRate::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRxErrInvalidSrcAddrCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxErrInvalidSrcAddrCount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePHYRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EthernetNetworkDiagnostics.PHYRate response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics RxErrInvalidSrcAddrCount read Error", error); + LogNSError("EthernetNetworkDiagnostics PHYRate read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -34908,25 +36206,25 @@ class ReadThreadNetworkDiagnosticsRxErrInvalidSrcAddrCount : public ReadAttribut } }; -class SubscribeAttributeThreadNetworkDiagnosticsRxErrInvalidSrcAddrCount : public SubscribeAttribute { +class SubscribeAttributeEthernetNetworkDiagnosticsPHYRate : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsRxErrInvalidSrcAddrCount() - : SubscribeAttribute("rx-err-invalid-src-addr-count") + SubscribeAttributeEthernetNetworkDiagnosticsPHYRate() + : SubscribeAttribute("phyrate") { } - ~SubscribeAttributeThreadNetworkDiagnosticsRxErrInvalidSrcAddrCount() + ~SubscribeAttributeEthernetNetworkDiagnosticsPHYRate() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrInvalidSrcAddrCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::PHYRate::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -34937,10 +36235,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrInvalidSrcAddrCount : publi if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRxErrInvalidSrcAddrCountWithParams:params + [cluster subscribeAttributePHYRateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxErrInvalidSrcAddrCount response %@", [value description]); + NSLog(@"EthernetNetworkDiagnostics.PHYRate response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -34954,34 +36252,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrInvalidSrcAddrCount : publi }; /* - * Attribute RxErrSecCount + * Attribute FullDuplex */ -class ReadThreadNetworkDiagnosticsRxErrSecCount : public ReadAttribute { +class ReadEthernetNetworkDiagnosticsFullDuplex : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsRxErrSecCount() - : ReadAttribute("rx-err-sec-count") + ReadEthernetNetworkDiagnosticsFullDuplex() + : ReadAttribute("full-duplex") { } - ~ReadThreadNetworkDiagnosticsRxErrSecCount() + ~ReadEthernetNetworkDiagnosticsFullDuplex() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrSecCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::FullDuplex::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRxErrSecCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxErrSecCount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFullDuplexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EthernetNetworkDiagnostics.FullDuplex response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics RxErrSecCount read Error", error); + LogNSError("EthernetNetworkDiagnostics FullDuplex read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -34990,25 +36288,25 @@ class ReadThreadNetworkDiagnosticsRxErrSecCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsRxErrSecCount : public SubscribeAttribute { +class SubscribeAttributeEthernetNetworkDiagnosticsFullDuplex : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsRxErrSecCount() - : SubscribeAttribute("rx-err-sec-count") + SubscribeAttributeEthernetNetworkDiagnosticsFullDuplex() + : SubscribeAttribute("full-duplex") { } - ~SubscribeAttributeThreadNetworkDiagnosticsRxErrSecCount() + ~SubscribeAttributeEthernetNetworkDiagnosticsFullDuplex() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrSecCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::FullDuplex::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -35019,10 +36317,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrSecCount : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRxErrSecCountWithParams:params + [cluster subscribeAttributeFullDuplexWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxErrSecCount response %@", [value description]); + NSLog(@"EthernetNetworkDiagnostics.FullDuplex response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -35036,34 +36334,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrSecCount : public Subscribe }; /* - * Attribute RxErrFcsCount + * Attribute PacketRxCount */ -class ReadThreadNetworkDiagnosticsRxErrFcsCount : public ReadAttribute { +class ReadEthernetNetworkDiagnosticsPacketRxCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsRxErrFcsCount() - : ReadAttribute("rx-err-fcs-count") + ReadEthernetNetworkDiagnosticsPacketRxCount() + : ReadAttribute("packet-rx-count") { } - ~ReadThreadNetworkDiagnosticsRxErrFcsCount() + ~ReadEthernetNetworkDiagnosticsPacketRxCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::PacketRxCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRxErrFcsCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxErrFcsCount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePacketRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EthernetNetworkDiagnostics.PacketRxCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics RxErrFcsCount read Error", error); + LogNSError("EthernetNetworkDiagnostics PacketRxCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -35072,25 +36370,25 @@ class ReadThreadNetworkDiagnosticsRxErrFcsCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsRxErrFcsCount : public SubscribeAttribute { +class SubscribeAttributeEthernetNetworkDiagnosticsPacketRxCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsRxErrFcsCount() - : SubscribeAttribute("rx-err-fcs-count") + SubscribeAttributeEthernetNetworkDiagnosticsPacketRxCount() + : SubscribeAttribute("packet-rx-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsRxErrFcsCount() + ~SubscribeAttributeEthernetNetworkDiagnosticsPacketRxCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrFcsCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::PacketRxCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -35101,10 +36399,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrFcsCount : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRxErrFcsCountWithParams:params + [cluster subscribeAttributePacketRxCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxErrFcsCount response %@", [value description]); + NSLog(@"EthernetNetworkDiagnostics.PacketRxCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -35118,34 +36416,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrFcsCount : public Subscribe }; /* - * Attribute RxErrOtherCount + * Attribute PacketTxCount */ -class ReadThreadNetworkDiagnosticsRxErrOtherCount : public ReadAttribute { +class ReadEthernetNetworkDiagnosticsPacketTxCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsRxErrOtherCount() - : ReadAttribute("rx-err-other-count") + ReadEthernetNetworkDiagnosticsPacketTxCount() + : ReadAttribute("packet-tx-count") { } - ~ReadThreadNetworkDiagnosticsRxErrOtherCount() + ~ReadEthernetNetworkDiagnosticsPacketTxCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::PacketTxCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRxErrOtherCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxErrOtherCount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePacketTxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EthernetNetworkDiagnostics.PacketTxCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics RxErrOtherCount read Error", error); + LogNSError("EthernetNetworkDiagnostics PacketTxCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -35154,25 +36452,25 @@ class ReadThreadNetworkDiagnosticsRxErrOtherCount : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsRxErrOtherCount : public SubscribeAttribute { +class SubscribeAttributeEthernetNetworkDiagnosticsPacketTxCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsRxErrOtherCount() - : SubscribeAttribute("rx-err-other-count") + SubscribeAttributeEthernetNetworkDiagnosticsPacketTxCount() + : SubscribeAttribute("packet-tx-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsRxErrOtherCount() + ~SubscribeAttributeEthernetNetworkDiagnosticsPacketTxCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::RxErrOtherCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::PacketTxCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -35183,10 +36481,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrOtherCount : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRxErrOtherCountWithParams:params + [cluster subscribeAttributePacketTxCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.RxErrOtherCount response %@", [value description]); + NSLog(@"EthernetNetworkDiagnostics.PacketTxCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -35200,34 +36498,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsRxErrOtherCount : public Subscri }; /* - * Attribute ActiveTimestamp + * Attribute TxErrCount */ -class ReadThreadNetworkDiagnosticsActiveTimestamp : public ReadAttribute { +class ReadEthernetNetworkDiagnosticsTxErrCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsActiveTimestamp() - : ReadAttribute("active-timestamp") + ReadEthernetNetworkDiagnosticsTxErrCount() + : ReadAttribute("tx-err-count") { } - ~ReadThreadNetworkDiagnosticsActiveTimestamp() + ~ReadEthernetNetworkDiagnosticsTxErrCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::TxErrCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActiveTimestampWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.ActiveTimestamp response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTxErrCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EthernetNetworkDiagnostics.TxErrCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics ActiveTimestamp read Error", error); + LogNSError("EthernetNetworkDiagnostics TxErrCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -35236,25 +36534,25 @@ class ReadThreadNetworkDiagnosticsActiveTimestamp : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsActiveTimestamp : public SubscribeAttribute { +class SubscribeAttributeEthernetNetworkDiagnosticsTxErrCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsActiveTimestamp() - : SubscribeAttribute("active-timestamp") + SubscribeAttributeEthernetNetworkDiagnosticsTxErrCount() + : SubscribeAttribute("tx-err-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsActiveTimestamp() + ~SubscribeAttributeEthernetNetworkDiagnosticsTxErrCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ActiveTimestamp::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::TxErrCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -35265,10 +36563,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsActiveTimestamp : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActiveTimestampWithParams:params + [cluster subscribeAttributeTxErrCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.ActiveTimestamp response %@", [value description]); + NSLog(@"EthernetNetworkDiagnostics.TxErrCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -35282,34 +36580,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsActiveTimestamp : public Subscri }; /* - * Attribute PendingTimestamp + * Attribute CollisionCount */ -class ReadThreadNetworkDiagnosticsPendingTimestamp : public ReadAttribute { +class ReadEthernetNetworkDiagnosticsCollisionCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsPendingTimestamp() - : ReadAttribute("pending-timestamp") + ReadEthernetNetworkDiagnosticsCollisionCount() + : ReadAttribute("collision-count") { } - ~ReadThreadNetworkDiagnosticsPendingTimestamp() + ~ReadEthernetNetworkDiagnosticsCollisionCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::PendingTimestamp::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::CollisionCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePendingTimestampWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.PendingTimestamp response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCollisionCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EthernetNetworkDiagnostics.CollisionCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics PendingTimestamp read Error", error); + LogNSError("EthernetNetworkDiagnostics CollisionCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -35318,25 +36616,25 @@ class ReadThreadNetworkDiagnosticsPendingTimestamp : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsPendingTimestamp : public SubscribeAttribute { +class SubscribeAttributeEthernetNetworkDiagnosticsCollisionCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsPendingTimestamp() - : SubscribeAttribute("pending-timestamp") + SubscribeAttributeEthernetNetworkDiagnosticsCollisionCount() + : SubscribeAttribute("collision-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsPendingTimestamp() + ~SubscribeAttributeEthernetNetworkDiagnosticsCollisionCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::PendingTimestamp::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::CollisionCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -35347,10 +36645,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsPendingTimestamp : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePendingTimestampWithParams:params + [cluster subscribeAttributeCollisionCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.PendingTimestamp response %@", [value description]); + NSLog(@"EthernetNetworkDiagnostics.CollisionCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -35364,34 +36662,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsPendingTimestamp : public Subscr }; /* - * Attribute Delay + * Attribute OverrunCount */ -class ReadThreadNetworkDiagnosticsDelay : public ReadAttribute { +class ReadEthernetNetworkDiagnosticsOverrunCount : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsDelay() - : ReadAttribute("delay") + ReadEthernetNetworkDiagnosticsOverrunCount() + : ReadAttribute("overrun-count") { } - ~ReadThreadNetworkDiagnosticsDelay() + ~ReadEthernetNetworkDiagnosticsOverrunCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::Delay::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::OverrunCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDelayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.Delay response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOverrunCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EthernetNetworkDiagnostics.OverrunCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics Delay read Error", error); + LogNSError("EthernetNetworkDiagnostics OverrunCount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -35400,25 +36698,25 @@ class ReadThreadNetworkDiagnosticsDelay : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsDelay : public SubscribeAttribute { +class SubscribeAttributeEthernetNetworkDiagnosticsOverrunCount : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsDelay() - : SubscribeAttribute("delay") + SubscribeAttributeEthernetNetworkDiagnosticsOverrunCount() + : SubscribeAttribute("overrun-count") { } - ~SubscribeAttributeThreadNetworkDiagnosticsDelay() + ~SubscribeAttributeEthernetNetworkDiagnosticsOverrunCount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::Delay::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::OverrunCount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -35429,10 +36727,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsDelay : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDelayWithParams:params + [cluster subscribeAttributeOverrunCountWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.Delay response %@", [value description]); + NSLog(@"EthernetNetworkDiagnostics.OverrunCount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -35446,34 +36744,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsDelay : public SubscribeAttribut }; /* - * Attribute SecurityPolicy + * Attribute CarrierDetect */ -class ReadThreadNetworkDiagnosticsSecurityPolicy : public ReadAttribute { +class ReadEthernetNetworkDiagnosticsCarrierDetect : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsSecurityPolicy() - : ReadAttribute("security-policy") + ReadEthernetNetworkDiagnosticsCarrierDetect() + : ReadAttribute("carrier-detect") { } - ~ReadThreadNetworkDiagnosticsSecurityPolicy() + ~ReadEthernetNetworkDiagnosticsCarrierDetect() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::SecurityPolicy::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::CarrierDetect::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSecurityPolicyWithCompletion:^(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.SecurityPolicy response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCarrierDetectWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EthernetNetworkDiagnostics.CarrierDetect response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics SecurityPolicy read Error", error); + LogNSError("EthernetNetworkDiagnostics CarrierDetect read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -35482,25 +36780,25 @@ class ReadThreadNetworkDiagnosticsSecurityPolicy : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsSecurityPolicy : public SubscribeAttribute { +class SubscribeAttributeEthernetNetworkDiagnosticsCarrierDetect : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsSecurityPolicy() - : SubscribeAttribute("security-policy") + SubscribeAttributeEthernetNetworkDiagnosticsCarrierDetect() + : SubscribeAttribute("carrier-detect") { } - ~SubscribeAttributeThreadNetworkDiagnosticsSecurityPolicy() + ~SubscribeAttributeEthernetNetworkDiagnosticsCarrierDetect() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::SecurityPolicy::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::CarrierDetect::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -35511,10 +36809,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsSecurityPolicy : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSecurityPolicyWithParams:params + [cluster subscribeAttributeCarrierDetectWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(MTRThreadNetworkDiagnosticsClusterSecurityPolicy * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.SecurityPolicy response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EthernetNetworkDiagnostics.CarrierDetect response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -35528,34 +36826,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsSecurityPolicy : public Subscrib }; /* - * Attribute ChannelPage0Mask + * Attribute TimeSinceReset */ -class ReadThreadNetworkDiagnosticsChannelPage0Mask : public ReadAttribute { +class ReadEthernetNetworkDiagnosticsTimeSinceReset : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsChannelPage0Mask() - : ReadAttribute("channel-page0mask") + ReadEthernetNetworkDiagnosticsTimeSinceReset() + : ReadAttribute("time-since-reset") { } - ~ReadThreadNetworkDiagnosticsChannelPage0Mask() + ~ReadEthernetNetworkDiagnosticsTimeSinceReset() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ChannelPage0Mask::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::TimeSinceReset::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeChannelPage0MaskWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.ChannelPage0Mask response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTimeSinceResetWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EthernetNetworkDiagnostics.TimeSinceReset response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics ChannelPage0Mask read Error", error); + LogNSError("EthernetNetworkDiagnostics TimeSinceReset read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -35564,25 +36862,25 @@ class ReadThreadNetworkDiagnosticsChannelPage0Mask : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsChannelPage0Mask : public SubscribeAttribute { +class SubscribeAttributeEthernetNetworkDiagnosticsTimeSinceReset : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsChannelPage0Mask() - : SubscribeAttribute("channel-page0mask") + SubscribeAttributeEthernetNetworkDiagnosticsTimeSinceReset() + : SubscribeAttribute("time-since-reset") { } - ~SubscribeAttributeThreadNetworkDiagnosticsChannelPage0Mask() + ~SubscribeAttributeEthernetNetworkDiagnosticsTimeSinceReset() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ChannelPage0Mask::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::TimeSinceReset::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -35593,10 +36891,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsChannelPage0Mask : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeChannelPage0MaskWithParams:params + [cluster subscribeAttributeTimeSinceResetWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.ChannelPage0Mask response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EthernetNetworkDiagnostics.TimeSinceReset response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -35610,34 +36908,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsChannelPage0Mask : public Subscr }; /* - * Attribute OperationalDatasetComponents + * Attribute GeneratedCommandList */ -class ReadThreadNetworkDiagnosticsOperationalDatasetComponents : public ReadAttribute { +class ReadEthernetNetworkDiagnosticsGeneratedCommandList : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsOperationalDatasetComponents() - : ReadAttribute("operational-dataset-components") + ReadEthernetNetworkDiagnosticsGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadThreadNetworkDiagnosticsOperationalDatasetComponents() + ~ReadEthernetNetworkDiagnosticsGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::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 = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOperationalDatasetComponentsWithCompletion:^(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.OperationalDatasetComponents response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EthernetNetworkDiagnostics.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics OperationalDatasetComponents read Error", error); + LogNSError("EthernetNetworkDiagnostics GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -35646,25 +36944,25 @@ class ReadThreadNetworkDiagnosticsOperationalDatasetComponents : public ReadAttr } }; -class SubscribeAttributeThreadNetworkDiagnosticsOperationalDatasetComponents : public SubscribeAttribute { +class SubscribeAttributeEthernetNetworkDiagnosticsGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsOperationalDatasetComponents() - : SubscribeAttribute("operational-dataset-components") + SubscribeAttributeEthernetNetworkDiagnosticsGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeThreadNetworkDiagnosticsOperationalDatasetComponents() + ~SubscribeAttributeEthernetNetworkDiagnosticsGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::OperationalDatasetComponents::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::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 = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -35675,10 +36973,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsOperationalDatasetComponents : p if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOperationalDatasetComponentsWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(MTRThreadNetworkDiagnosticsClusterOperationalDatasetComponents * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.OperationalDatasetComponents response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EthernetNetworkDiagnostics.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -35692,34 +36990,34 @@ class SubscribeAttributeThreadNetworkDiagnosticsOperationalDatasetComponents : p }; /* - * Attribute ActiveNetworkFaultsList + * Attribute AcceptedCommandList */ -class ReadThreadNetworkDiagnosticsActiveNetworkFaultsList : public ReadAttribute { +class ReadEthernetNetworkDiagnosticsAcceptedCommandList : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsActiveNetworkFaultsList() - : ReadAttribute("active-network-faults-list") + ReadEthernetNetworkDiagnosticsAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadThreadNetworkDiagnosticsActiveNetworkFaultsList() + ~ReadEthernetNetworkDiagnosticsAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::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 = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeActiveNetworkFaultsListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.ActiveNetworkFaultsList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EthernetNetworkDiagnostics.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics ActiveNetworkFaultsList read Error", error); + LogNSError("EthernetNetworkDiagnostics AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -35728,25 +37026,25 @@ class ReadThreadNetworkDiagnosticsActiveNetworkFaultsList : public ReadAttribute } }; -class SubscribeAttributeThreadNetworkDiagnosticsActiveNetworkFaultsList : public SubscribeAttribute { +class SubscribeAttributeEthernetNetworkDiagnosticsAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsActiveNetworkFaultsList() - : SubscribeAttribute("active-network-faults-list") + SubscribeAttributeEthernetNetworkDiagnosticsAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeThreadNetworkDiagnosticsActiveNetworkFaultsList() + ~SubscribeAttributeEthernetNetworkDiagnosticsAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ActiveNetworkFaultsList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::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 = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -35757,10 +37055,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsActiveNetworkFaultsList : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActiveNetworkFaultsListWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.ActiveNetworkFaultsList response %@", [value description]); + NSLog(@"EthernetNetworkDiagnostics.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -35773,35 +37071,37 @@ class SubscribeAttributeThreadNetworkDiagnosticsActiveNetworkFaultsList : public } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute GeneratedCommandList + * Attribute EventList */ -class ReadThreadNetworkDiagnosticsGeneratedCommandList : public ReadAttribute { +class ReadEthernetNetworkDiagnosticsEventList : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadEthernetNetworkDiagnosticsEventList() + : ReadAttribute("event-list") { } - ~ReadThreadNetworkDiagnosticsGeneratedCommandList() + ~ReadEthernetNetworkDiagnosticsEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::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 = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EthernetNetworkDiagnostics.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics GeneratedCommandList read Error", error); + LogNSError("EthernetNetworkDiagnostics EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -35810,25 +37110,25 @@ class ReadThreadNetworkDiagnosticsGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeEthernetNetworkDiagnosticsEventList : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeEthernetNetworkDiagnosticsEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeThreadNetworkDiagnosticsGeneratedCommandList() + ~SubscribeAttributeEthernetNetworkDiagnosticsEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::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 = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -35839,10 +37139,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsGeneratedCommandList : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.GeneratedCommandList response %@", [value description]); + NSLog(@"EthernetNetworkDiagnostics.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -35855,35 +37155,37 @@ class SubscribeAttributeThreadNetworkDiagnosticsGeneratedCommandList : public Su } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute AcceptedCommandList + * Attribute AttributeList */ -class ReadThreadNetworkDiagnosticsAcceptedCommandList : public ReadAttribute { +class ReadEthernetNetworkDiagnosticsAttributeList : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadEthernetNetworkDiagnosticsAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadThreadNetworkDiagnosticsAcceptedCommandList() + ~ReadEthernetNetworkDiagnosticsAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::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 = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"EthernetNetworkDiagnostics.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics AcceptedCommandList read Error", error); + LogNSError("EthernetNetworkDiagnostics AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -35892,25 +37194,25 @@ class ReadThreadNetworkDiagnosticsAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeEthernetNetworkDiagnosticsAttributeList : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeEthernetNetworkDiagnosticsAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeThreadNetworkDiagnosticsAcceptedCommandList() + ~SubscribeAttributeEthernetNetworkDiagnosticsAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::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 = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -35921,10 +37223,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsAcceptedCommandList : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.AcceptedCommandList response %@", [value description]); + NSLog(@"EthernetNetworkDiagnostics.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -35937,37 +37239,35 @@ class SubscribeAttributeThreadNetworkDiagnosticsAcceptedCommandList : public Sub } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute FeatureMap */ -class ReadThreadNetworkDiagnosticsEventList : public ReadAttribute { +class ReadEthernetNetworkDiagnosticsFeatureMap : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsEventList() - : ReadAttribute("event-list") + ReadEthernetNetworkDiagnosticsFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadThreadNetworkDiagnosticsEventList() + ~ReadEthernetNetworkDiagnosticsFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::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 = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EthernetNetworkDiagnostics.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics EventList read Error", error); + LogNSError("EthernetNetworkDiagnostics FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -35976,25 +37276,25 @@ class ReadThreadNetworkDiagnosticsEventList : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsEventList : public SubscribeAttribute { +class SubscribeAttributeEthernetNetworkDiagnosticsFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeEthernetNetworkDiagnosticsFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeThreadNetworkDiagnosticsEventList() + ~SubscribeAttributeEthernetNetworkDiagnosticsFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::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 = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -36005,10 +37305,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsEventList : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EthernetNetworkDiagnostics.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -36021,37 +37321,35 @@ class SubscribeAttributeThreadNetworkDiagnosticsEventList : public SubscribeAttr } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute ClusterRevision */ -class ReadThreadNetworkDiagnosticsAttributeList : public ReadAttribute { +class ReadEthernetNetworkDiagnosticsClusterRevision : public ReadAttribute { public: - ReadThreadNetworkDiagnosticsAttributeList() - : ReadAttribute("attribute-list") + ReadEthernetNetworkDiagnosticsClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadThreadNetworkDiagnosticsAttributeList() + ~ReadEthernetNetworkDiagnosticsClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::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 = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EthernetNetworkDiagnostics.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ThreadNetworkDiagnostics AttributeList read Error", error); + LogNSError("EthernetNetworkDiagnostics ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -36060,25 +37358,25 @@ class ReadThreadNetworkDiagnosticsAttributeList : public ReadAttribute { } }; -class SubscribeAttributeThreadNetworkDiagnosticsAttributeList : public SubscribeAttribute { +class SubscribeAttributeEthernetNetworkDiagnosticsClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeThreadNetworkDiagnosticsAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeEthernetNetworkDiagnosticsClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeThreadNetworkDiagnosticsAttributeList() + ~SubscribeAttributeEthernetNetworkDiagnosticsClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::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 = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -36089,10 +37387,10 @@ class SubscribeAttributeThreadNetworkDiagnosticsAttributeList : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"EthernetNetworkDiagnostics.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -36105,276 +37403,399 @@ class SubscribeAttributeThreadNetworkDiagnosticsAttributeList : public Subscribe } }; +#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| 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 | +\*----------------------------------------------------------------------------*/ + +#if MTR_ENABLE_PROVISIONAL /* - * Attribute FeatureMap + * Command SetUTCTime */ -class ReadThreadNetworkDiagnosticsFeatureMap : public ReadAttribute { +class TimeSynchronizationSetUTCTime : public ClusterCommand { public: - ReadThreadNetworkDiagnosticsFeatureMap() - : ReadAttribute("feature-map") - { - } - - ~ReadThreadNetworkDiagnosticsFeatureMap() + TimeSynchronizationSetUTCTime() + : ClusterCommand("set-utctime") { + 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(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::FeatureMap::Id; + 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 ") 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 = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.FeatureMap response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ThreadNetworkDiagnostics FeatureMap read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRTimeSynchronizationClusterSetUTCTimeParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.utcTime = [NSNumber numberWithUnsignedLongLong:mRequest.UTCTime]; + params.granularity = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.granularity)]; + if (mRequest.timeSource.HasValue()) { + params.timeSource = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.timeSource.Value())]; + } else { + params.timeSource = nil; + } + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setUTCTimeWithParams: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::TimeSynchronization::Commands::SetUTCTime::Type mRequest; }; -class SubscribeAttributeThreadNetworkDiagnosticsFeatureMap : public SubscribeAttribute { +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command SetTrustedTimeSource + */ +class TimeSynchronizationSetTrustedTimeSource : public ClusterCommand { public: - SubscribeAttributeThreadNetworkDiagnosticsFeatureMap() - : SubscribeAttribute("feature-map") - { - } - - ~SubscribeAttributeThreadNetworkDiagnosticsFeatureMap() + TimeSynchronizationSetTrustedTimeSource() + : ClusterCommand("set-trusted-time-source") + , mComplex_TrustedTimeSource(&mRequest.trustedTimeSource) { +#if MTR_ENABLE_PROVISIONAL + AddArgument("TrustedTimeSource", &mComplex_TrustedTimeSource); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::FeatureMap::Id; + 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 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThreadNetworkDiagnostics 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(); + 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 = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRTimeSynchronizationClusterSetTrustedTimeSourceParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + if (mRequest.trustedTimeSource.IsNull()) { + params.trustedTimeSource = nil; + } else { + params.trustedTimeSource = [MTRTimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct new]; + params.trustedTimeSource.nodeID = [NSNumber numberWithUnsignedLongLong:mRequest.trustedTimeSource.Value().nodeID]; + params.trustedTimeSource.endpoint = [NSNumber numberWithUnsignedShort:mRequest.trustedTimeSource.Value().endpoint]; } - 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 setTrustedTimeSourceWithParams: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 subscribeAttributeFeatureMapWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.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; } + +private: + chip::app::Clusters::TimeSynchronization::Commands::SetTrustedTimeSource::Type mRequest; + TypedComplexArgument> mComplex_TrustedTimeSource; }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* - * Attribute ClusterRevision + * Command SetTimeZone */ -class ReadThreadNetworkDiagnosticsClusterRevision : public ReadAttribute { +class TimeSynchronizationSetTimeZone : public ClusterCommand { public: - ReadThreadNetworkDiagnosticsClusterRevision() - : ReadAttribute("cluster-revision") - { - } - - ~ReadThreadNetworkDiagnosticsClusterRevision() + TimeSynchronizationSetTimeZone() + : ClusterCommand("set-time-zone") + , mComplex_TimeZone(&mRequest.timeZone) { +#if MTR_ENABLE_PROVISIONAL + AddArgument("TimeZone", &mComplex_TimeZone); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ClusterRevision::Id; + 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 ") 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 = [[MTRBaseClusterThreadNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ThreadNetworkDiagnostics.ClusterRevision response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ThreadNetworkDiagnostics ClusterRevision read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRTimeSynchronizationClusterSetTimeZoneParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + for (auto & entry_0 : mRequest.timeZone) { + MTRTimeSynchronizationClusterTimeZoneStruct * newElement_0; + newElement_0 = [MTRTimeSynchronizationClusterTimeZoneStruct new]; + newElement_0.offset = [NSNumber numberWithInt:entry_0.offset]; + newElement_0.validAt = [NSNumber numberWithUnsignedLongLong:entry_0.validAt]; + if (entry_0.name.HasValue()) { + newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.Value().data() length:entry_0.name.Value().size() encoding:NSUTF8StringEncoding]; + } else { + newElement_0.name = nil; + } + [array_0 addObject:newElement_0]; } - SetCommandExitStatus(error); - }]; + params.timeZone = array_0; + } +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setTimeZoneWithParams:params completion: + ^(MTRTimeSynchronizationClusterSetTimeZoneResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::TimeSynchronization::Commands::SetTimeZoneResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::TimeSynchronization::Commands::SetTimeZoneResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::TimeSynchronization::Commands::SetTimeZone::Type mRequest; + TypedComplexArgument> mComplex_TimeZone; }; -class SubscribeAttributeThreadNetworkDiagnosticsClusterRevision : public SubscribeAttribute { +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command SetDSTOffset + */ +class TimeSynchronizationSetDSTOffset : public ClusterCommand { public: - SubscribeAttributeThreadNetworkDiagnosticsClusterRevision() - : SubscribeAttribute("cluster-revision") - { - } - - ~SubscribeAttributeThreadNetworkDiagnosticsClusterRevision() + TimeSynchronizationSetDSTOffset() + : ClusterCommand("set-dstoffset") + , mComplex_DSTOffset(&mRequest.DSTOffset) { +#if MTR_ENABLE_PROVISIONAL + AddArgument("DSTOffset", &mComplex_DSTOffset); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::ThreadNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::ThreadNetworkDiagnostics::Attributes::ClusterRevision::Id; + 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, 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 = [[MTRBaseClusterThreadNetworkDiagnostics 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(@"ThreadNetworkDiagnostics.ClusterRevision response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRTimeSynchronizationClusterSetDSTOffsetParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + for (auto & entry_0 : mRequest.DSTOffset) { + MTRTimeSynchronizationClusterDSTOffsetStruct * newElement_0; + newElement_0 = [MTRTimeSynchronizationClusterDSTOffsetStruct new]; + newElement_0.offset = [NSNumber numberWithInt:entry_0.offset]; + newElement_0.validStarting = [NSNumber numberWithUnsignedLongLong:entry_0.validStarting]; + if (entry_0.validUntil.IsNull()) { + newElement_0.validUntil = nil; } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + newElement_0.validUntil = [NSNumber numberWithUnsignedLongLong:entry_0.validUntil.Value()]; } - SetCommandExitStatus(error); - }]; - + [array_0 addObject:newElement_0]; + } + params.dstOffset = array_0; + } +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setDSTOffsetWithParams: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; } -}; -/*----------------------------------------------------------------------------*\ -| Cluster WiFiNetworkDiagnostics | 0x0036 | -|------------------------------------------------------------------------------| -| Commands: | | -| * ResetCounts | 0x00 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * Bssid | 0x0000 | -| * SecurityType | 0x0001 | -| * WiFiVersion | 0x0002 | -| * ChannelNumber | 0x0003 | -| * Rssi | 0x0004 | -| * BeaconLostCount | 0x0005 | -| * BeaconRxCount | 0x0006 | -| * PacketMulticastRxCount | 0x0007 | -| * PacketMulticastTxCount | 0x0008 | -| * PacketUnicastRxCount | 0x0009 | -| * PacketUnicastTxCount | 0x000A | -| * CurrentMaxRate | 0x000B | -| * OverrunCount | 0x000C | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * Disconnection | 0x0000 | -| * AssociationFailure | 0x0001 | -| * ConnectionStatus | 0x0002 | -\*----------------------------------------------------------------------------*/ +private: + chip::app::Clusters::TimeSynchronization::Commands::SetDSTOffset::Type mRequest; + TypedComplexArgument> mComplex_DSTOffset; +}; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* - * Command ResetCounts + * Command SetDefaultNTP */ -class WiFiNetworkDiagnosticsResetCounts : public ClusterCommand { +class TimeSynchronizationSetDefaultNTP : public ClusterCommand { public: - WiFiNetworkDiagnosticsResetCounts() - : ClusterCommand("reset-counts") + TimeSynchronizationSetDefaultNTP() + : ClusterCommand("set-default-ntp") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("DefaultNTP", &mRequest.defaultNTP); +#endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::WiFiNetworkDiagnostics::Commands::ResetCounts::Id; + 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, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRWiFiNetworkDiagnosticsClusterResetCountsParams alloc] init]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRTimeSynchronizationClusterSetDefaultNTPParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + if (mRequest.defaultNTP.IsNull()) { + params.defaultNTP = nil; + } else { + params.defaultNTP = [[NSString alloc] initWithBytes:mRequest.defaultNTP.Value().data() length:mRequest.defaultNTP.Value().size() encoding:NSUTF8StringEncoding]; + } +#endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { - [cluster resetCountsWithParams: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 setDefaultNTPWithParams: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::TimeSynchronization::Commands::SetDefaultNTP::Type mRequest; }; +#endif // MTR_ENABLE_PROVISIONAL + +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute Bssid + * Attribute UTCTime */ -class ReadWiFiNetworkDiagnosticsBssid : public ReadAttribute { +class ReadTimeSynchronizationUTCTime : public ReadAttribute { public: - ReadWiFiNetworkDiagnosticsBssid() - : ReadAttribute("bssid") + ReadTimeSynchronizationUTCTime() + : ReadAttribute("utctime") { } - ~ReadWiFiNetworkDiagnosticsBssid() + ~ReadTimeSynchronizationUTCTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::Bssid::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::UTCTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBSSIDWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.BSSID response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUTCTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.UTCTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WiFiNetworkDiagnostics BSSID read Error", error); + LogNSError("TimeSynchronization UTCTime read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -36383,25 +37804,25 @@ class ReadWiFiNetworkDiagnosticsBssid : public ReadAttribute { } }; -class SubscribeAttributeWiFiNetworkDiagnosticsBssid : public SubscribeAttribute { +class SubscribeAttributeTimeSynchronizationUTCTime : public SubscribeAttribute { public: - SubscribeAttributeWiFiNetworkDiagnosticsBssid() - : SubscribeAttribute("bssid") + SubscribeAttributeTimeSynchronizationUTCTime() + : SubscribeAttribute("utctime") { } - ~SubscribeAttributeWiFiNetworkDiagnosticsBssid() + ~SubscribeAttributeTimeSynchronizationUTCTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::Bssid::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::UTCTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -36412,10 +37833,10 @@ class SubscribeAttributeWiFiNetworkDiagnosticsBssid : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBSSIDWithParams:params + [cluster subscribeAttributeUTCTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.BSSID response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.UTCTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -36428,35 +37849,38 @@ class SubscribeAttributeWiFiNetworkDiagnosticsBssid : public SubscribeAttribute } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute SecurityType + * Attribute Granularity */ -class ReadWiFiNetworkDiagnosticsSecurityType : public ReadAttribute { +class ReadTimeSynchronizationGranularity : public ReadAttribute { public: - ReadWiFiNetworkDiagnosticsSecurityType() - : ReadAttribute("security-type") + ReadTimeSynchronizationGranularity() + : ReadAttribute("granularity") { } - ~ReadWiFiNetworkDiagnosticsSecurityType() + ~ReadTimeSynchronizationGranularity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::SecurityType::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::Granularity::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSecurityTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.SecurityType response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGranularityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.Granularity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WiFiNetworkDiagnostics SecurityType read Error", error); + LogNSError("TimeSynchronization Granularity read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -36465,25 +37889,25 @@ class ReadWiFiNetworkDiagnosticsSecurityType : public ReadAttribute { } }; -class SubscribeAttributeWiFiNetworkDiagnosticsSecurityType : public SubscribeAttribute { +class SubscribeAttributeTimeSynchronizationGranularity : public SubscribeAttribute { public: - SubscribeAttributeWiFiNetworkDiagnosticsSecurityType() - : SubscribeAttribute("security-type") + SubscribeAttributeTimeSynchronizationGranularity() + : SubscribeAttribute("granularity") { } - ~SubscribeAttributeWiFiNetworkDiagnosticsSecurityType() + ~SubscribeAttributeTimeSynchronizationGranularity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::SecurityType::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::Granularity::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -36494,10 +37918,10 @@ class SubscribeAttributeWiFiNetworkDiagnosticsSecurityType : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSecurityTypeWithParams:params + [cluster subscribeAttributeGranularityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.SecurityType response %@", [value description]); + NSLog(@"TimeSynchronization.Granularity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -36510,35 +37934,38 @@ class SubscribeAttributeWiFiNetworkDiagnosticsSecurityType : public SubscribeAtt } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute WiFiVersion + * Attribute TimeSource */ -class ReadWiFiNetworkDiagnosticsWiFiVersion : public ReadAttribute { +class ReadTimeSynchronizationTimeSource : public ReadAttribute { public: - ReadWiFiNetworkDiagnosticsWiFiVersion() - : ReadAttribute("wi-fi-version") + ReadTimeSynchronizationTimeSource() + : ReadAttribute("time-source") { } - ~ReadWiFiNetworkDiagnosticsWiFiVersion() + ~ReadTimeSynchronizationTimeSource() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::WiFiVersion::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::TimeSource::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeWiFiVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.WiFiVersion response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTimeSourceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.TimeSource response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WiFiNetworkDiagnostics WiFiVersion read Error", error); + LogNSError("TimeSynchronization TimeSource read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -36547,25 +37974,25 @@ class ReadWiFiNetworkDiagnosticsWiFiVersion : public ReadAttribute { } }; -class SubscribeAttributeWiFiNetworkDiagnosticsWiFiVersion : public SubscribeAttribute { +class SubscribeAttributeTimeSynchronizationTimeSource : public SubscribeAttribute { public: - SubscribeAttributeWiFiNetworkDiagnosticsWiFiVersion() - : SubscribeAttribute("wi-fi-version") + SubscribeAttributeTimeSynchronizationTimeSource() + : SubscribeAttribute("time-source") { } - ~SubscribeAttributeWiFiNetworkDiagnosticsWiFiVersion() + ~SubscribeAttributeTimeSynchronizationTimeSource() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::WiFiVersion::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::TimeSource::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -36576,10 +38003,10 @@ class SubscribeAttributeWiFiNetworkDiagnosticsWiFiVersion : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeWiFiVersionWithParams:params + [cluster subscribeAttributeTimeSourceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.WiFiVersion response %@", [value description]); + NSLog(@"TimeSynchronization.TimeSource response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -36592,35 +38019,38 @@ class SubscribeAttributeWiFiNetworkDiagnosticsWiFiVersion : public SubscribeAttr } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ChannelNumber + * Attribute TrustedTimeSource */ -class ReadWiFiNetworkDiagnosticsChannelNumber : public ReadAttribute { +class ReadTimeSynchronizationTrustedTimeSource : public ReadAttribute { public: - ReadWiFiNetworkDiagnosticsChannelNumber() - : ReadAttribute("channel-number") + ReadTimeSynchronizationTrustedTimeSource() + : ReadAttribute("trusted-time-source") { } - ~ReadWiFiNetworkDiagnosticsChannelNumber() + ~ReadTimeSynchronizationTrustedTimeSource() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::ChannelNumber::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::TrustedTimeSource::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeChannelNumberWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.ChannelNumber response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTrustedTimeSourceWithCompletion:^(MTRTimeSynchronizationClusterTrustedTimeSourceStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.TrustedTimeSource response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WiFiNetworkDiagnostics ChannelNumber read Error", error); + LogNSError("TimeSynchronization TrustedTimeSource read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -36629,25 +38059,25 @@ class ReadWiFiNetworkDiagnosticsChannelNumber : public ReadAttribute { } }; -class SubscribeAttributeWiFiNetworkDiagnosticsChannelNumber : public SubscribeAttribute { +class SubscribeAttributeTimeSynchronizationTrustedTimeSource : public SubscribeAttribute { public: - SubscribeAttributeWiFiNetworkDiagnosticsChannelNumber() - : SubscribeAttribute("channel-number") + SubscribeAttributeTimeSynchronizationTrustedTimeSource() + : SubscribeAttribute("trusted-time-source") { } - ~SubscribeAttributeWiFiNetworkDiagnosticsChannelNumber() + ~SubscribeAttributeTimeSynchronizationTrustedTimeSource() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::ChannelNumber::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::TrustedTimeSource::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -36658,10 +38088,10 @@ class SubscribeAttributeWiFiNetworkDiagnosticsChannelNumber : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeChannelNumberWithParams:params + [cluster subscribeAttributeTrustedTimeSourceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.ChannelNumber response %@", [value description]); + reportHandler:^(MTRTimeSynchronizationClusterTrustedTimeSourceStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.TrustedTimeSource response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -36674,35 +38104,38 @@ class SubscribeAttributeWiFiNetworkDiagnosticsChannelNumber : public SubscribeAt } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute Rssi + * Attribute DefaultNTP */ -class ReadWiFiNetworkDiagnosticsRssi : public ReadAttribute { +class ReadTimeSynchronizationDefaultNTP : public ReadAttribute { public: - ReadWiFiNetworkDiagnosticsRssi() - : ReadAttribute("rssi") + ReadTimeSynchronizationDefaultNTP() + : ReadAttribute("default-ntp") { } - ~ReadWiFiNetworkDiagnosticsRssi() + ~ReadTimeSynchronizationDefaultNTP() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::Rssi::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::DefaultNTP::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRSSIWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.RSSI response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDefaultNTPWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.DefaultNTP response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WiFiNetworkDiagnostics RSSI read Error", error); + LogNSError("TimeSynchronization DefaultNTP read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -36711,25 +38144,25 @@ class ReadWiFiNetworkDiagnosticsRssi : public ReadAttribute { } }; -class SubscribeAttributeWiFiNetworkDiagnosticsRssi : public SubscribeAttribute { +class SubscribeAttributeTimeSynchronizationDefaultNTP : public SubscribeAttribute { public: - SubscribeAttributeWiFiNetworkDiagnosticsRssi() - : SubscribeAttribute("rssi") + SubscribeAttributeTimeSynchronizationDefaultNTP() + : SubscribeAttribute("default-ntp") { } - ~SubscribeAttributeWiFiNetworkDiagnosticsRssi() + ~SubscribeAttributeTimeSynchronizationDefaultNTP() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::Rssi::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::DefaultNTP::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -36740,10 +38173,10 @@ class SubscribeAttributeWiFiNetworkDiagnosticsRssi : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRSSIWithParams:params + [cluster subscribeAttributeDefaultNTPWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.RSSI response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.DefaultNTP response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -36756,35 +38189,38 @@ class SubscribeAttributeWiFiNetworkDiagnosticsRssi : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute BeaconLostCount + * Attribute TimeZone */ -class ReadWiFiNetworkDiagnosticsBeaconLostCount : public ReadAttribute { +class ReadTimeSynchronizationTimeZone : public ReadAttribute { public: - ReadWiFiNetworkDiagnosticsBeaconLostCount() - : ReadAttribute("beacon-lost-count") + ReadTimeSynchronizationTimeZone() + : ReadAttribute("time-zone") { } - ~ReadWiFiNetworkDiagnosticsBeaconLostCount() + ~ReadTimeSynchronizationTimeZone() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::BeaconLostCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::TimeZone::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBeaconLostCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.BeaconLostCount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTimeZoneWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.TimeZone response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WiFiNetworkDiagnostics BeaconLostCount read Error", error); + LogNSError("TimeSynchronization TimeZone read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -36793,25 +38229,25 @@ class ReadWiFiNetworkDiagnosticsBeaconLostCount : public ReadAttribute { } }; -class SubscribeAttributeWiFiNetworkDiagnosticsBeaconLostCount : public SubscribeAttribute { +class SubscribeAttributeTimeSynchronizationTimeZone : public SubscribeAttribute { public: - SubscribeAttributeWiFiNetworkDiagnosticsBeaconLostCount() - : SubscribeAttribute("beacon-lost-count") + SubscribeAttributeTimeSynchronizationTimeZone() + : SubscribeAttribute("time-zone") { } - ~SubscribeAttributeWiFiNetworkDiagnosticsBeaconLostCount() + ~SubscribeAttributeTimeSynchronizationTimeZone() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::BeaconLostCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::TimeZone::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -36822,10 +38258,10 @@ class SubscribeAttributeWiFiNetworkDiagnosticsBeaconLostCount : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBeaconLostCountWithParams:params + [cluster subscribeAttributeTimeZoneWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.BeaconLostCount response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.TimeZone response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -36838,35 +38274,38 @@ class SubscribeAttributeWiFiNetworkDiagnosticsBeaconLostCount : public Subscribe } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute BeaconRxCount + * Attribute DSTOffset */ -class ReadWiFiNetworkDiagnosticsBeaconRxCount : public ReadAttribute { +class ReadTimeSynchronizationDSTOffset : public ReadAttribute { public: - ReadWiFiNetworkDiagnosticsBeaconRxCount() - : ReadAttribute("beacon-rx-count") + ReadTimeSynchronizationDSTOffset() + : ReadAttribute("dstoffset") { } - ~ReadWiFiNetworkDiagnosticsBeaconRxCount() + ~ReadTimeSynchronizationDSTOffset() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::BeaconRxCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::DSTOffset::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeBeaconRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.BeaconRxCount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDSTOffsetWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.DSTOffset response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WiFiNetworkDiagnostics BeaconRxCount read Error", error); + LogNSError("TimeSynchronization DSTOffset read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -36875,25 +38314,25 @@ class ReadWiFiNetworkDiagnosticsBeaconRxCount : public ReadAttribute { } }; -class SubscribeAttributeWiFiNetworkDiagnosticsBeaconRxCount : public SubscribeAttribute { +class SubscribeAttributeTimeSynchronizationDSTOffset : public SubscribeAttribute { public: - SubscribeAttributeWiFiNetworkDiagnosticsBeaconRxCount() - : SubscribeAttribute("beacon-rx-count") + SubscribeAttributeTimeSynchronizationDSTOffset() + : SubscribeAttribute("dstoffset") { } - ~SubscribeAttributeWiFiNetworkDiagnosticsBeaconRxCount() + ~SubscribeAttributeTimeSynchronizationDSTOffset() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::BeaconRxCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::DSTOffset::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -36904,10 +38343,10 @@ class SubscribeAttributeWiFiNetworkDiagnosticsBeaconRxCount : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBeaconRxCountWithParams:params + [cluster subscribeAttributeDSTOffsetWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.BeaconRxCount response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.DSTOffset response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -36920,35 +38359,38 @@ class SubscribeAttributeWiFiNetworkDiagnosticsBeaconRxCount : public SubscribeAt } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute PacketMulticastRxCount + * Attribute LocalTime */ -class ReadWiFiNetworkDiagnosticsPacketMulticastRxCount : public ReadAttribute { +class ReadTimeSynchronizationLocalTime : public ReadAttribute { public: - ReadWiFiNetworkDiagnosticsPacketMulticastRxCount() - : ReadAttribute("packet-multicast-rx-count") + ReadTimeSynchronizationLocalTime() + : ReadAttribute("local-time") { } - ~ReadWiFiNetworkDiagnosticsPacketMulticastRxCount() + ~ReadTimeSynchronizationLocalTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::LocalTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePacketMulticastRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.PacketMulticastRxCount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLocalTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.LocalTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WiFiNetworkDiagnostics PacketMulticastRxCount read Error", error); + LogNSError("TimeSynchronization LocalTime read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -36957,25 +38399,25 @@ class ReadWiFiNetworkDiagnosticsPacketMulticastRxCount : public ReadAttribute { } }; -class SubscribeAttributeWiFiNetworkDiagnosticsPacketMulticastRxCount : public SubscribeAttribute { +class SubscribeAttributeTimeSynchronizationLocalTime : public SubscribeAttribute { public: - SubscribeAttributeWiFiNetworkDiagnosticsPacketMulticastRxCount() - : SubscribeAttribute("packet-multicast-rx-count") + SubscribeAttributeTimeSynchronizationLocalTime() + : SubscribeAttribute("local-time") { } - ~SubscribeAttributeWiFiNetworkDiagnosticsPacketMulticastRxCount() + ~SubscribeAttributeTimeSynchronizationLocalTime() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::LocalTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -36986,10 +38428,10 @@ class SubscribeAttributeWiFiNetworkDiagnosticsPacketMulticastRxCount : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePacketMulticastRxCountWithParams:params + [cluster subscribeAttributeLocalTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.PacketMulticastRxCount response %@", [value description]); + NSLog(@"TimeSynchronization.LocalTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -37002,35 +38444,38 @@ class SubscribeAttributeWiFiNetworkDiagnosticsPacketMulticastRxCount : public Su } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute PacketMulticastTxCount + * Attribute TimeZoneDatabase */ -class ReadWiFiNetworkDiagnosticsPacketMulticastTxCount : public ReadAttribute { +class ReadTimeSynchronizationTimeZoneDatabase : public ReadAttribute { public: - ReadWiFiNetworkDiagnosticsPacketMulticastTxCount() - : ReadAttribute("packet-multicast-tx-count") + ReadTimeSynchronizationTimeZoneDatabase() + : ReadAttribute("time-zone-database") { } - ~ReadWiFiNetworkDiagnosticsPacketMulticastTxCount() + ~ReadTimeSynchronizationTimeZoneDatabase() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::TimeZoneDatabase::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePacketMulticastTxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.PacketMulticastTxCount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTimeZoneDatabaseWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.TimeZoneDatabase response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WiFiNetworkDiagnostics PacketMulticastTxCount read Error", error); + LogNSError("TimeSynchronization TimeZoneDatabase read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -37039,25 +38484,25 @@ class ReadWiFiNetworkDiagnosticsPacketMulticastTxCount : public ReadAttribute { } }; -class SubscribeAttributeWiFiNetworkDiagnosticsPacketMulticastTxCount : public SubscribeAttribute { +class SubscribeAttributeTimeSynchronizationTimeZoneDatabase : public SubscribeAttribute { public: - SubscribeAttributeWiFiNetworkDiagnosticsPacketMulticastTxCount() - : SubscribeAttribute("packet-multicast-tx-count") + SubscribeAttributeTimeSynchronizationTimeZoneDatabase() + : SubscribeAttribute("time-zone-database") { } - ~SubscribeAttributeWiFiNetworkDiagnosticsPacketMulticastTxCount() + ~SubscribeAttributeTimeSynchronizationTimeZoneDatabase() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::TimeZoneDatabase::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -37068,10 +38513,10 @@ class SubscribeAttributeWiFiNetworkDiagnosticsPacketMulticastTxCount : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePacketMulticastTxCountWithParams:params + [cluster subscribeAttributeTimeZoneDatabaseWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.PacketMulticastTxCount response %@", [value description]); + NSLog(@"TimeSynchronization.TimeZoneDatabase response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -37084,35 +38529,38 @@ class SubscribeAttributeWiFiNetworkDiagnosticsPacketMulticastTxCount : public Su } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute PacketUnicastRxCount + * Attribute NTPServerAvailable */ -class ReadWiFiNetworkDiagnosticsPacketUnicastRxCount : public ReadAttribute { +class ReadTimeSynchronizationNTPServerAvailable : public ReadAttribute { public: - ReadWiFiNetworkDiagnosticsPacketUnicastRxCount() - : ReadAttribute("packet-unicast-rx-count") + ReadTimeSynchronizationNTPServerAvailable() + : ReadAttribute("ntpserver-available") { } - ~ReadWiFiNetworkDiagnosticsPacketUnicastRxCount() + ~ReadTimeSynchronizationNTPServerAvailable() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::NTPServerAvailable::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePacketUnicastRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.PacketUnicastRxCount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNTPServerAvailableWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.NTPServerAvailable response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WiFiNetworkDiagnostics PacketUnicastRxCount read Error", error); + LogNSError("TimeSynchronization NTPServerAvailable read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -37121,25 +38569,25 @@ class ReadWiFiNetworkDiagnosticsPacketUnicastRxCount : public ReadAttribute { } }; -class SubscribeAttributeWiFiNetworkDiagnosticsPacketUnicastRxCount : public SubscribeAttribute { +class SubscribeAttributeTimeSynchronizationNTPServerAvailable : public SubscribeAttribute { public: - SubscribeAttributeWiFiNetworkDiagnosticsPacketUnicastRxCount() - : SubscribeAttribute("packet-unicast-rx-count") + SubscribeAttributeTimeSynchronizationNTPServerAvailable() + : SubscribeAttribute("ntpserver-available") { } - ~SubscribeAttributeWiFiNetworkDiagnosticsPacketUnicastRxCount() + ~SubscribeAttributeTimeSynchronizationNTPServerAvailable() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::NTPServerAvailable::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -37150,10 +38598,10 @@ class SubscribeAttributeWiFiNetworkDiagnosticsPacketUnicastRxCount : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePacketUnicastRxCountWithParams:params + [cluster subscribeAttributeNTPServerAvailableWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.PacketUnicastRxCount response %@", [value description]); + NSLog(@"TimeSynchronization.NTPServerAvailable response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -37166,35 +38614,38 @@ class SubscribeAttributeWiFiNetworkDiagnosticsPacketUnicastRxCount : public Subs } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute PacketUnicastTxCount + * Attribute TimeZoneListMaxSize */ -class ReadWiFiNetworkDiagnosticsPacketUnicastTxCount : public ReadAttribute { +class ReadTimeSynchronizationTimeZoneListMaxSize : public ReadAttribute { public: - ReadWiFiNetworkDiagnosticsPacketUnicastTxCount() - : ReadAttribute("packet-unicast-tx-count") + ReadTimeSynchronizationTimeZoneListMaxSize() + : ReadAttribute("time-zone-list-max-size") { } - ~ReadWiFiNetworkDiagnosticsPacketUnicastTxCount() + ~ReadTimeSynchronizationTimeZoneListMaxSize() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::TimeZoneListMaxSize::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePacketUnicastTxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.PacketUnicastTxCount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeTimeZoneListMaxSizeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.TimeZoneListMaxSize response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WiFiNetworkDiagnostics PacketUnicastTxCount read Error", error); + LogNSError("TimeSynchronization TimeZoneListMaxSize read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -37203,25 +38654,25 @@ class ReadWiFiNetworkDiagnosticsPacketUnicastTxCount : public ReadAttribute { } }; -class SubscribeAttributeWiFiNetworkDiagnosticsPacketUnicastTxCount : public SubscribeAttribute { +class SubscribeAttributeTimeSynchronizationTimeZoneListMaxSize : public SubscribeAttribute { public: - SubscribeAttributeWiFiNetworkDiagnosticsPacketUnicastTxCount() - : SubscribeAttribute("packet-unicast-tx-count") + SubscribeAttributeTimeSynchronizationTimeZoneListMaxSize() + : SubscribeAttribute("time-zone-list-max-size") { } - ~SubscribeAttributeWiFiNetworkDiagnosticsPacketUnicastTxCount() + ~SubscribeAttributeTimeSynchronizationTimeZoneListMaxSize() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::TimeZoneListMaxSize::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -37232,10 +38683,10 @@ class SubscribeAttributeWiFiNetworkDiagnosticsPacketUnicastTxCount : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePacketUnicastTxCountWithParams:params + [cluster subscribeAttributeTimeZoneListMaxSizeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.PacketUnicastTxCount response %@", [value description]); + NSLog(@"TimeSynchronization.TimeZoneListMaxSize response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -37248,35 +38699,38 @@ class SubscribeAttributeWiFiNetworkDiagnosticsPacketUnicastTxCount : public Subs } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute CurrentMaxRate + * Attribute DSTOffsetListMaxSize */ -class ReadWiFiNetworkDiagnosticsCurrentMaxRate : public ReadAttribute { +class ReadTimeSynchronizationDSTOffsetListMaxSize : public ReadAttribute { public: - ReadWiFiNetworkDiagnosticsCurrentMaxRate() - : ReadAttribute("current-max-rate") + ReadTimeSynchronizationDSTOffsetListMaxSize() + : ReadAttribute("dstoffset-list-max-size") { } - ~ReadWiFiNetworkDiagnosticsCurrentMaxRate() + ~ReadTimeSynchronizationDSTOffsetListMaxSize() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::DSTOffsetListMaxSize::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCurrentMaxRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.CurrentMaxRate response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeDSTOffsetListMaxSizeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.DSTOffsetListMaxSize response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WiFiNetworkDiagnostics CurrentMaxRate read Error", error); + LogNSError("TimeSynchronization DSTOffsetListMaxSize read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -37285,25 +38739,25 @@ class ReadWiFiNetworkDiagnosticsCurrentMaxRate : public ReadAttribute { } }; -class SubscribeAttributeWiFiNetworkDiagnosticsCurrentMaxRate : public SubscribeAttribute { +class SubscribeAttributeTimeSynchronizationDSTOffsetListMaxSize : public SubscribeAttribute { public: - SubscribeAttributeWiFiNetworkDiagnosticsCurrentMaxRate() - : SubscribeAttribute("current-max-rate") + SubscribeAttributeTimeSynchronizationDSTOffsetListMaxSize() + : SubscribeAttribute("dstoffset-list-max-size") { } - ~SubscribeAttributeWiFiNetworkDiagnosticsCurrentMaxRate() + ~SubscribeAttributeTimeSynchronizationDSTOffsetListMaxSize() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::DSTOffsetListMaxSize::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -37314,10 +38768,10 @@ class SubscribeAttributeWiFiNetworkDiagnosticsCurrentMaxRate : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentMaxRateWithParams:params + [cluster subscribeAttributeDSTOffsetListMaxSizeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.CurrentMaxRate response %@", [value description]); + NSLog(@"TimeSynchronization.DSTOffsetListMaxSize response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -37330,35 +38784,38 @@ class SubscribeAttributeWiFiNetworkDiagnosticsCurrentMaxRate : public SubscribeA } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute OverrunCount + * Attribute SupportsDNSResolve */ -class ReadWiFiNetworkDiagnosticsOverrunCount : public ReadAttribute { +class ReadTimeSynchronizationSupportsDNSResolve : public ReadAttribute { public: - ReadWiFiNetworkDiagnosticsOverrunCount() - : ReadAttribute("overrun-count") + ReadTimeSynchronizationSupportsDNSResolve() + : ReadAttribute("supports-dnsresolve") { } - ~ReadWiFiNetworkDiagnosticsOverrunCount() + ~ReadTimeSynchronizationSupportsDNSResolve() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::OverrunCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::SupportsDNSResolve::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOverrunCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.OverrunCount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportsDNSResolveWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TimeSynchronization.SupportsDNSResolve response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WiFiNetworkDiagnostics OverrunCount read Error", error); + LogNSError("TimeSynchronization SupportsDNSResolve read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -37367,25 +38824,25 @@ class ReadWiFiNetworkDiagnosticsOverrunCount : public ReadAttribute { } }; -class SubscribeAttributeWiFiNetworkDiagnosticsOverrunCount : public SubscribeAttribute { +class SubscribeAttributeTimeSynchronizationSupportsDNSResolve : public SubscribeAttribute { public: - SubscribeAttributeWiFiNetworkDiagnosticsOverrunCount() - : SubscribeAttribute("overrun-count") + SubscribeAttributeTimeSynchronizationSupportsDNSResolve() + : SubscribeAttribute("supports-dnsresolve") { } - ~SubscribeAttributeWiFiNetworkDiagnosticsOverrunCount() + ~SubscribeAttributeTimeSynchronizationSupportsDNSResolve() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::OverrunCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::SupportsDNSResolve::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -37396,10 +38853,10 @@ class SubscribeAttributeWiFiNetworkDiagnosticsOverrunCount : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOverrunCountWithParams:params + [cluster subscribeAttributeSupportsDNSResolveWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.OverrunCount response %@", [value description]); + NSLog(@"TimeSynchronization.SupportsDNSResolve response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -37412,35 +38869,38 @@ class SubscribeAttributeWiFiNetworkDiagnosticsOverrunCount : public SubscribeAtt } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute GeneratedCommandList */ -class ReadWiFiNetworkDiagnosticsGeneratedCommandList : public ReadAttribute { +class ReadTimeSynchronizationGeneratedCommandList : public ReadAttribute { public: - ReadWiFiNetworkDiagnosticsGeneratedCommandList() + ReadTimeSynchronizationGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadWiFiNetworkDiagnosticsGeneratedCommandList() + ~ReadTimeSynchronizationGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::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 = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.GeneratedCommandList response %@", [value description]); + NSLog(@"TimeSynchronization.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WiFiNetworkDiagnostics GeneratedCommandList read Error", error); + LogNSError("TimeSynchronization GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -37449,25 +38909,25 @@ class ReadWiFiNetworkDiagnosticsGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeWiFiNetworkDiagnosticsGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeTimeSynchronizationGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeWiFiNetworkDiagnosticsGeneratedCommandList() + SubscribeAttributeTimeSynchronizationGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeWiFiNetworkDiagnosticsGeneratedCommandList() + ~SubscribeAttributeTimeSynchronizationGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::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 = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -37481,7 +38941,7 @@ class SubscribeAttributeWiFiNetworkDiagnosticsGeneratedCommandList : public Subs [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.GeneratedCommandList response %@", [value description]); + NSLog(@"TimeSynchronization.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -37494,35 +38954,38 @@ class SubscribeAttributeWiFiNetworkDiagnosticsGeneratedCommandList : public Subs } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute AcceptedCommandList */ -class ReadWiFiNetworkDiagnosticsAcceptedCommandList : public ReadAttribute { +class ReadTimeSynchronizationAcceptedCommandList : public ReadAttribute { public: - ReadWiFiNetworkDiagnosticsAcceptedCommandList() + ReadTimeSynchronizationAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadWiFiNetworkDiagnosticsAcceptedCommandList() + ~ReadTimeSynchronizationAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::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 = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.AcceptedCommandList response %@", [value description]); + NSLog(@"TimeSynchronization.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WiFiNetworkDiagnostics AcceptedCommandList read Error", error); + LogNSError("TimeSynchronization AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -37531,25 +38994,25 @@ class ReadWiFiNetworkDiagnosticsAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeWiFiNetworkDiagnosticsAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeTimeSynchronizationAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeWiFiNetworkDiagnosticsAcceptedCommandList() + SubscribeAttributeTimeSynchronizationAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeWiFiNetworkDiagnosticsAcceptedCommandList() + ~SubscribeAttributeTimeSynchronizationAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::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 = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -37563,7 +39026,7 @@ class SubscribeAttributeWiFiNetworkDiagnosticsAcceptedCommandList : public Subsc [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.AcceptedCommandList response %@", [value description]); + NSLog(@"TimeSynchronization.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -37576,37 +39039,38 @@ class SubscribeAttributeWiFiNetworkDiagnosticsAcceptedCommandList : public Subsc } }; +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* * Attribute EventList */ -class ReadWiFiNetworkDiagnosticsEventList : public ReadAttribute { +class ReadTimeSynchronizationEventList : public ReadAttribute { public: - ReadWiFiNetworkDiagnosticsEventList() + ReadTimeSynchronizationEventList() : ReadAttribute("event-list") { } - ~ReadWiFiNetworkDiagnosticsEventList() + ~ReadTimeSynchronizationEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::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 = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.EventList response %@", [value description]); + NSLog(@"TimeSynchronization.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WiFiNetworkDiagnostics EventList read Error", error); + LogNSError("TimeSynchronization EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -37615,25 +39079,25 @@ class ReadWiFiNetworkDiagnosticsEventList : public ReadAttribute { } }; -class SubscribeAttributeWiFiNetworkDiagnosticsEventList : public SubscribeAttribute { +class SubscribeAttributeTimeSynchronizationEventList : public SubscribeAttribute { public: - SubscribeAttributeWiFiNetworkDiagnosticsEventList() + SubscribeAttributeTimeSynchronizationEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeWiFiNetworkDiagnosticsEventList() + ~SubscribeAttributeTimeSynchronizationEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::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 = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -37647,7 +39111,7 @@ class SubscribeAttributeWiFiNetworkDiagnosticsEventList : public SubscribeAttrib [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.EventList response %@", [value description]); + NSLog(@"TimeSynchronization.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -37661,36 +39125,37 @@ class SubscribeAttributeWiFiNetworkDiagnosticsEventList : public SubscribeAttrib }; #endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* * Attribute AttributeList */ -class ReadWiFiNetworkDiagnosticsAttributeList : public ReadAttribute { +class ReadTimeSynchronizationAttributeList : public ReadAttribute { public: - ReadWiFiNetworkDiagnosticsAttributeList() + ReadTimeSynchronizationAttributeList() : ReadAttribute("attribute-list") { } - ~ReadWiFiNetworkDiagnosticsAttributeList() + ~ReadTimeSynchronizationAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::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 = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.AttributeList response %@", [value description]); + NSLog(@"TimeSynchronization.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WiFiNetworkDiagnostics AttributeList read Error", error); + LogNSError("TimeSynchronization AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -37699,25 +39164,25 @@ class ReadWiFiNetworkDiagnosticsAttributeList : public ReadAttribute { } }; -class SubscribeAttributeWiFiNetworkDiagnosticsAttributeList : public SubscribeAttribute { +class SubscribeAttributeTimeSynchronizationAttributeList : public SubscribeAttribute { public: - SubscribeAttributeWiFiNetworkDiagnosticsAttributeList() + SubscribeAttributeTimeSynchronizationAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeWiFiNetworkDiagnosticsAttributeList() + ~SubscribeAttributeTimeSynchronizationAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::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 = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -37731,7 +39196,7 @@ class SubscribeAttributeWiFiNetworkDiagnosticsAttributeList : public SubscribeAt [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.AttributeList response %@", [value description]); + NSLog(@"TimeSynchronization.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -37744,35 +39209,38 @@ class SubscribeAttributeWiFiNetworkDiagnosticsAttributeList : public SubscribeAt } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute FeatureMap */ -class ReadWiFiNetworkDiagnosticsFeatureMap : public ReadAttribute { +class ReadTimeSynchronizationFeatureMap : public ReadAttribute { public: - ReadWiFiNetworkDiagnosticsFeatureMap() + ReadTimeSynchronizationFeatureMap() : ReadAttribute("feature-map") { } - ~ReadWiFiNetworkDiagnosticsFeatureMap() + ~ReadTimeSynchronizationFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::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 = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.FeatureMap response %@", [value description]); + NSLog(@"TimeSynchronization.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WiFiNetworkDiagnostics FeatureMap read Error", error); + LogNSError("TimeSynchronization FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -37781,25 +39249,25 @@ class ReadWiFiNetworkDiagnosticsFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeWiFiNetworkDiagnosticsFeatureMap : public SubscribeAttribute { +class SubscribeAttributeTimeSynchronizationFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeWiFiNetworkDiagnosticsFeatureMap() + SubscribeAttributeTimeSynchronizationFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeWiFiNetworkDiagnosticsFeatureMap() + ~SubscribeAttributeTimeSynchronizationFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::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 = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -37813,7 +39281,7 @@ class SubscribeAttributeWiFiNetworkDiagnosticsFeatureMap : public SubscribeAttri [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.FeatureMap response %@", [value description]); + NSLog(@"TimeSynchronization.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -37826,35 +39294,38 @@ class SubscribeAttributeWiFiNetworkDiagnosticsFeatureMap : public SubscribeAttri } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute ClusterRevision */ -class ReadWiFiNetworkDiagnosticsClusterRevision : public ReadAttribute { +class ReadTimeSynchronizationClusterRevision : public ReadAttribute { public: - ReadWiFiNetworkDiagnosticsClusterRevision() + ReadTimeSynchronizationClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadWiFiNetworkDiagnosticsClusterRevision() + ~ReadTimeSynchronizationClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::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 = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.ClusterRevision response %@", [value description]); + NSLog(@"TimeSynchronization.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("WiFiNetworkDiagnostics ClusterRevision read Error", error); + LogNSError("TimeSynchronization ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -37863,25 +39334,25 @@ class ReadWiFiNetworkDiagnosticsClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeWiFiNetworkDiagnosticsClusterRevision : public SubscribeAttribute { +class SubscribeAttributeTimeSynchronizationClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeWiFiNetworkDiagnosticsClusterRevision() + SubscribeAttributeTimeSynchronizationClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeWiFiNetworkDiagnosticsClusterRevision() + ~SubscribeAttributeTimeSynchronizationClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::WiFiNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::WiFiNetworkDiagnostics::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::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 = [[MTRBaseClusterWiFiNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -37895,7 +39366,7 @@ class SubscribeAttributeWiFiNetworkDiagnosticsClusterRevision : public Subscribe [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"WiFiNetworkDiagnostics.ClusterRevision response %@", [value description]); + NSLog(@"TimeSynchronization.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -37908,22 +39379,30 @@ class SubscribeAttributeWiFiNetworkDiagnosticsClusterRevision : public Subscribe } }; +#endif // MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster EthernetNetworkDiagnostics | 0x0037 | +| Cluster BridgedDeviceBasicInformation | 0x0039 | |------------------------------------------------------------------------------| | Commands: | | -| * ResetCounts | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * PHYRate | 0x0000 | -| * FullDuplex | 0x0001 | -| * PacketRxCount | 0x0002 | -| * PacketTxCount | 0x0003 | -| * TxErrCount | 0x0004 | -| * CollisionCount | 0x0005 | -| * OverrunCount | 0x0006 | -| * CarrierDetect | 0x0007 | -| * TimeSinceReset | 0x0008 | +| * 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 | @@ -37932,81 +39411,41 @@ class SubscribeAttributeWiFiNetworkDiagnosticsClusterRevision : public Subscribe | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | +| * StartUp | 0x0000 | +| * ShutDown | 0x0001 | +| * Leave | 0x0002 | +| * ReachableChanged | 0x0003 | \*----------------------------------------------------------------------------*/ /* - * Command ResetCounts - */ -class EthernetNetworkDiagnosticsResetCounts : public ClusterCommand { -public: - EthernetNetworkDiagnosticsResetCounts() - : ClusterCommand("reset-counts") - { - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - 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 endpoint %u", clusterId, commandId, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTREthernetNetworkDiagnosticsClusterResetCountsParams 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 resetCountsWithParams: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 PHYRate + * Attribute VendorName */ -class ReadEthernetNetworkDiagnosticsPHYRate : public ReadAttribute { +class ReadBridgedDeviceBasicInformationVendorName : public ReadAttribute { public: - ReadEthernetNetworkDiagnosticsPHYRate() - : ReadAttribute("phyrate") + ReadBridgedDeviceBasicInformationVendorName() + : ReadAttribute("vendor-name") { } - ~ReadEthernetNetworkDiagnosticsPHYRate() + ~ReadBridgedDeviceBasicInformationVendorName() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::PHYRate::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::VendorName::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePHYRateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.PHYRate response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeVendorNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.VendorName response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EthernetNetworkDiagnostics PHYRate read Error", error); + LogNSError("BridgedDeviceBasicInformation VendorName read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -38015,25 +39454,25 @@ class ReadEthernetNetworkDiagnosticsPHYRate : public ReadAttribute { } }; -class SubscribeAttributeEthernetNetworkDiagnosticsPHYRate : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationVendorName : public SubscribeAttribute { public: - SubscribeAttributeEthernetNetworkDiagnosticsPHYRate() - : SubscribeAttribute("phyrate") + SubscribeAttributeBridgedDeviceBasicInformationVendorName() + : SubscribeAttribute("vendor-name") { } - ~SubscribeAttributeEthernetNetworkDiagnosticsPHYRate() + ~SubscribeAttributeBridgedDeviceBasicInformationVendorName() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::PHYRate::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::VendorName::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -38044,10 +39483,10 @@ class SubscribeAttributeEthernetNetworkDiagnosticsPHYRate : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePHYRateWithParams:params + [cluster subscribeAttributeVendorNameWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.PHYRate response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.VendorName response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -38061,34 +39500,34 @@ class SubscribeAttributeEthernetNetworkDiagnosticsPHYRate : public SubscribeAttr }; /* - * Attribute FullDuplex + * Attribute VendorID */ -class ReadEthernetNetworkDiagnosticsFullDuplex : public ReadAttribute { +class ReadBridgedDeviceBasicInformationVendorID : public ReadAttribute { public: - ReadEthernetNetworkDiagnosticsFullDuplex() - : ReadAttribute("full-duplex") + ReadBridgedDeviceBasicInformationVendorID() + : ReadAttribute("vendor-id") { } - ~ReadEthernetNetworkDiagnosticsFullDuplex() + ~ReadBridgedDeviceBasicInformationVendorID() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::FullDuplex::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::VendorID::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFullDuplexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.FullDuplex response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeVendorIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.VendorID response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EthernetNetworkDiagnostics FullDuplex read Error", error); + LogNSError("BridgedDeviceBasicInformation VendorID read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -38097,25 +39536,25 @@ class ReadEthernetNetworkDiagnosticsFullDuplex : public ReadAttribute { } }; -class SubscribeAttributeEthernetNetworkDiagnosticsFullDuplex : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationVendorID : public SubscribeAttribute { public: - SubscribeAttributeEthernetNetworkDiagnosticsFullDuplex() - : SubscribeAttribute("full-duplex") + SubscribeAttributeBridgedDeviceBasicInformationVendorID() + : SubscribeAttribute("vendor-id") { } - ~SubscribeAttributeEthernetNetworkDiagnosticsFullDuplex() + ~SubscribeAttributeBridgedDeviceBasicInformationVendorID() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::FullDuplex::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::VendorID::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -38126,10 +39565,10 @@ class SubscribeAttributeEthernetNetworkDiagnosticsFullDuplex : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFullDuplexWithParams:params + [cluster subscribeAttributeVendorIDWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.FullDuplex response %@", [value description]); + NSLog(@"BridgedDeviceBasicInformation.VendorID response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -38143,34 +39582,34 @@ class SubscribeAttributeEthernetNetworkDiagnosticsFullDuplex : public SubscribeA }; /* - * Attribute PacketRxCount + * Attribute ProductName */ -class ReadEthernetNetworkDiagnosticsPacketRxCount : public ReadAttribute { +class ReadBridgedDeviceBasicInformationProductName : public ReadAttribute { public: - ReadEthernetNetworkDiagnosticsPacketRxCount() - : ReadAttribute("packet-rx-count") + ReadBridgedDeviceBasicInformationProductName() + : ReadAttribute("product-name") { } - ~ReadEthernetNetworkDiagnosticsPacketRxCount() + ~ReadBridgedDeviceBasicInformationProductName() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::PacketRxCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ProductName::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePacketRxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.PacketRxCount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeProductNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.ProductName response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EthernetNetworkDiagnostics PacketRxCount read Error", error); + LogNSError("BridgedDeviceBasicInformation ProductName read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -38179,25 +39618,25 @@ class ReadEthernetNetworkDiagnosticsPacketRxCount : public ReadAttribute { } }; -class SubscribeAttributeEthernetNetworkDiagnosticsPacketRxCount : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationProductName : public SubscribeAttribute { public: - SubscribeAttributeEthernetNetworkDiagnosticsPacketRxCount() - : SubscribeAttribute("packet-rx-count") + SubscribeAttributeBridgedDeviceBasicInformationProductName() + : SubscribeAttribute("product-name") { } - ~SubscribeAttributeEthernetNetworkDiagnosticsPacketRxCount() + ~SubscribeAttributeBridgedDeviceBasicInformationProductName() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::PacketRxCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ProductName::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -38208,10 +39647,10 @@ class SubscribeAttributeEthernetNetworkDiagnosticsPacketRxCount : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePacketRxCountWithParams:params + [cluster subscribeAttributeProductNameWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.PacketRxCount response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.ProductName response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -38225,34 +39664,34 @@ class SubscribeAttributeEthernetNetworkDiagnosticsPacketRxCount : public Subscri }; /* - * Attribute PacketTxCount + * Attribute NodeLabel */ -class ReadEthernetNetworkDiagnosticsPacketTxCount : public ReadAttribute { +class ReadBridgedDeviceBasicInformationNodeLabel : public ReadAttribute { public: - ReadEthernetNetworkDiagnosticsPacketTxCount() - : ReadAttribute("packet-tx-count") + ReadBridgedDeviceBasicInformationNodeLabel() + : ReadAttribute("node-label") { } - ~ReadEthernetNetworkDiagnosticsPacketTxCount() + ~ReadBridgedDeviceBasicInformationNodeLabel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::PacketTxCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::NodeLabel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePacketTxCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.PacketTxCount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNodeLabelWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.NodeLabel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EthernetNetworkDiagnostics PacketTxCount read Error", error); + LogNSError("BridgedDeviceBasicInformation NodeLabel read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -38261,107 +39700,66 @@ class ReadEthernetNetworkDiagnosticsPacketTxCount : public ReadAttribute { } }; -class SubscribeAttributeEthernetNetworkDiagnosticsPacketTxCount : public SubscribeAttribute { +class WriteBridgedDeviceBasicInformationNodeLabel : public WriteAttribute { public: - SubscribeAttributeEthernetNetworkDiagnosticsPacketTxCount() - : SubscribeAttribute("packet-tx-count") + WriteBridgedDeviceBasicInformationNodeLabel() + : WriteAttribute("node-label") { + AddArgument("attr-name", "node-label"); + AddArgument("attr-value", &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeEthernetNetworkDiagnosticsPacketTxCount() + ~WriteBridgedDeviceBasicInformationNodeLabel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::PacketTxCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::NodeLabel::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 = [[MTRBaseClusterEthernetNetworkDiagnostics 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 subscribeAttributePacketTxCountWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.PacketTxCount 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 TxErrCount - */ -class ReadEthernetNetworkDiagnosticsTxErrCount : public ReadAttribute { -public: - ReadEthernetNetworkDiagnosticsTxErrCount() - : ReadAttribute("tx-err-count") - { - } - - ~ReadEthernetNetworkDiagnosticsTxErrCount() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::TxErrCount::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation 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; + NSString * _Nonnull value = [[NSString alloc] initWithBytes:mValue.data() length:mValue.size() encoding:NSUTF8StringEncoding]; - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTxErrCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.TxErrCount response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("EthernetNetworkDiagnostics TxErrCount read Error", error); + [cluster writeAttributeNodeLabelWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("BridgedDeviceBasicInformation NodeLabel write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + chip::ByteSpan mValue; }; -class SubscribeAttributeEthernetNetworkDiagnosticsTxErrCount : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationNodeLabel : public SubscribeAttribute { public: - SubscribeAttributeEthernetNetworkDiagnosticsTxErrCount() - : SubscribeAttribute("tx-err-count") + SubscribeAttributeBridgedDeviceBasicInformationNodeLabel() + : SubscribeAttribute("node-label") { } - ~SubscribeAttributeEthernetNetworkDiagnosticsTxErrCount() + ~SubscribeAttributeBridgedDeviceBasicInformationNodeLabel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::TxErrCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::NodeLabel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -38372,10 +39770,10 @@ class SubscribeAttributeEthernetNetworkDiagnosticsTxErrCount : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTxErrCountWithParams:params + [cluster subscribeAttributeNodeLabelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.TxErrCount response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.NodeLabel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -38389,34 +39787,34 @@ class SubscribeAttributeEthernetNetworkDiagnosticsTxErrCount : public SubscribeA }; /* - * Attribute CollisionCount + * Attribute HardwareVersion */ -class ReadEthernetNetworkDiagnosticsCollisionCount : public ReadAttribute { +class ReadBridgedDeviceBasicInformationHardwareVersion : public ReadAttribute { public: - ReadEthernetNetworkDiagnosticsCollisionCount() - : ReadAttribute("collision-count") + ReadBridgedDeviceBasicInformationHardwareVersion() + : ReadAttribute("hardware-version") { } - ~ReadEthernetNetworkDiagnosticsCollisionCount() + ~ReadBridgedDeviceBasicInformationHardwareVersion() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::CollisionCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::HardwareVersion::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCollisionCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.CollisionCount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeHardwareVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.HardwareVersion response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EthernetNetworkDiagnostics CollisionCount read Error", error); + LogNSError("BridgedDeviceBasicInformation HardwareVersion read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -38425,25 +39823,25 @@ class ReadEthernetNetworkDiagnosticsCollisionCount : public ReadAttribute { } }; -class SubscribeAttributeEthernetNetworkDiagnosticsCollisionCount : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationHardwareVersion : public SubscribeAttribute { public: - SubscribeAttributeEthernetNetworkDiagnosticsCollisionCount() - : SubscribeAttribute("collision-count") + SubscribeAttributeBridgedDeviceBasicInformationHardwareVersion() + : SubscribeAttribute("hardware-version") { } - ~SubscribeAttributeEthernetNetworkDiagnosticsCollisionCount() + ~SubscribeAttributeBridgedDeviceBasicInformationHardwareVersion() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::CollisionCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::HardwareVersion::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -38454,10 +39852,10 @@ class SubscribeAttributeEthernetNetworkDiagnosticsCollisionCount : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCollisionCountWithParams:params + [cluster subscribeAttributeHardwareVersionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.CollisionCount response %@", [value description]); + NSLog(@"BridgedDeviceBasicInformation.HardwareVersion response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -38471,34 +39869,34 @@ class SubscribeAttributeEthernetNetworkDiagnosticsCollisionCount : public Subscr }; /* - * Attribute OverrunCount + * Attribute HardwareVersionString */ -class ReadEthernetNetworkDiagnosticsOverrunCount : public ReadAttribute { +class ReadBridgedDeviceBasicInformationHardwareVersionString : public ReadAttribute { public: - ReadEthernetNetworkDiagnosticsOverrunCount() - : ReadAttribute("overrun-count") + ReadBridgedDeviceBasicInformationHardwareVersionString() + : ReadAttribute("hardware-version-string") { } - ~ReadEthernetNetworkDiagnosticsOverrunCount() + ~ReadBridgedDeviceBasicInformationHardwareVersionString() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::OverrunCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::HardwareVersionString::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOverrunCountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.OverrunCount response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeHardwareVersionStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.HardwareVersionString response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EthernetNetworkDiagnostics OverrunCount read Error", error); + LogNSError("BridgedDeviceBasicInformation HardwareVersionString read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -38507,25 +39905,25 @@ class ReadEthernetNetworkDiagnosticsOverrunCount : public ReadAttribute { } }; -class SubscribeAttributeEthernetNetworkDiagnosticsOverrunCount : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationHardwareVersionString : public SubscribeAttribute { public: - SubscribeAttributeEthernetNetworkDiagnosticsOverrunCount() - : SubscribeAttribute("overrun-count") + SubscribeAttributeBridgedDeviceBasicInformationHardwareVersionString() + : SubscribeAttribute("hardware-version-string") { } - ~SubscribeAttributeEthernetNetworkDiagnosticsOverrunCount() + ~SubscribeAttributeBridgedDeviceBasicInformationHardwareVersionString() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::OverrunCount::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::HardwareVersionString::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -38536,10 +39934,10 @@ class SubscribeAttributeEthernetNetworkDiagnosticsOverrunCount : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOverrunCountWithParams:params + [cluster subscribeAttributeHardwareVersionStringWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.OverrunCount response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.HardwareVersionString response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -38553,34 +39951,34 @@ class SubscribeAttributeEthernetNetworkDiagnosticsOverrunCount : public Subscrib }; /* - * Attribute CarrierDetect + * Attribute SoftwareVersion */ -class ReadEthernetNetworkDiagnosticsCarrierDetect : public ReadAttribute { +class ReadBridgedDeviceBasicInformationSoftwareVersion : public ReadAttribute { public: - ReadEthernetNetworkDiagnosticsCarrierDetect() - : ReadAttribute("carrier-detect") + ReadBridgedDeviceBasicInformationSoftwareVersion() + : ReadAttribute("software-version") { } - ~ReadEthernetNetworkDiagnosticsCarrierDetect() + ~ReadBridgedDeviceBasicInformationSoftwareVersion() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::CarrierDetect::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::SoftwareVersion::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCarrierDetectWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.CarrierDetect response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSoftwareVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.SoftwareVersion response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EthernetNetworkDiagnostics CarrierDetect read Error", error); + LogNSError("BridgedDeviceBasicInformation SoftwareVersion read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -38589,25 +39987,25 @@ class ReadEthernetNetworkDiagnosticsCarrierDetect : public ReadAttribute { } }; -class SubscribeAttributeEthernetNetworkDiagnosticsCarrierDetect : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationSoftwareVersion : public SubscribeAttribute { public: - SubscribeAttributeEthernetNetworkDiagnosticsCarrierDetect() - : SubscribeAttribute("carrier-detect") + SubscribeAttributeBridgedDeviceBasicInformationSoftwareVersion() + : SubscribeAttribute("software-version") { } - ~SubscribeAttributeEthernetNetworkDiagnosticsCarrierDetect() + ~SubscribeAttributeBridgedDeviceBasicInformationSoftwareVersion() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::CarrierDetect::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::SoftwareVersion::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -38618,10 +40016,10 @@ class SubscribeAttributeEthernetNetworkDiagnosticsCarrierDetect : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCarrierDetectWithParams:params + [cluster subscribeAttributeSoftwareVersionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.CarrierDetect response %@", [value description]); + NSLog(@"BridgedDeviceBasicInformation.SoftwareVersion response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -38635,34 +40033,34 @@ class SubscribeAttributeEthernetNetworkDiagnosticsCarrierDetect : public Subscri }; /* - * Attribute TimeSinceReset + * Attribute SoftwareVersionString */ -class ReadEthernetNetworkDiagnosticsTimeSinceReset : public ReadAttribute { +class ReadBridgedDeviceBasicInformationSoftwareVersionString : public ReadAttribute { public: - ReadEthernetNetworkDiagnosticsTimeSinceReset() - : ReadAttribute("time-since-reset") + ReadBridgedDeviceBasicInformationSoftwareVersionString() + : ReadAttribute("software-version-string") { } - ~ReadEthernetNetworkDiagnosticsTimeSinceReset() + ~ReadBridgedDeviceBasicInformationSoftwareVersionString() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::TimeSinceReset::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::SoftwareVersionString::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTimeSinceResetWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.TimeSinceReset response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSoftwareVersionStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.SoftwareVersionString response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EthernetNetworkDiagnostics TimeSinceReset read Error", error); + LogNSError("BridgedDeviceBasicInformation SoftwareVersionString read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -38671,25 +40069,25 @@ class ReadEthernetNetworkDiagnosticsTimeSinceReset : public ReadAttribute { } }; -class SubscribeAttributeEthernetNetworkDiagnosticsTimeSinceReset : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationSoftwareVersionString : public SubscribeAttribute { public: - SubscribeAttributeEthernetNetworkDiagnosticsTimeSinceReset() - : SubscribeAttribute("time-since-reset") + SubscribeAttributeBridgedDeviceBasicInformationSoftwareVersionString() + : SubscribeAttribute("software-version-string") { } - ~SubscribeAttributeEthernetNetworkDiagnosticsTimeSinceReset() + ~SubscribeAttributeBridgedDeviceBasicInformationSoftwareVersionString() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::TimeSinceReset::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::SoftwareVersionString::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -38700,10 +40098,10 @@ class SubscribeAttributeEthernetNetworkDiagnosticsTimeSinceReset : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTimeSinceResetWithParams:params + [cluster subscribeAttributeSoftwareVersionStringWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.TimeSinceReset response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.SoftwareVersionString response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -38717,34 +40115,34 @@ class SubscribeAttributeEthernetNetworkDiagnosticsTimeSinceReset : public Subscr }; /* - * Attribute GeneratedCommandList + * Attribute ManufacturingDate */ -class ReadEthernetNetworkDiagnosticsGeneratedCommandList : public ReadAttribute { +class ReadBridgedDeviceBasicInformationManufacturingDate : public ReadAttribute { public: - ReadEthernetNetworkDiagnosticsGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadBridgedDeviceBasicInformationManufacturingDate() + : ReadAttribute("manufacturing-date") { } - ~ReadEthernetNetworkDiagnosticsGeneratedCommandList() + ~ReadBridgedDeviceBasicInformationManufacturingDate() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ManufacturingDate::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeManufacturingDateWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.ManufacturingDate response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EthernetNetworkDiagnostics GeneratedCommandList read Error", error); + LogNSError("BridgedDeviceBasicInformation ManufacturingDate read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -38753,25 +40151,25 @@ class ReadEthernetNetworkDiagnosticsGeneratedCommandList : public ReadAttribute } }; -class SubscribeAttributeEthernetNetworkDiagnosticsGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationManufacturingDate : public SubscribeAttribute { public: - SubscribeAttributeEthernetNetworkDiagnosticsGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeBridgedDeviceBasicInformationManufacturingDate() + : SubscribeAttribute("manufacturing-date") { } - ~SubscribeAttributeEthernetNetworkDiagnosticsGeneratedCommandList() + ~SubscribeAttributeBridgedDeviceBasicInformationManufacturingDate() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ManufacturingDate::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -38782,10 +40180,10 @@ class SubscribeAttributeEthernetNetworkDiagnosticsGeneratedCommandList : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeManufacturingDateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.ManufacturingDate response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -38799,34 +40197,34 @@ class SubscribeAttributeEthernetNetworkDiagnosticsGeneratedCommandList : public }; /* - * Attribute AcceptedCommandList + * Attribute PartNumber */ -class ReadEthernetNetworkDiagnosticsAcceptedCommandList : public ReadAttribute { +class ReadBridgedDeviceBasicInformationPartNumber : public ReadAttribute { public: - ReadEthernetNetworkDiagnosticsAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadBridgedDeviceBasicInformationPartNumber() + : ReadAttribute("part-number") { } - ~ReadEthernetNetworkDiagnosticsAcceptedCommandList() + ~ReadBridgedDeviceBasicInformationPartNumber() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::PartNumber::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePartNumberWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.PartNumber response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EthernetNetworkDiagnostics AcceptedCommandList read Error", error); + LogNSError("BridgedDeviceBasicInformation PartNumber read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -38835,25 +40233,25 @@ class ReadEthernetNetworkDiagnosticsAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeEthernetNetworkDiagnosticsAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationPartNumber : public SubscribeAttribute { public: - SubscribeAttributeEthernetNetworkDiagnosticsAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeBridgedDeviceBasicInformationPartNumber() + : SubscribeAttribute("part-number") { } - ~SubscribeAttributeEthernetNetworkDiagnosticsAcceptedCommandList() + ~SubscribeAttributeBridgedDeviceBasicInformationPartNumber() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::PartNumber::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -38864,10 +40262,10 @@ class SubscribeAttributeEthernetNetworkDiagnosticsAcceptedCommandList : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributePartNumberWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.PartNumber response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -38880,37 +40278,35 @@ class SubscribeAttributeEthernetNetworkDiagnosticsAcceptedCommandList : public S } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute ProductURL */ -class ReadEthernetNetworkDiagnosticsEventList : public ReadAttribute { +class ReadBridgedDeviceBasicInformationProductURL : public ReadAttribute { public: - ReadEthernetNetworkDiagnosticsEventList() - : ReadAttribute("event-list") + ReadBridgedDeviceBasicInformationProductURL() + : ReadAttribute("product-url") { } - ~ReadEthernetNetworkDiagnosticsEventList() + ~ReadBridgedDeviceBasicInformationProductURL() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ProductURL::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeProductURLWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.ProductURL response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EthernetNetworkDiagnostics EventList read Error", error); + LogNSError("BridgedDeviceBasicInformation ProductURL read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -38919,25 +40315,25 @@ class ReadEthernetNetworkDiagnosticsEventList : public ReadAttribute { } }; -class SubscribeAttributeEthernetNetworkDiagnosticsEventList : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationProductURL : public SubscribeAttribute { public: - SubscribeAttributeEthernetNetworkDiagnosticsEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeBridgedDeviceBasicInformationProductURL() + : SubscribeAttribute("product-url") { } - ~SubscribeAttributeEthernetNetworkDiagnosticsEventList() + ~SubscribeAttributeBridgedDeviceBasicInformationProductURL() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ProductURL::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -38948,10 +40344,10 @@ class SubscribeAttributeEthernetNetworkDiagnosticsEventList : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeProductURLWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.EventList response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.ProductURL response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -38964,37 +40360,35 @@ class SubscribeAttributeEthernetNetworkDiagnosticsEventList : public SubscribeAt } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute ProductLabel */ -class ReadEthernetNetworkDiagnosticsAttributeList : public ReadAttribute { +class ReadBridgedDeviceBasicInformationProductLabel : public ReadAttribute { public: - ReadEthernetNetworkDiagnosticsAttributeList() - : ReadAttribute("attribute-list") + ReadBridgedDeviceBasicInformationProductLabel() + : ReadAttribute("product-label") { } - ~ReadEthernetNetworkDiagnosticsAttributeList() + ~ReadBridgedDeviceBasicInformationProductLabel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ProductLabel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeProductLabelWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.ProductLabel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EthernetNetworkDiagnostics AttributeList read Error", error); + LogNSError("BridgedDeviceBasicInformation ProductLabel read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -39003,25 +40397,25 @@ class ReadEthernetNetworkDiagnosticsAttributeList : public ReadAttribute { } }; -class SubscribeAttributeEthernetNetworkDiagnosticsAttributeList : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationProductLabel : public SubscribeAttribute { public: - SubscribeAttributeEthernetNetworkDiagnosticsAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeBridgedDeviceBasicInformationProductLabel() + : SubscribeAttribute("product-label") { } - ~SubscribeAttributeEthernetNetworkDiagnosticsAttributeList() + ~SubscribeAttributeBridgedDeviceBasicInformationProductLabel() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ProductLabel::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -39032,10 +40426,10 @@ class SubscribeAttributeEthernetNetworkDiagnosticsAttributeList : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeProductLabelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.AttributeList response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.ProductLabel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -39049,34 +40443,34 @@ class SubscribeAttributeEthernetNetworkDiagnosticsAttributeList : public Subscri }; /* - * Attribute FeatureMap + * Attribute SerialNumber */ -class ReadEthernetNetworkDiagnosticsFeatureMap : public ReadAttribute { +class ReadBridgedDeviceBasicInformationSerialNumber : public ReadAttribute { public: - ReadEthernetNetworkDiagnosticsFeatureMap() - : ReadAttribute("feature-map") + ReadBridgedDeviceBasicInformationSerialNumber() + : ReadAttribute("serial-number") { } - ~ReadEthernetNetworkDiagnosticsFeatureMap() + ~ReadBridgedDeviceBasicInformationSerialNumber() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::SerialNumber::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSerialNumberWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.SerialNumber response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EthernetNetworkDiagnostics FeatureMap read Error", error); + LogNSError("BridgedDeviceBasicInformation SerialNumber read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -39085,25 +40479,25 @@ class ReadEthernetNetworkDiagnosticsFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeEthernetNetworkDiagnosticsFeatureMap : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationSerialNumber : public SubscribeAttribute { public: - SubscribeAttributeEthernetNetworkDiagnosticsFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeBridgedDeviceBasicInformationSerialNumber() + : SubscribeAttribute("serial-number") { } - ~SubscribeAttributeEthernetNetworkDiagnosticsFeatureMap() + ~SubscribeAttributeBridgedDeviceBasicInformationSerialNumber() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::SerialNumber::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -39114,10 +40508,10 @@ class SubscribeAttributeEthernetNetworkDiagnosticsFeatureMap : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeSerialNumberWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.FeatureMap response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.SerialNumber response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -39131,34 +40525,34 @@ class SubscribeAttributeEthernetNetworkDiagnosticsFeatureMap : public SubscribeA }; /* - * Attribute ClusterRevision + * Attribute Reachable */ -class ReadEthernetNetworkDiagnosticsClusterRevision : public ReadAttribute { +class ReadBridgedDeviceBasicInformationReachable : public ReadAttribute { public: - ReadEthernetNetworkDiagnosticsClusterRevision() - : ReadAttribute("cluster-revision") + ReadBridgedDeviceBasicInformationReachable() + : ReadAttribute("reachable") { } - ~ReadEthernetNetworkDiagnosticsClusterRevision() + ~ReadBridgedDeviceBasicInformationReachable() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::Reachable::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeReachableWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.Reachable response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("EthernetNetworkDiagnostics ClusterRevision read Error", error); + LogNSError("BridgedDeviceBasicInformation Reachable read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -39167,25 +40561,25 @@ class ReadEthernetNetworkDiagnosticsClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeEthernetNetworkDiagnosticsClusterRevision : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationReachable : public SubscribeAttribute { public: - SubscribeAttributeEthernetNetworkDiagnosticsClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeBridgedDeviceBasicInformationReachable() + : SubscribeAttribute("reachable") { } - ~SubscribeAttributeEthernetNetworkDiagnosticsClusterRevision() + ~SubscribeAttributeBridgedDeviceBasicInformationReachable() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EthernetNetworkDiagnostics::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EthernetNetworkDiagnostics::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::Reachable::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEthernetNetworkDiagnostics alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -39196,10 +40590,10 @@ class SubscribeAttributeEthernetNetworkDiagnosticsClusterRevision : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeReachableWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EthernetNetworkDiagnostics.ClusterRevision response %@", [value description]); + NSLog(@"BridgedDeviceBasicInformation.Reachable response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -39212,399 +40606,117 @@ class SubscribeAttributeEthernetNetworkDiagnosticsClusterRevision : public Subsc } }; -#if MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| 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 | -\*----------------------------------------------------------------------------*/ - -#if MTR_ENABLE_PROVISIONAL -/* - * Command SetUTCTime - */ -class TimeSynchronizationSetUTCTime : public ClusterCommand { -public: - TimeSynchronizationSetUTCTime() - : ClusterCommand("set-utctime") - { - 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(MTRBaseDevice * device, chip::EndpointId endpointId) 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, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRTimeSynchronizationClusterSetUTCTimeParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.utcTime = [NSNumber numberWithUnsignedLongLong:mRequest.UTCTime]; - params.granularity = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.granularity)]; - if (mRequest.timeSource.HasValue()) { - params.timeSource = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.timeSource.Value())]; - } else { - params.timeSource = nil; - } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setUTCTimeWithParams: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::TimeSynchronization::Commands::SetUTCTime::Type mRequest; -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command SetTrustedTimeSource - */ -class TimeSynchronizationSetTrustedTimeSource : public ClusterCommand { -public: - TimeSynchronizationSetTrustedTimeSource() - : ClusterCommand("set-trusted-time-source") - , mComplex_TrustedTimeSource(&mRequest.trustedTimeSource) - { -#if MTR_ENABLE_PROVISIONAL - AddArgument("TrustedTimeSource", &mComplex_TrustedTimeSource); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) 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, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRTimeSynchronizationClusterSetTrustedTimeSourceParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - if (mRequest.trustedTimeSource.IsNull()) { - params.trustedTimeSource = nil; - } else { - params.trustedTimeSource = [MTRTimeSynchronizationClusterFabricScopedTrustedTimeSourceStruct new]; - params.trustedTimeSource.nodeID = [NSNumber numberWithUnsignedLongLong:mRequest.trustedTimeSource.Value().nodeID]; - params.trustedTimeSource.endpoint = [NSNumber numberWithUnsignedShort:mRequest.trustedTimeSource.Value().endpoint]; - } -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setTrustedTimeSourceWithParams: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::TimeSynchronization::Commands::SetTrustedTimeSource::Type mRequest; - TypedComplexArgument> mComplex_TrustedTimeSource; -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command SetTimeZone - */ -class TimeSynchronizationSetTimeZone : public ClusterCommand { -public: - TimeSynchronizationSetTimeZone() - : ClusterCommand("set-time-zone") - , mComplex_TimeZone(&mRequest.timeZone) - { -#if MTR_ENABLE_PROVISIONAL - AddArgument("TimeZone", &mComplex_TimeZone); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) 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, endpointId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRTimeSynchronizationClusterSetTimeZoneParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - for (auto & entry_0 : mRequest.timeZone) { - MTRTimeSynchronizationClusterTimeZoneStruct * newElement_0; - newElement_0 = [MTRTimeSynchronizationClusterTimeZoneStruct new]; - newElement_0.offset = [NSNumber numberWithInt:entry_0.offset]; - newElement_0.validAt = [NSNumber numberWithUnsignedLongLong:entry_0.validAt]; - if (entry_0.name.HasValue()) { - newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.Value().data() length:entry_0.name.Value().size() encoding:NSUTF8StringEncoding]; - } else { - newElement_0.name = nil; - } - [array_0 addObject:newElement_0]; - } - params.timeZone = array_0; - } -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setTimeZoneWithParams:params completion: - ^(MTRTimeSynchronizationClusterSetTimeZoneResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::TimeSynchronization::Commands::SetTimeZoneResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::TimeSynchronization::Commands::SetTimeZoneResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::TimeSynchronization::Commands::SetTimeZone::Type mRequest; - TypedComplexArgument> mComplex_TimeZone; -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* - * Command SetDSTOffset + * Attribute UniqueID */ -class TimeSynchronizationSetDSTOffset : public ClusterCommand { +class ReadBridgedDeviceBasicInformationUniqueID : public ReadAttribute { public: - TimeSynchronizationSetDSTOffset() - : ClusterCommand("set-dstoffset") - , mComplex_DSTOffset(&mRequest.DSTOffset) + ReadBridgedDeviceBasicInformationUniqueID() + : ReadAttribute("unique-id") + { + } + + ~ReadBridgedDeviceBasicInformationUniqueID() { -#if MTR_ENABLE_PROVISIONAL - AddArgument("DSTOffset", &mComplex_DSTOffset); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) 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::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::UniqueID::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 = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRTimeSynchronizationClusterSetDSTOffsetParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - for (auto & entry_0 : mRequest.DSTOffset) { - MTRTimeSynchronizationClusterDSTOffsetStruct * newElement_0; - newElement_0 = [MTRTimeSynchronizationClusterDSTOffsetStruct new]; - newElement_0.offset = [NSNumber numberWithInt:entry_0.offset]; - newElement_0.validStarting = [NSNumber numberWithUnsignedLongLong:entry_0.validStarting]; - if (entry_0.validUntil.IsNull()) { - newElement_0.validUntil = nil; - } else { - newElement_0.validUntil = [NSNumber numberWithUnsignedLongLong:entry_0.validUntil.Value()]; - } - [array_0 addObject:newElement_0]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeUniqueIDWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.UniqueID response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("BridgedDeviceBasicInformation UniqueID read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } - params.dstOffset = array_0; - } -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setDSTOffsetWithParams: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); - } - }]; - } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::TimeSynchronization::Commands::SetDSTOffset::Type mRequest; - TypedComplexArgument> mComplex_DSTOffset; }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/* - * Command SetDefaultNTP - */ -class TimeSynchronizationSetDefaultNTP : public ClusterCommand { +class SubscribeAttributeBridgedDeviceBasicInformationUniqueID : public SubscribeAttribute { public: - TimeSynchronizationSetDefaultNTP() - : ClusterCommand("set-default-ntp") + SubscribeAttributeBridgedDeviceBasicInformationUniqueID() + : SubscribeAttribute("unique-id") { -#if MTR_ENABLE_PROVISIONAL - AddArgument("DefaultNTP", &mRequest.defaultNTP); -#endif // MTR_ENABLE_PROVISIONAL - ClusterCommand::AddArguments(); } - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ~SubscribeAttributeBridgedDeviceBasicInformationUniqueID() { - 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, endpointId); + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::UniqueID::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRTimeSynchronizationClusterSetDefaultNTPParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; -#if MTR_ENABLE_PROVISIONAL - if (mRequest.defaultNTP.IsNull()) { - params.defaultNTP = nil; - } else { - params.defaultNTP = [[NSString alloc] initWithBytes:mRequest.defaultNTP.Value().data() length:mRequest.defaultNTP.Value().size() encoding:NSUTF8StringEncoding]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); } -#endif // MTR_ENABLE_PROVISIONAL - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setDefaultNTPWithParams: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); - } - }]; + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); } + [cluster subscribeAttributeUniqueIDWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.UniqueID 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::TimeSynchronization::Commands::SetDefaultNTP::Type mRequest; }; -#endif // MTR_ENABLE_PROVISIONAL - -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute UTCTime + * Attribute ProductAppearance */ -class ReadTimeSynchronizationUTCTime : public ReadAttribute { +class ReadBridgedDeviceBasicInformationProductAppearance : public ReadAttribute { public: - ReadTimeSynchronizationUTCTime() - : ReadAttribute("utctime") + ReadBridgedDeviceBasicInformationProductAppearance() + : ReadAttribute("product-appearance") { } - ~ReadTimeSynchronizationUTCTime() + ~ReadBridgedDeviceBasicInformationProductAppearance() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::UTCTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ProductAppearance::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUTCTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.UTCTime response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeProductAppearanceWithCompletion:^(MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.ProductAppearance response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TimeSynchronization UTCTime read Error", error); + LogNSError("BridgedDeviceBasicInformation ProductAppearance read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -39613,25 +40725,25 @@ class ReadTimeSynchronizationUTCTime : public ReadAttribute { } }; -class SubscribeAttributeTimeSynchronizationUTCTime : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationProductAppearance : public SubscribeAttribute { public: - SubscribeAttributeTimeSynchronizationUTCTime() - : SubscribeAttribute("utctime") + SubscribeAttributeBridgedDeviceBasicInformationProductAppearance() + : SubscribeAttribute("product-appearance") { } - ~SubscribeAttributeTimeSynchronizationUTCTime() + ~SubscribeAttributeBridgedDeviceBasicInformationProductAppearance() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::UTCTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ProductAppearance::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -39642,10 +40754,10 @@ class SubscribeAttributeTimeSynchronizationUTCTime : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUTCTimeWithParams:params + [cluster subscribeAttributeProductAppearanceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.UTCTime response %@", [value description]); + reportHandler:^(MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.ProductAppearance response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -39658,38 +40770,35 @@ class SubscribeAttributeTimeSynchronizationUTCTime : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute Granularity + * Attribute GeneratedCommandList */ -class ReadTimeSynchronizationGranularity : public ReadAttribute { +class ReadBridgedDeviceBasicInformationGeneratedCommandList : public ReadAttribute { public: - ReadTimeSynchronizationGranularity() - : ReadAttribute("granularity") + ReadBridgedDeviceBasicInformationGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadTimeSynchronizationGranularity() + ~ReadBridgedDeviceBasicInformationGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::Granularity::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::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 = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGranularityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.Granularity response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TimeSynchronization Granularity read Error", error); + LogNSError("BridgedDeviceBasicInformation GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -39698,25 +40807,25 @@ class ReadTimeSynchronizationGranularity : public ReadAttribute { } }; -class SubscribeAttributeTimeSynchronizationGranularity : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeTimeSynchronizationGranularity() - : SubscribeAttribute("granularity") + SubscribeAttributeBridgedDeviceBasicInformationGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeTimeSynchronizationGranularity() + ~SubscribeAttributeBridgedDeviceBasicInformationGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::Granularity::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::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 = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -39727,10 +40836,10 @@ class SubscribeAttributeTimeSynchronizationGranularity : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGranularityWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.Granularity response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -39743,38 +40852,35 @@ class SubscribeAttributeTimeSynchronizationGranularity : public SubscribeAttribu } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute TimeSource + * Attribute AcceptedCommandList */ -class ReadTimeSynchronizationTimeSource : public ReadAttribute { +class ReadBridgedDeviceBasicInformationAcceptedCommandList : public ReadAttribute { public: - ReadTimeSynchronizationTimeSource() - : ReadAttribute("time-source") + ReadBridgedDeviceBasicInformationAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadTimeSynchronizationTimeSource() + ~ReadBridgedDeviceBasicInformationAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::TimeSource::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::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 = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTimeSourceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.TimeSource response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TimeSynchronization TimeSource read Error", error); + LogNSError("BridgedDeviceBasicInformation AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -39783,25 +40889,25 @@ class ReadTimeSynchronizationTimeSource : public ReadAttribute { } }; -class SubscribeAttributeTimeSynchronizationTimeSource : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeTimeSynchronizationTimeSource() - : SubscribeAttribute("time-source") + SubscribeAttributeBridgedDeviceBasicInformationAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeTimeSynchronizationTimeSource() + ~SubscribeAttributeBridgedDeviceBasicInformationAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::TimeSource::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::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 = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -39812,10 +40918,10 @@ class SubscribeAttributeTimeSynchronizationTimeSource : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTimeSourceWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.TimeSource response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -39828,38 +40934,37 @@ class SubscribeAttributeTimeSynchronizationTimeSource : public SubscribeAttribut } }; -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* - * Attribute TrustedTimeSource + * Attribute EventList */ -class ReadTimeSynchronizationTrustedTimeSource : public ReadAttribute { +class ReadBridgedDeviceBasicInformationEventList : public ReadAttribute { public: - ReadTimeSynchronizationTrustedTimeSource() - : ReadAttribute("trusted-time-source") + ReadBridgedDeviceBasicInformationEventList() + : ReadAttribute("event-list") { } - ~ReadTimeSynchronizationTrustedTimeSource() + ~ReadBridgedDeviceBasicInformationEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::TrustedTimeSource::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::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 = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTrustedTimeSourceWithCompletion:^(MTRTimeSynchronizationClusterTrustedTimeSourceStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.TrustedTimeSource response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TimeSynchronization TrustedTimeSource read Error", error); + LogNSError("BridgedDeviceBasicInformation EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -39868,25 +40973,25 @@ class ReadTimeSynchronizationTrustedTimeSource : public ReadAttribute { } }; -class SubscribeAttributeTimeSynchronizationTrustedTimeSource : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationEventList : public SubscribeAttribute { public: - SubscribeAttributeTimeSynchronizationTrustedTimeSource() - : SubscribeAttribute("trusted-time-source") + SubscribeAttributeBridgedDeviceBasicInformationEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeTimeSynchronizationTrustedTimeSource() + ~SubscribeAttributeBridgedDeviceBasicInformationEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::TrustedTimeSource::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::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 = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -39897,10 +41002,10 @@ class SubscribeAttributeTimeSynchronizationTrustedTimeSource : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTrustedTimeSourceWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(MTRTimeSynchronizationClusterTrustedTimeSourceStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.TrustedTimeSource response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -39914,37 +41019,36 @@ class SubscribeAttributeTimeSynchronizationTrustedTimeSource : public SubscribeA }; #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* - * Attribute DefaultNTP + * Attribute AttributeList */ -class ReadTimeSynchronizationDefaultNTP : public ReadAttribute { +class ReadBridgedDeviceBasicInformationAttributeList : public ReadAttribute { public: - ReadTimeSynchronizationDefaultNTP() - : ReadAttribute("default-ntp") + ReadBridgedDeviceBasicInformationAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadTimeSynchronizationDefaultNTP() + ~ReadBridgedDeviceBasicInformationAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::DefaultNTP::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::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 = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDefaultNTPWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.DefaultNTP response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TimeSynchronization DefaultNTP read Error", error); + LogNSError("BridgedDeviceBasicInformation AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -39953,25 +41057,25 @@ class ReadTimeSynchronizationDefaultNTP : public ReadAttribute { } }; -class SubscribeAttributeTimeSynchronizationDefaultNTP : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationAttributeList : public SubscribeAttribute { public: - SubscribeAttributeTimeSynchronizationDefaultNTP() - : SubscribeAttribute("default-ntp") + SubscribeAttributeBridgedDeviceBasicInformationAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeTimeSynchronizationDefaultNTP() + ~SubscribeAttributeBridgedDeviceBasicInformationAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::DefaultNTP::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::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 = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -39982,10 +41086,10 @@ class SubscribeAttributeTimeSynchronizationDefaultNTP : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDefaultNTPWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.DefaultNTP response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -39998,38 +41102,35 @@ class SubscribeAttributeTimeSynchronizationDefaultNTP : public SubscribeAttribut } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute TimeZone + * Attribute FeatureMap */ -class ReadTimeSynchronizationTimeZone : public ReadAttribute { +class ReadBridgedDeviceBasicInformationFeatureMap : public ReadAttribute { public: - ReadTimeSynchronizationTimeZone() - : ReadAttribute("time-zone") + ReadBridgedDeviceBasicInformationFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadTimeSynchronizationTimeZone() + ~ReadBridgedDeviceBasicInformationFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::TimeZone::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::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 = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTimeZoneWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.TimeZone response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TimeSynchronization TimeZone read Error", error); + LogNSError("BridgedDeviceBasicInformation FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -40038,25 +41139,25 @@ class ReadTimeSynchronizationTimeZone : public ReadAttribute { } }; -class SubscribeAttributeTimeSynchronizationTimeZone : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeTimeSynchronizationTimeZone() - : SubscribeAttribute("time-zone") + SubscribeAttributeBridgedDeviceBasicInformationFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeTimeSynchronizationTimeZone() + ~SubscribeAttributeBridgedDeviceBasicInformationFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::TimeZone::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::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 = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -40067,10 +41168,10 @@ class SubscribeAttributeTimeSynchronizationTimeZone : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTimeZoneWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.TimeZone response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -40083,38 +41184,35 @@ class SubscribeAttributeTimeSynchronizationTimeZone : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute DSTOffset + * Attribute ClusterRevision */ -class ReadTimeSynchronizationDSTOffset : public ReadAttribute { +class ReadBridgedDeviceBasicInformationClusterRevision : public ReadAttribute { public: - ReadTimeSynchronizationDSTOffset() - : ReadAttribute("dstoffset") + ReadBridgedDeviceBasicInformationClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadTimeSynchronizationDSTOffset() + ~ReadBridgedDeviceBasicInformationClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::DSTOffset::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::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 = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDSTOffsetWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.DSTOffset response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TimeSynchronization DSTOffset read Error", error); + LogNSError("BridgedDeviceBasicInformation ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -40123,25 +41221,25 @@ class ReadTimeSynchronizationDSTOffset : public ReadAttribute { } }; -class SubscribeAttributeTimeSynchronizationDSTOffset : public SubscribeAttribute { +class SubscribeAttributeBridgedDeviceBasicInformationClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeTimeSynchronizationDSTOffset() - : SubscribeAttribute("dstoffset") + SubscribeAttributeBridgedDeviceBasicInformationClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeTimeSynchronizationDSTOffset() + ~SubscribeAttributeBridgedDeviceBasicInformationClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::DSTOffset::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::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 = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -40152,10 +41250,10 @@ class SubscribeAttributeTimeSynchronizationDSTOffset : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDSTOffsetWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.DSTOffset response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"BridgedDeviceBasicInformation.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -40168,38 +41266,61 @@ class SubscribeAttributeTimeSynchronizationDSTOffset : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| 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 | +\*----------------------------------------------------------------------------*/ /* - * Attribute LocalTime + * Attribute NumberOfPositions */ -class ReadTimeSynchronizationLocalTime : public ReadAttribute { +class ReadSwitchNumberOfPositions : public ReadAttribute { public: - ReadTimeSynchronizationLocalTime() - : ReadAttribute("local-time") + ReadSwitchNumberOfPositions() + : ReadAttribute("number-of-positions") { } - ~ReadTimeSynchronizationLocalTime() + ~ReadSwitchNumberOfPositions() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::LocalTime::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Switch::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Switch::Attributes::NumberOfPositions::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLocalTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.LocalTime response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeNumberOfPositionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.NumberOfPositions response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TimeSynchronization LocalTime read Error", error); + LogNSError("Switch NumberOfPositions read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -40208,25 +41329,25 @@ class ReadTimeSynchronizationLocalTime : public ReadAttribute { } }; -class SubscribeAttributeTimeSynchronizationLocalTime : public SubscribeAttribute { +class SubscribeAttributeSwitchNumberOfPositions : public SubscribeAttribute { public: - SubscribeAttributeTimeSynchronizationLocalTime() - : SubscribeAttribute("local-time") + SubscribeAttributeSwitchNumberOfPositions() + : SubscribeAttribute("number-of-positions") { } - ~SubscribeAttributeTimeSynchronizationLocalTime() + ~SubscribeAttributeSwitchNumberOfPositions() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::LocalTime::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 = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __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(); @@ -40237,10 +41358,10 @@ class SubscribeAttributeTimeSynchronizationLocalTime : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLocalTimeWithParams:params + [cluster subscribeAttributeNumberOfPositionsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.LocalTime response %@", [value description]); + NSLog(@"Switch.NumberOfPositions response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -40253,38 +41374,35 @@ class SubscribeAttributeTimeSynchronizationLocalTime : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute TimeZoneDatabase + * Attribute CurrentPosition */ -class ReadTimeSynchronizationTimeZoneDatabase : public ReadAttribute { +class ReadSwitchCurrentPosition : public ReadAttribute { public: - ReadTimeSynchronizationTimeZoneDatabase() - : ReadAttribute("time-zone-database") + ReadSwitchCurrentPosition() + : ReadAttribute("current-position") { } - ~ReadTimeSynchronizationTimeZoneDatabase() + ~ReadSwitchCurrentPosition() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::TimeZoneDatabase::Id; + 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 = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTimeZoneDatabaseWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.TimeZoneDatabase response %@", [value description]); + __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("TimeSynchronization TimeZoneDatabase read Error", error); + LogNSError("Switch CurrentPosition read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -40293,25 +41411,25 @@ class ReadTimeSynchronizationTimeZoneDatabase : public ReadAttribute { } }; -class SubscribeAttributeTimeSynchronizationTimeZoneDatabase : public SubscribeAttribute { +class SubscribeAttributeSwitchCurrentPosition : public SubscribeAttribute { public: - SubscribeAttributeTimeSynchronizationTimeZoneDatabase() - : SubscribeAttribute("time-zone-database") + SubscribeAttributeSwitchCurrentPosition() + : SubscribeAttribute("current-position") { } - ~SubscribeAttributeTimeSynchronizationTimeZoneDatabase() + ~SubscribeAttributeSwitchCurrentPosition() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::TimeZoneDatabase::Id; + 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 = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __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(); @@ -40322,10 +41440,10 @@ class SubscribeAttributeTimeSynchronizationTimeZoneDatabase : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTimeZoneDatabaseWithParams:params + [cluster subscribeAttributeCurrentPositionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.TimeZoneDatabase response %@", [value description]); + NSLog(@"Switch.CurrentPosition response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -40338,38 +41456,35 @@ class SubscribeAttributeTimeSynchronizationTimeZoneDatabase : public SubscribeAt } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute NTPServerAvailable + * Attribute MultiPressMax */ -class ReadTimeSynchronizationNTPServerAvailable : public ReadAttribute { +class ReadSwitchMultiPressMax : public ReadAttribute { public: - ReadTimeSynchronizationNTPServerAvailable() - : ReadAttribute("ntpserver-available") + ReadSwitchMultiPressMax() + : ReadAttribute("multi-press-max") { } - ~ReadTimeSynchronizationNTPServerAvailable() + ~ReadSwitchMultiPressMax() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::NTPServerAvailable::Id; + 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 = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNTPServerAvailableWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.NTPServerAvailable response %@", [value description]); + __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("TimeSynchronization NTPServerAvailable read Error", error); + LogNSError("Switch MultiPressMax read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -40378,25 +41493,25 @@ class ReadTimeSynchronizationNTPServerAvailable : public ReadAttribute { } }; -class SubscribeAttributeTimeSynchronizationNTPServerAvailable : public SubscribeAttribute { +class SubscribeAttributeSwitchMultiPressMax : public SubscribeAttribute { public: - SubscribeAttributeTimeSynchronizationNTPServerAvailable() - : SubscribeAttribute("ntpserver-available") + SubscribeAttributeSwitchMultiPressMax() + : SubscribeAttribute("multi-press-max") { } - ~SubscribeAttributeTimeSynchronizationNTPServerAvailable() + ~SubscribeAttributeSwitchMultiPressMax() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::NTPServerAvailable::Id; + 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 = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __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(); @@ -40407,10 +41522,10 @@ class SubscribeAttributeTimeSynchronizationNTPServerAvailable : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNTPServerAvailableWithParams:params + [cluster subscribeAttributeMultiPressMaxWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.NTPServerAvailable response %@", [value description]); + NSLog(@"Switch.MultiPressMax response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -40423,38 +41538,35 @@ class SubscribeAttributeTimeSynchronizationNTPServerAvailable : public Subscribe } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute TimeZoneListMaxSize + * Attribute GeneratedCommandList */ -class ReadTimeSynchronizationTimeZoneListMaxSize : public ReadAttribute { +class ReadSwitchGeneratedCommandList : public ReadAttribute { public: - ReadTimeSynchronizationTimeZoneListMaxSize() - : ReadAttribute("time-zone-list-max-size") + ReadSwitchGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadTimeSynchronizationTimeZoneListMaxSize() + ~ReadSwitchGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::TimeZoneListMaxSize::Id; + 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 = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTimeZoneListMaxSizeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.TimeZoneListMaxSize response %@", [value description]); + __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("TimeSynchronization TimeZoneListMaxSize read Error", error); + LogNSError("Switch GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -40463,25 +41575,25 @@ class ReadTimeSynchronizationTimeZoneListMaxSize : public ReadAttribute { } }; -class SubscribeAttributeTimeSynchronizationTimeZoneListMaxSize : public SubscribeAttribute { +class SubscribeAttributeSwitchGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeTimeSynchronizationTimeZoneListMaxSize() - : SubscribeAttribute("time-zone-list-max-size") + SubscribeAttributeSwitchGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeTimeSynchronizationTimeZoneListMaxSize() + ~SubscribeAttributeSwitchGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::TimeZoneListMaxSize::Id; + 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 = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __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(); @@ -40492,10 +41604,10 @@ class SubscribeAttributeTimeSynchronizationTimeZoneListMaxSize : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTimeZoneListMaxSizeWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.TimeZoneListMaxSize response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -40508,38 +41620,35 @@ class SubscribeAttributeTimeSynchronizationTimeZoneListMaxSize : public Subscrib } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute DSTOffsetListMaxSize + * Attribute AcceptedCommandList */ -class ReadTimeSynchronizationDSTOffsetListMaxSize : public ReadAttribute { +class ReadSwitchAcceptedCommandList : public ReadAttribute { public: - ReadTimeSynchronizationDSTOffsetListMaxSize() - : ReadAttribute("dstoffset-list-max-size") + ReadSwitchAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadTimeSynchronizationDSTOffsetListMaxSize() + ~ReadSwitchAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::DSTOffsetListMaxSize::Id; + 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 = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDSTOffsetListMaxSizeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.DSTOffsetListMaxSize response %@", [value description]); + __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("TimeSynchronization DSTOffsetListMaxSize read Error", error); + LogNSError("Switch AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -40548,25 +41657,25 @@ class ReadTimeSynchronizationDSTOffsetListMaxSize : public ReadAttribute { } }; -class SubscribeAttributeTimeSynchronizationDSTOffsetListMaxSize : public SubscribeAttribute { +class SubscribeAttributeSwitchAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeTimeSynchronizationDSTOffsetListMaxSize() - : SubscribeAttribute("dstoffset-list-max-size") + SubscribeAttributeSwitchAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeTimeSynchronizationDSTOffsetListMaxSize() + ~SubscribeAttributeSwitchAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::DSTOffsetListMaxSize::Id; + 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 = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __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(); @@ -40577,10 +41686,10 @@ class SubscribeAttributeTimeSynchronizationDSTOffsetListMaxSize : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDSTOffsetListMaxSizeWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.DSTOffsetListMaxSize response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -40593,38 +41702,37 @@ class SubscribeAttributeTimeSynchronizationDSTOffsetListMaxSize : public Subscri } }; -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* - * Attribute SupportsDNSResolve + * Attribute EventList */ -class ReadTimeSynchronizationSupportsDNSResolve : public ReadAttribute { +class ReadSwitchEventList : public ReadAttribute { public: - ReadTimeSynchronizationSupportsDNSResolve() - : ReadAttribute("supports-dnsresolve") + ReadSwitchEventList() + : ReadAttribute("event-list") { } - ~ReadTimeSynchronizationSupportsDNSResolve() + ~ReadSwitchEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::SupportsDNSResolve::Id; + 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 = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportsDNSResolveWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.SupportsDNSResolve response %@", [value description]); + __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("TimeSynchronization SupportsDNSResolve read Error", error); + LogNSError("Switch EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -40633,25 +41741,25 @@ class ReadTimeSynchronizationSupportsDNSResolve : public ReadAttribute { } }; -class SubscribeAttributeTimeSynchronizationSupportsDNSResolve : public SubscribeAttribute { +class SubscribeAttributeSwitchEventList : public SubscribeAttribute { public: - SubscribeAttributeTimeSynchronizationSupportsDNSResolve() - : SubscribeAttribute("supports-dnsresolve") + SubscribeAttributeSwitchEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeTimeSynchronizationSupportsDNSResolve() + ~SubscribeAttributeSwitchEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::SupportsDNSResolve::Id; + 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 = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __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(); @@ -40662,10 +41770,10 @@ class SubscribeAttributeTimeSynchronizationSupportsDNSResolve : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportsDNSResolveWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.SupportsDNSResolve response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -40679,37 +41787,36 @@ class SubscribeAttributeTimeSynchronizationSupportsDNSResolve : public Subscribe }; #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* - * Attribute GeneratedCommandList + * Attribute AttributeList */ -class ReadTimeSynchronizationGeneratedCommandList : public ReadAttribute { +class ReadSwitchAttributeList : public ReadAttribute { public: - ReadTimeSynchronizationGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadSwitchAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadTimeSynchronizationGeneratedCommandList() + ~ReadSwitchAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::GeneratedCommandList::Id; + 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 = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.GeneratedCommandList response %@", [value description]); + __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("TimeSynchronization GeneratedCommandList read Error", error); + LogNSError("Switch AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -40718,25 +41825,25 @@ class ReadTimeSynchronizationGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeTimeSynchronizationGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeSwitchAttributeList : public SubscribeAttribute { public: - SubscribeAttributeTimeSynchronizationGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeSwitchAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeTimeSynchronizationGeneratedCommandList() + ~SubscribeAttributeSwitchAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::GeneratedCommandList::Id; + 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 = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __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(); @@ -40747,10 +41854,10 @@ class SubscribeAttributeTimeSynchronizationGeneratedCommandList : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.GeneratedCommandList response %@", [value description]); + NSLog(@"Switch.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -40763,38 +41870,35 @@ class SubscribeAttributeTimeSynchronizationGeneratedCommandList : public Subscri } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute AcceptedCommandList + * Attribute FeatureMap */ -class ReadTimeSynchronizationAcceptedCommandList : public ReadAttribute { +class ReadSwitchFeatureMap : public ReadAttribute { public: - ReadTimeSynchronizationAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadSwitchFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadTimeSynchronizationAcceptedCommandList() + ~ReadSwitchFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::AcceptedCommandList::Id; + 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 = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.AcceptedCommandList response %@", [value description]); + __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("TimeSynchronization AcceptedCommandList read Error", error); + LogNSError("Switch FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -40803,25 +41907,25 @@ class ReadTimeSynchronizationAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeTimeSynchronizationAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeSwitchFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeTimeSynchronizationAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeSwitchFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeTimeSynchronizationAcceptedCommandList() + ~SubscribeAttributeSwitchFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::AcceptedCommandList::Id; + 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 = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __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(); @@ -40832,10 +41936,10 @@ class SubscribeAttributeTimeSynchronizationAcceptedCommandList : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Switch.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -40848,38 +41952,35 @@ class SubscribeAttributeTimeSynchronizationAcceptedCommandList : public Subscrib } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute ClusterRevision */ -class ReadTimeSynchronizationEventList : public ReadAttribute { +class ReadSwitchClusterRevision : public ReadAttribute { public: - ReadTimeSynchronizationEventList() - : ReadAttribute("event-list") + ReadSwitchClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadTimeSynchronizationEventList() + ~ReadSwitchClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::EventList::Id; + 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 = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.EventList response %@", [value description]); + __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("TimeSynchronization EventList read Error", error); + LogNSError("Switch ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -40888,83 +41989,248 @@ class ReadTimeSynchronizationEventList : public ReadAttribute { } }; -class SubscribeAttributeTimeSynchronizationEventList : public SubscribeAttribute { +class SubscribeAttributeSwitchClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeTimeSynchronizationEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeSwitchClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeTimeSynchronizationEventList() + ~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::TimeSynchronization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::EventList::Id; + 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); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterTimeSynchronization 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 = [[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); + } + }]; } - [cluster subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.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 +private: +}; /* - * Attribute AttributeList + * Attribute WindowStatus */ -class ReadTimeSynchronizationAttributeList : public ReadAttribute { +class ReadAdministratorCommissioningWindowStatus : public ReadAttribute { public: - ReadTimeSynchronizationAttributeList() - : ReadAttribute("attribute-list") + ReadAdministratorCommissioningWindowStatus() + : ReadAttribute("window-status") { } - ~ReadTimeSynchronizationAttributeList() + ~ReadAdministratorCommissioningWindowStatus() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::AttributeList::Id; + 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 = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.AttributeList response %@", [value description]); + __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("TimeSynchronization AttributeList read Error", error); + LogNSError("AdministratorCommissioning WindowStatus read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -40973,25 +42239,25 @@ class ReadTimeSynchronizationAttributeList : public ReadAttribute { } }; -class SubscribeAttributeTimeSynchronizationAttributeList : public SubscribeAttribute { +class SubscribeAttributeAdministratorCommissioningWindowStatus : public SubscribeAttribute { public: - SubscribeAttributeTimeSynchronizationAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeAdministratorCommissioningWindowStatus() + : SubscribeAttribute("window-status") { } - ~SubscribeAttributeTimeSynchronizationAttributeList() + ~SubscribeAttributeAdministratorCommissioningWindowStatus() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::AttributeList::Id; + 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 = [[MTRBaseClusterTimeSynchronization 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(); @@ -41002,10 +42268,10 @@ class SubscribeAttributeTimeSynchronizationAttributeList : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeWindowStatusWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"AdministratorCommissioning.WindowStatus response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -41018,38 +42284,35 @@ class SubscribeAttributeTimeSynchronizationAttributeList : public SubscribeAttri } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute FeatureMap + * Attribute AdminFabricIndex */ -class ReadTimeSynchronizationFeatureMap : public ReadAttribute { +class ReadAdministratorCommissioningAdminFabricIndex : public ReadAttribute { public: - ReadTimeSynchronizationFeatureMap() - : ReadAttribute("feature-map") + ReadAdministratorCommissioningAdminFabricIndex() + : ReadAttribute("admin-fabric-index") { } - ~ReadTimeSynchronizationFeatureMap() + ~ReadAdministratorCommissioningAdminFabricIndex() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::FeatureMap::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 = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.FeatureMap 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("TimeSynchronization FeatureMap read Error", error); + LogNSError("AdministratorCommissioning AdminFabricIndex read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -41058,25 +42321,25 @@ class ReadTimeSynchronizationFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeTimeSynchronizationFeatureMap : public SubscribeAttribute { +class SubscribeAttributeAdministratorCommissioningAdminFabricIndex : public SubscribeAttribute { public: - SubscribeAttributeTimeSynchronizationFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeAdministratorCommissioningAdminFabricIndex() + : SubscribeAttribute("admin-fabric-index") { } - ~SubscribeAttributeTimeSynchronizationFeatureMap() + ~SubscribeAttributeAdministratorCommissioningAdminFabricIndex() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::FeatureMap::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 = [[MTRBaseClusterTimeSynchronization 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(); @@ -41087,10 +42350,10 @@ class SubscribeAttributeTimeSynchronizationFeatureMap : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeAdminFabricIndexWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.FeatureMap response %@", [value description]); + NSLog(@"AdministratorCommissioning.AdminFabricIndex response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -41103,38 +42366,35 @@ class SubscribeAttributeTimeSynchronizationFeatureMap : public SubscribeAttribut } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute ClusterRevision + * Attribute AdminVendorId */ -class ReadTimeSynchronizationClusterRevision : public ReadAttribute { +class ReadAdministratorCommissioningAdminVendorId : public ReadAttribute { public: - ReadTimeSynchronizationClusterRevision() - : ReadAttribute("cluster-revision") + ReadAdministratorCommissioningAdminVendorId() + : ReadAttribute("admin-vendor-id") { } - ~ReadTimeSynchronizationClusterRevision() + ~ReadAdministratorCommissioningAdminVendorId() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::ClusterRevision::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 = [[MTRBaseClusterTimeSynchronization alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.ClusterRevision 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("TimeSynchronization ClusterRevision read Error", error); + LogNSError("AdministratorCommissioning AdminVendorId read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -41143,25 +42403,25 @@ class ReadTimeSynchronizationClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeTimeSynchronizationClusterRevision : public SubscribeAttribute { +class SubscribeAttributeAdministratorCommissioningAdminVendorId : public SubscribeAttribute { public: - SubscribeAttributeTimeSynchronizationClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeAdministratorCommissioningAdminVendorId() + : SubscribeAttribute("admin-vendor-id") { } - ~SubscribeAttributeTimeSynchronizationClusterRevision() + ~SubscribeAttributeAdministratorCommissioningAdminVendorId() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::TimeSynchronization::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::TimeSynchronization::Attributes::ClusterRevision::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 = [[MTRBaseClusterTimeSynchronization 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(); @@ -41172,10 +42432,10 @@ class SubscribeAttributeTimeSynchronizationClusterRevision : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeAdminVendorIdWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TimeSynchronization.ClusterRevision response %@", [value description]); + NSLog(@"AdministratorCommissioning.AdminVendorId response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -41188,73 +42448,35 @@ class SubscribeAttributeTimeSynchronizationClusterRevision : public SubscribeAtt } }; -#endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| 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 | -\*----------------------------------------------------------------------------*/ - /* - * Attribute VendorName + * Attribute GeneratedCommandList */ -class ReadBridgedDeviceBasicInformationVendorName : public ReadAttribute { +class ReadAdministratorCommissioningGeneratedCommandList : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationVendorName() - : ReadAttribute("vendor-name") + ReadAdministratorCommissioningGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadBridgedDeviceBasicInformationVendorName() + ~ReadAdministratorCommissioningGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::VendorName::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 = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeVendorNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.VendorName response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AdministratorCommissioning.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BridgedDeviceBasicInformation VendorName read Error", error); + LogNSError("AdministratorCommissioning GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -41263,25 +42485,25 @@ class ReadBridgedDeviceBasicInformationVendorName : public ReadAttribute { } }; -class SubscribeAttributeBridgedDeviceBasicInformationVendorName : public SubscribeAttribute { +class SubscribeAttributeAdministratorCommissioningGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationVendorName() - : SubscribeAttribute("vendor-name") + SubscribeAttributeAdministratorCommissioningGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeBridgedDeviceBasicInformationVendorName() + ~SubscribeAttributeAdministratorCommissioningGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::VendorName::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 = [[MTRBaseClusterBridgedDeviceBasicInformation 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(); @@ -41292,10 +42514,10 @@ class SubscribeAttributeBridgedDeviceBasicInformationVendorName : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeVendorNameWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.VendorName response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AdministratorCommissioning.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -41309,34 +42531,34 @@ class SubscribeAttributeBridgedDeviceBasicInformationVendorName : public Subscri }; /* - * Attribute VendorID + * Attribute AcceptedCommandList */ -class ReadBridgedDeviceBasicInformationVendorID : public ReadAttribute { +class ReadAdministratorCommissioningAcceptedCommandList : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationVendorID() - : ReadAttribute("vendor-id") + ReadAdministratorCommissioningAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadBridgedDeviceBasicInformationVendorID() + ~ReadAdministratorCommissioningAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::VendorID::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 = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeVendorIDWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.VendorID response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AdministratorCommissioning.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BridgedDeviceBasicInformation VendorID read Error", error); + LogNSError("AdministratorCommissioning AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -41345,25 +42567,25 @@ class ReadBridgedDeviceBasicInformationVendorID : public ReadAttribute { } }; -class SubscribeAttributeBridgedDeviceBasicInformationVendorID : public SubscribeAttribute { +class SubscribeAttributeAdministratorCommissioningAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationVendorID() - : SubscribeAttribute("vendor-id") + SubscribeAttributeAdministratorCommissioningAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeBridgedDeviceBasicInformationVendorID() + ~SubscribeAttributeAdministratorCommissioningAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::VendorID::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 = [[MTRBaseClusterBridgedDeviceBasicInformation 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(); @@ -41374,10 +42596,10 @@ class SubscribeAttributeBridgedDeviceBasicInformationVendorID : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeVendorIDWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.VendorID response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AdministratorCommissioning.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -41390,35 +42612,37 @@ class SubscribeAttributeBridgedDeviceBasicInformationVendorID : public Subscribe } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ProductName + * Attribute EventList */ -class ReadBridgedDeviceBasicInformationProductName : public ReadAttribute { +class ReadAdministratorCommissioningEventList : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationProductName() - : ReadAttribute("product-name") + ReadAdministratorCommissioningEventList() + : ReadAttribute("event-list") { } - ~ReadBridgedDeviceBasicInformationProductName() + ~ReadAdministratorCommissioningEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ProductName::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 = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeProductNameWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.ProductName response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AdministratorCommissioning.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BridgedDeviceBasicInformation ProductName read Error", error); + LogNSError("AdministratorCommissioning EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -41427,25 +42651,25 @@ class ReadBridgedDeviceBasicInformationProductName : public ReadAttribute { } }; -class SubscribeAttributeBridgedDeviceBasicInformationProductName : public SubscribeAttribute { +class SubscribeAttributeAdministratorCommissioningEventList : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationProductName() - : SubscribeAttribute("product-name") + SubscribeAttributeAdministratorCommissioningEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeBridgedDeviceBasicInformationProductName() + ~SubscribeAttributeAdministratorCommissioningEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ProductName::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 = [[MTRBaseClusterBridgedDeviceBasicInformation 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(); @@ -41456,10 +42680,10 @@ class SubscribeAttributeBridgedDeviceBasicInformationProductName : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeProductNameWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.ProductName response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AdministratorCommissioning.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -41472,103 +42696,64 @@ class SubscribeAttributeBridgedDeviceBasicInformationProductName : public Subscr } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute NodeLabel + * Attribute AttributeList */ -class ReadBridgedDeviceBasicInformationNodeLabel : public ReadAttribute { +class ReadAdministratorCommissioningAttributeList : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationNodeLabel() - : ReadAttribute("node-label") + ReadAdministratorCommissioningAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadBridgedDeviceBasicInformationNodeLabel() + ~ReadAdministratorCommissioningAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::NodeLabel::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 = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNodeLabelWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.NodeLabel response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AdministratorCommissioning.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BridgedDeviceBasicInformation NodeLabel read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteBridgedDeviceBasicInformationNodeLabel : public WriteAttribute { -public: - WriteBridgedDeviceBasicInformationNodeLabel() - : WriteAttribute("node-label") - { - AddArgument("attr-name", "node-label"); - AddArgument("attr-value", &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteBridgedDeviceBasicInformationNodeLabel() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::NodeLabel::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 = [[MTRBaseClusterBridgedDeviceBasicInformation 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; - NSString * _Nonnull value = [[NSString alloc] initWithBytes:mValue.data() length:mValue.size() encoding:NSUTF8StringEncoding]; - - [cluster writeAttributeNodeLabelWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("BridgedDeviceBasicInformation NodeLabel write Error", error); + LogNSError("AdministratorCommissioning AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - chip::ByteSpan mValue; }; -class SubscribeAttributeBridgedDeviceBasicInformationNodeLabel : public SubscribeAttribute { +class SubscribeAttributeAdministratorCommissioningAttributeList : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationNodeLabel() - : SubscribeAttribute("node-label") + SubscribeAttributeAdministratorCommissioningAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeBridgedDeviceBasicInformationNodeLabel() + ~SubscribeAttributeAdministratorCommissioningAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::NodeLabel::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 = [[MTRBaseClusterBridgedDeviceBasicInformation 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(); @@ -41579,10 +42764,10 @@ class SubscribeAttributeBridgedDeviceBasicInformationNodeLabel : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNodeLabelWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.NodeLabel response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"AdministratorCommissioning.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -41596,34 +42781,34 @@ class SubscribeAttributeBridgedDeviceBasicInformationNodeLabel : public Subscrib }; /* - * Attribute HardwareVersion + * Attribute FeatureMap */ -class ReadBridgedDeviceBasicInformationHardwareVersion : public ReadAttribute { +class ReadAdministratorCommissioningFeatureMap : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationHardwareVersion() - : ReadAttribute("hardware-version") + ReadAdministratorCommissioningFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadBridgedDeviceBasicInformationHardwareVersion() + ~ReadAdministratorCommissioningFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::HardwareVersion::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 = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeHardwareVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.HardwareVersion response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"AdministratorCommissioning.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BridgedDeviceBasicInformation HardwareVersion read Error", error); + LogNSError("AdministratorCommissioning FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -41632,25 +42817,25 @@ class ReadBridgedDeviceBasicInformationHardwareVersion : public ReadAttribute { } }; -class SubscribeAttributeBridgedDeviceBasicInformationHardwareVersion : public SubscribeAttribute { +class SubscribeAttributeAdministratorCommissioningFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationHardwareVersion() - : SubscribeAttribute("hardware-version") + SubscribeAttributeAdministratorCommissioningFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeBridgedDeviceBasicInformationHardwareVersion() + ~SubscribeAttributeAdministratorCommissioningFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::HardwareVersion::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 = [[MTRBaseClusterBridgedDeviceBasicInformation 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(); @@ -41661,10 +42846,10 @@ class SubscribeAttributeBridgedDeviceBasicInformationHardwareVersion : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeHardwareVersionWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.HardwareVersion response %@", [value description]); + NSLog(@"AdministratorCommissioning.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -41678,34 +42863,34 @@ class SubscribeAttributeBridgedDeviceBasicInformationHardwareVersion : public Su }; /* - * Attribute HardwareVersionString + * Attribute ClusterRevision */ -class ReadBridgedDeviceBasicInformationHardwareVersionString : public ReadAttribute { +class ReadAdministratorCommissioningClusterRevision : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationHardwareVersionString() - : ReadAttribute("hardware-version-string") + ReadAdministratorCommissioningClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadBridgedDeviceBasicInformationHardwareVersionString() + ~ReadAdministratorCommissioningClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::HardwareVersionString::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 = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeHardwareVersionStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.HardwareVersionString response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterAdministratorCommissioning alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"AdministratorCommissioning.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BridgedDeviceBasicInformation HardwareVersionString read Error", error); + LogNSError("AdministratorCommissioning ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -41714,25 +42899,25 @@ class ReadBridgedDeviceBasicInformationHardwareVersionString : public ReadAttrib } }; -class SubscribeAttributeBridgedDeviceBasicInformationHardwareVersionString : public SubscribeAttribute { +class SubscribeAttributeAdministratorCommissioningClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationHardwareVersionString() - : SubscribeAttribute("hardware-version-string") + SubscribeAttributeAdministratorCommissioningClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeBridgedDeviceBasicInformationHardwareVersionString() + ~SubscribeAttributeAdministratorCommissioningClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::HardwareVersionString::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 = [[MTRBaseClusterBridgedDeviceBasicInformation 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(); @@ -41743,10 +42928,10 @@ class SubscribeAttributeBridgedDeviceBasicInformationHardwareVersionString : pub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeHardwareVersionStringWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.HardwareVersionString response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"AdministratorCommissioning.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -41759,363 +42944,511 @@ class SubscribeAttributeBridgedDeviceBasicInformationHardwareVersionString : pub } }; +/*----------------------------------------------------------------------------*\ +| Cluster OperationalCredentials | 0x003E | +|------------------------------------------------------------------------------| +| Commands: | | +| * AttestationRequest | 0x00 | +| * CertificateChainRequest | 0x02 | +| * CSRRequest | 0x04 | +| * AddNOC | 0x06 | +| * UpdateNOC | 0x07 | +| * UpdateFabricLabel | 0x09 | +| * RemoveFabric | 0x0A | +| * AddTrustedRootCertificate | 0x0B | +|------------------------------------------------------------------------------| +| Attributes: | | +| * NOCs | 0x0000 | +| * Fabrics | 0x0001 | +| * SupportedFabrics | 0x0002 | +| * CommissionedFabrics | 0x0003 | +| * TrustedRootCertificates | 0x0004 | +| * CurrentFabricIndex | 0x0005 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute SoftwareVersion + * Command AttestationRequest */ -class ReadBridgedDeviceBasicInformationSoftwareVersion : public ReadAttribute { +class OperationalCredentialsAttestationRequest : public ClusterCommand { public: - ReadBridgedDeviceBasicInformationSoftwareVersion() - : ReadAttribute("software-version") - { - } - - ~ReadBridgedDeviceBasicInformationSoftwareVersion() + OperationalCredentialsAttestationRequest() + : ClusterCommand("attestation-request") { + AddArgument("AttestationNonce", &mRequest.attestationNonce); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::SoftwareVersion::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 ") 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 = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSoftwareVersionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.SoftwareVersion response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("BridgedDeviceBasicInformation SoftwareVersion read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __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.attestationNonce = [NSData dataWithBytes:mRequest.attestationNonce.data() length:mRequest.attestationNonce.size()]; + 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); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::OperationalCredentials::Commands::AttestationRequest::Type mRequest; }; -class SubscribeAttributeBridgedDeviceBasicInformationSoftwareVersion : public SubscribeAttribute { +/* + * Command CertificateChainRequest + */ +class OperationalCredentialsCertificateChainRequest : public ClusterCommand { public: - SubscribeAttributeBridgedDeviceBasicInformationSoftwareVersion() - : SubscribeAttribute("software-version") - { - } - - ~SubscribeAttributeBridgedDeviceBasicInformationSoftwareVersion() + 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::BridgedDeviceBasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::SoftwareVersion::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, 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 = [[MTRBaseClusterBridgedDeviceBasicInformation 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 = [[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); + constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::CertificateChainResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; } - [cluster subscribeAttributeSoftwareVersionWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.SoftwareVersion 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::CertificateChainRequest::Type mRequest; }; /* - * Attribute SoftwareVersionString + * Command CSRRequest */ -class ReadBridgedDeviceBasicInformationSoftwareVersionString : public ReadAttribute { +class OperationalCredentialsCSRRequest : public ClusterCommand { public: - ReadBridgedDeviceBasicInformationSoftwareVersionString() - : ReadAttribute("software-version-string") - { - } - - ~ReadBridgedDeviceBasicInformationSoftwareVersionString() + OperationalCredentialsCSRRequest() + : ClusterCommand("csrrequest") { + 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::BridgedDeviceBasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::SoftwareVersionString::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 ") 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 = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSoftwareVersionStringWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.SoftwareVersionString response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("BridgedDeviceBasicInformation SoftwareVersionString read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __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.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 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::OperationalCredentials::Commands::CSRRequest::Type mRequest; }; -class SubscribeAttributeBridgedDeviceBasicInformationSoftwareVersionString : public SubscribeAttribute { +/* + * Command AddNOC + */ +class OperationalCredentialsAddNOC : public ClusterCommand { public: - SubscribeAttributeBridgedDeviceBasicInformationSoftwareVersionString() - : SubscribeAttribute("software-version-string") - { - } - - ~SubscribeAttributeBridgedDeviceBasicInformationSoftwareVersionString() + 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::BridgedDeviceBasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::SoftwareVersionString::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); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation 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 = [[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; } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); + 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 subscribeAttributeSoftwareVersionStringWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.SoftwareVersionString 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::AddNOC::Type mRequest; }; /* - * Attribute ManufacturingDate + * Command UpdateNOC */ -class ReadBridgedDeviceBasicInformationManufacturingDate : public ReadAttribute { +class OperationalCredentialsUpdateNOC : public ClusterCommand { public: - ReadBridgedDeviceBasicInformationManufacturingDate() - : ReadAttribute("manufacturing-date") - { - } - - ~ReadBridgedDeviceBasicInformationManufacturingDate() + OperationalCredentialsUpdateNOC() + : ClusterCommand("update-noc") { + 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::BridgedDeviceBasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ManufacturingDate::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 ") 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 = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeManufacturingDateWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.ManufacturingDate response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("BridgedDeviceBasicInformation ManufacturingDate read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __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; }; -class SubscribeAttributeBridgedDeviceBasicInformationManufacturingDate : public SubscribeAttribute { +/* + * Command UpdateFabricLabel + */ +class OperationalCredentialsUpdateFabricLabel : public ClusterCommand { public: - SubscribeAttributeBridgedDeviceBasicInformationManufacturingDate() - : SubscribeAttribute("manufacturing-date") - { - } - - ~SubscribeAttributeBridgedDeviceBasicInformationManufacturingDate() + 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::BridgedDeviceBasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ManufacturingDate::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); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation 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 = [[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); + } + }]; } - [cluster subscribeAttributeManufacturingDateWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.ManufacturingDate 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::UpdateFabricLabel::Type mRequest; }; /* - * Attribute PartNumber + * Command RemoveFabric */ -class ReadBridgedDeviceBasicInformationPartNumber : public ReadAttribute { +class OperationalCredentialsRemoveFabric : public ClusterCommand { public: - ReadBridgedDeviceBasicInformationPartNumber() - : ReadAttribute("part-number") - { - } - - ~ReadBridgedDeviceBasicInformationPartNumber() + 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::BridgedDeviceBasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::PartNumber::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 ") 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 = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePartNumberWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.PartNumber response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("BridgedDeviceBasicInformation PartNumber read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __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; }; -class SubscribeAttributeBridgedDeviceBasicInformationPartNumber : public SubscribeAttribute { +/* + * Command AddTrustedRootCertificate + */ +class OperationalCredentialsAddTrustedRootCertificate : public ClusterCommand { public: - SubscribeAttributeBridgedDeviceBasicInformationPartNumber() - : SubscribeAttribute("part-number") - { - } - - ~SubscribeAttributeBridgedDeviceBasicInformationPartNumber() + 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::BridgedDeviceBasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::PartNumber::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, 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 = [[MTRBaseClusterBridgedDeviceBasicInformation 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 = [[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); + } + }]; } - [cluster subscribeAttributePartNumberWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.PartNumber 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 ProductURL + * Attribute NOCs */ -class ReadBridgedDeviceBasicInformationProductURL : public ReadAttribute { +class ReadOperationalCredentialsNOCs : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationProductURL() - : ReadAttribute("product-url") + ReadOperationalCredentialsNOCs() + : ReadAttribute("nocs") { } - ~ReadBridgedDeviceBasicInformationProductURL() + ~ReadOperationalCredentialsNOCs() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ProductURL::Id; + 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 = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeProductURLWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.ProductURL 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("BridgedDeviceBasicInformation ProductURL read Error", error); + LogNSError("OperationalCredentials NOCs read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -42124,25 +43457,25 @@ class ReadBridgedDeviceBasicInformationProductURL : public ReadAttribute { } }; -class SubscribeAttributeBridgedDeviceBasicInformationProductURL : public SubscribeAttribute { +class SubscribeAttributeOperationalCredentialsNOCs : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationProductURL() - : SubscribeAttribute("product-url") + SubscribeAttributeOperationalCredentialsNOCs() + : SubscribeAttribute("nocs") { } - ~SubscribeAttributeBridgedDeviceBasicInformationProductURL() + ~SubscribeAttributeOperationalCredentialsNOCs() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ProductURL::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 = [[MTRBaseClusterBridgedDeviceBasicInformation 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(); @@ -42153,10 +43486,10 @@ class SubscribeAttributeBridgedDeviceBasicInformationProductURL : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeProductURLWithParams:params + [cluster subscribeAttributeNOCsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.ProductURL response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalCredentials.NOCs response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -42170,34 +43503,38 @@ class SubscribeAttributeBridgedDeviceBasicInformationProductURL : public Subscri }; /* - * Attribute ProductLabel + * Attribute Fabrics */ -class ReadBridgedDeviceBasicInformationProductLabel : public ReadAttribute { +class ReadOperationalCredentialsFabrics : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationProductLabel() - : ReadAttribute("product-label") + ReadOperationalCredentialsFabrics() + : ReadAttribute("fabrics") { } - ~ReadBridgedDeviceBasicInformationProductLabel() + ~ReadOperationalCredentialsFabrics() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ProductLabel::Id; + 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 = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeProductLabelWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.ProductLabel 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 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("BridgedDeviceBasicInformation ProductLabel read Error", error); + LogNSError("OperationalCredentials Fabrics read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -42206,25 +43543,25 @@ class ReadBridgedDeviceBasicInformationProductLabel : public ReadAttribute { } }; -class SubscribeAttributeBridgedDeviceBasicInformationProductLabel : public SubscribeAttribute { +class SubscribeAttributeOperationalCredentialsFabrics : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationProductLabel() - : SubscribeAttribute("product-label") + SubscribeAttributeOperationalCredentialsFabrics() + : SubscribeAttribute("fabrics") { } - ~SubscribeAttributeBridgedDeviceBasicInformationProductLabel() + ~SubscribeAttributeOperationalCredentialsFabrics() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ProductLabel::Id; + 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 = [[MTRBaseClusterBridgedDeviceBasicInformation 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(); @@ -42235,10 +43572,10 @@ class SubscribeAttributeBridgedDeviceBasicInformationProductLabel : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeProductLabelWithParams:params + [cluster subscribeAttributeFabricsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.ProductLabel response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalCredentials.Fabrics response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -42252,34 +43589,34 @@ class SubscribeAttributeBridgedDeviceBasicInformationProductLabel : public Subsc }; /* - * Attribute SerialNumber + * Attribute SupportedFabrics */ -class ReadBridgedDeviceBasicInformationSerialNumber : public ReadAttribute { +class ReadOperationalCredentialsSupportedFabrics : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationSerialNumber() - : ReadAttribute("serial-number") + ReadOperationalCredentialsSupportedFabrics() + : ReadAttribute("supported-fabrics") { } - ~ReadBridgedDeviceBasicInformationSerialNumber() + ~ReadOperationalCredentialsSupportedFabrics() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::SerialNumber::Id; + 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 = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSerialNumberWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.SerialNumber response %@", [value description]); + __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("BridgedDeviceBasicInformation SerialNumber read Error", error); + LogNSError("OperationalCredentials SupportedFabrics read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -42288,25 +43625,25 @@ class ReadBridgedDeviceBasicInformationSerialNumber : public ReadAttribute { } }; -class SubscribeAttributeBridgedDeviceBasicInformationSerialNumber : public SubscribeAttribute { +class SubscribeAttributeOperationalCredentialsSupportedFabrics : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationSerialNumber() - : SubscribeAttribute("serial-number") + SubscribeAttributeOperationalCredentialsSupportedFabrics() + : SubscribeAttribute("supported-fabrics") { } - ~SubscribeAttributeBridgedDeviceBasicInformationSerialNumber() + ~SubscribeAttributeOperationalCredentialsSupportedFabrics() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::SerialNumber::Id; + 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 = [[MTRBaseClusterBridgedDeviceBasicInformation 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(); @@ -42317,10 +43654,10 @@ class SubscribeAttributeBridgedDeviceBasicInformationSerialNumber : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSerialNumberWithParams:params + [cluster subscribeAttributeSupportedFabricsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.SerialNumber response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalCredentials.SupportedFabrics response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -42334,34 +43671,34 @@ class SubscribeAttributeBridgedDeviceBasicInformationSerialNumber : public Subsc }; /* - * Attribute Reachable + * Attribute CommissionedFabrics */ -class ReadBridgedDeviceBasicInformationReachable : public ReadAttribute { +class ReadOperationalCredentialsCommissionedFabrics : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationReachable() - : ReadAttribute("reachable") + ReadOperationalCredentialsCommissionedFabrics() + : ReadAttribute("commissioned-fabrics") { } - ~ReadBridgedDeviceBasicInformationReachable() + ~ReadOperationalCredentialsCommissionedFabrics() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::Reachable::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 = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeReachableWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.Reachable response %@", [value description]); + __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("BridgedDeviceBasicInformation Reachable read Error", error); + LogNSError("OperationalCredentials CommissionedFabrics read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -42370,25 +43707,25 @@ class ReadBridgedDeviceBasicInformationReachable : public ReadAttribute { } }; -class SubscribeAttributeBridgedDeviceBasicInformationReachable : public SubscribeAttribute { +class SubscribeAttributeOperationalCredentialsCommissionedFabrics : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationReachable() - : SubscribeAttribute("reachable") + SubscribeAttributeOperationalCredentialsCommissionedFabrics() + : SubscribeAttribute("commissioned-fabrics") { } - ~SubscribeAttributeBridgedDeviceBasicInformationReachable() + ~SubscribeAttributeOperationalCredentialsCommissionedFabrics() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::Reachable::Id; + 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 = [[MTRBaseClusterBridgedDeviceBasicInformation 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(); @@ -42399,10 +43736,10 @@ class SubscribeAttributeBridgedDeviceBasicInformationReachable : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeReachableWithParams:params + [cluster subscribeAttributeCommissionedFabricsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.Reachable response %@", [value description]); + NSLog(@"OperationalCredentials.CommissionedFabrics response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -42416,34 +43753,34 @@ class SubscribeAttributeBridgedDeviceBasicInformationReachable : public Subscrib }; /* - * Attribute UniqueID + * Attribute TrustedRootCertificates */ -class ReadBridgedDeviceBasicInformationUniqueID : public ReadAttribute { +class ReadOperationalCredentialsTrustedRootCertificates : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationUniqueID() - : ReadAttribute("unique-id") + ReadOperationalCredentialsTrustedRootCertificates() + : ReadAttribute("trusted-root-certificates") { } - ~ReadBridgedDeviceBasicInformationUniqueID() + ~ReadOperationalCredentialsTrustedRootCertificates() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::UniqueID::Id; + 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 = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUniqueIDWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.UniqueID 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("BridgedDeviceBasicInformation UniqueID read Error", error); + LogNSError("OperationalCredentials TrustedRootCertificates read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -42452,25 +43789,25 @@ class ReadBridgedDeviceBasicInformationUniqueID : public ReadAttribute { } }; -class SubscribeAttributeBridgedDeviceBasicInformationUniqueID : public SubscribeAttribute { +class SubscribeAttributeOperationalCredentialsTrustedRootCertificates : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationUniqueID() - : SubscribeAttribute("unique-id") + SubscribeAttributeOperationalCredentialsTrustedRootCertificates() + : SubscribeAttribute("trusted-root-certificates") { } - ~SubscribeAttributeBridgedDeviceBasicInformationUniqueID() + ~SubscribeAttributeOperationalCredentialsTrustedRootCertificates() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::UniqueID::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 = [[MTRBaseClusterBridgedDeviceBasicInformation 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(); @@ -42481,10 +43818,10 @@ class SubscribeAttributeBridgedDeviceBasicInformationUniqueID : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUniqueIDWithParams:params + [cluster subscribeAttributeTrustedRootCertificatesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.UniqueID 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 { @@ -42498,34 +43835,34 @@ class SubscribeAttributeBridgedDeviceBasicInformationUniqueID : public Subscribe }; /* - * Attribute ProductAppearance + * Attribute CurrentFabricIndex */ -class ReadBridgedDeviceBasicInformationProductAppearance : public ReadAttribute { +class ReadOperationalCredentialsCurrentFabricIndex : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationProductAppearance() - : ReadAttribute("product-appearance") + ReadOperationalCredentialsCurrentFabricIndex() + : ReadAttribute("current-fabric-index") { } - ~ReadBridgedDeviceBasicInformationProductAppearance() + ~ReadOperationalCredentialsCurrentFabricIndex() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ProductAppearance::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 = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeProductAppearanceWithCompletion:^(MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.ProductAppearance 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("BridgedDeviceBasicInformation ProductAppearance read Error", error); + LogNSError("OperationalCredentials CurrentFabricIndex read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -42534,25 +43871,25 @@ class ReadBridgedDeviceBasicInformationProductAppearance : public ReadAttribute } }; -class SubscribeAttributeBridgedDeviceBasicInformationProductAppearance : public SubscribeAttribute { +class SubscribeAttributeOperationalCredentialsCurrentFabricIndex : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationProductAppearance() - : SubscribeAttribute("product-appearance") + SubscribeAttributeOperationalCredentialsCurrentFabricIndex() + : SubscribeAttribute("current-fabric-index") { } - ~SubscribeAttributeBridgedDeviceBasicInformationProductAppearance() + ~SubscribeAttributeOperationalCredentialsCurrentFabricIndex() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::Attributes::ProductAppearance::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 = [[MTRBaseClusterBridgedDeviceBasicInformation 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(); @@ -42563,10 +43900,10 @@ class SubscribeAttributeBridgedDeviceBasicInformationProductAppearance : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeProductAppearanceWithParams:params + [cluster subscribeAttributeCurrentFabricIndexWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(MTRBridgedDeviceBasicInformationClusterProductAppearanceStruct * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.ProductAppearance response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalCredentials.CurrentFabricIndex response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -42582,32 +43919,32 @@ class SubscribeAttributeBridgedDeviceBasicInformationProductAppearance : public /* * Attribute GeneratedCommandList */ -class ReadBridgedDeviceBasicInformationGeneratedCommandList : public ReadAttribute { +class ReadOperationalCredentialsGeneratedCommandList : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationGeneratedCommandList() + ReadOperationalCredentialsGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadBridgedDeviceBasicInformationGeneratedCommandList() + ~ReadOperationalCredentialsGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::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 = [[MTRBaseClusterBridgedDeviceBasicInformation 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(@"BridgedDeviceBasicInformation.GeneratedCommandList response %@", [value description]); + NSLog(@"OperationalCredentials.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BridgedDeviceBasicInformation GeneratedCommandList read Error", error); + LogNSError("OperationalCredentials GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -42616,25 +43953,25 @@ class ReadBridgedDeviceBasicInformationGeneratedCommandList : public ReadAttribu } }; -class SubscribeAttributeBridgedDeviceBasicInformationGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeOperationalCredentialsGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationGeneratedCommandList() + SubscribeAttributeOperationalCredentialsGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeBridgedDeviceBasicInformationGeneratedCommandList() + ~SubscribeAttributeOperationalCredentialsGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::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 = [[MTRBaseClusterBridgedDeviceBasicInformation 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(); @@ -42648,7 +43985,7 @@ class SubscribeAttributeBridgedDeviceBasicInformationGeneratedCommandList : publ [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.GeneratedCommandList response %@", [value description]); + NSLog(@"OperationalCredentials.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -42664,32 +44001,32 @@ class SubscribeAttributeBridgedDeviceBasicInformationGeneratedCommandList : publ /* * Attribute AcceptedCommandList */ -class ReadBridgedDeviceBasicInformationAcceptedCommandList : public ReadAttribute { +class ReadOperationalCredentialsAcceptedCommandList : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationAcceptedCommandList() + ReadOperationalCredentialsAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadBridgedDeviceBasicInformationAcceptedCommandList() + ~ReadOperationalCredentialsAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::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 = [[MTRBaseClusterBridgedDeviceBasicInformation 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(@"BridgedDeviceBasicInformation.AcceptedCommandList response %@", [value description]); + NSLog(@"OperationalCredentials.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BridgedDeviceBasicInformation AcceptedCommandList read Error", error); + LogNSError("OperationalCredentials AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -42698,25 +44035,25 @@ class ReadBridgedDeviceBasicInformationAcceptedCommandList : public ReadAttribut } }; -class SubscribeAttributeBridgedDeviceBasicInformationAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeOperationalCredentialsAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationAcceptedCommandList() + SubscribeAttributeOperationalCredentialsAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeBridgedDeviceBasicInformationAcceptedCommandList() + ~SubscribeAttributeOperationalCredentialsAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::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 = [[MTRBaseClusterBridgedDeviceBasicInformation 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(); @@ -42730,7 +44067,7 @@ class SubscribeAttributeBridgedDeviceBasicInformationAcceptedCommandList : publi [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.AcceptedCommandList response %@", [value description]); + NSLog(@"OperationalCredentials.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -42748,32 +44085,32 @@ class SubscribeAttributeBridgedDeviceBasicInformationAcceptedCommandList : publi /* * Attribute EventList */ -class ReadBridgedDeviceBasicInformationEventList : public ReadAttribute { +class ReadOperationalCredentialsEventList : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationEventList() + ReadOperationalCredentialsEventList() : ReadAttribute("event-list") { } - ~ReadBridgedDeviceBasicInformationEventList() + ~ReadOperationalCredentialsEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::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 = [[MTRBaseClusterBridgedDeviceBasicInformation 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(@"BridgedDeviceBasicInformation.EventList response %@", [value description]); + NSLog(@"OperationalCredentials.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BridgedDeviceBasicInformation EventList read Error", error); + LogNSError("OperationalCredentials EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -42782,25 +44119,25 @@ class ReadBridgedDeviceBasicInformationEventList : public ReadAttribute { } }; -class SubscribeAttributeBridgedDeviceBasicInformationEventList : public SubscribeAttribute { +class SubscribeAttributeOperationalCredentialsEventList : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationEventList() + SubscribeAttributeOperationalCredentialsEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeBridgedDeviceBasicInformationEventList() + ~SubscribeAttributeOperationalCredentialsEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::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 = [[MTRBaseClusterBridgedDeviceBasicInformation 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(); @@ -42814,7 +44151,7 @@ class SubscribeAttributeBridgedDeviceBasicInformationEventList : public Subscrib [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.EventList response %@", [value description]); + NSLog(@"OperationalCredentials.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -42832,32 +44169,32 @@ class SubscribeAttributeBridgedDeviceBasicInformationEventList : public Subscrib /* * Attribute AttributeList */ -class ReadBridgedDeviceBasicInformationAttributeList : public ReadAttribute { +class ReadOperationalCredentialsAttributeList : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationAttributeList() + ReadOperationalCredentialsAttributeList() : ReadAttribute("attribute-list") { } - ~ReadBridgedDeviceBasicInformationAttributeList() + ~ReadOperationalCredentialsAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::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 = [[MTRBaseClusterBridgedDeviceBasicInformation 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(@"BridgedDeviceBasicInformation.AttributeList response %@", [value description]); + NSLog(@"OperationalCredentials.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BridgedDeviceBasicInformation AttributeList read Error", error); + LogNSError("OperationalCredentials AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -42866,25 +44203,25 @@ class ReadBridgedDeviceBasicInformationAttributeList : public ReadAttribute { } }; -class SubscribeAttributeBridgedDeviceBasicInformationAttributeList : public SubscribeAttribute { +class SubscribeAttributeOperationalCredentialsAttributeList : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationAttributeList() + SubscribeAttributeOperationalCredentialsAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeBridgedDeviceBasicInformationAttributeList() + ~SubscribeAttributeOperationalCredentialsAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::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 = [[MTRBaseClusterBridgedDeviceBasicInformation 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(); @@ -42898,7 +44235,7 @@ class SubscribeAttributeBridgedDeviceBasicInformationAttributeList : public Subs [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.AttributeList response %@", [value description]); + NSLog(@"OperationalCredentials.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -42914,32 +44251,32 @@ class SubscribeAttributeBridgedDeviceBasicInformationAttributeList : public Subs /* * Attribute FeatureMap */ -class ReadBridgedDeviceBasicInformationFeatureMap : public ReadAttribute { +class ReadOperationalCredentialsFeatureMap : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationFeatureMap() + ReadOperationalCredentialsFeatureMap() : ReadAttribute("feature-map") { } - ~ReadBridgedDeviceBasicInformationFeatureMap() + ~ReadOperationalCredentialsFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::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 = [[MTRBaseClusterBridgedDeviceBasicInformation 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(@"BridgedDeviceBasicInformation.FeatureMap response %@", [value description]); + NSLog(@"OperationalCredentials.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BridgedDeviceBasicInformation FeatureMap read Error", error); + LogNSError("OperationalCredentials FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -42948,25 +44285,25 @@ class ReadBridgedDeviceBasicInformationFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeBridgedDeviceBasicInformationFeatureMap : public SubscribeAttribute { +class SubscribeAttributeOperationalCredentialsFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationFeatureMap() + SubscribeAttributeOperationalCredentialsFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeBridgedDeviceBasicInformationFeatureMap() + ~SubscribeAttributeOperationalCredentialsFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::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 = [[MTRBaseClusterBridgedDeviceBasicInformation 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(); @@ -42980,7 +44317,7 @@ class SubscribeAttributeBridgedDeviceBasicInformationFeatureMap : public Subscri [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.FeatureMap response %@", [value description]); + NSLog(@"OperationalCredentials.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -42996,32 +44333,32 @@ class SubscribeAttributeBridgedDeviceBasicInformationFeatureMap : public Subscri /* * Attribute ClusterRevision */ -class ReadBridgedDeviceBasicInformationClusterRevision : public ReadAttribute { +class ReadOperationalCredentialsClusterRevision : public ReadAttribute { public: - ReadBridgedDeviceBasicInformationClusterRevision() + ReadOperationalCredentialsClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadBridgedDeviceBasicInformationClusterRevision() + ~ReadOperationalCredentialsClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::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 = [[MTRBaseClusterBridgedDeviceBasicInformation 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(@"BridgedDeviceBasicInformation.ClusterRevision response %@", [value description]); + NSLog(@"OperationalCredentials.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BridgedDeviceBasicInformation ClusterRevision read Error", error); + LogNSError("OperationalCredentials ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -43030,25 +44367,25 @@ class ReadBridgedDeviceBasicInformationClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeBridgedDeviceBasicInformationClusterRevision : public SubscribeAttribute { +class SubscribeAttributeOperationalCredentialsClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeBridgedDeviceBasicInformationClusterRevision() + SubscribeAttributeOperationalCredentialsClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeBridgedDeviceBasicInformationClusterRevision() + ~SubscribeAttributeOperationalCredentialsClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::BridgedDeviceBasicInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::BridgedDeviceBasicInformation::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 = [[MTRBaseClusterBridgedDeviceBasicInformation 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(); @@ -43062,7 +44399,7 @@ class SubscribeAttributeBridgedDeviceBasicInformationClusterRevision : public Su [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BridgedDeviceBasicInformation.ClusterRevision response %@", [value description]); + NSLog(@"OperationalCredentials.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -43076,14 +44413,19 @@ class SubscribeAttributeBridgedDeviceBasicInformationClusterRevision : public Su }; /*----------------------------------------------------------------------------*\ -| Cluster Switch | 0x003B | +| Cluster GroupKeyManagement | 0x003F | |------------------------------------------------------------------------------| | Commands: | | +| * KeySetWrite | 0x00 | +| * KeySetRead | 0x01 | +| * KeySetRemove | 0x03 | +| * KeySetReadAllIndices | 0x04 | |------------------------------------------------------------------------------| | Attributes: | | -| * NumberOfPositions | 0x0000 | -| * CurrentPosition | 0x0001 | -| * MultiPressMax | 0x0002 | +| * GroupKeyMap | 0x0000 | +| * GroupTable | 0x0001 | +| * MaxGroupsPerFabric | 0x0002 | +| * MaxGroupKeysPerFabric | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -43092,235 +44434,354 @@ class SubscribeAttributeBridgedDeviceBasicInformationClusterRevision : public Su | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | -| * SwitchLatched | 0x0000 | -| * InitialPress | 0x0001 | -| * LongPress | 0x0002 | -| * ShortRelease | 0x0003 | -| * LongRelease | 0x0004 | -| * MultiPressOngoing | 0x0005 | -| * MultiPressComplete | 0x0006 | \*----------------------------------------------------------------------------*/ /* - * Attribute NumberOfPositions + * Command KeySetWrite */ -class ReadSwitchNumberOfPositions : public ReadAttribute { +class GroupKeyManagementKeySetWrite : public ClusterCommand { public: - ReadSwitchNumberOfPositions() - : ReadAttribute("number-of-positions") - { - } - - ~ReadSwitchNumberOfPositions() + GroupKeyManagementKeySetWrite() + : ClusterCommand("key-set-write") + , mComplex_GroupKeySet(&mRequest.groupKeySet) { + AddArgument("GroupKeySet", &mComplex_GroupKeySet); + ClusterCommand::AddArguments(); } 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::NumberOfPositions::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 ") 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 = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfPositionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.NumberOfPositions response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("Switch NumberOfPositions read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __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); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type mRequest; + TypedComplexArgument mComplex_GroupKeySet; }; -class SubscribeAttributeSwitchNumberOfPositions : public SubscribeAttribute { +/* + * Command KeySetRead + */ +class GroupKeyManagementKeySetRead : public ClusterCommand { public: - SubscribeAttributeSwitchNumberOfPositions() - : SubscribeAttribute("number-of-positions") - { - } - - ~SubscribeAttributeSwitchNumberOfPositions() + GroupKeyManagementKeySetRead() + : ClusterCommand("key-set-read") { + 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::Switch::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Switch::Attributes::NumberOfPositions::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); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%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(); + __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); + } + }]; } - [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; } + +private: + chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type mRequest; }; /* - * Attribute CurrentPosition + * Command KeySetRemove */ -class ReadSwitchCurrentPosition : public ReadAttribute { +class GroupKeyManagementKeySetRemove : public ClusterCommand { public: - ReadSwitchCurrentPosition() - : ReadAttribute("current-position") + GroupKeyManagementKeySetRemove() + : ClusterCommand("key-set-remove") { + AddArgument("GroupKeySetID", 0, UINT16_MAX, &mRequest.groupKeySetID); + ClusterCommand::AddArguments(); } - ~ReadSwitchCurrentPosition() + 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; + + 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 = [[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); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type mRequest; +}; + +/* + * Command KeySetReadAllIndices + */ +class GroupKeyManagementKeySetReadAllIndices : public ClusterCommand { +public: + GroupKeyManagementKeySetReadAllIndices() + : ClusterCommand("key-set-read-all-indices") { + ClusterCommand::AddArguments(); } 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::GroupKeyManagement::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadAllIndices::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 = [[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); - }]; + __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); + } + }]; + } return CHIP_NO_ERROR; } + +private: }; -class SubscribeAttributeSwitchCurrentPosition : public SubscribeAttribute { +/* + * Attribute GroupKeyMap + */ +class ReadGroupKeyManagementGroupKeyMap : public ReadAttribute { public: - SubscribeAttributeSwitchCurrentPosition() - : SubscribeAttribute("current-position") + ReadGroupKeyManagementGroupKeyMap() + : ReadAttribute("group-key-map") { } - ~SubscribeAttributeSwitchCurrentPosition() + ~ReadGroupKeyManagementGroupKeyMap() { } 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::GroupKeyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::GroupKeyMap::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 ") ReportAttribute (0x%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(); - } + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRReadParams alloc] init]; 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); - }]; - + [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; } }; -/* - * Attribute MultiPressMax - */ -class ReadSwitchMultiPressMax : public ReadAttribute { +class WriteGroupKeyManagementGroupKeyMap : public WriteAttribute { public: - ReadSwitchMultiPressMax() - : ReadAttribute("multi-press-max") + WriteGroupKeyManagementGroupKeyMap() + : WriteAttribute("group-key-map") + , mComplex(&mValue) { + AddArgument("attr-name", "group-key-map"); + AddArgument("attr-value", &mComplex); + WriteAttribute::AddArguments(); } - ~ReadSwitchMultiPressMax() + ~WriteGroupKeyManagementGroupKeyMap() { } 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); + 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 = [[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); + __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::DataModel::List mValue; + TypedComplexArgument> mComplex; }; -class SubscribeAttributeSwitchMultiPressMax : public SubscribeAttribute { +class SubscribeAttributeGroupKeyManagementGroupKeyMap : public SubscribeAttribute { public: - SubscribeAttributeSwitchMultiPressMax() - : SubscribeAttribute("multi-press-max") + SubscribeAttributeGroupKeyManagementGroupKeyMap() + : SubscribeAttribute("group-key-map") { } - ~SubscribeAttributeSwitchMultiPressMax() + ~SubscribeAttributeGroupKeyManagementGroupKeyMap() { } 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::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 = [[MTRBaseClusterSwitch 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(); @@ -43331,10 +44792,10 @@ class SubscribeAttributeSwitchMultiPressMax : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMultiPressMaxWithParams:params + [cluster subscribeAttributeGroupKeyMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.MultiPressMax response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.GroupKeyMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -43348,34 +44809,38 @@ class SubscribeAttributeSwitchMultiPressMax : public SubscribeAttribute { }; /* - * Attribute GeneratedCommandList + * Attribute GroupTable */ -class ReadSwitchGeneratedCommandList : public ReadAttribute { +class ReadGroupKeyManagementGroupTable : public ReadAttribute { public: - ReadSwitchGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadGroupKeyManagementGroupTable() + : ReadAttribute("group-table") { } - ~ReadSwitchGeneratedCommandList() + ~ReadGroupKeyManagementGroupTable() { } 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::GroupKeyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::GroupTable::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%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]); + __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("Switch GeneratedCommandList read Error", error); + LogNSError("GroupKeyManagement GroupTable read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -43384,25 +44849,25 @@ class ReadSwitchGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeSwitchGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeGroupKeyManagementGroupTable : public SubscribeAttribute { public: - SubscribeAttributeSwitchGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeGroupKeyManagementGroupTable() + : SubscribeAttribute("group-table") { } - ~SubscribeAttributeSwitchGeneratedCommandList() + ~SubscribeAttributeGroupKeyManagementGroupTable() { } 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::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 = [[MTRBaseClusterSwitch 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(); @@ -43413,10 +44878,10 @@ class SubscribeAttributeSwitchGeneratedCommandList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeGroupTableWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.GeneratedCommandList response %@", [value description]); + NSLog(@"GroupKeyManagement.GroupTable response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -43430,34 +44895,34 @@ class SubscribeAttributeSwitchGeneratedCommandList : public SubscribeAttribute { }; /* - * Attribute AcceptedCommandList + * Attribute MaxGroupsPerFabric */ -class ReadSwitchAcceptedCommandList : public ReadAttribute { +class ReadGroupKeyManagementMaxGroupsPerFabric : public ReadAttribute { public: - ReadSwitchAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadGroupKeyManagementMaxGroupsPerFabric() + : ReadAttribute("max-groups-per-fabric") { } - ~ReadSwitchAcceptedCommandList() + ~ReadGroupKeyManagementMaxGroupsPerFabric() { } 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::GroupKeyManagement::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::MaxGroupsPerFabric::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%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]); + __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("Switch AcceptedCommandList read Error", error); + LogNSError("GroupKeyManagement MaxGroupsPerFabric read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -43466,25 +44931,25 @@ class ReadSwitchAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeSwitchAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeGroupKeyManagementMaxGroupsPerFabric : public SubscribeAttribute { public: - SubscribeAttributeSwitchAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeGroupKeyManagementMaxGroupsPerFabric() + : SubscribeAttribute("max-groups-per-fabric") { } - ~SubscribeAttributeSwitchAcceptedCommandList() + ~SubscribeAttributeGroupKeyManagementMaxGroupsPerFabric() { } 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::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 = [[MTRBaseClusterSwitch 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(); @@ -43495,10 +44960,10 @@ class SubscribeAttributeSwitchAcceptedCommandList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeMaxGroupsPerFabricWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.MaxGroupsPerFabric response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -43511,37 +44976,35 @@ class SubscribeAttributeSwitchAcceptedCommandList : public SubscribeAttribute { } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute MaxGroupKeysPerFabric */ -class ReadSwitchEventList : public ReadAttribute { +class ReadGroupKeyManagementMaxGroupKeysPerFabric : public ReadAttribute { public: - ReadSwitchEventList() - : ReadAttribute("event-list") + ReadGroupKeyManagementMaxGroupKeysPerFabric() + : ReadAttribute("max-group-keys-per-fabric") { } - ~ReadSwitchEventList() + ~ReadGroupKeyManagementMaxGroupKeysPerFabric() { } 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::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 = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.EventList response %@", [value description]); + __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("Switch EventList read Error", error); + LogNSError("GroupKeyManagement MaxGroupKeysPerFabric read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -43550,25 +45013,25 @@ class ReadSwitchEventList : public ReadAttribute { } }; -class SubscribeAttributeSwitchEventList : public SubscribeAttribute { -public: - SubscribeAttributeSwitchEventList() - : SubscribeAttribute("event-list") +class SubscribeAttributeGroupKeyManagementMaxGroupKeysPerFabric : public SubscribeAttribute { +public: + SubscribeAttributeGroupKeyManagementMaxGroupKeysPerFabric() + : SubscribeAttribute("max-group-keys-per-fabric") { } - ~SubscribeAttributeSwitchEventList() + ~SubscribeAttributeGroupKeyManagementMaxGroupKeysPerFabric() { } 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::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 = [[MTRBaseClusterSwitch 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(); @@ -43579,10 +45042,10 @@ class SubscribeAttributeSwitchEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeMaxGroupKeysPerFabricWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.MaxGroupKeysPerFabric response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -43595,37 +45058,35 @@ class SubscribeAttributeSwitchEventList : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute GeneratedCommandList */ -class ReadSwitchAttributeList : public ReadAttribute { +class ReadGroupKeyManagementGeneratedCommandList : public ReadAttribute { public: - ReadSwitchAttributeList() - : ReadAttribute("attribute-list") + ReadGroupKeyManagementGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadSwitchAttributeList() + ~ReadGroupKeyManagementGeneratedCommandList() { } 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::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 = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.AttributeList response %@", [value description]); + __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("Switch AttributeList read Error", error); + LogNSError("GroupKeyManagement GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -43634,25 +45095,25 @@ class ReadSwitchAttributeList : public ReadAttribute { } }; -class SubscribeAttributeSwitchAttributeList : public SubscribeAttribute { +class SubscribeAttributeGroupKeyManagementGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeSwitchAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeGroupKeyManagementGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeSwitchAttributeList() + ~SubscribeAttributeGroupKeyManagementGeneratedCommandList() { } 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::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 = [[MTRBaseClusterSwitch 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(); @@ -43663,10 +45124,10 @@ class SubscribeAttributeSwitchAttributeList : 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(@"Switch.AttributeList response %@", [value description]); + NSLog(@"GroupKeyManagement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -43680,34 +45141,34 @@ class SubscribeAttributeSwitchAttributeList : public SubscribeAttribute { }; /* - * Attribute FeatureMap + * Attribute AcceptedCommandList */ -class ReadSwitchFeatureMap : public ReadAttribute { +class ReadGroupKeyManagementAcceptedCommandList : public ReadAttribute { public: - ReadSwitchFeatureMap() - : ReadAttribute("feature-map") + ReadGroupKeyManagementAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadSwitchFeatureMap() + ~ReadGroupKeyManagementAcceptedCommandList() { } 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::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 = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.FeatureMap 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("Switch FeatureMap read Error", error); + LogNSError("GroupKeyManagement AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -43716,25 +45177,25 @@ class ReadSwitchFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeSwitchFeatureMap : public SubscribeAttribute { +class SubscribeAttributeGroupKeyManagementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeSwitchFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeGroupKeyManagementAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeSwitchFeatureMap() + ~SubscribeAttributeGroupKeyManagementAcceptedCommandList() { } 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::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 = [[MTRBaseClusterSwitch 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(); @@ -43745,10 +45206,10 @@ class SubscribeAttributeSwitchFeatureMap : 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(@"Switch.FeatureMap response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -43761,35 +45222,37 @@ class SubscribeAttributeSwitchFeatureMap : public SubscribeAttribute { } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ClusterRevision + * Attribute EventList */ -class ReadSwitchClusterRevision : public ReadAttribute { +class ReadGroupKeyManagementEventList : public ReadAttribute { public: - ReadSwitchClusterRevision() - : ReadAttribute("cluster-revision") + ReadGroupKeyManagementEventList() + : ReadAttribute("event-list") { } - ~ReadSwitchClusterRevision() + ~ReadGroupKeyManagementEventList() { } 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::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 = [[MTRBaseClusterSwitch alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Switch.ClusterRevision 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("Switch ClusterRevision read Error", error); + LogNSError("GroupKeyManagement EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -43798,25 +45261,25 @@ class ReadSwitchClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeSwitchClusterRevision : public SubscribeAttribute { +class SubscribeAttributeGroupKeyManagementEventList : public SubscribeAttribute { public: - SubscribeAttributeSwitchClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeGroupKeyManagementEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeSwitchClusterRevision() + ~SubscribeAttributeGroupKeyManagementEventList() { } 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::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 = [[MTRBaseClusterSwitch 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(); @@ -43827,10 +45290,10 @@ class SubscribeAttributeSwitchClusterRevision : 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(@"Switch.ClusterRevision response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -43843,203 +45306,119 @@ class SubscribeAttributeSwitchClusterRevision : public SubscribeAttribute { } }; -/*----------------------------------------------------------------------------*\ -| 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: | | -\*----------------------------------------------------------------------------*/ +#endif // MTR_ENABLE_PROVISIONAL /* - * Command OpenCommissioningWindow + * Attribute AttributeList */ -class AdministratorCommissioningOpenCommissioningWindow : public ClusterCommand { +class ReadGroupKeyManagementAttributeList : public ReadAttribute { 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 + ReadGroupKeyManagementAttributeList() + : ReadAttribute("attribute-list") { - 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") + ~ReadGroupKeyManagementAttributeList() { - 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; + 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 ") 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 = [[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); - } - }]; - } + __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("GroupKeyManagement AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type mRequest; }; -/* - * Command RevokeCommissioning - */ -class AdministratorCommissioningRevokeCommissioning : public ClusterCommand { +class SubscribeAttributeGroupKeyManagementAttributeList : public SubscribeAttribute { public: - AdministratorCommissioningRevokeCommissioning() - : ClusterCommand("revoke-commissioning") + SubscribeAttributeGroupKeyManagementAttributeList() + : SubscribeAttribute("attribute-list") { - ClusterCommand::AddArguments(); } - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ~SubscribeAttributeGroupKeyManagementAttributeList() { - 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); + 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; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%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 * 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); - } - }]; + __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 subscribeAttributeAttributeListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"GroupKeyManagement.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: }; /* - * Attribute WindowStatus + * Attribute FeatureMap */ -class ReadAdministratorCommissioningWindowStatus : public ReadAttribute { +class ReadGroupKeyManagementFeatureMap : public ReadAttribute { public: - ReadAdministratorCommissioningWindowStatus() - : ReadAttribute("window-status") + ReadGroupKeyManagementFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadAdministratorCommissioningWindowStatus() + ~ReadGroupKeyManagementFeatureMap() { } 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::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 = [[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 = [[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("AdministratorCommissioning WindowStatus read Error", error); + LogNSError("GroupKeyManagement FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -44048,25 +45427,25 @@ class ReadAdministratorCommissioningWindowStatus : public ReadAttribute { } }; -class SubscribeAttributeAdministratorCommissioningWindowStatus : public SubscribeAttribute { +class SubscribeAttributeGroupKeyManagementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeAdministratorCommissioningWindowStatus() - : SubscribeAttribute("window-status") + SubscribeAttributeGroupKeyManagementFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeAdministratorCommissioningWindowStatus() + ~SubscribeAttributeGroupKeyManagementFeatureMap() { } 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::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 = [[MTRBaseClusterAdministratorCommissioning 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(); @@ -44077,10 +45456,10 @@ class SubscribeAttributeAdministratorCommissioningWindowStatus : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeWindowStatusWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.WindowStatus response %@", [value description]); + NSLog(@"GroupKeyManagement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -44094,34 +45473,34 @@ class SubscribeAttributeAdministratorCommissioningWindowStatus : public Subscrib }; /* - * Attribute AdminFabricIndex + * Attribute ClusterRevision */ -class ReadAdministratorCommissioningAdminFabricIndex : public ReadAttribute { +class ReadGroupKeyManagementClusterRevision : public ReadAttribute { public: - ReadAdministratorCommissioningAdminFabricIndex() - : ReadAttribute("admin-fabric-index") + ReadGroupKeyManagementClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadAdministratorCommissioningAdminFabricIndex() + ~ReadGroupKeyManagementClusterRevision() { } 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::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 = [[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 = [[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("AdministratorCommissioning AdminFabricIndex read Error", error); + LogNSError("GroupKeyManagement ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -44130,25 +45509,25 @@ class ReadAdministratorCommissioningAdminFabricIndex : public ReadAttribute { } }; -class SubscribeAttributeAdministratorCommissioningAdminFabricIndex : public SubscribeAttribute { +class SubscribeAttributeGroupKeyManagementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeAdministratorCommissioningAdminFabricIndex() - : SubscribeAttribute("admin-fabric-index") + SubscribeAttributeGroupKeyManagementClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeAdministratorCommissioningAdminFabricIndex() + ~SubscribeAttributeGroupKeyManagementClusterRevision() { } 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::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 = [[MTRBaseClusterAdministratorCommissioning 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(); @@ -44159,10 +45538,10 @@ class SubscribeAttributeAdministratorCommissioningAdminFabricIndex : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAdminFabricIndexWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.AdminFabricIndex response %@", [value description]); + NSLog(@"GroupKeyManagement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -44175,35 +45554,52 @@ class SubscribeAttributeAdministratorCommissioningAdminFabricIndex : public Subs } }; +/*----------------------------------------------------------------------------*\ +| Cluster FixedLabel | 0x0040 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * LabelList | 0x0000 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute AdminVendorId + * Attribute LabelList */ -class ReadAdministratorCommissioningAdminVendorId : public ReadAttribute { +class ReadFixedLabelLabelList : public ReadAttribute { public: - ReadAdministratorCommissioningAdminVendorId() - : ReadAttribute("admin-vendor-id") + ReadFixedLabelLabelList() + : ReadAttribute("label-list") { } - ~ReadAdministratorCommissioningAdminVendorId() + ~ReadFixedLabelLabelList() { } 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::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 = [[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 = [[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("AdministratorCommissioning AdminVendorId read Error", error); + LogNSError("FixedLabel LabelList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -44212,25 +45608,25 @@ class ReadAdministratorCommissioningAdminVendorId : public ReadAttribute { } }; -class SubscribeAttributeAdministratorCommissioningAdminVendorId : public SubscribeAttribute { +class SubscribeAttributeFixedLabelLabelList : public SubscribeAttribute { public: - SubscribeAttributeAdministratorCommissioningAdminVendorId() - : SubscribeAttribute("admin-vendor-id") + SubscribeAttributeFixedLabelLabelList() + : SubscribeAttribute("label-list") { } - ~SubscribeAttributeAdministratorCommissioningAdminVendorId() + ~SubscribeAttributeFixedLabelLabelList() { } 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::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 = [[MTRBaseClusterAdministratorCommissioning 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(); @@ -44241,10 +45637,10 @@ class SubscribeAttributeAdministratorCommissioningAdminVendorId : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAdminVendorIdWithParams:params + [cluster subscribeAttributeLabelListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.AdminVendorId 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 { @@ -44260,32 +45656,32 @@ class SubscribeAttributeAdministratorCommissioningAdminVendorId : public Subscri /* * Attribute GeneratedCommandList */ -class ReadAdministratorCommissioningGeneratedCommandList : public ReadAttribute { +class ReadFixedLabelGeneratedCommandList : public ReadAttribute { public: - ReadAdministratorCommissioningGeneratedCommandList() + ReadFixedLabelGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadAdministratorCommissioningGeneratedCommandList() + ~ReadFixedLabelGeneratedCommandList() { } 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::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 = [[MTRBaseClusterAdministratorCommissioning 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(@"AdministratorCommissioning.GeneratedCommandList response %@", [value description]); + NSLog(@"FixedLabel.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AdministratorCommissioning GeneratedCommandList read Error", error); + LogNSError("FixedLabel GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -44294,25 +45690,25 @@ class ReadAdministratorCommissioningGeneratedCommandList : public ReadAttribute } }; -class SubscribeAttributeAdministratorCommissioningGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeFixedLabelGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeAdministratorCommissioningGeneratedCommandList() + SubscribeAttributeFixedLabelGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeAdministratorCommissioningGeneratedCommandList() + ~SubscribeAttributeFixedLabelGeneratedCommandList() { } 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::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 = [[MTRBaseClusterAdministratorCommissioning 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(); @@ -44326,7 +45722,7 @@ class SubscribeAttributeAdministratorCommissioningGeneratedCommandList : public [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AdministratorCommissioning.GeneratedCommandList response %@", [value description]); + NSLog(@"FixedLabel.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -44342,32 +45738,32 @@ class SubscribeAttributeAdministratorCommissioningGeneratedCommandList : public /* * Attribute AcceptedCommandList */ -class ReadAdministratorCommissioningAcceptedCommandList : public ReadAttribute { +class ReadFixedLabelAcceptedCommandList : public ReadAttribute { public: - ReadAdministratorCommissioningAcceptedCommandList() + ReadFixedLabelAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadAdministratorCommissioningAcceptedCommandList() + ~ReadFixedLabelAcceptedCommandList() { } 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::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 = [[MTRBaseClusterAdministratorCommissioning 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(@"AdministratorCommissioning.AcceptedCommandList response %@", [value description]); + NSLog(@"FixedLabel.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AdministratorCommissioning AcceptedCommandList read Error", error); + LogNSError("FixedLabel AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -44376,25 +45772,25 @@ class ReadAdministratorCommissioningAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeAdministratorCommissioningAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeFixedLabelAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeAdministratorCommissioningAcceptedCommandList() + SubscribeAttributeFixedLabelAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeAdministratorCommissioningAcceptedCommandList() + ~SubscribeAttributeFixedLabelAcceptedCommandList() { } 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::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 = [[MTRBaseClusterAdministratorCommissioning 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(); @@ -44408,7 +45804,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(@"FixedLabel.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -44426,32 +45822,32 @@ class SubscribeAttributeAdministratorCommissioningAcceptedCommandList : public S /* * Attribute EventList */ -class ReadAdministratorCommissioningEventList : public ReadAttribute { +class ReadFixedLabelEventList : public ReadAttribute { public: - ReadAdministratorCommissioningEventList() + ReadFixedLabelEventList() : ReadAttribute("event-list") { } - ~ReadAdministratorCommissioningEventList() + ~ReadFixedLabelEventList() { } 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::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 = [[MTRBaseClusterAdministratorCommissioning 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(@"AdministratorCommissioning.EventList response %@", [value description]); + NSLog(@"FixedLabel.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AdministratorCommissioning EventList read Error", error); + LogNSError("FixedLabel EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -44460,25 +45856,25 @@ class ReadAdministratorCommissioningEventList : public ReadAttribute { } }; -class SubscribeAttributeAdministratorCommissioningEventList : public SubscribeAttribute { +class SubscribeAttributeFixedLabelEventList : public SubscribeAttribute { public: - SubscribeAttributeAdministratorCommissioningEventList() + SubscribeAttributeFixedLabelEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeAdministratorCommissioningEventList() + ~SubscribeAttributeFixedLabelEventList() { } 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::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 = [[MTRBaseClusterAdministratorCommissioning 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(); @@ -44492,7 +45888,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(@"FixedLabel.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -44510,32 +45906,32 @@ class SubscribeAttributeAdministratorCommissioningEventList : public SubscribeAt /* * Attribute AttributeList */ -class ReadAdministratorCommissioningAttributeList : public ReadAttribute { +class ReadFixedLabelAttributeList : public ReadAttribute { public: - ReadAdministratorCommissioningAttributeList() + ReadFixedLabelAttributeList() : ReadAttribute("attribute-list") { } - ~ReadAdministratorCommissioningAttributeList() + ~ReadFixedLabelAttributeList() { } 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::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 = [[MTRBaseClusterAdministratorCommissioning 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(@"AdministratorCommissioning.AttributeList response %@", [value description]); + NSLog(@"FixedLabel.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AdministratorCommissioning AttributeList read Error", error); + LogNSError("FixedLabel AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -44544,25 +45940,25 @@ class ReadAdministratorCommissioningAttributeList : public ReadAttribute { } }; -class SubscribeAttributeAdministratorCommissioningAttributeList : public SubscribeAttribute { +class SubscribeAttributeFixedLabelAttributeList : public SubscribeAttribute { public: - SubscribeAttributeAdministratorCommissioningAttributeList() + SubscribeAttributeFixedLabelAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeAdministratorCommissioningAttributeList() + ~SubscribeAttributeFixedLabelAttributeList() { } 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::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 = [[MTRBaseClusterAdministratorCommissioning 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(); @@ -44576,7 +45972,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(@"FixedLabel.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -44592,32 +45988,32 @@ class SubscribeAttributeAdministratorCommissioningAttributeList : public Subscri /* * Attribute FeatureMap */ -class ReadAdministratorCommissioningFeatureMap : public ReadAttribute { +class ReadFixedLabelFeatureMap : public ReadAttribute { public: - ReadAdministratorCommissioningFeatureMap() + ReadFixedLabelFeatureMap() : ReadAttribute("feature-map") { } - ~ReadAdministratorCommissioningFeatureMap() + ~ReadFixedLabelFeatureMap() { } 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::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 = [[MTRBaseClusterAdministratorCommissioning 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(@"AdministratorCommissioning.FeatureMap response %@", [value description]); + NSLog(@"FixedLabel.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AdministratorCommissioning FeatureMap read Error", error); + LogNSError("FixedLabel FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -44626,25 +46022,25 @@ class ReadAdministratorCommissioningFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeAdministratorCommissioningFeatureMap : public SubscribeAttribute { +class SubscribeAttributeFixedLabelFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeAdministratorCommissioningFeatureMap() + SubscribeAttributeFixedLabelFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeAdministratorCommissioningFeatureMap() + ~SubscribeAttributeFixedLabelFeatureMap() { } 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::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 = [[MTRBaseClusterAdministratorCommissioning 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(); @@ -44658,7 +46054,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(@"FixedLabel.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -44674,32 +46070,32 @@ class SubscribeAttributeAdministratorCommissioningFeatureMap : public SubscribeA /* * Attribute ClusterRevision */ -class ReadAdministratorCommissioningClusterRevision : public ReadAttribute { +class ReadFixedLabelClusterRevision : public ReadAttribute { public: - ReadAdministratorCommissioningClusterRevision() + ReadFixedLabelClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadAdministratorCommissioningClusterRevision() + ~ReadFixedLabelClusterRevision() { } 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::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 = [[MTRBaseClusterAdministratorCommissioning 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(@"AdministratorCommissioning.ClusterRevision response %@", [value description]); + NSLog(@"FixedLabel.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("AdministratorCommissioning ClusterRevision read Error", error); + LogNSError("FixedLabel ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -44708,25 +46104,25 @@ class ReadAdministratorCommissioningClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeAdministratorCommissioningClusterRevision : public SubscribeAttribute { +class SubscribeAttributeFixedLabelClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeAdministratorCommissioningClusterRevision() + SubscribeAttributeFixedLabelClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeAdministratorCommissioningClusterRevision() + ~SubscribeAttributeFixedLabelClusterRevision() { } 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::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 = [[MTRBaseClusterAdministratorCommissioning 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(); @@ -44740,7 +46136,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(@"FixedLabel.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -44754,25 +46150,12 @@ class SubscribeAttributeAdministratorCommissioningClusterRevision : public Subsc }; /*----------------------------------------------------------------------------*\ -| Cluster OperationalCredentials | 0x003E | +| Cluster UserLabel | 0x0041 | |------------------------------------------------------------------------------| | Commands: | | -| * AttestationRequest | 0x00 | -| * CertificateChainRequest | 0x02 | -| * CSRRequest | 0x04 | -| * AddNOC | 0x06 | -| * UpdateNOC | 0x07 | -| * UpdateFabricLabel | 0x09 | -| * RemoveFabric | 0x0A | -| * AddTrustedRootCertificate | 0x0B | |------------------------------------------------------------------------------| | Attributes: | | -| * NOCs | 0x0000 | -| * Fabrics | 0x0001 | -| * SupportedFabrics | 0x0002 | -| * CommissionedFabrics | 0x0003 | -| * TrustedRootCertificates | 0x0004 | -| * CurrentFabricIndex | 0x0005 | +| * LabelList | 0x0000 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -44784,480 +46167,252 @@ class SubscribeAttributeAdministratorCommissioningClusterRevision : public Subsc \*----------------------------------------------------------------------------*/ /* - * Command AttestationRequest - */ -class OperationalCredentialsAttestationRequest : public ClusterCommand { -public: - OperationalCredentialsAttestationRequest() - : ClusterCommand("attestation-request") - { - AddArgument("AttestationNonce", &mRequest.attestationNonce); - 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; - - 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]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - 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 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 + * Attribute LabelList */ -class OperationalCredentialsCertificateChainRequest : public ClusterCommand { +class ReadUserLabelLabelList : public ReadAttribute { public: - OperationalCredentialsCertificateChainRequest() - : ClusterCommand("certificate-chain-request") - { - AddArgument("CertificateType", 0, UINT8_MAX, &mRequest.certificateType); - ClusterCommand::AddArguments(); - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ReadUserLabelLabelList() + : ReadAttribute("label-list") { - 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); - constexpr chip::CommandId responseId = chip::app::Clusters::OperationalCredentials::Commands::CertificateChainResponse::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; -}; - -/* - * Command CSRRequest - */ -class OperationalCredentialsCSRRequest : public ClusterCommand { -public: - OperationalCredentialsCSRRequest() - : ClusterCommand("csrrequest") + ~ReadUserLabelLabelList() { - 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::OperationalCredentials::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OperationalCredentials::Commands::CSRRequest::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 = [[MTRBaseClusterOperationalCredentials alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROperationalCredentialsClusterCSRRequestParams 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; - } - 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); - } - }]; - } + __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; } - -private: - chip::app::Clusters::OperationalCredentials::Commands::CSRRequest::Type mRequest; }; -/* - * Command AddNOC - */ -class OperationalCredentialsAddNOC : public ClusterCommand { +class WriteUserLabelLabelList : public WriteAttribute { public: - 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 + WriteUserLabelLabelList() + : WriteAttribute("label-list") + , mComplex(&mValue) { - 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 = [[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 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; + AddArgument("attr-name", "label-list"); + AddArgument("attr-value", &mComplex); + WriteAttribute::AddArguments(); } -private: - chip::app::Clusters::OperationalCredentials::Commands::AddNOC::Type mRequest; -}; - -/* - * Command UpdateNOC - */ -class OperationalCredentialsUpdateNOC : public ClusterCommand { -public: - OperationalCredentialsUpdateNOC() - : ClusterCommand("update-noc") + ~WriteUserLabelLabelList() { - 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; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + 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 = [[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); - } - }]; + __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; } - 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::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); - } - }]; - } + [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::OperationalCredentials::Commands::UpdateFabricLabel::Type mRequest; + chip::app::DataModel::List mValue; + TypedComplexArgument> mComplex; }; -/* - * Command RemoveFabric - */ -class OperationalCredentialsRemoveFabric : public ClusterCommand { +class SubscribeAttributeUserLabelLabelList : public SubscribeAttribute { public: - OperationalCredentialsRemoveFabric() - : ClusterCommand("remove-fabric") + SubscribeAttributeUserLabelLabelList() + : SubscribeAttribute("label-list") { - AddArgument("FabricIndex", 0, UINT8_MAX, &mRequest.fabricIndex); - ClusterCommand::AddArguments(); } - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ~SubscribeAttributeUserLabelLabelList() { - 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); + 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 = [[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 = [[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::OperationalCredentials::Commands::RemoveFabric::Type mRequest; }; /* - * Command AddTrustedRootCertificate + * Attribute GeneratedCommandList */ -class OperationalCredentialsAddTrustedRootCertificate : public ClusterCommand { +class ReadUserLabelGeneratedCommandList : public ReadAttribute { public: - OperationalCredentialsAddTrustedRootCertificate() - : ClusterCommand("add-trusted-root-certificate") + ReadUserLabelGeneratedCommandList() + : ReadAttribute("generated-command-list") + { + } + + ~ReadUserLabelGeneratedCommandList() { - 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; + 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 = [[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 = [[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; } +}; + +class SubscribeAttributeUserLabelGeneratedCommandList : public SubscribeAttribute { +public: + SubscribeAttributeUserLabelGeneratedCommandList() + : SubscribeAttribute("generated-command-list") + { + } -private: - chip::app::Clusters::OperationalCredentials::Commands::AddTrustedRootCertificate::Type mRequest; + ~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; + } }; /* - * Attribute NOCs + * Attribute AcceptedCommandList */ -class ReadOperationalCredentialsNOCs : public ReadAttribute { +class ReadUserLabelAcceptedCommandList : public ReadAttribute { public: - ReadOperationalCredentialsNOCs() - : ReadAttribute("nocs") + ReadUserLabelAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadOperationalCredentialsNOCs() + ~ReadUserLabelAcceptedCommandList() { } 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::UserLabel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UserLabel::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 = [[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("OperationalCredentials NOCs read Error", error); + LogNSError("UserLabel AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -45266,25 +46421,25 @@ class ReadOperationalCredentialsNOCs : public ReadAttribute { } }; -class SubscribeAttributeOperationalCredentialsNOCs : public SubscribeAttribute { +class SubscribeAttributeUserLabelAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOperationalCredentialsNOCs() - : SubscribeAttribute("nocs") + SubscribeAttributeUserLabelAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeOperationalCredentialsNOCs() + ~SubscribeAttributeUserLabelAcceptedCommandList() { } 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::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 = [[MTRBaseClusterOperationalCredentials 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(); @@ -45295,10 +46450,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(@"UserLabel.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -45311,39 +46466,37 @@ class SubscribeAttributeOperationalCredentialsNOCs : public SubscribeAttribute { } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute Fabrics + * Attribute EventList */ -class ReadOperationalCredentialsFabrics : public ReadAttribute { +class ReadUserLabelEventList : public ReadAttribute { public: - ReadOperationalCredentialsFabrics() - : ReadAttribute("fabrics") + ReadUserLabelEventList() + : ReadAttribute("event-list") { } - ~ReadOperationalCredentialsFabrics() + ~ReadUserLabelEventList() { } 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::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 = [[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 = [[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("OperationalCredentials Fabrics read Error", error); + LogNSError("UserLabel EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -45352,25 +46505,25 @@ class ReadOperationalCredentialsFabrics : public ReadAttribute { } }; -class SubscribeAttributeOperationalCredentialsFabrics : public SubscribeAttribute { +class SubscribeAttributeUserLabelEventList : public SubscribeAttribute { public: - SubscribeAttributeOperationalCredentialsFabrics() - : SubscribeAttribute("fabrics") + SubscribeAttributeUserLabelEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeOperationalCredentialsFabrics() + ~SubscribeAttributeUserLabelEventList() { } 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::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 = [[MTRBaseClusterOperationalCredentials 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(); @@ -45381,10 +46534,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(@"UserLabel.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -45397,35 +46550,37 @@ class SubscribeAttributeOperationalCredentialsFabrics : public SubscribeAttribut } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute SupportedFabrics + * Attribute AttributeList */ -class ReadOperationalCredentialsSupportedFabrics : public ReadAttribute { +class ReadUserLabelAttributeList : public ReadAttribute { public: - ReadOperationalCredentialsSupportedFabrics() - : ReadAttribute("supported-fabrics") + ReadUserLabelAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadOperationalCredentialsSupportedFabrics() + ~ReadUserLabelAttributeList() { } 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::UserLabel::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UserLabel::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 = [[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("OperationalCredentials SupportedFabrics read Error", error); + LogNSError("UserLabel AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -45434,25 +46589,25 @@ class ReadOperationalCredentialsSupportedFabrics : public ReadAttribute { } }; -class SubscribeAttributeOperationalCredentialsSupportedFabrics : public SubscribeAttribute { +class SubscribeAttributeUserLabelAttributeList : public SubscribeAttribute { public: - SubscribeAttributeOperationalCredentialsSupportedFabrics() - : SubscribeAttribute("supported-fabrics") + SubscribeAttributeUserLabelAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeOperationalCredentialsSupportedFabrics() + ~SubscribeAttributeUserLabelAttributeList() { } 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::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 = [[MTRBaseClusterOperationalCredentials 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(); @@ -45463,10 +46618,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(@"UserLabel.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -45480,34 +46635,34 @@ class SubscribeAttributeOperationalCredentialsSupportedFabrics : public Subscrib }; /* - * Attribute CommissionedFabrics + * Attribute FeatureMap */ -class ReadOperationalCredentialsCommissionedFabrics : public ReadAttribute { +class ReadUserLabelFeatureMap : public ReadAttribute { public: - ReadOperationalCredentialsCommissionedFabrics() - : ReadAttribute("commissioned-fabrics") + ReadUserLabelFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadOperationalCredentialsCommissionedFabrics() + ~ReadUserLabelFeatureMap() { } 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::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 = [[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 = [[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("OperationalCredentials CommissionedFabrics read Error", error); + LogNSError("UserLabel FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -45516,25 +46671,25 @@ class ReadOperationalCredentialsCommissionedFabrics : public ReadAttribute { } }; -class SubscribeAttributeOperationalCredentialsCommissionedFabrics : public SubscribeAttribute { +class SubscribeAttributeUserLabelFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeOperationalCredentialsCommissionedFabrics() - : SubscribeAttribute("commissioned-fabrics") + SubscribeAttributeUserLabelFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeOperationalCredentialsCommissionedFabrics() + ~SubscribeAttributeUserLabelFeatureMap() { } 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::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 = [[MTRBaseClusterOperationalCredentials 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(); @@ -45545,10 +46700,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(@"UserLabel.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -45562,34 +46717,34 @@ class SubscribeAttributeOperationalCredentialsCommissionedFabrics : public Subsc }; /* - * Attribute TrustedRootCertificates + * Attribute ClusterRevision */ -class ReadOperationalCredentialsTrustedRootCertificates : public ReadAttribute { +class ReadUserLabelClusterRevision : public ReadAttribute { public: - ReadOperationalCredentialsTrustedRootCertificates() - : ReadAttribute("trusted-root-certificates") + ReadUserLabelClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadOperationalCredentialsTrustedRootCertificates() + ~ReadUserLabelClusterRevision() { } 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::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 = [[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 = [[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("OperationalCredentials TrustedRootCertificates read Error", error); + LogNSError("UserLabel ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -45598,25 +46753,25 @@ class ReadOperationalCredentialsTrustedRootCertificates : public ReadAttribute { } }; -class SubscribeAttributeOperationalCredentialsTrustedRootCertificates : public SubscribeAttribute { +class SubscribeAttributeUserLabelClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeOperationalCredentialsTrustedRootCertificates() - : SubscribeAttribute("trusted-root-certificates") + SubscribeAttributeUserLabelClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeOperationalCredentialsTrustedRootCertificates() + ~SubscribeAttributeUserLabelClusterRevision() { } 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::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 = [[MTRBaseClusterOperationalCredentials 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(); @@ -45627,10 +46782,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(@"UserLabel.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -45643,35 +46798,53 @@ class SubscribeAttributeOperationalCredentialsTrustedRootCertificates : public S } }; +/*----------------------------------------------------------------------------*\ +| Cluster BooleanState | 0x0045 | +|------------------------------------------------------------------------------| +| Commands: | | +|------------------------------------------------------------------------------| +| Attributes: | | +| * StateValue | 0x0000 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +| * StateChange | 0x0000 | +\*----------------------------------------------------------------------------*/ + /* - * Attribute CurrentFabricIndex + * Attribute StateValue */ -class ReadOperationalCredentialsCurrentFabricIndex : public ReadAttribute { +class ReadBooleanStateStateValue : public ReadAttribute { public: - ReadOperationalCredentialsCurrentFabricIndex() - : ReadAttribute("current-fabric-index") + ReadBooleanStateStateValue() + : ReadAttribute("state-value") { } - ~ReadOperationalCredentialsCurrentFabricIndex() + ~ReadBooleanStateStateValue() { } 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::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 = [[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 = [[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("OperationalCredentials CurrentFabricIndex read Error", error); + LogNSError("BooleanState StateValue read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -45680,25 +46853,25 @@ class ReadOperationalCredentialsCurrentFabricIndex : public ReadAttribute { } }; -class SubscribeAttributeOperationalCredentialsCurrentFabricIndex : public SubscribeAttribute { +class SubscribeAttributeBooleanStateStateValue : public SubscribeAttribute { public: - SubscribeAttributeOperationalCredentialsCurrentFabricIndex() - : SubscribeAttribute("current-fabric-index") + SubscribeAttributeBooleanStateStateValue() + : SubscribeAttribute("state-value") { } - ~SubscribeAttributeOperationalCredentialsCurrentFabricIndex() + ~SubscribeAttributeBooleanStateStateValue() { } 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::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 = [[MTRBaseClusterOperationalCredentials 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(); @@ -45709,10 +46882,10 @@ class SubscribeAttributeOperationalCredentialsCurrentFabricIndex : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentFabricIndexWithParams:params + [cluster subscribeAttributeStateValueWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OperationalCredentials.CurrentFabricIndex response %@", [value description]); + NSLog(@"BooleanState.StateValue response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -45728,32 +46901,32 @@ class SubscribeAttributeOperationalCredentialsCurrentFabricIndex : public Subscr /* * Attribute GeneratedCommandList */ -class ReadOperationalCredentialsGeneratedCommandList : public ReadAttribute { +class ReadBooleanStateGeneratedCommandList : public ReadAttribute { public: - ReadOperationalCredentialsGeneratedCommandList() + ReadBooleanStateGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadOperationalCredentialsGeneratedCommandList() + ~ReadBooleanStateGeneratedCommandList() { } 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::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 = [[MTRBaseClusterOperationalCredentials 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(@"OperationalCredentials.GeneratedCommandList response %@", [value description]); + NSLog(@"BooleanState.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalCredentials GeneratedCommandList read Error", error); + LogNSError("BooleanState GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -45762,25 +46935,25 @@ class ReadOperationalCredentialsGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeOperationalCredentialsGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeBooleanStateGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOperationalCredentialsGeneratedCommandList() + SubscribeAttributeBooleanStateGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeOperationalCredentialsGeneratedCommandList() + ~SubscribeAttributeBooleanStateGeneratedCommandList() { } 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::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 = [[MTRBaseClusterOperationalCredentials 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(); @@ -45794,7 +46967,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(@"BooleanState.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -45810,32 +46983,32 @@ class SubscribeAttributeOperationalCredentialsGeneratedCommandList : public Subs /* * Attribute AcceptedCommandList */ -class ReadOperationalCredentialsAcceptedCommandList : public ReadAttribute { +class ReadBooleanStateAcceptedCommandList : public ReadAttribute { public: - ReadOperationalCredentialsAcceptedCommandList() + ReadBooleanStateAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadOperationalCredentialsAcceptedCommandList() + ~ReadBooleanStateAcceptedCommandList() { } 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::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 = [[MTRBaseClusterOperationalCredentials 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(@"OperationalCredentials.AcceptedCommandList response %@", [value description]); + NSLog(@"BooleanState.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalCredentials AcceptedCommandList read Error", error); + LogNSError("BooleanState AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -45844,25 +47017,25 @@ class ReadOperationalCredentialsAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeOperationalCredentialsAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeBooleanStateAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOperationalCredentialsAcceptedCommandList() + SubscribeAttributeBooleanStateAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeOperationalCredentialsAcceptedCommandList() + ~SubscribeAttributeBooleanStateAcceptedCommandList() { } 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::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 = [[MTRBaseClusterOperationalCredentials 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(); @@ -45876,7 +47049,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(@"BooleanState.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -45894,32 +47067,32 @@ class SubscribeAttributeOperationalCredentialsAcceptedCommandList : public Subsc /* * Attribute EventList */ -class ReadOperationalCredentialsEventList : public ReadAttribute { +class ReadBooleanStateEventList : public ReadAttribute { public: - ReadOperationalCredentialsEventList() + ReadBooleanStateEventList() : ReadAttribute("event-list") { } - ~ReadOperationalCredentialsEventList() + ~ReadBooleanStateEventList() { } 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::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 = [[MTRBaseClusterOperationalCredentials 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(@"OperationalCredentials.EventList response %@", [value description]); + NSLog(@"BooleanState.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalCredentials EventList read Error", error); + LogNSError("BooleanState EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -45928,25 +47101,25 @@ class ReadOperationalCredentialsEventList : public ReadAttribute { } }; -class SubscribeAttributeOperationalCredentialsEventList : public SubscribeAttribute { +class SubscribeAttributeBooleanStateEventList : public SubscribeAttribute { public: - SubscribeAttributeOperationalCredentialsEventList() + SubscribeAttributeBooleanStateEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeOperationalCredentialsEventList() + ~SubscribeAttributeBooleanStateEventList() { } 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::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 = [[MTRBaseClusterOperationalCredentials 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(); @@ -45960,7 +47133,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(@"BooleanState.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -45978,32 +47151,32 @@ class SubscribeAttributeOperationalCredentialsEventList : public SubscribeAttrib /* * Attribute AttributeList */ -class ReadOperationalCredentialsAttributeList : public ReadAttribute { +class ReadBooleanStateAttributeList : public ReadAttribute { public: - ReadOperationalCredentialsAttributeList() + ReadBooleanStateAttributeList() : ReadAttribute("attribute-list") { } - ~ReadOperationalCredentialsAttributeList() + ~ReadBooleanStateAttributeList() { } 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::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 = [[MTRBaseClusterOperationalCredentials 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(@"OperationalCredentials.AttributeList response %@", [value description]); + NSLog(@"BooleanState.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalCredentials AttributeList read Error", error); + LogNSError("BooleanState AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -46012,25 +47185,25 @@ class ReadOperationalCredentialsAttributeList : public ReadAttribute { } }; -class SubscribeAttributeOperationalCredentialsAttributeList : public SubscribeAttribute { +class SubscribeAttributeBooleanStateAttributeList : public SubscribeAttribute { public: - SubscribeAttributeOperationalCredentialsAttributeList() + SubscribeAttributeBooleanStateAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeOperationalCredentialsAttributeList() + ~SubscribeAttributeBooleanStateAttributeList() { } 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::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 = [[MTRBaseClusterOperationalCredentials 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(); @@ -46044,7 +47217,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(@"BooleanState.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -46060,32 +47233,32 @@ class SubscribeAttributeOperationalCredentialsAttributeList : public SubscribeAt /* * Attribute FeatureMap */ -class ReadOperationalCredentialsFeatureMap : public ReadAttribute { +class ReadBooleanStateFeatureMap : public ReadAttribute { public: - ReadOperationalCredentialsFeatureMap() + ReadBooleanStateFeatureMap() : ReadAttribute("feature-map") { } - ~ReadOperationalCredentialsFeatureMap() + ~ReadBooleanStateFeatureMap() { } 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::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 = [[MTRBaseClusterOperationalCredentials 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(@"OperationalCredentials.FeatureMap response %@", [value description]); + NSLog(@"BooleanState.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalCredentials FeatureMap read Error", error); + LogNSError("BooleanState FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -46094,25 +47267,25 @@ class ReadOperationalCredentialsFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeOperationalCredentialsFeatureMap : public SubscribeAttribute { +class SubscribeAttributeBooleanStateFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeOperationalCredentialsFeatureMap() + SubscribeAttributeBooleanStateFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeOperationalCredentialsFeatureMap() + ~SubscribeAttributeBooleanStateFeatureMap() { } 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::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 = [[MTRBaseClusterOperationalCredentials 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(); @@ -46126,7 +47299,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(@"BooleanState.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -46142,32 +47315,32 @@ class SubscribeAttributeOperationalCredentialsFeatureMap : public SubscribeAttri /* * Attribute ClusterRevision */ -class ReadOperationalCredentialsClusterRevision : public ReadAttribute { +class ReadBooleanStateClusterRevision : public ReadAttribute { public: - ReadOperationalCredentialsClusterRevision() + ReadBooleanStateClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadOperationalCredentialsClusterRevision() + ~ReadBooleanStateClusterRevision() { } 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::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 = [[MTRBaseClusterOperationalCredentials 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(@"OperationalCredentials.ClusterRevision response %@", [value description]); + NSLog(@"BooleanState.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OperationalCredentials ClusterRevision read Error", error); + LogNSError("BooleanState ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -46176,25 +47349,25 @@ class ReadOperationalCredentialsClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeOperationalCredentialsClusterRevision : public SubscribeAttribute { +class SubscribeAttributeBooleanStateClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeOperationalCredentialsClusterRevision() + SubscribeAttributeBooleanStateClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeOperationalCredentialsClusterRevision() + ~SubscribeAttributeBooleanStateClusterRevision() { } 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::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 = [[MTRBaseClusterOperationalCredentials 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(); @@ -46208,7 +47381,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(@"BooleanState.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -46221,20 +47394,25 @@ class SubscribeAttributeOperationalCredentialsClusterRevision : public Subscribe } }; +#if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster GroupKeyManagement | 0x003F | +| Cluster IcdManagement | 0x0046 | |------------------------------------------------------------------------------| | Commands: | | -| * KeySetWrite | 0x00 | -| * KeySetRead | 0x01 | -| * KeySetRemove | 0x03 | -| * KeySetReadAllIndices | 0x04 | +| * RegisterClient | 0x00 | +| * UnregisterClient | 0x02 | +| * StayActiveRequest | 0x03 | |------------------------------------------------------------------------------| | Attributes: | | -| * GroupKeyMap | 0x0000 | -| * GroupTable | 0x0001 | -| * MaxGroupsPerFabric | 0x0002 | -| * MaxGroupKeysPerFabric | 0x0003 | +| * IdleModeDuration | 0x0000 | +| * ActiveModeDuration | 0x0001 | +| * ActiveModeThreshold | 0x0002 | +| * RegisteredClients | 0x0003 | +| * ICDCounter | 0x0004 | +| * ClientsSupportedPerFabric | 0x0005 | +| * UserActiveModeTriggerHint | 0x0006 | +| * UserActiveModeTriggerInstruction | 0x0007 | +| * OperatingMode | 0x0008 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -46243,495 +47421,237 @@ class SubscribeAttributeOperationalCredentialsClusterRevision : public Subscribe | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | +| * OnTransitionToActiveMode | 0x0000 | \*----------------------------------------------------------------------------*/ +#if MTR_ENABLE_PROVISIONAL /* - * Command KeySetWrite + * Command RegisterClient */ -class GroupKeyManagementKeySetWrite : public ClusterCommand { +class IcdManagementRegisterClient : public ClusterCommand { public: - GroupKeyManagementKeySetWrite() - : ClusterCommand("key-set-write") - , mComplex_GroupKeySet(&mRequest.groupKeySet) + IcdManagementRegisterClient() + : ClusterCommand("register-client") { - AddArgument("GroupKeySet", &mComplex_GroupKeySet); +#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 { - 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::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 = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + __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; - 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; +#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.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); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type mRequest; - TypedComplexArgument mComplex_GroupKeySet; -}; - -/* - * Command KeySetRead - */ -class GroupKeyManagementKeySetRead : public ClusterCommand { -public: - GroupKeyManagementKeySetRead() - : ClusterCommand("key-set-read") - { - 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::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 = [[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); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type mRequest; -}; - -/* - * Command KeySetRemove - */ -class GroupKeyManagementKeySetRemove : public ClusterCommand { -public: - GroupKeyManagementKeySetRemove() - : ClusterCommand("key-set-remove") - { - 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; - - 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 = [[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); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type mRequest; -}; - -/* - * Command KeySetReadAllIndices - */ -class GroupKeyManagementKeySetReadAllIndices : public ClusterCommand { -public: - GroupKeyManagementKeySetReadAllIndices() - : ClusterCommand("key-set-read-all-indices") - { - 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; - - 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 = [[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); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; - -/* - * Attribute GroupKeyMap - */ -class ReadGroupKeyManagementGroupKeyMap : public ReadAttribute { -public: - ReadGroupKeyManagementGroupKeyMap() - : ReadAttribute("group-key-map") - { - } - - ~ReadGroupKeyManagementGroupKeyMap() - { - } - - 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 ") ReadAttribute (0x%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]); - 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::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(); + params.verificationKey = 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 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); + } + }]; } - [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; } + +private: + chip::app::Clusters::IcdManagement::Commands::RegisterClient::Type mRequest; }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* - * Attribute GroupTable + * Command UnregisterClient */ -class ReadGroupKeyManagementGroupTable : public ReadAttribute { +class IcdManagementUnregisterClient : public ClusterCommand { public: - ReadGroupKeyManagementGroupTable() - : ReadAttribute("group-table") - { - } - - ~ReadGroupKeyManagementGroupTable() + 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::GroupKeyManagement::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::GroupKeyManagement::Attributes::GroupTable::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 ") 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 = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRReadParams alloc] init]; - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); + __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); + } + }]; } - [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::IcdManagement::Commands::UnregisterClient::Type mRequest; }; -class SubscribeAttributeGroupKeyManagementGroupTable : public SubscribeAttribute { +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command StayActiveRequest + */ +class IcdManagementStayActiveRequest : public ClusterCommand { public: - SubscribeAttributeGroupKeyManagementGroupTable() - : SubscribeAttribute("group-table") - { - } - - ~SubscribeAttributeGroupKeyManagementGroupTable() + IcdManagementStayActiveRequest() + : ClusterCommand("stay-active-request") { + ClusterCommand::AddArguments(); } 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::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); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%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(); + __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); + } + }]; } - [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; } + +private: }; +#endif // MTR_ENABLE_PROVISIONAL + +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute MaxGroupsPerFabric + * Attribute IdleModeDuration */ -class ReadGroupKeyManagementMaxGroupsPerFabric : public ReadAttribute { +class ReadIcdManagementIdleModeDuration : public ReadAttribute { public: - ReadGroupKeyManagementMaxGroupsPerFabric() - : ReadAttribute("max-groups-per-fabric") + ReadIcdManagementIdleModeDuration() + : ReadAttribute("idle-mode-duration") { } - ~ReadGroupKeyManagementMaxGroupsPerFabric() + ~ReadIcdManagementIdleModeDuration() { } 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::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 = [[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 = [[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("GroupKeyManagement MaxGroupsPerFabric read Error", error); + LogNSError("ICDManagement IdleModeDuration read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -46740,25 +47660,25 @@ class ReadGroupKeyManagementMaxGroupsPerFabric : public ReadAttribute { } }; -class SubscribeAttributeGroupKeyManagementMaxGroupsPerFabric : public SubscribeAttribute { +class SubscribeAttributeIcdManagementIdleModeDuration : public SubscribeAttribute { public: - SubscribeAttributeGroupKeyManagementMaxGroupsPerFabric() - : SubscribeAttribute("max-groups-per-fabric") + SubscribeAttributeIcdManagementIdleModeDuration() + : SubscribeAttribute("idle-mode-duration") { } - ~SubscribeAttributeGroupKeyManagementMaxGroupsPerFabric() + ~SubscribeAttributeIcdManagementIdleModeDuration() { } 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::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 = [[MTRBaseClusterGroupKeyManagement 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(); @@ -46769,10 +47689,10 @@ class SubscribeAttributeGroupKeyManagementMaxGroupsPerFabric : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxGroupsPerFabricWithParams:params + [cluster subscribeAttributeIdleModeDurationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.MaxGroupsPerFabric response %@", [value description]); + NSLog(@"ICDManagement.IdleModeDuration response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -46785,35 +47705,38 @@ class SubscribeAttributeGroupKeyManagementMaxGroupsPerFabric : public SubscribeA } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute MaxGroupKeysPerFabric + * Attribute ActiveModeDuration */ -class ReadGroupKeyManagementMaxGroupKeysPerFabric : public ReadAttribute { +class ReadIcdManagementActiveModeDuration : public ReadAttribute { public: - ReadGroupKeyManagementMaxGroupKeysPerFabric() - : ReadAttribute("max-group-keys-per-fabric") + ReadIcdManagementActiveModeDuration() + : ReadAttribute("active-mode-duration") { } - ~ReadGroupKeyManagementMaxGroupKeysPerFabric() + ~ReadIcdManagementActiveModeDuration() { } 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::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 = [[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 = [[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("GroupKeyManagement MaxGroupKeysPerFabric read Error", error); + LogNSError("ICDManagement ActiveModeDuration read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -46822,25 +47745,25 @@ class ReadGroupKeyManagementMaxGroupKeysPerFabric : public ReadAttribute { } }; -class SubscribeAttributeGroupKeyManagementMaxGroupKeysPerFabric : public SubscribeAttribute { +class SubscribeAttributeIcdManagementActiveModeDuration : public SubscribeAttribute { public: - SubscribeAttributeGroupKeyManagementMaxGroupKeysPerFabric() - : SubscribeAttribute("max-group-keys-per-fabric") + SubscribeAttributeIcdManagementActiveModeDuration() + : SubscribeAttribute("active-mode-duration") { } - ~SubscribeAttributeGroupKeyManagementMaxGroupKeysPerFabric() + ~SubscribeAttributeIcdManagementActiveModeDuration() { } 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::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 = [[MTRBaseClusterGroupKeyManagement 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(); @@ -46851,10 +47774,10 @@ class SubscribeAttributeGroupKeyManagementMaxGroupKeysPerFabric : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxGroupKeysPerFabricWithParams:params + [cluster subscribeAttributeActiveModeDurationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.MaxGroupKeysPerFabric response %@", [value description]); + NSLog(@"ICDManagement.ActiveModeDuration response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -46867,35 +47790,38 @@ class SubscribeAttributeGroupKeyManagementMaxGroupKeysPerFabric : public Subscri } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute GeneratedCommandList + * Attribute ActiveModeThreshold */ -class ReadGroupKeyManagementGeneratedCommandList : public ReadAttribute { +class ReadIcdManagementActiveModeThreshold : public ReadAttribute { public: - ReadGroupKeyManagementGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadIcdManagementActiveModeThreshold() + : ReadAttribute("active-mode-threshold") { } - ~ReadGroupKeyManagementGeneratedCommandList() + ~ReadIcdManagementActiveModeThreshold() { } 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::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 = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.GeneratedCommandList 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("GroupKeyManagement GeneratedCommandList read Error", error); + LogNSError("ICDManagement ActiveModeThreshold read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -46904,25 +47830,25 @@ class ReadGroupKeyManagementGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeGroupKeyManagementGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeIcdManagementActiveModeThreshold : public SubscribeAttribute { public: - SubscribeAttributeGroupKeyManagementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeIcdManagementActiveModeThreshold() + : SubscribeAttribute("active-mode-threshold") { } - ~SubscribeAttributeGroupKeyManagementGeneratedCommandList() + ~SubscribeAttributeIcdManagementActiveModeThreshold() { } 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::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 = [[MTRBaseClusterGroupKeyManagement 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(); @@ -46933,10 +47859,10 @@ class SubscribeAttributeGroupKeyManagementGeneratedCommandList : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeActiveModeThresholdWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.GeneratedCommandList 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 { @@ -46949,35 +47875,42 @@ class SubscribeAttributeGroupKeyManagementGeneratedCommandList : public Subscrib } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute AcceptedCommandList + * Attribute RegisteredClients */ -class ReadGroupKeyManagementAcceptedCommandList : public ReadAttribute { +class ReadIcdManagementRegisteredClients : public ReadAttribute { public: - ReadGroupKeyManagementAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadIcdManagementRegisteredClients() + : ReadAttribute("registered-clients") { } - ~ReadGroupKeyManagementAcceptedCommandList() + ~ReadIcdManagementRegisteredClients() { } 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::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 = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.AcceptedCommandList 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("GroupKeyManagement AcceptedCommandList read Error", error); + LogNSError("ICDManagement RegisteredClients read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -46986,25 +47919,25 @@ class ReadGroupKeyManagementAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeGroupKeyManagementAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeIcdManagementRegisteredClients : public SubscribeAttribute { public: - SubscribeAttributeGroupKeyManagementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeIcdManagementRegisteredClients() + : SubscribeAttribute("registered-clients") { } - ~SubscribeAttributeGroupKeyManagementAcceptedCommandList() + ~SubscribeAttributeIcdManagementRegisteredClients() { } 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::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 = [[MTRBaseClusterGroupKeyManagement 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(); @@ -47015,10 +47948,10 @@ class SubscribeAttributeGroupKeyManagementAcceptedCommandList : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeRegisteredClientsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.AcceptedCommandList response %@", [value description]); + NSLog(@"ICDManagement.RegisteredClients response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -47031,37 +47964,38 @@ class SubscribeAttributeGroupKeyManagementAcceptedCommandList : public Subscribe } }; +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* - * Attribute EventList + * Attribute ICDCounter */ -class ReadGroupKeyManagementEventList : public ReadAttribute { +class ReadIcdManagementICDCounter : public ReadAttribute { public: - ReadGroupKeyManagementEventList() - : ReadAttribute("event-list") + ReadIcdManagementICDCounter() + : ReadAttribute("icdcounter") { } - ~ReadGroupKeyManagementEventList() + ~ReadIcdManagementICDCounter() { } 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::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 = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.EventList 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("GroupKeyManagement EventList read Error", error); + LogNSError("ICDManagement ICDCounter read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -47070,25 +48004,25 @@ class ReadGroupKeyManagementEventList : public ReadAttribute { } }; -class SubscribeAttributeGroupKeyManagementEventList : public SubscribeAttribute { +class SubscribeAttributeIcdManagementICDCounter : public SubscribeAttribute { public: - SubscribeAttributeGroupKeyManagementEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeIcdManagementICDCounter() + : SubscribeAttribute("icdcounter") { } - ~SubscribeAttributeGroupKeyManagementEventList() + ~SubscribeAttributeIcdManagementICDCounter() { } 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::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 = [[MTRBaseClusterGroupKeyManagement 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(); @@ -47099,10 +48033,10 @@ class SubscribeAttributeGroupKeyManagementEventList : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeICDCounterWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.EventList 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 { @@ -47116,36 +48050,37 @@ class SubscribeAttributeGroupKeyManagementEventList : public SubscribeAttribute }; #endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* - * Attribute AttributeList + * Attribute ClientsSupportedPerFabric */ -class ReadGroupKeyManagementAttributeList : public ReadAttribute { +class ReadIcdManagementClientsSupportedPerFabric : public ReadAttribute { public: - ReadGroupKeyManagementAttributeList() - : ReadAttribute("attribute-list") + ReadIcdManagementClientsSupportedPerFabric() + : ReadAttribute("clients-supported-per-fabric") { } - ~ReadGroupKeyManagementAttributeList() + ~ReadIcdManagementClientsSupportedPerFabric() { } 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::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 = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.AttributeList 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("GroupKeyManagement AttributeList read Error", error); + LogNSError("ICDManagement ClientsSupportedPerFabric read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -47154,25 +48089,25 @@ class ReadGroupKeyManagementAttributeList : public ReadAttribute { } }; -class SubscribeAttributeGroupKeyManagementAttributeList : public SubscribeAttribute { +class SubscribeAttributeIcdManagementClientsSupportedPerFabric : public SubscribeAttribute { public: - SubscribeAttributeGroupKeyManagementAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeIcdManagementClientsSupportedPerFabric() + : SubscribeAttribute("clients-supported-per-fabric") { } - ~SubscribeAttributeGroupKeyManagementAttributeList() + ~SubscribeAttributeIcdManagementClientsSupportedPerFabric() { } 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::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 = [[MTRBaseClusterGroupKeyManagement 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(); @@ -47183,10 +48118,10 @@ class SubscribeAttributeGroupKeyManagementAttributeList : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeClientsSupportedPerFabricWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ICDManagement.ClientsSupportedPerFabric response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -47199,35 +48134,38 @@ class SubscribeAttributeGroupKeyManagementAttributeList : public SubscribeAttrib } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute FeatureMap + * Attribute UserActiveModeTriggerHint */ -class ReadGroupKeyManagementFeatureMap : public ReadAttribute { +class ReadIcdManagementUserActiveModeTriggerHint : public ReadAttribute { public: - ReadGroupKeyManagementFeatureMap() - : ReadAttribute("feature-map") + ReadIcdManagementUserActiveModeTriggerHint() + : ReadAttribute("user-active-mode-trigger-hint") { } - ~ReadGroupKeyManagementFeatureMap() + ~ReadIcdManagementUserActiveModeTriggerHint() { } 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::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 = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.FeatureMap 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("GroupKeyManagement FeatureMap read Error", error); + LogNSError("ICDManagement UserActiveModeTriggerHint read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -47236,25 +48174,25 @@ class ReadGroupKeyManagementFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeGroupKeyManagementFeatureMap : public SubscribeAttribute { +class SubscribeAttributeIcdManagementUserActiveModeTriggerHint : public SubscribeAttribute { public: - SubscribeAttributeGroupKeyManagementFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeIcdManagementUserActiveModeTriggerHint() + : SubscribeAttribute("user-active-mode-trigger-hint") { } - ~SubscribeAttributeGroupKeyManagementFeatureMap() + ~SubscribeAttributeIcdManagementUserActiveModeTriggerHint() { } 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::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 = [[MTRBaseClusterGroupKeyManagement 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(); @@ -47265,10 +48203,10 @@ class SubscribeAttributeGroupKeyManagementFeatureMap : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeUserActiveModeTriggerHintWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.FeatureMap response %@", [value description]); + NSLog(@"ICDManagement.UserActiveModeTriggerHint response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -47281,35 +48219,38 @@ class SubscribeAttributeGroupKeyManagementFeatureMap : public SubscribeAttribute } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ClusterRevision + * Attribute UserActiveModeTriggerInstruction */ -class ReadGroupKeyManagementClusterRevision : public ReadAttribute { +class ReadIcdManagementUserActiveModeTriggerInstruction : public ReadAttribute { public: - ReadGroupKeyManagementClusterRevision() - : ReadAttribute("cluster-revision") + ReadIcdManagementUserActiveModeTriggerInstruction() + : ReadAttribute("user-active-mode-trigger-instruction") { } - ~ReadGroupKeyManagementClusterRevision() + ~ReadIcdManagementUserActiveModeTriggerInstruction() { } 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::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 = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.ClusterRevision 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("GroupKeyManagement ClusterRevision read Error", error); + LogNSError("ICDManagement UserActiveModeTriggerInstruction read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -47318,25 +48259,25 @@ class ReadGroupKeyManagementClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeGroupKeyManagementClusterRevision : public SubscribeAttribute { +class SubscribeAttributeIcdManagementUserActiveModeTriggerInstruction : public SubscribeAttribute { public: - SubscribeAttributeGroupKeyManagementClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeIcdManagementUserActiveModeTriggerInstruction() + : SubscribeAttribute("user-active-mode-trigger-instruction") { } - ~SubscribeAttributeGroupKeyManagementClusterRevision() + ~SubscribeAttributeIcdManagementUserActiveModeTriggerInstruction() { } 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::IcdManagement::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::IcdManagement::Attributes::UserActiveModeTriggerInstruction::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%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 = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -47347,10 +48288,10 @@ class SubscribeAttributeGroupKeyManagementClusterRevision : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeUserActiveModeTriggerInstructionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"GroupKeyManagement.ClusterRevision response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ICDManagement.UserActiveModeTriggerInstruction response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -47363,52 +48304,38 @@ class SubscribeAttributeGroupKeyManagementClusterRevision : public SubscribeAttr } }; -/*----------------------------------------------------------------------------*\ -| Cluster FixedLabel | 0x0040 | -|------------------------------------------------------------------------------| -| 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 OperatingMode */ -class ReadFixedLabelLabelList : public ReadAttribute { +class ReadIcdManagementOperatingMode : public ReadAttribute { public: - ReadFixedLabelLabelList() - : ReadAttribute("label-list") + ReadIcdManagementOperatingMode() + : ReadAttribute("operating-mode") { } - ~ReadFixedLabelLabelList() + ~ReadIcdManagementOperatingMode() { } 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::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 = [[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 readAttributeOperatingModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ICDManagement.OperatingMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FixedLabel LabelList read Error", error); + LogNSError("ICDManagement OperatingMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -47417,25 +48344,25 @@ class ReadFixedLabelLabelList : public ReadAttribute { } }; -class SubscribeAttributeFixedLabelLabelList : public SubscribeAttribute { +class SubscribeAttributeIcdManagementOperatingMode : public SubscribeAttribute { public: - SubscribeAttributeFixedLabelLabelList() - : SubscribeAttribute("label-list") + SubscribeAttributeIcdManagementOperatingMode() + : SubscribeAttribute("operating-mode") { } - ~SubscribeAttributeFixedLabelLabelList() + ~SubscribeAttributeIcdManagementOperatingMode() { } 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::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 = [[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 +48373,10 @@ class SubscribeAttributeFixedLabelLabelList : 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(@"FixedLabel.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 { @@ -47462,35 +48389,38 @@ class SubscribeAttributeFixedLabelLabelList : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute GeneratedCommandList */ -class ReadFixedLabelGeneratedCommandList : public ReadAttribute { +class ReadIcdManagementGeneratedCommandList : public ReadAttribute { public: - ReadFixedLabelGeneratedCommandList() + ReadIcdManagementGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadFixedLabelGeneratedCommandList() + ~ReadIcdManagementGeneratedCommandList() { } 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::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 = [[MTRBaseClusterFixedLabel 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(@"FixedLabel.GeneratedCommandList response %@", [value description]); + NSLog(@"ICDManagement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FixedLabel GeneratedCommandList read Error", error); + LogNSError("ICDManagement GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -47499,25 +48429,25 @@ class ReadFixedLabelGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeFixedLabelGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeIcdManagementGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeFixedLabelGeneratedCommandList() + SubscribeAttributeIcdManagementGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeFixedLabelGeneratedCommandList() + ~SubscribeAttributeIcdManagementGeneratedCommandList() { } 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::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 = [[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(); @@ -47531,7 +48461,7 @@ class SubscribeAttributeFixedLabelGeneratedCommandList : public SubscribeAttribu [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FixedLabel.GeneratedCommandList response %@", [value description]); + NSLog(@"ICDManagement.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -47544,35 +48474,38 @@ class SubscribeAttributeFixedLabelGeneratedCommandList : public SubscribeAttribu } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute AcceptedCommandList */ -class ReadFixedLabelAcceptedCommandList : public ReadAttribute { +class ReadIcdManagementAcceptedCommandList : public ReadAttribute { public: - ReadFixedLabelAcceptedCommandList() + ReadIcdManagementAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadFixedLabelAcceptedCommandList() + ~ReadIcdManagementAcceptedCommandList() { } 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::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 = [[MTRBaseClusterFixedLabel 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(@"FixedLabel.AcceptedCommandList response %@", [value description]); + NSLog(@"ICDManagement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FixedLabel AcceptedCommandList read Error", error); + LogNSError("ICDManagement AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -47581,25 +48514,25 @@ class ReadFixedLabelAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeFixedLabelAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeIcdManagementAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeFixedLabelAcceptedCommandList() + SubscribeAttributeIcdManagementAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeFixedLabelAcceptedCommandList() + ~SubscribeAttributeIcdManagementAcceptedCommandList() { } 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::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 = [[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(); @@ -47613,7 +48546,7 @@ class SubscribeAttributeFixedLabelAcceptedCommandList : public SubscribeAttribut [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FixedLabel.AcceptedCommandList response %@", [value description]); + NSLog(@"ICDManagement.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -47626,37 +48559,38 @@ class SubscribeAttributeFixedLabelAcceptedCommandList : public SubscribeAttribut } }; +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* * Attribute EventList */ -class ReadFixedLabelEventList : public ReadAttribute { +class ReadIcdManagementEventList : public ReadAttribute { public: - ReadFixedLabelEventList() + ReadIcdManagementEventList() : ReadAttribute("event-list") { } - ~ReadFixedLabelEventList() + ~ReadIcdManagementEventList() { } 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::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 = [[MTRBaseClusterFixedLabel 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(@"FixedLabel.EventList response %@", [value description]); + NSLog(@"ICDManagement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FixedLabel EventList read Error", error); + LogNSError("ICDManagement EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -47665,25 +48599,25 @@ class ReadFixedLabelEventList : public ReadAttribute { } }; -class SubscribeAttributeFixedLabelEventList : public SubscribeAttribute { +class SubscribeAttributeIcdManagementEventList : public SubscribeAttribute { public: - SubscribeAttributeFixedLabelEventList() + SubscribeAttributeIcdManagementEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeFixedLabelEventList() + ~SubscribeAttributeIcdManagementEventList() { } 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::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 = [[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(); @@ -47697,7 +48631,7 @@ class SubscribeAttributeFixedLabelEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FixedLabel.EventList response %@", [value description]); + NSLog(@"ICDManagement.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -47711,36 +48645,37 @@ class SubscribeAttributeFixedLabelEventList : public SubscribeAttribute { }; #endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* * Attribute AttributeList */ -class ReadFixedLabelAttributeList : public ReadAttribute { +class ReadIcdManagementAttributeList : public ReadAttribute { public: - ReadFixedLabelAttributeList() + ReadIcdManagementAttributeList() : ReadAttribute("attribute-list") { } - ~ReadFixedLabelAttributeList() + ~ReadIcdManagementAttributeList() { } 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::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 = [[MTRBaseClusterFixedLabel 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(@"FixedLabel.AttributeList response %@", [value description]); + NSLog(@"ICDManagement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FixedLabel AttributeList read Error", error); + LogNSError("ICDManagement AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -47749,25 +48684,25 @@ class ReadFixedLabelAttributeList : public ReadAttribute { } }; -class SubscribeAttributeFixedLabelAttributeList : public SubscribeAttribute { +class SubscribeAttributeIcdManagementAttributeList : public SubscribeAttribute { public: - SubscribeAttributeFixedLabelAttributeList() + SubscribeAttributeIcdManagementAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeFixedLabelAttributeList() + ~SubscribeAttributeIcdManagementAttributeList() { } 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::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 = [[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(); @@ -47781,7 +48716,7 @@ class SubscribeAttributeFixedLabelAttributeList : public SubscribeAttribute { [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"FixedLabel.AttributeList response %@", [value description]); + NSLog(@"ICDManagement.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -47794,35 +48729,38 @@ class SubscribeAttributeFixedLabelAttributeList : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute FeatureMap */ -class ReadFixedLabelFeatureMap : public ReadAttribute { +class ReadIcdManagementFeatureMap : public ReadAttribute { public: - ReadFixedLabelFeatureMap() + ReadIcdManagementFeatureMap() : ReadAttribute("feature-map") { } - ~ReadFixedLabelFeatureMap() + ~ReadIcdManagementFeatureMap() { } 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::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 = [[MTRBaseClusterFixedLabel 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(@"FixedLabel.FeatureMap response %@", [value description]); + NSLog(@"ICDManagement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FixedLabel FeatureMap read Error", error); + LogNSError("ICDManagement FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -47831,25 +48769,25 @@ class ReadFixedLabelFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeFixedLabelFeatureMap : public SubscribeAttribute { +class SubscribeAttributeIcdManagementFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeFixedLabelFeatureMap() + SubscribeAttributeIcdManagementFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeFixedLabelFeatureMap() + ~SubscribeAttributeIcdManagementFeatureMap() { } 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::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 = [[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(); @@ -47863,7 +48801,7 @@ class SubscribeAttributeFixedLabelFeatureMap : public SubscribeAttribute { [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FixedLabel.FeatureMap response %@", [value description]); + NSLog(@"ICDManagement.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -47876,35 +48814,38 @@ class SubscribeAttributeFixedLabelFeatureMap : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute ClusterRevision */ -class ReadFixedLabelClusterRevision : public ReadAttribute { +class ReadIcdManagementClusterRevision : public ReadAttribute { public: - ReadFixedLabelClusterRevision() + ReadIcdManagementClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadFixedLabelClusterRevision() + ~ReadIcdManagementClusterRevision() { } 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::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 = [[MTRBaseClusterFixedLabel 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(@"FixedLabel.ClusterRevision response %@", [value description]); + NSLog(@"ICDManagement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("FixedLabel ClusterRevision read Error", error); + LogNSError("ICDManagement ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -47913,25 +48854,25 @@ class ReadFixedLabelClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeFixedLabelClusterRevision : public SubscribeAttribute { +class SubscribeAttributeIcdManagementClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeFixedLabelClusterRevision() + SubscribeAttributeIcdManagementClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeFixedLabelClusterRevision() + ~SubscribeAttributeIcdManagementClusterRevision() { } 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::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 = [[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(); @@ -47945,7 +48886,7 @@ class SubscribeAttributeFixedLabelClusterRevision : public SubscribeAttribute { [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"FixedLabel.ClusterRevision response %@", [value description]); + NSLog(@"ICDManagement.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -47958,13 +48899,22 @@ class SubscribeAttributeFixedLabelClusterRevision : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster UserLabel | 0x0041 | +| Cluster Timer | 0x0047 | |------------------------------------------------------------------------------| | Commands: | | +| * SetTimer | 0x00 | +| * ResetTimer | 0x01 | +| * AddTime | 0x02 | +| * ReduceTime | 0x03 | |------------------------------------------------------------------------------| | Attributes: | | -| * LabelList | 0x0000 | +| * SetTime | 0x0000 | +| * TimeRemaining | 0x0001 | +| * TimerState | 0x0002 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -47975,116 +48925,270 @@ class SubscribeAttributeFixedLabelClusterRevision : public SubscribeAttribute { | Events: | | \*----------------------------------------------------------------------------*/ +#if MTR_ENABLE_PROVISIONAL /* - * Attribute LabelList + * Command SetTimer */ -class ReadUserLabelLabelList : public ReadAttribute { +class TimerSetTimer : public ClusterCommand { public: - ReadUserLabelLabelList() - : ReadAttribute("label-list") + TimerSetTimer() + : ClusterCommand("set-timer") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("NewTime", 0, UINT32_MAX, &mRequest.newTime); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } - ~ReadUserLabelLabelList() + 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::UserLabel::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::UserLabel::Attributes::LabelList::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 = [[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); - }]; + __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 WriteUserLabelLabelList : public WriteAttribute { +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command AddTime + */ +class TimerAddTime : public ClusterCommand { public: - WriteUserLabelLabelList() - : WriteAttribute("label-list") - , mComplex(&mValue) + TimerAddTime() + : ClusterCommand("add-time") { - AddArgument("attr-name", "label-list"); - AddArgument("attr-value", &mComplex); - WriteAttribute::AddArguments(); +#if MTR_ENABLE_PROVISIONAL + AddArgument("AdditionalTime", 0, UINT32_MAX, &mRequest.additionalTime); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } - ~WriteUserLabelLabelList() + 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::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); + + 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]; + 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); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::Timer::Commands::ReduceTime::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL + +#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::UserLabel::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::UserLabel::Attributes::LabelList::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 ") 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; - } + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - [cluster writeAttributeLabelListWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("UserLabel LabelList write Error", error); + 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; } - -private: - chip::app::DataModel::List mValue; - TypedComplexArgument> mComplex; }; -class SubscribeAttributeUserLabelLabelList : public SubscribeAttribute { +class SubscribeAttributeTimerSetTime : public SubscribeAttribute { public: - SubscribeAttributeUserLabelLabelList() - : SubscribeAttribute("label-list") + SubscribeAttributeTimerSetTime() + : SubscribeAttribute("set-time") { } - ~SubscribeAttributeUserLabelLabelList() + ~SubscribeAttributeTimerSetTime() { } 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::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 = [[MTRBaseClusterUserLabel 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(); @@ -48095,10 +49199,10 @@ class SubscribeAttributeUserLabelLabelList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLabelListWithParams:params + [cluster subscribeAttributeSetTimeWithParams: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(@"Timer.SetTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -48111,35 +49215,38 @@ class SubscribeAttributeUserLabelLabelList : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute GeneratedCommandList + * Attribute TimeRemaining */ -class ReadUserLabelGeneratedCommandList : public ReadAttribute { +class ReadTimerTimeRemaining : public ReadAttribute { public: - ReadUserLabelGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadTimerTimeRemaining() + : ReadAttribute("time-remaining") { } - ~ReadUserLabelGeneratedCommandList() + ~ReadTimerTimeRemaining() { } 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::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 = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.GeneratedCommandList 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("UserLabel GeneratedCommandList read Error", error); + LogNSError("Timer TimeRemaining read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -48148,25 +49255,25 @@ class ReadUserLabelGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeUserLabelGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeTimerTimeRemaining : public SubscribeAttribute { public: - SubscribeAttributeUserLabelGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeTimerTimeRemaining() + : SubscribeAttribute("time-remaining") { } - ~SubscribeAttributeUserLabelGeneratedCommandList() + ~SubscribeAttributeTimerTimeRemaining() { } 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::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 = [[MTRBaseClusterUserLabel 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(); @@ -48177,10 +49284,10 @@ class SubscribeAttributeUserLabelGeneratedCommandList : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeTimeRemainingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.GeneratedCommandList 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 { @@ -48193,35 +49300,38 @@ class SubscribeAttributeUserLabelGeneratedCommandList : public SubscribeAttribut } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute AcceptedCommandList + * Attribute TimerState */ -class ReadUserLabelAcceptedCommandList : public ReadAttribute { +class ReadTimerTimerState : public ReadAttribute { public: - ReadUserLabelAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadTimerTimerState() + : ReadAttribute("timer-state") { } - ~ReadUserLabelAcceptedCommandList() + ~ReadTimerTimerState() { } 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::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 = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.AcceptedCommandList 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("UserLabel AcceptedCommandList read Error", error); + LogNSError("Timer TimerState read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -48230,25 +49340,25 @@ class ReadUserLabelAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeUserLabelAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeTimerTimerState : public SubscribeAttribute { public: - SubscribeAttributeUserLabelAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeTimerTimerState() + : SubscribeAttribute("timer-state") { } - ~SubscribeAttributeUserLabelAcceptedCommandList() + ~SubscribeAttributeTimerTimerState() { } 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::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 = [[MTRBaseClusterUserLabel 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(); @@ -48259,10 +49369,10 @@ class SubscribeAttributeUserLabelAcceptedCommandList : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeTimerStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.AcceptedCommandList 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 { @@ -48275,37 +49385,38 @@ class SubscribeAttributeUserLabelAcceptedCommandList : public SubscribeAttribute } }; +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* - * Attribute EventList + * Attribute GeneratedCommandList */ -class ReadUserLabelEventList : public ReadAttribute { +class ReadTimerGeneratedCommandList : public ReadAttribute { public: - ReadUserLabelEventList() - : ReadAttribute("event-list") + ReadTimerGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadUserLabelEventList() + ~ReadTimerGeneratedCommandList() { } 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::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 = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.EventList 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("UserLabel EventList read Error", error); + LogNSError("Timer GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -48314,25 +49425,25 @@ class ReadUserLabelEventList : public ReadAttribute { } }; -class SubscribeAttributeUserLabelEventList : public SubscribeAttribute { +class SubscribeAttributeTimerGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeUserLabelEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeTimerGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeUserLabelEventList() + ~SubscribeAttributeTimerGeneratedCommandList() { } 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::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 = [[MTRBaseClusterUserLabel 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(); @@ -48343,10 +49454,10 @@ class SubscribeAttributeUserLabelEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.EventList response %@", [value description]); + NSLog(@"Timer.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -48360,36 +49471,37 @@ class SubscribeAttributeUserLabelEventList : public SubscribeAttribute { }; #endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* - * Attribute AttributeList + * Attribute AcceptedCommandList */ -class ReadUserLabelAttributeList : public ReadAttribute { +class ReadTimerAcceptedCommandList : public ReadAttribute { public: - ReadUserLabelAttributeList() - : ReadAttribute("attribute-list") + ReadTimerAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadUserLabelAttributeList() + ~ReadTimerAcceptedCommandList() { } 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::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 = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.AttributeList 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("UserLabel AttributeList read Error", error); + LogNSError("Timer AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -48398,25 +49510,25 @@ class ReadUserLabelAttributeList : public ReadAttribute { } }; -class SubscribeAttributeUserLabelAttributeList : public SubscribeAttribute { +class SubscribeAttributeTimerAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeUserLabelAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeTimerAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeUserLabelAttributeList() + ~SubscribeAttributeTimerAcceptedCommandList() { } 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::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 = [[MTRBaseClusterUserLabel 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(); @@ -48427,10 +49539,10 @@ class SubscribeAttributeUserLabelAttributeList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.AttributeList response %@", [value description]); + NSLog(@"Timer.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -48443,35 +49555,38 @@ class SubscribeAttributeUserLabelAttributeList : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute FeatureMap + * Attribute EventList */ -class ReadUserLabelFeatureMap : public ReadAttribute { +class ReadTimerEventList : public ReadAttribute { public: - ReadUserLabelFeatureMap() - : ReadAttribute("feature-map") + ReadTimerEventList() + : ReadAttribute("event-list") { } - ~ReadUserLabelFeatureMap() + ~ReadTimerEventList() { } 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::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 = [[MTRBaseClusterUserLabel alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.FeatureMap 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("UserLabel FeatureMap read Error", error); + LogNSError("Timer EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -48480,25 +49595,25 @@ class ReadUserLabelFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeUserLabelFeatureMap : public SubscribeAttribute { +class SubscribeAttributeTimerEventList : public SubscribeAttribute { public: - SubscribeAttributeUserLabelFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeTimerEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeUserLabelFeatureMap() + ~SubscribeAttributeTimerEventList() { } 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::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 = [[MTRBaseClusterUserLabel 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(); @@ -48509,10 +49624,10 @@ class SubscribeAttributeUserLabelFeatureMap : 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(@"UserLabel.FeatureMap 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 { @@ -48525,35 +49640,38 @@ class SubscribeAttributeUserLabelFeatureMap : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ClusterRevision + * Attribute AttributeList */ -class ReadUserLabelClusterRevision : public ReadAttribute { +class ReadTimerAttributeList : public ReadAttribute { public: - ReadUserLabelClusterRevision() - : ReadAttribute("cluster-revision") + ReadTimerAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadUserLabelClusterRevision() + ~ReadTimerAttributeList() { } 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::Timer::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Timer::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]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.ClusterRevision response %@", [value description]); + __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("UserLabel ClusterRevision read Error", error); + LogNSError("Timer AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -48562,25 +49680,25 @@ class ReadUserLabelClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeUserLabelClusterRevision : public SubscribeAttribute { +class SubscribeAttributeTimerAttributeList : public SubscribeAttribute { public: - SubscribeAttributeUserLabelClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeTimerAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeUserLabelClusterRevision() + ~SubscribeAttributeTimerAttributeList() { } 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::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 = [[MTRBaseClusterUserLabel 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(); @@ -48591,10 +49709,10 @@ class SubscribeAttributeUserLabelClusterRevision : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"UserLabel.ClusterRevision response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Timer.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -48607,53 +49725,38 @@ class SubscribeAttributeUserLabelClusterRevision : public SubscribeAttribute { } }; -/*----------------------------------------------------------------------------*\ -| Cluster BooleanState | 0x0045 | -|------------------------------------------------------------------------------| -| Commands: | | -|------------------------------------------------------------------------------| -| Attributes: | | -| * StateValue | 0x0000 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -| * StateChange | 0x0000 | -\*----------------------------------------------------------------------------*/ +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* - * Attribute StateValue + * Attribute FeatureMap */ -class ReadBooleanStateStateValue : public ReadAttribute { +class ReadTimerFeatureMap : public ReadAttribute { public: - ReadBooleanStateStateValue() - : ReadAttribute("state-value") + ReadTimerFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadBooleanStateStateValue() + ~ReadTimerFeatureMap() { } 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::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 = [[MTRBaseClusterBooleanState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStateValueWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanState.StateValue 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("BooleanState StateValue read Error", error); + LogNSError("Timer FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -48662,25 +49765,25 @@ class ReadBooleanStateStateValue : public ReadAttribute { } }; -class SubscribeAttributeBooleanStateStateValue : public SubscribeAttribute { +class SubscribeAttributeTimerFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeBooleanStateStateValue() - : SubscribeAttribute("state-value") + SubscribeAttributeTimerFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeBooleanStateStateValue() + ~SubscribeAttributeTimerFeatureMap() { } 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 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 = [[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(); @@ -48691,10 +49794,10 @@ class SubscribeAttributeBooleanStateStateValue : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeStateValueWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanState.StateValue response %@", [value description]); + NSLog(@"Timer.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -48707,35 +49810,38 @@ class SubscribeAttributeBooleanStateStateValue : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute GeneratedCommandList + * Attribute ClusterRevision */ -class ReadBooleanStateGeneratedCommandList : public ReadAttribute { +class ReadTimerClusterRevision : public ReadAttribute { public: - ReadBooleanStateGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadTimerClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadBooleanStateGeneratedCommandList() + ~ReadTimerClusterRevision() { } 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::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 = [[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 readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Timer.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("BooleanState GeneratedCommandList read Error", error); + LogNSError("Timer ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -48744,25 +49850,25 @@ class ReadBooleanStateGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeBooleanStateGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeTimerClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeBooleanStateGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeTimerClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeBooleanStateGeneratedCommandList() + ~SubscribeAttributeTimerClusterRevision() { } 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::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 = [[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 +49879,10 @@ class SubscribeAttributeBooleanStateGeneratedCommandList : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams: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.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -48789,203 +49895,277 @@ class SubscribeAttributeBooleanStateGeneratedCommandList : public SubscribeAttri } }; +#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 AcceptedCommandList + * Command Pause */ -class ReadBooleanStateAcceptedCommandList : public ReadAttribute { +class OvenCavityOperationalStatePause : public ClusterCommand { public: - ReadBooleanStateAcceptedCommandList() - : ReadAttribute("accepted-command-list") - { - } - - ~ReadBooleanStateAcceptedCommandList() + OvenCavityOperationalStatePause() + : ClusterCommand("pause") { + 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::AcceptedCommandList::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 ") 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 readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanState.AcceptedCommandList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("BooleanState AcceptedCommandList 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 = [[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: }; -class SubscribeAttributeBooleanStateAcceptedCommandList : public SubscribeAttribute { +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command Stop + */ +class OvenCavityOperationalStateStop : public ClusterCommand { public: - SubscribeAttributeBooleanStateAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") - { - } - - ~SubscribeAttributeBooleanStateAcceptedCommandList() + OvenCavityOperationalStateStop() + : ClusterCommand("stop") { + 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::AcceptedCommandList::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, 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 = [[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); + } + }]; } - [cluster subscribeAttributeAcceptedCommandListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanState.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: }; +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Command Start */ -class ReadBooleanStateEventList : public ReadAttribute { +class OvenCavityOperationalStateStart : public ClusterCommand { public: - ReadBooleanStateEventList() - : ReadAttribute("event-list") - { - } - - ~ReadBooleanStateEventList() + OvenCavityOperationalStateStart() + : ClusterCommand("start") { + 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::EventList::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 ") 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 readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanState.EventList response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("BooleanState EventList 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 = [[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: }; -class SubscribeAttributeBooleanStateEventList : public SubscribeAttribute { +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command Resume + */ +class OvenCavityOperationalStateResume : public ClusterCommand { public: - SubscribeAttributeBooleanStateEventList() - : SubscribeAttribute("event-list") - { - } - - ~SubscribeAttributeBooleanStateEventList() + OvenCavityOperationalStateResume() + : ClusterCommand("resume") { + 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::EventList::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 = [[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 = [[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 subscribeAttributeEventListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanState.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: }; #endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute AttributeList + * Attribute PhaseList */ -class ReadBooleanStateAttributeList : public ReadAttribute { +class ReadOvenCavityOperationalStatePhaseList : public ReadAttribute { public: - ReadBooleanStateAttributeList() - : ReadAttribute("attribute-list") + ReadOvenCavityOperationalStatePhaseList() + : ReadAttribute("phase-list") { } - ~ReadBooleanStateAttributeList() + ~ReadOvenCavityOperationalStatePhaseList() { } 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::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 = [[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 = [[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("BooleanState AttributeList read Error", error); + LogNSError("OvenCavityOperationalState PhaseList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -48994,25 +50174,25 @@ class ReadBooleanStateAttributeList : public ReadAttribute { } }; -class SubscribeAttributeBooleanStateAttributeList : public SubscribeAttribute { +class SubscribeAttributeOvenCavityOperationalStatePhaseList : public SubscribeAttribute { public: - SubscribeAttributeBooleanStateAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeOvenCavityOperationalStatePhaseList() + : SubscribeAttribute("phase-list") { } - ~SubscribeAttributeBooleanStateAttributeList() + ~SubscribeAttributeOvenCavityOperationalStatePhaseList() { } 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::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 = [[MTRBaseClusterBooleanState 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(); @@ -49023,10 +50203,10 @@ class SubscribeAttributeBooleanStateAttributeList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributePhaseListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanState.AttributeList response %@", [value description]); + NSLog(@"OvenCavityOperationalState.PhaseList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -49039,35 +50219,38 @@ class SubscribeAttributeBooleanStateAttributeList : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute FeatureMap + * Attribute CurrentPhase */ -class ReadBooleanStateFeatureMap : public ReadAttribute { +class ReadOvenCavityOperationalStateCurrentPhase : public ReadAttribute { public: - ReadBooleanStateFeatureMap() - : ReadAttribute("feature-map") + ReadOvenCavityOperationalStateCurrentPhase() + : ReadAttribute("current-phase") { } - ~ReadBooleanStateFeatureMap() + ~ReadOvenCavityOperationalStateCurrentPhase() { } 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::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 = [[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 = [[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("BooleanState FeatureMap read Error", error); + LogNSError("OvenCavityOperationalState CurrentPhase read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -49076,25 +50259,25 @@ class ReadBooleanStateFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeBooleanStateFeatureMap : public SubscribeAttribute { +class SubscribeAttributeOvenCavityOperationalStateCurrentPhase : public SubscribeAttribute { public: - SubscribeAttributeBooleanStateFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeOvenCavityOperationalStateCurrentPhase() + : SubscribeAttribute("current-phase") { } - ~SubscribeAttributeBooleanStateFeatureMap() + ~SubscribeAttributeOvenCavityOperationalStateCurrentPhase() { } 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::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 = [[MTRBaseClusterBooleanState 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(); @@ -49105,10 +50288,10 @@ class SubscribeAttributeBooleanStateFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeCurrentPhaseWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanState.FeatureMap response %@", [value description]); + NSLog(@"OvenCavityOperationalState.CurrentPhase response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -49121,35 +50304,38 @@ class SubscribeAttributeBooleanStateFeatureMap : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ClusterRevision + * Attribute CountdownTime */ -class ReadBooleanStateClusterRevision : public ReadAttribute { +class ReadOvenCavityOperationalStateCountdownTime : public ReadAttribute { public: - ReadBooleanStateClusterRevision() - : ReadAttribute("cluster-revision") + ReadOvenCavityOperationalStateCountdownTime() + : ReadAttribute("countdown-time") { } - ~ReadBooleanStateClusterRevision() + ~ReadOvenCavityOperationalStateCountdownTime() { } 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::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 = [[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 = [[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("BooleanState ClusterRevision read Error", error); + LogNSError("OvenCavityOperationalState CountdownTime read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -49158,25 +50344,25 @@ class ReadBooleanStateClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeBooleanStateClusterRevision : public SubscribeAttribute { +class SubscribeAttributeOvenCavityOperationalStateCountdownTime : public SubscribeAttribute { public: - SubscribeAttributeBooleanStateClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeOvenCavityOperationalStateCountdownTime() + : SubscribeAttribute("countdown-time") { } - ~SubscribeAttributeBooleanStateClusterRevision() + ~SubscribeAttributeOvenCavityOperationalStateCountdownTime() { } 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::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 = [[MTRBaseClusterBooleanState 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(); @@ -49187,10 +50373,10 @@ class SubscribeAttributeBooleanStateClusterRevision : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeCountdownTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"BooleanState.ClusterRevision response %@", [value description]); + NSLog(@"OvenCavityOperationalState.CountdownTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -49203,264 +50389,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 OperationalStateList */ -class IcdManagementRegisterClient : public ClusterCommand { +class ReadOvenCavityOperationalStateOperationalStateList : 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 + ReadOvenCavityOperationalStateOperationalStateList() + : ReadAttribute("operational-state-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") + ~ReadOvenCavityOperationalStateOperationalStateList() { -#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::OvenCavityOperationalState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenCavityOperationalState::Attributes::OperationalStateList::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 = [[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("OvenCavityOperationalState OperationalStateList 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 SubscribeAttributeOvenCavityOperationalStateOperationalStateList : public SubscribeAttribute { public: - IcdManagementStayActiveRequest() - : ClusterCommand("stay-active-request") + SubscribeAttributeOvenCavityOperationalStateOperationalStateList() + : SubscribeAttribute("operational-state-list") { - ClusterCommand::AddArguments(); } - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ~SubscribeAttributeOvenCavityOperationalStateOperationalStateList() { - 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::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 * 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 = [[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(); } + [cluster subscribeAttributeOperationalStateListWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenCavityOperationalState.OperationalStateList 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 OperationalState */ -class ReadIcdManagementIdleModeDuration : public ReadAttribute { +class ReadOvenCavityOperationalStateOperationalState : public ReadAttribute { public: - ReadIcdManagementIdleModeDuration() - : ReadAttribute("idle-mode-duration") + ReadOvenCavityOperationalStateOperationalState() + : ReadAttribute("operational-state") { } - ~ReadIcdManagementIdleModeDuration() + ~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::IdleModeDuration::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 readAttributeIdleModeDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.IdleModeDuration 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 IdleModeDuration read Error", error); + LogNSError("OvenCavityOperationalState OperationalState read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -49469,25 +50514,25 @@ class ReadIcdManagementIdleModeDuration : public ReadAttribute { } }; -class SubscribeAttributeIcdManagementIdleModeDuration : public SubscribeAttribute { +class SubscribeAttributeOvenCavityOperationalStateOperationalState : public SubscribeAttribute { public: - SubscribeAttributeIcdManagementIdleModeDuration() - : SubscribeAttribute("idle-mode-duration") + SubscribeAttributeOvenCavityOperationalStateOperationalState() + : SubscribeAttribute("operational-state") { } - ~SubscribeAttributeIcdManagementIdleModeDuration() + ~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::IdleModeDuration::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(); @@ -49498,10 +50543,10 @@ class SubscribeAttributeIcdManagementIdleModeDuration : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeIdleModeDurationWithParams:params + [cluster subscribeAttributeOperationalStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.IdleModeDuration response %@", [value description]); + NSLog(@"OvenCavityOperationalState.OperationalState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -49518,34 +50563,34 @@ class SubscribeAttributeIcdManagementIdleModeDuration : public SubscribeAttribut #if MTR_ENABLE_PROVISIONAL /* - * Attribute ActiveModeDuration + * Attribute OperationalError */ -class ReadIcdManagementActiveModeDuration : public ReadAttribute { +class ReadOvenCavityOperationalStateOperationalError : public ReadAttribute { public: - ReadIcdManagementActiveModeDuration() - : ReadAttribute("active-mode-duration") + ReadOvenCavityOperationalStateOperationalError() + : ReadAttribute("operational-error") { } - ~ReadIcdManagementActiveModeDuration() + ~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::ActiveModeDuration::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 readAttributeActiveModeDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.ActiveModeDuration 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 ActiveModeDuration read Error", error); + LogNSError("OvenCavityOperationalState OperationalError read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -49554,25 +50599,25 @@ class ReadIcdManagementActiveModeDuration : public ReadAttribute { } }; -class SubscribeAttributeIcdManagementActiveModeDuration : public SubscribeAttribute { +class SubscribeAttributeOvenCavityOperationalStateOperationalError : public SubscribeAttribute { public: - SubscribeAttributeIcdManagementActiveModeDuration() - : SubscribeAttribute("active-mode-duration") + SubscribeAttributeOvenCavityOperationalStateOperationalError() + : SubscribeAttribute("operational-error") { } - ~SubscribeAttributeIcdManagementActiveModeDuration() + ~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::ActiveModeDuration::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(); @@ -49583,10 +50628,10 @@ class SubscribeAttributeIcdManagementActiveModeDuration : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActiveModeDurationWithParams:params + [cluster subscribeAttributeOperationalErrorWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.ActiveModeDuration 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 { @@ -49603,34 +50648,34 @@ class SubscribeAttributeIcdManagementActiveModeDuration : public SubscribeAttrib #if MTR_ENABLE_PROVISIONAL /* - * Attribute ActiveModeThreshold + * Attribute GeneratedCommandList */ -class ReadIcdManagementActiveModeThreshold : public ReadAttribute { +class ReadOvenCavityOperationalStateGeneratedCommandList : public ReadAttribute { public: - ReadIcdManagementActiveModeThreshold() - : ReadAttribute("active-mode-threshold") + ReadOvenCavityOperationalStateGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadIcdManagementActiveModeThreshold() + ~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::ActiveModeThreshold::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]; - [cluster readAttributeActiveModeThresholdWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.ActiveModeThreshold response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenCavityOperationalState.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ICDManagement ActiveModeThreshold read Error", error); + LogNSError("OvenCavityOperationalState GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -49639,25 +50684,25 @@ class ReadIcdManagementActiveModeThreshold : public ReadAttribute { } }; -class SubscribeAttributeIcdManagementActiveModeThreshold : public SubscribeAttribute { +class SubscribeAttributeOvenCavityOperationalStateGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeIcdManagementActiveModeThreshold() - : SubscribeAttribute("active-mode-threshold") + SubscribeAttributeOvenCavityOperationalStateGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeIcdManagementActiveModeThreshold() + ~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::ActiveModeThreshold::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(); @@ -49668,10 +50713,10 @@ class SubscribeAttributeIcdManagementActiveModeThreshold : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeActiveModeThresholdWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.ActiveModeThreshold response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenCavityOperationalState.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -49688,38 +50733,34 @@ class SubscribeAttributeIcdManagementActiveModeThreshold : public SubscribeAttri #if MTR_ENABLE_PROVISIONAL /* - * Attribute RegisteredClients + * Attribute AcceptedCommandList */ -class ReadIcdManagementRegisteredClients : public ReadAttribute { +class ReadOvenCavityOperationalStateAcceptedCommandList : public ReadAttribute { public: - ReadIcdManagementRegisteredClients() - : ReadAttribute("registered-clients") + ReadOvenCavityOperationalStateAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadIcdManagementRegisteredClients() + ~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::RegisteredClients::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 * 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 readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenCavityOperationalState.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ICDManagement RegisteredClients read Error", error); + LogNSError("OvenCavityOperationalState AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -49728,25 +50769,25 @@ class ReadIcdManagementRegisteredClients : public ReadAttribute { } }; -class SubscribeAttributeIcdManagementRegisteredClients : public SubscribeAttribute { +class SubscribeAttributeOvenCavityOperationalStateAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeIcdManagementRegisteredClients() - : SubscribeAttribute("registered-clients") + SubscribeAttributeOvenCavityOperationalStateAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeIcdManagementRegisteredClients() + ~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::RegisteredClients::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(); @@ -49757,10 +50798,10 @@ class SubscribeAttributeIcdManagementRegisteredClients : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRegisteredClientsWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.RegisteredClients response %@", [value description]); + NSLog(@"OvenCavityOperationalState.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -49777,34 +50818,34 @@ class SubscribeAttributeIcdManagementRegisteredClients : public SubscribeAttribu #if MTR_ENABLE_PROVISIONAL /* - * Attribute ICDCounter + * Attribute EventList */ -class ReadIcdManagementICDCounter : public ReadAttribute { +class ReadOvenCavityOperationalStateEventList : public ReadAttribute { public: - ReadIcdManagementICDCounter() - : ReadAttribute("icdcounter") + ReadOvenCavityOperationalStateEventList() + : ReadAttribute("event-list") { } - ~ReadIcdManagementICDCounter() + ~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::ICDCounter::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]; - [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 readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenCavityOperationalState.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ICDManagement ICDCounter read Error", error); + LogNSError("OvenCavityOperationalState EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -49813,25 +50854,25 @@ class ReadIcdManagementICDCounter : public ReadAttribute { } }; -class SubscribeAttributeIcdManagementICDCounter : public SubscribeAttribute { +class SubscribeAttributeOvenCavityOperationalStateEventList : public SubscribeAttribute { public: - SubscribeAttributeIcdManagementICDCounter() - : SubscribeAttribute("icdcounter") + SubscribeAttributeOvenCavityOperationalStateEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeIcdManagementICDCounter() + ~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::ICDCounter::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(); @@ -49842,10 +50883,10 @@ class SubscribeAttributeIcdManagementICDCounter : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeICDCounterWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.ICDCounter response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenCavityOperationalState.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -49862,34 +50903,34 @@ class SubscribeAttributeIcdManagementICDCounter : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute ClientsSupportedPerFabric + * Attribute AttributeList */ -class ReadIcdManagementClientsSupportedPerFabric : public ReadAttribute { +class ReadOvenCavityOperationalStateAttributeList : public ReadAttribute { public: - ReadIcdManagementClientsSupportedPerFabric() - : ReadAttribute("clients-supported-per-fabric") + ReadOvenCavityOperationalStateAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadIcdManagementClientsSupportedPerFabric() + ~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::ClientsSupportedPerFabric::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]; - [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 readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenCavityOperationalState.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ICDManagement ClientsSupportedPerFabric read Error", error); + LogNSError("OvenCavityOperationalState AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -49898,25 +50939,25 @@ class ReadIcdManagementClientsSupportedPerFabric : public ReadAttribute { } }; -class SubscribeAttributeIcdManagementClientsSupportedPerFabric : public SubscribeAttribute { +class SubscribeAttributeOvenCavityOperationalStateAttributeList : public SubscribeAttribute { public: - SubscribeAttributeIcdManagementClientsSupportedPerFabric() - : SubscribeAttribute("clients-supported-per-fabric") + SubscribeAttributeOvenCavityOperationalStateAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeIcdManagementClientsSupportedPerFabric() + ~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::ClientsSupportedPerFabric::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(); @@ -49927,10 +50968,10 @@ class SubscribeAttributeIcdManagementClientsSupportedPerFabric : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClientsSupportedPerFabricWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.ClientsSupportedPerFabric response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenCavityOperationalState.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -49947,34 +50988,34 @@ class SubscribeAttributeIcdManagementClientsSupportedPerFabric : public Subscrib #if MTR_ENABLE_PROVISIONAL /* - * Attribute UserActiveModeTriggerHint + * Attribute FeatureMap */ -class ReadIcdManagementUserActiveModeTriggerHint : public ReadAttribute { +class ReadOvenCavityOperationalStateFeatureMap : public ReadAttribute { public: - ReadIcdManagementUserActiveModeTriggerHint() - : ReadAttribute("user-active-mode-trigger-hint") + ReadOvenCavityOperationalStateFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadIcdManagementUserActiveModeTriggerHint() + ~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::UserActiveModeTriggerHint::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]; - [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 readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenCavityOperationalState.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ICDManagement UserActiveModeTriggerHint read Error", error); + LogNSError("OvenCavityOperationalState FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -49983,25 +51024,25 @@ class ReadIcdManagementUserActiveModeTriggerHint : public ReadAttribute { } }; -class SubscribeAttributeIcdManagementUserActiveModeTriggerHint : public SubscribeAttribute { +class SubscribeAttributeOvenCavityOperationalStateFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeIcdManagementUserActiveModeTriggerHint() - : SubscribeAttribute("user-active-mode-trigger-hint") + SubscribeAttributeOvenCavityOperationalStateFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeIcdManagementUserActiveModeTriggerHint() + ~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::UserActiveModeTriggerHint::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(); @@ -50012,10 +51053,10 @@ class SubscribeAttributeIcdManagementUserActiveModeTriggerHint : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUserActiveModeTriggerHintWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.UserActiveModeTriggerHint response %@", [value description]); + NSLog(@"OvenCavityOperationalState.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -50032,34 +51073,34 @@ class SubscribeAttributeIcdManagementUserActiveModeTriggerHint : public Subscrib #if MTR_ENABLE_PROVISIONAL /* - * Attribute UserActiveModeTriggerInstruction + * Attribute ClusterRevision */ -class ReadIcdManagementUserActiveModeTriggerInstruction : public ReadAttribute { +class ReadOvenCavityOperationalStateClusterRevision : public ReadAttribute { public: - ReadIcdManagementUserActiveModeTriggerInstruction() - : ReadAttribute("user-active-mode-trigger-instruction") + ReadOvenCavityOperationalStateClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadIcdManagementUserActiveModeTriggerInstruction() + ~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::UserActiveModeTriggerInstruction::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]; - [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 readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenCavityOperationalState.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ICDManagement UserActiveModeTriggerInstruction read Error", error); + LogNSError("OvenCavityOperationalState ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -50068,25 +51109,25 @@ class ReadIcdManagementUserActiveModeTriggerInstruction : public ReadAttribute { } }; -class SubscribeAttributeIcdManagementUserActiveModeTriggerInstruction : public SubscribeAttribute { +class SubscribeAttributeOvenCavityOperationalStateClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeIcdManagementUserActiveModeTriggerInstruction() - : SubscribeAttribute("user-active-mode-trigger-instruction") + SubscribeAttributeOvenCavityOperationalStateClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeIcdManagementUserActiveModeTriggerInstruction() + ~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::UserActiveModeTriggerInstruction::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(); @@ -50097,10 +51138,10 @@ class SubscribeAttributeIcdManagementUserActiveModeTriggerInstruction : public S if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUserActiveModeTriggerInstructionWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams: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.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -50113,38 +51154,121 @@ class SubscribeAttributeIcdManagementUserActiveModeTriggerInstruction : public S } }; +#endif // MTR_ENABLE_PROVISIONAL #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| 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: | | +\*----------------------------------------------------------------------------*/ +#if MTR_ENABLE_PROVISIONAL /* - * Attribute OperatingMode + * Command ChangeToMode */ -class ReadIcdManagementOperatingMode : public ReadAttribute { +class OvenModeChangeToMode : public ClusterCommand { public: - ReadIcdManagementOperatingMode() - : ReadAttribute("operating-mode") + OvenModeChangeToMode() + : ClusterCommand("change-to-mode") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("NewMode", 0, UINT8_MAX, &mRequest.newMode); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } - ~ReadIcdManagementOperatingMode() + 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; + + 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]; + 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); + } + 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::OvenMode::Commands::ChangeToMode::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL + +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute SupportedModes + */ +class ReadOvenModeSupportedModes : public ReadAttribute { +public: + ReadOvenModeSupportedModes() + : ReadAttribute("supported-modes") + { + } + + ~ReadOvenModeSupportedModes() { } 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::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 = [[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 = [[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("ICDManagement OperatingMode read Error", error); + LogNSError("OvenMode SupportedModes read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -50153,25 +51277,25 @@ class ReadIcdManagementOperatingMode : public ReadAttribute { } }; -class SubscribeAttributeIcdManagementOperatingMode : public SubscribeAttribute { +class SubscribeAttributeOvenModeSupportedModes : public SubscribeAttribute { public: - SubscribeAttributeIcdManagementOperatingMode() - : SubscribeAttribute("operating-mode") + SubscribeAttributeOvenModeSupportedModes() + : SubscribeAttribute("supported-modes") { } - ~SubscribeAttributeIcdManagementOperatingMode() + ~SubscribeAttributeOvenModeSupportedModes() { } 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::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 = [[MTRBaseClusterICDManagement 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(); @@ -50182,10 +51306,10 @@ class SubscribeAttributeIcdManagementOperatingMode : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOperatingModeWithParams:params + [cluster subscribeAttributeSupportedModesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.OperatingMode 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 { @@ -50202,34 +51326,34 @@ class SubscribeAttributeIcdManagementOperatingMode : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute GeneratedCommandList + * Attribute CurrentMode */ -class ReadIcdManagementGeneratedCommandList : public ReadAttribute { +class ReadOvenModeCurrentMode : public ReadAttribute { public: - ReadIcdManagementGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadOvenModeCurrentMode() + : ReadAttribute("current-mode") { } - ~ReadIcdManagementGeneratedCommandList() + ~ReadOvenModeCurrentMode() { } 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::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 = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.GeneratedCommandList 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("ICDManagement GeneratedCommandList read Error", error); + LogNSError("OvenMode CurrentMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -50238,25 +51362,25 @@ class ReadIcdManagementGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeIcdManagementGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeOvenModeCurrentMode : public SubscribeAttribute { public: - SubscribeAttributeIcdManagementGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeOvenModeCurrentMode() + : SubscribeAttribute("current-mode") { } - ~SubscribeAttributeIcdManagementGeneratedCommandList() + ~SubscribeAttributeOvenModeCurrentMode() { } 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::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 = [[MTRBaseClusterICDManagement 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(); @@ -50267,10 +51391,10 @@ class SubscribeAttributeIcdManagementGeneratedCommandList : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeCurrentModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OvenMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -50287,34 +51411,34 @@ class SubscribeAttributeIcdManagementGeneratedCommandList : public SubscribeAttr #if MTR_ENABLE_PROVISIONAL /* - * Attribute AcceptedCommandList + * Attribute StartUpMode */ -class ReadIcdManagementAcceptedCommandList : public ReadAttribute { +class ReadOvenModeStartUpMode : public ReadAttribute { public: - ReadIcdManagementAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadOvenModeStartUpMode() + : ReadAttribute("start-up-mode") { } - ~ReadIcdManagementAcceptedCommandList() + ~ReadOvenModeStartUpMode() { } 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::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 = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.AcceptedCommandList 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("ICDManagement AcceptedCommandList read Error", error); + LogNSError("OvenMode StartUpMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -50323,25 +51447,69 @@ class ReadIcdManagementAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeIcdManagementAcceptedCommandList : public SubscribeAttribute { +class WriteOvenModeStartUpMode : public WriteAttribute { public: - SubscribeAttributeIcdManagementAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + WriteOvenModeStartUpMode() + : WriteAttribute("start-up-mode") { + AddArgument("attr-name", "start-up-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeIcdManagementAcceptedCommandList() + ~WriteOvenModeStartUpMode() { } 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::OvenMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::OvenMode::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 * 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("OvenMode StartUpMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::Nullable mValue; +}; + +class SubscribeAttributeOvenModeStartUpMode : public SubscribeAttribute { +public: + SubscribeAttributeOvenModeStartUpMode() + : SubscribeAttribute("start-up-mode") + { + } + + ~SubscribeAttributeOvenModeStartUpMode() + { + } + + 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; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%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 = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -50352,10 +51520,10 @@ class SubscribeAttributeIcdManagementAcceptedCommandList : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeStartUpModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.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 { @@ -50372,34 +51540,34 @@ class SubscribeAttributeIcdManagementAcceptedCommandList : public SubscribeAttri #if MTR_ENABLE_PROVISIONAL /* - * Attribute EventList + * Attribute OnMode */ -class ReadIcdManagementEventList : public ReadAttribute { +class ReadOvenModeOnMode : public ReadAttribute { public: - ReadIcdManagementEventList() - : ReadAttribute("event-list") + ReadOvenModeOnMode() + : ReadAttribute("on-mode") { } - ~ReadIcdManagementEventList() + ~ReadOvenModeOnMode() { } 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::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 = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.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("ICDManagement EventList read Error", error); + LogNSError("OvenMode OnMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -50408,25 +51576,69 @@ class ReadIcdManagementEventList : public ReadAttribute { } }; -class SubscribeAttributeIcdManagementEventList : public SubscribeAttribute { +class WriteOvenModeOnMode : public WriteAttribute { public: - SubscribeAttributeIcdManagementEventList() - : SubscribeAttribute("event-list") + WriteOvenModeOnMode() + : WriteAttribute("on-mode") { + AddArgument("attr-name", "on-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeIcdManagementEventList() + ~WriteOvenModeOnMode() { } 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::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 = [[MTRBaseClusterICDManagement 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(); @@ -50437,10 +51649,10 @@ class SubscribeAttributeIcdManagementEventList : 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(@"ICDManagement.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 { @@ -50457,34 +51669,34 @@ class SubscribeAttributeIcdManagementEventList : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute AttributeList + * Attribute GeneratedCommandList */ -class ReadIcdManagementAttributeList : public ReadAttribute { +class ReadOvenModeGeneratedCommandList : public ReadAttribute { public: - ReadIcdManagementAttributeList() - : ReadAttribute("attribute-list") + ReadOvenModeGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadIcdManagementAttributeList() + ~ReadOvenModeGeneratedCommandList() { } 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::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 = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.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("ICDManagement AttributeList read Error", error); + LogNSError("OvenMode GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -50493,25 +51705,25 @@ class ReadIcdManagementAttributeList : public ReadAttribute { } }; -class SubscribeAttributeIcdManagementAttributeList : public SubscribeAttribute { +class SubscribeAttributeOvenModeGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeIcdManagementAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeOvenModeGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeIcdManagementAttributeList() + ~SubscribeAttributeOvenModeGeneratedCommandList() { } 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::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 = [[MTRBaseClusterICDManagement 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(); @@ -50522,10 +51734,10 @@ class SubscribeAttributeIcdManagementAttributeList : 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(@"ICDManagement.AttributeList response %@", [value description]); + NSLog(@"OvenMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -50542,34 +51754,34 @@ class SubscribeAttributeIcdManagementAttributeList : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute FeatureMap + * Attribute AcceptedCommandList */ -class ReadIcdManagementFeatureMap : public ReadAttribute { +class ReadOvenModeAcceptedCommandList : public ReadAttribute { public: - ReadIcdManagementFeatureMap() - : ReadAttribute("feature-map") + ReadOvenModeAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadIcdManagementFeatureMap() + ~ReadOvenModeAcceptedCommandList() { } 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::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 = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.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("ICDManagement FeatureMap read Error", error); + LogNSError("OvenMode AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -50578,25 +51790,25 @@ class ReadIcdManagementFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeIcdManagementFeatureMap : public SubscribeAttribute { +class SubscribeAttributeOvenModeAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeIcdManagementFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeOvenModeAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeIcdManagementFeatureMap() + ~SubscribeAttributeOvenModeAcceptedCommandList() { } 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::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 = [[MTRBaseClusterICDManagement 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(); @@ -50607,10 +51819,10 @@ class SubscribeAttributeIcdManagementFeatureMap : 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(@"ICDManagement.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 { @@ -50627,34 +51839,34 @@ class SubscribeAttributeIcdManagementFeatureMap : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute ClusterRevision + * Attribute EventList */ -class ReadIcdManagementClusterRevision : public ReadAttribute { +class ReadOvenModeEventList : public ReadAttribute { public: - ReadIcdManagementClusterRevision() - : ReadAttribute("cluster-revision") + ReadOvenModeEventList() + : ReadAttribute("event-list") { } - ~ReadIcdManagementClusterRevision() + ~ReadOvenModeEventList() { } 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::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 = [[MTRBaseClusterICDManagement alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ICDManagement.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("ICDManagement ClusterRevision read Error", error); + LogNSError("OvenMode EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -50663,25 +51875,25 @@ class ReadIcdManagementClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeIcdManagementClusterRevision : public SubscribeAttribute { +class SubscribeAttributeOvenModeEventList : public SubscribeAttribute { public: - SubscribeAttributeIcdManagementClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeOvenModeEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeIcdManagementClusterRevision() + ~SubscribeAttributeOvenModeEventList() { } 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::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 = [[MTRBaseClusterICDManagement 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(); @@ -50692,10 +51904,10 @@ class SubscribeAttributeIcdManagementClusterRevision : 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(@"ICDManagement.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 { @@ -50708,269 +51920,208 @@ class SubscribeAttributeIcdManagementClusterRevision : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| 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: | | -\*----------------------------------------------------------------------------*/ -#if MTR_ENABLE_PROVISIONAL /* - * Command SetTimer + * Attribute AttributeList */ -class TimerSetTimer : public ClusterCommand { +class ReadOvenModeAttributeList : public ReadAttribute { public: - TimerSetTimer() - : ClusterCommand("set-timer") + ReadOvenModeAttributeList() + : ReadAttribute("attribute-list") + { + } + + ~ReadOvenModeAttributeList() { -#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; + 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 ") 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 = [[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); - } - }]; - } + __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("OvenMode AttributeList read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; 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 { +class SubscribeAttributeOvenModeAttributeList : public SubscribeAttribute { public: - TimerResetTimer() - : ClusterCommand("reset-timer") + SubscribeAttributeOvenModeAttributeList() + : SubscribeAttribute("attribute-list") { - ClusterCommand::AddArguments(); } - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + ~SubscribeAttributeOvenModeAttributeList() { - 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); + 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; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%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 = [[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); - } - }]; + __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(); + } + 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(@"OvenMode.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 + /* - * Command AddTime + * Attribute FeatureMap */ -class TimerAddTime : public ClusterCommand { +class ReadOvenModeFeatureMap : public ReadAttribute { public: - TimerAddTime() - : ClusterCommand("add-time") + ReadOvenModeFeatureMap() + : ReadAttribute("feature-map") + { + } + + ~ReadOvenModeFeatureMap() { -#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; + 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 ") 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 = [[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); - } - }]; - } + __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("OvenMode FeatureMap read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; 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 { +class SubscribeAttributeOvenModeFeatureMap : public SubscribeAttribute { public: - TimerReduceTime() - : ClusterCommand("reduce-time") + SubscribeAttributeOvenModeFeatureMap() + : SubscribeAttribute("feature-map") { -#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 + ~SubscribeAttributeOvenModeFeatureMap() { - 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); + 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; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%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 = [[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); - } - }]; + __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(); + } + 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(@"OvenMode.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; } - -private: - chip::app::Clusters::Timer::Commands::ReduceTime::Type mRequest; }; #endif // MTR_ENABLE_PROVISIONAL - #if MTR_ENABLE_PROVISIONAL /* - * Attribute SetTime + * Attribute ClusterRevision */ -class ReadTimerSetTime : public ReadAttribute { +class ReadOvenModeClusterRevision : public ReadAttribute { public: - ReadTimerSetTime() - : ReadAttribute("set-time") + ReadOvenModeClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadTimerSetTime() + ~ReadOvenModeClusterRevision() { } 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; + 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 = [[MTRBaseClusterTimer alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSetTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Timer.SetTime 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("Timer SetTime read Error", error); + LogNSError("OvenMode ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -50979,25 +52130,25 @@ class ReadTimerSetTime : public ReadAttribute { } }; -class SubscribeAttributeTimerSetTime : public SubscribeAttribute { +class SubscribeAttributeOvenModeClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeTimerSetTime() - : SubscribeAttribute("set-time") + SubscribeAttributeOvenModeClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeTimerSetTime() + ~SubscribeAttributeOvenModeClusterRevision() { } 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; + 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 = [[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(); @@ -51008,10 +52159,10 @@ class SubscribeAttributeTimerSetTime : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSetTimeWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Timer.SetTime response %@", [value description]); + NSLog(@"OvenMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -51025,37 +52176,57 @@ class SubscribeAttributeTimerSetTime : public SubscribeAttribute { }; #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 TimeRemaining + * Attribute SupportedDrynessLevels */ -class ReadTimerTimeRemaining : public ReadAttribute { +class ReadLaundryDryerControlsSupportedDrynessLevels : public ReadAttribute { public: - ReadTimerTimeRemaining() - : ReadAttribute("time-remaining") + ReadLaundryDryerControlsSupportedDrynessLevels() + : ReadAttribute("supported-dryness-levels") { } - ~ReadTimerTimeRemaining() + ~ReadLaundryDryerControlsSupportedDrynessLevels() { } 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::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 = [[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 = [[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("Timer TimeRemaining read Error", error); + LogNSError("LaundryDryerControls SupportedDrynessLevels read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -51064,25 +52235,25 @@ class ReadTimerTimeRemaining : public ReadAttribute { } }; -class SubscribeAttributeTimerTimeRemaining : public SubscribeAttribute { +class SubscribeAttributeLaundryDryerControlsSupportedDrynessLevels : public SubscribeAttribute { public: - SubscribeAttributeTimerTimeRemaining() - : SubscribeAttribute("time-remaining") + SubscribeAttributeLaundryDryerControlsSupportedDrynessLevels() + : SubscribeAttribute("supported-dryness-levels") { } - ~SubscribeAttributeTimerTimeRemaining() + ~SubscribeAttributeLaundryDryerControlsSupportedDrynessLevels() { } 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::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 = [[MTRBaseClusterTimer 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(); @@ -51093,10 +52264,10 @@ class SubscribeAttributeTimerTimeRemaining : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTimeRemainingWithParams:params + [cluster subscribeAttributeSupportedDrynessLevelsWithParams: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(@"LaundryDryerControls.SupportedDrynessLevels response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -51113,34 +52284,34 @@ class SubscribeAttributeTimerTimeRemaining : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute TimerState + * Attribute SelectedDrynessLevel */ -class ReadTimerTimerState : public ReadAttribute { +class ReadLaundryDryerControlsSelectedDrynessLevel : public ReadAttribute { public: - ReadTimerTimerState() - : ReadAttribute("timer-state") + ReadLaundryDryerControlsSelectedDrynessLevel() + : ReadAttribute("selected-dryness-level") { } - ~ReadTimerTimerState() + ~ReadLaundryDryerControlsSelectedDrynessLevel() { } 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::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 = [[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 = [[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("Timer TimerState read Error", error); + LogNSError("LaundryDryerControls SelectedDrynessLevel read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -51149,25 +52320,69 @@ class ReadTimerTimerState : public ReadAttribute { } }; -class SubscribeAttributeTimerTimerState : public SubscribeAttribute { +class WriteLaundryDryerControlsSelectedDrynessLevel : public WriteAttribute { public: - SubscribeAttributeTimerTimerState() - : SubscribeAttribute("timer-state") + WriteLaundryDryerControlsSelectedDrynessLevel() + : WriteAttribute("selected-dryness-level") { + AddArgument("attr-name", "selected-dryness-level"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeTimerTimerState() + ~WriteLaundryDryerControlsSelectedDrynessLevel() { } 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::LaundryDryerControls::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::LaundryDryerControls::Attributes::SelectedDrynessLevel::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 * 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 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 SubscribeAttributeLaundryDryerControlsSelectedDrynessLevel : public SubscribeAttribute { +public: + SubscribeAttributeLaundryDryerControlsSelectedDrynessLevel() + : SubscribeAttribute("selected-dryness-level") + { + } + + ~SubscribeAttributeLaundryDryerControlsSelectedDrynessLevel() + { + } + + 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; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%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 = [[MTRBaseClusterLaundryDryerControls 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 +52393,10 @@ class SubscribeAttributeTimerTimerState : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTimerStateWithParams:params + [cluster subscribeAttributeSelectedDrynessLevelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Timer.TimerState response %@", [value description]); + NSLog(@"LaundryDryerControls.SelectedDrynessLevel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -51200,32 +52415,32 @@ class SubscribeAttributeTimerTimerState : public SubscribeAttribute { /* * Attribute GeneratedCommandList */ -class ReadTimerGeneratedCommandList : public ReadAttribute { +class ReadLaundryDryerControlsGeneratedCommandList : public ReadAttribute { public: - ReadTimerGeneratedCommandList() + ReadLaundryDryerControlsGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadTimerGeneratedCommandList() + ~ReadLaundryDryerControlsGeneratedCommandList() { } 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::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 = [[MTRBaseClusterTimer 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(@"Timer.GeneratedCommandList response %@", [value description]); + NSLog(@"LaundryDryerControls.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Timer GeneratedCommandList read Error", error); + LogNSError("LaundryDryerControls GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -51234,25 +52449,25 @@ class ReadTimerGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeTimerGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeLaundryDryerControlsGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeTimerGeneratedCommandList() + SubscribeAttributeLaundryDryerControlsGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeTimerGeneratedCommandList() + ~SubscribeAttributeLaundryDryerControlsGeneratedCommandList() { } 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::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 = [[MTRBaseClusterTimer 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(); @@ -51266,7 +52481,7 @@ class SubscribeAttributeTimerGeneratedCommandList : public SubscribeAttribute { [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Timer.GeneratedCommandList response %@", [value description]); + NSLog(@"LaundryDryerControls.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -51285,32 +52500,32 @@ class SubscribeAttributeTimerGeneratedCommandList : public SubscribeAttribute { /* * Attribute AcceptedCommandList */ -class ReadTimerAcceptedCommandList : public ReadAttribute { +class ReadLaundryDryerControlsAcceptedCommandList : public ReadAttribute { public: - ReadTimerAcceptedCommandList() + ReadLaundryDryerControlsAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadTimerAcceptedCommandList() + ~ReadLaundryDryerControlsAcceptedCommandList() { } 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; + 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 = [[MTRBaseClusterTimer 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(@"Timer.AcceptedCommandList response %@", [value description]); + NSLog(@"LaundryDryerControls.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Timer AcceptedCommandList read Error", error); + LogNSError("LaundryDryerControls AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -51319,25 +52534,25 @@ class ReadTimerAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeTimerAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeLaundryDryerControlsAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeTimerAcceptedCommandList() + SubscribeAttributeLaundryDryerControlsAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeTimerAcceptedCommandList() + ~SubscribeAttributeLaundryDryerControlsAcceptedCommandList() { } 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::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 = [[MTRBaseClusterTimer 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(); @@ -51351,7 +52566,7 @@ class SubscribeAttributeTimerAcceptedCommandList : public SubscribeAttribute { [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Timer.AcceptedCommandList response %@", [value description]); + NSLog(@"LaundryDryerControls.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -51370,32 +52585,32 @@ class SubscribeAttributeTimerAcceptedCommandList : public SubscribeAttribute { /* * Attribute EventList */ -class ReadTimerEventList : public ReadAttribute { +class ReadLaundryDryerControlsEventList : public ReadAttribute { public: - ReadTimerEventList() + ReadLaundryDryerControlsEventList() : ReadAttribute("event-list") { } - ~ReadTimerEventList() + ~ReadLaundryDryerControlsEventList() { } 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::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 = [[MTRBaseClusterTimer 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(@"Timer.EventList response %@", [value description]); + NSLog(@"LaundryDryerControls.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Timer EventList read Error", error); + LogNSError("LaundryDryerControls EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -51404,25 +52619,25 @@ class ReadTimerEventList : public ReadAttribute { } }; -class SubscribeAttributeTimerEventList : public SubscribeAttribute { +class SubscribeAttributeLaundryDryerControlsEventList : public SubscribeAttribute { public: - SubscribeAttributeTimerEventList() + SubscribeAttributeLaundryDryerControlsEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeTimerEventList() + ~SubscribeAttributeLaundryDryerControlsEventList() { } 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::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 = [[MTRBaseClusterTimer 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(); @@ -51436,7 +52651,7 @@ class SubscribeAttributeTimerEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Timer.EventList response %@", [value description]); + NSLog(@"LaundryDryerControls.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -51455,32 +52670,32 @@ class SubscribeAttributeTimerEventList : public SubscribeAttribute { /* * Attribute AttributeList */ -class ReadTimerAttributeList : public ReadAttribute { +class ReadLaundryDryerControlsAttributeList : public ReadAttribute { public: - ReadTimerAttributeList() + ReadLaundryDryerControlsAttributeList() : ReadAttribute("attribute-list") { } - ~ReadTimerAttributeList() + ~ReadLaundryDryerControlsAttributeList() { } 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::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 = [[MTRBaseClusterTimer 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(@"Timer.AttributeList response %@", [value description]); + NSLog(@"LaundryDryerControls.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Timer AttributeList read Error", error); + LogNSError("LaundryDryerControls AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -51489,25 +52704,25 @@ class ReadTimerAttributeList : public ReadAttribute { } }; -class SubscribeAttributeTimerAttributeList : public SubscribeAttribute { +class SubscribeAttributeLaundryDryerControlsAttributeList : public SubscribeAttribute { public: - SubscribeAttributeTimerAttributeList() + SubscribeAttributeLaundryDryerControlsAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeTimerAttributeList() + ~SubscribeAttributeLaundryDryerControlsAttributeList() { } 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::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 = [[MTRBaseClusterTimer 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(); @@ -51521,7 +52736,7 @@ class SubscribeAttributeTimerAttributeList : public SubscribeAttribute { [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"Timer.AttributeList response %@", [value description]); + NSLog(@"LaundryDryerControls.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -51540,32 +52755,32 @@ class SubscribeAttributeTimerAttributeList : public SubscribeAttribute { /* * Attribute FeatureMap */ -class ReadTimerFeatureMap : public ReadAttribute { +class ReadLaundryDryerControlsFeatureMap : public ReadAttribute { public: - ReadTimerFeatureMap() + ReadLaundryDryerControlsFeatureMap() : ReadAttribute("feature-map") { } - ~ReadTimerFeatureMap() + ~ReadLaundryDryerControlsFeatureMap() { } 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::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 = [[MTRBaseClusterTimer 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(@"Timer.FeatureMap response %@", [value description]); + NSLog(@"LaundryDryerControls.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Timer FeatureMap read Error", error); + LogNSError("LaundryDryerControls FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -51574,25 +52789,25 @@ class ReadTimerFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeTimerFeatureMap : public SubscribeAttribute { +class SubscribeAttributeLaundryDryerControlsFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeTimerFeatureMap() + SubscribeAttributeLaundryDryerControlsFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeTimerFeatureMap() + ~SubscribeAttributeLaundryDryerControlsFeatureMap() { } 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::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 = [[MTRBaseClusterTimer 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(); @@ -51606,7 +52821,7 @@ class SubscribeAttributeTimerFeatureMap : public SubscribeAttribute { [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Timer.FeatureMap response %@", [value description]); + NSLog(@"LaundryDryerControls.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -51625,32 +52840,32 @@ class SubscribeAttributeTimerFeatureMap : public SubscribeAttribute { /* * Attribute ClusterRevision */ -class ReadTimerClusterRevision : public ReadAttribute { +class ReadLaundryDryerControlsClusterRevision : public ReadAttribute { public: - ReadTimerClusterRevision() + ReadLaundryDryerControlsClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadTimerClusterRevision() + ~ReadLaundryDryerControlsClusterRevision() { } 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::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 = [[MTRBaseClusterTimer 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(@"Timer.ClusterRevision response %@", [value description]); + NSLog(@"LaundryDryerControls.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Timer ClusterRevision read Error", error); + LogNSError("LaundryDryerControls ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -51659,25 +52874,25 @@ class ReadTimerClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeTimerClusterRevision : public SubscribeAttribute { +class SubscribeAttributeLaundryDryerControlsClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeTimerClusterRevision() + SubscribeAttributeLaundryDryerControlsClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeTimerClusterRevision() + ~SubscribeAttributeLaundryDryerControlsClusterRevision() { } 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::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 = [[MTRBaseClusterTimer 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(); @@ -51691,7 +52906,7 @@ class SubscribeAttributeTimerClusterRevision : public SubscribeAttribute { [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Timer.ClusterRevision response %@", [value description]); + NSLog(@"LaundryDryerControls.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -51706,23 +52921,19 @@ class SubscribeAttributeTimerClusterRevision : public SubscribeAttribute { #endif // MTR_ENABLE_PROVISIONAL #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster OvenCavityOperationalState | 0x0048 | +| Cluster ModeSelect | 0x0050 | |------------------------------------------------------------------------------| | Commands: | | -| * Pause | 0x00 | -| * Stop | 0x01 | -| * Start | 0x02 | -| * Resume | 0x03 | +| * ChangeToMode | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * PhaseList | 0x0000 | -| * CurrentPhase | 0x0001 | -| * CountdownTime | 0x0002 | -| * OperationalStateList | 0x0003 | -| * OperationalState | 0x0004 | -| * OperationalError | 0x0005 | +| * Description | 0x0000 | +| * StandardNamespace | 0x0001 | +| * SupportedModes | 0x0002 | +| * CurrentMode | 0x0003 | +| * StartUpMode | 0x0004 | +| * OnMode | 0x0005 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -51731,250 +52942,84 @@ class SubscribeAttributeTimerClusterRevision : public SubscribeAttribute { | * 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 + * Command ChangeToMode */ -class OvenCavityOperationalStateResume : public ClusterCommand { +class ModeSelectChangeToMode : public ClusterCommand { public: - OvenCavityOperationalStateResume() - : ClusterCommand("resume") + ModeSelectChangeToMode() + : 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::OvenCavityOperationalState::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::OvenCavityOperationalState::Commands::Resume::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 = [[MTRBaseClusterOvenCavityOperationalState alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROvenCavityOperationalStateClusterResumeParams 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; + params.newMode = [NSNumber numberWithUnsignedChar:mRequest.newMode]; 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 changeToModeWithParams: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::ModeSelect::Commands::ChangeToMode::Type mRequest; }; -#endif // MTR_ENABLE_PROVISIONAL - -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute PhaseList + * Attribute Description */ -class ReadOvenCavityOperationalStatePhaseList : public ReadAttribute { +class ReadModeSelectDescription : public ReadAttribute { public: - ReadOvenCavityOperationalStatePhaseList() - : ReadAttribute("phase-list") + ReadModeSelectDescription() + : ReadAttribute("description") { } - ~ReadOvenCavityOperationalStatePhaseList() + ~ReadModeSelectDescription() { } 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::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 = [[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 = [[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("OvenCavityOperationalState PhaseList read Error", error); + LogNSError("ModeSelect Description read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -51983,25 +53028,25 @@ class ReadOvenCavityOperationalStatePhaseList : public ReadAttribute { } }; -class SubscribeAttributeOvenCavityOperationalStatePhaseList : public SubscribeAttribute { +class SubscribeAttributeModeSelectDescription : public SubscribeAttribute { public: - SubscribeAttributeOvenCavityOperationalStatePhaseList() - : SubscribeAttribute("phase-list") + SubscribeAttributeModeSelectDescription() + : SubscribeAttribute("description") { } - ~SubscribeAttributeOvenCavityOperationalStatePhaseList() + ~SubscribeAttributeModeSelectDescription() { } 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::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 = [[MTRBaseClusterOvenCavityOperationalState 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(); @@ -52012,10 +53057,10 @@ class SubscribeAttributeOvenCavityOperationalStatePhaseList : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePhaseListWithParams:params + [cluster subscribeAttributeDescriptionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.PhaseList response %@", [value description]); + reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { + NSLog(@"ModeSelect.Description response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -52028,38 +53073,35 @@ class SubscribeAttributeOvenCavityOperationalStatePhaseList : public SubscribeAt } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute CurrentPhase + * Attribute StandardNamespace */ -class ReadOvenCavityOperationalStateCurrentPhase : public ReadAttribute { +class ReadModeSelectStandardNamespace : public ReadAttribute { public: - ReadOvenCavityOperationalStateCurrentPhase() - : ReadAttribute("current-phase") + ReadModeSelectStandardNamespace() + : ReadAttribute("standard-namespace") { } - ~ReadOvenCavityOperationalStateCurrentPhase() + ~ReadModeSelectStandardNamespace() { } 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::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 = [[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 = [[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("OvenCavityOperationalState CurrentPhase read Error", error); + LogNSError("ModeSelect StandardNamespace read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -52068,25 +53110,25 @@ class ReadOvenCavityOperationalStateCurrentPhase : public ReadAttribute { } }; -class SubscribeAttributeOvenCavityOperationalStateCurrentPhase : public SubscribeAttribute { +class SubscribeAttributeModeSelectStandardNamespace : public SubscribeAttribute { public: - SubscribeAttributeOvenCavityOperationalStateCurrentPhase() - : SubscribeAttribute("current-phase") + SubscribeAttributeModeSelectStandardNamespace() + : SubscribeAttribute("standard-namespace") { } - ~SubscribeAttributeOvenCavityOperationalStateCurrentPhase() + ~SubscribeAttributeModeSelectStandardNamespace() { } 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::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 = [[MTRBaseClusterOvenCavityOperationalState 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(); @@ -52097,10 +53139,10 @@ class SubscribeAttributeOvenCavityOperationalStateCurrentPhase : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentPhaseWithParams:params + [cluster subscribeAttributeStandardNamespaceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.CurrentPhase response %@", [value description]); + NSLog(@"ModeSelect.StandardNamespace response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -52113,38 +53155,35 @@ class SubscribeAttributeOvenCavityOperationalStateCurrentPhase : public Subscrib } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute CountdownTime + * Attribute SupportedModes */ -class ReadOvenCavityOperationalStateCountdownTime : public ReadAttribute { +class ReadModeSelectSupportedModes : public ReadAttribute { public: - ReadOvenCavityOperationalStateCountdownTime() - : ReadAttribute("countdown-time") + ReadModeSelectSupportedModes() + : ReadAttribute("supported-modes") { } - ~ReadOvenCavityOperationalStateCountdownTime() + ~ReadModeSelectSupportedModes() { } 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::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 = [[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 = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ModeSelect.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenCavityOperationalState CountdownTime read Error", error); + LogNSError("ModeSelect SupportedModes read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -52153,25 +53192,25 @@ class ReadOvenCavityOperationalStateCountdownTime : public ReadAttribute { } }; -class SubscribeAttributeOvenCavityOperationalStateCountdownTime : public SubscribeAttribute { +class SubscribeAttributeModeSelectSupportedModes : public SubscribeAttribute { public: - SubscribeAttributeOvenCavityOperationalStateCountdownTime() - : SubscribeAttribute("countdown-time") + SubscribeAttributeModeSelectSupportedModes() + : SubscribeAttribute("supported-modes") { } - ~SubscribeAttributeOvenCavityOperationalStateCountdownTime() + ~SubscribeAttributeModeSelectSupportedModes() { } 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::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 = [[MTRBaseClusterOvenCavityOperationalState 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(); @@ -52182,10 +53221,10 @@ class SubscribeAttributeOvenCavityOperationalStateCountdownTime : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCountdownTimeWithParams:params + [cluster subscribeAttributeSupportedModesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.CountdownTime response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"ModeSelect.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -52198,38 +53237,35 @@ class SubscribeAttributeOvenCavityOperationalStateCountdownTime : public Subscri } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute OperationalStateList + * Attribute CurrentMode */ -class ReadOvenCavityOperationalStateOperationalStateList : public ReadAttribute { +class ReadModeSelectCurrentMode : public ReadAttribute { public: - ReadOvenCavityOperationalStateOperationalStateList() - : ReadAttribute("operational-state-list") + ReadModeSelectCurrentMode() + : ReadAttribute("current-mode") { } - ~ReadOvenCavityOperationalStateOperationalStateList() + ~ReadModeSelectCurrentMode() { } 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::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 = [[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 = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ModeSelect.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenCavityOperationalState OperationalStateList read Error", error); + LogNSError("ModeSelect CurrentMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -52238,25 +53274,25 @@ class ReadOvenCavityOperationalStateOperationalStateList : public ReadAttribute } }; -class SubscribeAttributeOvenCavityOperationalStateOperationalStateList : public SubscribeAttribute { +class SubscribeAttributeModeSelectCurrentMode : public SubscribeAttribute { public: - SubscribeAttributeOvenCavityOperationalStateOperationalStateList() - : SubscribeAttribute("operational-state-list") + SubscribeAttributeModeSelectCurrentMode() + : SubscribeAttribute("current-mode") { } - ~SubscribeAttributeOvenCavityOperationalStateOperationalStateList() + ~SubscribeAttributeModeSelectCurrentMode() { } 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::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 = [[MTRBaseClusterOvenCavityOperationalState 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(); @@ -52267,10 +53303,10 @@ class SubscribeAttributeOvenCavityOperationalStateOperationalStateList : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOperationalStateListWithParams:params + [cluster subscribeAttributeCurrentModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.OperationalStateList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ModeSelect.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -52283,38 +53319,35 @@ class SubscribeAttributeOvenCavityOperationalStateOperationalStateList : public } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute OperationalState + * Attribute StartUpMode */ -class ReadOvenCavityOperationalStateOperationalState : public ReadAttribute { +class ReadModeSelectStartUpMode : public ReadAttribute { public: - ReadOvenCavityOperationalStateOperationalState() - : ReadAttribute("operational-state") + ReadModeSelectStartUpMode() + : ReadAttribute("start-up-mode") { } - ~ReadOvenCavityOperationalStateOperationalState() + ~ReadModeSelectStartUpMode() { } 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::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 = [[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 = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ModeSelect.StartUpMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenCavityOperationalState OperationalState read Error", error); + LogNSError("ModeSelect StartUpMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -52323,25 +53356,69 @@ class ReadOvenCavityOperationalStateOperationalState : public ReadAttribute { } }; -class SubscribeAttributeOvenCavityOperationalStateOperationalState : public SubscribeAttribute { +class WriteModeSelectStartUpMode : public WriteAttribute { public: - SubscribeAttributeOvenCavityOperationalStateOperationalState() - : SubscribeAttribute("operational-state") + WriteModeSelectStartUpMode() + : WriteAttribute("start-up-mode") { + AddArgument("attr-name", "start-up-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeOvenCavityOperationalStateOperationalState() + ~WriteModeSelectStartUpMode() { } 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::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 = [[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; + 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("ModeSelect StartUpMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::Nullable mValue; +}; + +class SubscribeAttributeModeSelectStartUpMode : public SubscribeAttribute { +public: + SubscribeAttributeModeSelectStartUpMode() + : SubscribeAttribute("start-up-mode") + { + } + + ~SubscribeAttributeModeSelectStartUpMode() + { + } + + 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; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%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 = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -52352,10 +53429,10 @@ class SubscribeAttributeOvenCavityOperationalStateOperationalState : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOperationalStateWithParams:params + [cluster subscribeAttributeStartUpModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.OperationalState response %@", [value description]); + NSLog(@"ModeSelect.StartUpMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -52368,65 +53445,106 @@ class SubscribeAttributeOvenCavityOperationalStateOperationalState : public Subs } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute OperationalError + * Attribute OnMode */ -class ReadOvenCavityOperationalStateOperationalError : public ReadAttribute { +class ReadModeSelectOnMode : public ReadAttribute { public: - ReadOvenCavityOperationalStateOperationalError() - : ReadAttribute("operational-error") + ReadModeSelectOnMode() + : ReadAttribute("on-mode") { } - ~ReadOvenCavityOperationalStateOperationalError() + ~ReadModeSelectOnMode() { } 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; + 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 = [[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); + __auto_type * cluster = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"ModeSelect.OnMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("ModeSelect OnMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteModeSelectOnMode : public WriteAttribute { +public: + WriteModeSelectOnMode() + : WriteAttribute("on-mode") + { + AddArgument("attr-name", "on-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteModeSelectOnMode() + { + } + + 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; + + 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 * 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("ModeSelect OnMode 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 SubscribeAttributeModeSelectOnMode : public SubscribeAttribute { public: - SubscribeAttributeOvenCavityOperationalStateOperationalError() - : SubscribeAttribute("operational-error") + SubscribeAttributeModeSelectOnMode() + : SubscribeAttribute("on-mode") { } - ~SubscribeAttributeOvenCavityOperationalStateOperationalError() + ~SubscribeAttributeModeSelectOnMode() { } 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::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 = [[MTRBaseClusterOvenCavityOperationalState 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(); @@ -52437,10 +53555,10 @@ class SubscribeAttributeOvenCavityOperationalStateOperationalError : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOperationalErrorWithParams:params + [cluster subscribeAttributeOnModeWithParams: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(@"ModeSelect.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -52453,38 +53571,35 @@ class SubscribeAttributeOvenCavityOperationalStateOperationalError : public Subs } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute GeneratedCommandList */ -class ReadOvenCavityOperationalStateGeneratedCommandList : public ReadAttribute { +class ReadModeSelectGeneratedCommandList : public ReadAttribute { public: - ReadOvenCavityOperationalStateGeneratedCommandList() + ReadModeSelectGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadOvenCavityOperationalStateGeneratedCommandList() + ~ReadModeSelectGeneratedCommandList() { } 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::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 = [[MTRBaseClusterOvenCavityOperationalState 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(@"OvenCavityOperationalState.GeneratedCommandList response %@", [value description]); + NSLog(@"ModeSelect.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenCavityOperationalState GeneratedCommandList read Error", error); + LogNSError("ModeSelect GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -52493,25 +53608,25 @@ class ReadOvenCavityOperationalStateGeneratedCommandList : public ReadAttribute } }; -class SubscribeAttributeOvenCavityOperationalStateGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeModeSelectGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOvenCavityOperationalStateGeneratedCommandList() + SubscribeAttributeModeSelectGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeOvenCavityOperationalStateGeneratedCommandList() + ~SubscribeAttributeModeSelectGeneratedCommandList() { } 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::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 = [[MTRBaseClusterOvenCavityOperationalState 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(); @@ -52525,7 +53640,7 @@ class SubscribeAttributeOvenCavityOperationalStateGeneratedCommandList : public [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenCavityOperationalState.GeneratedCommandList response %@", [value description]); + NSLog(@"ModeSelect.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -52538,38 +53653,35 @@ class SubscribeAttributeOvenCavityOperationalStateGeneratedCommandList : public } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute AcceptedCommandList */ -class ReadOvenCavityOperationalStateAcceptedCommandList : public ReadAttribute { +class ReadModeSelectAcceptedCommandList : public ReadAttribute { public: - ReadOvenCavityOperationalStateAcceptedCommandList() + ReadModeSelectAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadOvenCavityOperationalStateAcceptedCommandList() + ~ReadModeSelectAcceptedCommandList() { } 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::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 = [[MTRBaseClusterOvenCavityOperationalState 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(@"OvenCavityOperationalState.AcceptedCommandList response %@", [value description]); + NSLog(@"ModeSelect.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenCavityOperationalState AcceptedCommandList read Error", error); + LogNSError("ModeSelect AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -52578,25 +53690,25 @@ class ReadOvenCavityOperationalStateAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeOvenCavityOperationalStateAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeModeSelectAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOvenCavityOperationalStateAcceptedCommandList() + SubscribeAttributeModeSelectAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeOvenCavityOperationalStateAcceptedCommandList() + ~SubscribeAttributeModeSelectAcceptedCommandList() { } 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::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 = [[MTRBaseClusterOvenCavityOperationalState 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(); @@ -52610,7 +53722,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(@"ModeSelect.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -52623,38 +53735,37 @@ class SubscribeAttributeOvenCavityOperationalStateAcceptedCommandList : public S } }; -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* * Attribute EventList */ -class ReadOvenCavityOperationalStateEventList : public ReadAttribute { +class ReadModeSelectEventList : public ReadAttribute { public: - ReadOvenCavityOperationalStateEventList() + ReadModeSelectEventList() : ReadAttribute("event-list") { } - ~ReadOvenCavityOperationalStateEventList() + ~ReadModeSelectEventList() { } 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::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 = [[MTRBaseClusterOvenCavityOperationalState 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(@"OvenCavityOperationalState.EventList response %@", [value description]); + NSLog(@"ModeSelect.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenCavityOperationalState EventList read Error", error); + LogNSError("ModeSelect EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -52663,25 +53774,25 @@ class ReadOvenCavityOperationalStateEventList : public ReadAttribute { } }; -class SubscribeAttributeOvenCavityOperationalStateEventList : public SubscribeAttribute { +class SubscribeAttributeModeSelectEventList : public SubscribeAttribute { public: - SubscribeAttributeOvenCavityOperationalStateEventList() + SubscribeAttributeModeSelectEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeOvenCavityOperationalStateEventList() + ~SubscribeAttributeModeSelectEventList() { } 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::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 = [[MTRBaseClusterOvenCavityOperationalState 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(); @@ -52695,7 +53806,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(@"ModeSelect.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -52709,37 +53820,36 @@ class SubscribeAttributeOvenCavityOperationalStateEventList : public SubscribeAt }; #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* * Attribute AttributeList */ -class ReadOvenCavityOperationalStateAttributeList : public ReadAttribute { +class ReadModeSelectAttributeList : public ReadAttribute { public: - ReadOvenCavityOperationalStateAttributeList() + ReadModeSelectAttributeList() : ReadAttribute("attribute-list") { } - ~ReadOvenCavityOperationalStateAttributeList() + ~ReadModeSelectAttributeList() { } 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::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 = [[MTRBaseClusterOvenCavityOperationalState 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(@"OvenCavityOperationalState.AttributeList response %@", [value description]); + NSLog(@"ModeSelect.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenCavityOperationalState AttributeList read Error", error); + LogNSError("ModeSelect AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -52748,25 +53858,25 @@ class ReadOvenCavityOperationalStateAttributeList : public ReadAttribute { } }; -class SubscribeAttributeOvenCavityOperationalStateAttributeList : public SubscribeAttribute { +class SubscribeAttributeModeSelectAttributeList : public SubscribeAttribute { public: - SubscribeAttributeOvenCavityOperationalStateAttributeList() + SubscribeAttributeModeSelectAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeOvenCavityOperationalStateAttributeList() + ~SubscribeAttributeModeSelectAttributeList() { } 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::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 = [[MTRBaseClusterOvenCavityOperationalState 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(); @@ -52780,7 +53890,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(@"ModeSelect.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -52793,38 +53903,35 @@ class SubscribeAttributeOvenCavityOperationalStateAttributeList : public Subscri } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute FeatureMap */ -class ReadOvenCavityOperationalStateFeatureMap : public ReadAttribute { +class ReadModeSelectFeatureMap : public ReadAttribute { public: - ReadOvenCavityOperationalStateFeatureMap() + ReadModeSelectFeatureMap() : ReadAttribute("feature-map") { } - ~ReadOvenCavityOperationalStateFeatureMap() + ~ReadModeSelectFeatureMap() { } 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::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 = [[MTRBaseClusterOvenCavityOperationalState 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(@"OvenCavityOperationalState.FeatureMap response %@", [value description]); + NSLog(@"ModeSelect.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenCavityOperationalState FeatureMap read Error", error); + LogNSError("ModeSelect FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -52833,25 +53940,25 @@ class ReadOvenCavityOperationalStateFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeOvenCavityOperationalStateFeatureMap : public SubscribeAttribute { +class SubscribeAttributeModeSelectFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeOvenCavityOperationalStateFeatureMap() + SubscribeAttributeModeSelectFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeOvenCavityOperationalStateFeatureMap() + ~SubscribeAttributeModeSelectFeatureMap() { } 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::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 = [[MTRBaseClusterOvenCavityOperationalState 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(); @@ -52865,7 +53972,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(@"ModeSelect.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -52878,38 +53985,35 @@ class SubscribeAttributeOvenCavityOperationalStateFeatureMap : public SubscribeA } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute ClusterRevision */ -class ReadOvenCavityOperationalStateClusterRevision : public ReadAttribute { +class ReadModeSelectClusterRevision : public ReadAttribute { public: - ReadOvenCavityOperationalStateClusterRevision() + ReadModeSelectClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadOvenCavityOperationalStateClusterRevision() + ~ReadModeSelectClusterRevision() { } 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::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 = [[MTRBaseClusterOvenCavityOperationalState 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(@"OvenCavityOperationalState.ClusterRevision response %@", [value description]); + NSLog(@"ModeSelect.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenCavityOperationalState ClusterRevision read Error", error); + LogNSError("ModeSelect ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -52918,25 +54022,25 @@ class ReadOvenCavityOperationalStateClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeOvenCavityOperationalStateClusterRevision : public SubscribeAttribute { +class SubscribeAttributeModeSelectClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeOvenCavityOperationalStateClusterRevision() + SubscribeAttributeModeSelectClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeOvenCavityOperationalStateClusterRevision() + ~SubscribeAttributeModeSelectClusterRevision() { } 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::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 = [[MTRBaseClusterOvenCavityOperationalState 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(); @@ -52950,7 +54054,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(@"ModeSelect.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -52963,11 +54067,9 @@ class SubscribeAttributeOvenCavityOperationalStateClusterRevision : public Subsc } }; -#endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster OvenMode | 0x0049 | +| Cluster LaundryWasherMode | 0x0051 | |------------------------------------------------------------------------------| | Commands: | | | * ChangeToMode | 0x00 | @@ -52991,9 +54093,9 @@ class SubscribeAttributeOvenCavityOperationalStateClusterRevision : public Subsc /* * Command ChangeToMode */ -class OvenModeChangeToMode : public ClusterCommand { +class LaundryWasherModeChangeToMode : public ClusterCommand { public: - OvenModeChangeToMode() + LaundryWasherModeChangeToMode() : ClusterCommand("change-to-mode") { #if MTR_ENABLE_PROVISIONAL @@ -53004,14 +54106,14 @@ class OvenModeChangeToMode : public ClusterCommand { 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::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 = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTROvenModeClusterChangeToModeParams alloc] init]; + __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]; @@ -53020,17 +54122,17 @@ class OvenModeChangeToMode : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster changeToModeWithParams:params completion: - ^(MTROvenModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { + ^(MTRLaundryWasherModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::OvenMode::Commands::ChangeToModeResponse::Id; + 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::OvenMode::Commands::ChangeToModeResponse::Id; + constexpr chip::CommandId responseId = chip::app::Clusters::LaundryWasherMode::Commands::ChangeToModeResponse::Id; RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { @@ -53042,7 +54144,7 @@ class OvenModeChangeToMode : public ClusterCommand { } private: - chip::app::Clusters::OvenMode::Commands::ChangeToMode::Type mRequest; + chip::app::Clusters::LaundryWasherMode::Commands::ChangeToMode::Type mRequest; }; #endif // MTR_ENABLE_PROVISIONAL @@ -53052,32 +54154,32 @@ class OvenModeChangeToMode : public ClusterCommand { /* * Attribute SupportedModes */ -class ReadOvenModeSupportedModes : public ReadAttribute { +class ReadLaundryWasherModeSupportedModes : public ReadAttribute { public: - ReadOvenModeSupportedModes() + ReadLaundryWasherModeSupportedModes() : ReadAttribute("supported-modes") { } - ~ReadOvenModeSupportedModes() + ~ReadLaundryWasherModeSupportedModes() { } 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::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 = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenMode.SupportedModes response %@", [value description]); + NSLog(@"LaundryWasherMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenMode SupportedModes read Error", error); + LogNSError("LaundryWasherMode SupportedModes read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -53086,25 +54188,25 @@ class ReadOvenModeSupportedModes : public ReadAttribute { } }; -class SubscribeAttributeOvenModeSupportedModes : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherModeSupportedModes : public SubscribeAttribute { public: - SubscribeAttributeOvenModeSupportedModes() + SubscribeAttributeLaundryWasherModeSupportedModes() : SubscribeAttribute("supported-modes") { } - ~SubscribeAttributeOvenModeSupportedModes() + ~SubscribeAttributeLaundryWasherModeSupportedModes() { } 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::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 = [[MTRBaseClusterOvenMode 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(); @@ -53118,7 +54220,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(@"LaundryWasherMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -53137,32 +54239,32 @@ class SubscribeAttributeOvenModeSupportedModes : public SubscribeAttribute { /* * Attribute CurrentMode */ -class ReadOvenModeCurrentMode : public ReadAttribute { +class ReadLaundryWasherModeCurrentMode : public ReadAttribute { public: - ReadOvenModeCurrentMode() + ReadLaundryWasherModeCurrentMode() : ReadAttribute("current-mode") { } - ~ReadOvenModeCurrentMode() + ~ReadLaundryWasherModeCurrentMode() { } 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::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 = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenMode.CurrentMode response %@", [value description]); + NSLog(@"LaundryWasherMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenMode CurrentMode read Error", error); + LogNSError("LaundryWasherMode CurrentMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -53171,25 +54273,25 @@ class ReadOvenModeCurrentMode : public ReadAttribute { } }; -class SubscribeAttributeOvenModeCurrentMode : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherModeCurrentMode : public SubscribeAttribute { public: - SubscribeAttributeOvenModeCurrentMode() + SubscribeAttributeLaundryWasherModeCurrentMode() : SubscribeAttribute("current-mode") { } - ~SubscribeAttributeOvenModeCurrentMode() + ~SubscribeAttributeLaundryWasherModeCurrentMode() { } 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::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 = [[MTRBaseClusterOvenMode 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(); @@ -53203,7 +54305,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(@"LaundryWasherMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -53222,32 +54324,32 @@ class SubscribeAttributeOvenModeCurrentMode : public SubscribeAttribute { /* * Attribute StartUpMode */ -class ReadOvenModeStartUpMode : public ReadAttribute { +class ReadLaundryWasherModeStartUpMode : public ReadAttribute { public: - ReadOvenModeStartUpMode() + ReadLaundryWasherModeStartUpMode() : ReadAttribute("start-up-mode") { } - ~ReadOvenModeStartUpMode() + ~ReadLaundryWasherModeStartUpMode() { } 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::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 = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenMode.StartUpMode response %@", [value description]); + NSLog(@"LaundryWasherMode.StartUpMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenMode StartUpMode read Error", error); + LogNSError("LaundryWasherMode StartUpMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -53256,9 +54358,9 @@ class ReadOvenModeStartUpMode : public ReadAttribute { } }; -class WriteOvenModeStartUpMode : public WriteAttribute { +class WriteLaundryWasherModeStartUpMode : public WriteAttribute { public: - WriteOvenModeStartUpMode() + WriteLaundryWasherModeStartUpMode() : WriteAttribute("start-up-mode") { AddArgument("attr-name", "start-up-mode"); @@ -53266,18 +54368,18 @@ class WriteOvenModeStartUpMode : public WriteAttribute { WriteAttribute::AddArguments(); } - ~WriteOvenModeStartUpMode() + ~WriteLaundryWasherModeStartUpMode() { } 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::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 = [[MTRBaseClusterOvenMode 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; @@ -53288,7 +54390,7 @@ class WriteOvenModeStartUpMode : public WriteAttribute { [cluster writeAttributeStartUpModeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("OvenMode StartUpMode write Error", error); + LogNSError("LaundryWasherMode StartUpMode write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -53300,25 +54402,25 @@ class WriteOvenModeStartUpMode : public WriteAttribute { chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeOvenModeStartUpMode : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherModeStartUpMode : public SubscribeAttribute { public: - SubscribeAttributeOvenModeStartUpMode() + SubscribeAttributeLaundryWasherModeStartUpMode() : SubscribeAttribute("start-up-mode") { } - ~SubscribeAttributeOvenModeStartUpMode() + ~SubscribeAttributeLaundryWasherModeStartUpMode() { } 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::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 = [[MTRBaseClusterOvenMode 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(); @@ -53332,7 +54434,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(@"LaundryWasherMode.StartUpMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -53351,32 +54453,32 @@ class SubscribeAttributeOvenModeStartUpMode : public SubscribeAttribute { /* * Attribute OnMode */ -class ReadOvenModeOnMode : public ReadAttribute { +class ReadLaundryWasherModeOnMode : public ReadAttribute { public: - ReadOvenModeOnMode() + ReadLaundryWasherModeOnMode() : ReadAttribute("on-mode") { } - ~ReadOvenModeOnMode() + ~ReadLaundryWasherModeOnMode() { } 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::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 = [[MTRBaseClusterOvenMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"OvenMode.OnMode response %@", [value description]); + NSLog(@"LaundryWasherMode.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenMode OnMode read Error", error); + LogNSError("LaundryWasherMode OnMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -53385,9 +54487,9 @@ class ReadOvenModeOnMode : public ReadAttribute { } }; -class WriteOvenModeOnMode : public WriteAttribute { +class WriteLaundryWasherModeOnMode : public WriteAttribute { public: - WriteOvenModeOnMode() + WriteLaundryWasherModeOnMode() : WriteAttribute("on-mode") { AddArgument("attr-name", "on-mode"); @@ -53395,18 +54497,18 @@ class WriteOvenModeOnMode : public WriteAttribute { WriteAttribute::AddArguments(); } - ~WriteOvenModeOnMode() + ~WriteLaundryWasherModeOnMode() { } 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::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 = [[MTRBaseClusterOvenMode 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; @@ -53417,7 +54519,7 @@ class WriteOvenModeOnMode : public WriteAttribute { [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("OvenMode OnMode write Error", error); + LogNSError("LaundryWasherMode OnMode write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -53429,25 +54531,25 @@ class WriteOvenModeOnMode : public WriteAttribute { chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeOvenModeOnMode : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherModeOnMode : public SubscribeAttribute { public: - SubscribeAttributeOvenModeOnMode() + SubscribeAttributeLaundryWasherModeOnMode() : SubscribeAttribute("on-mode") { } - ~SubscribeAttributeOvenModeOnMode() + ~SubscribeAttributeLaundryWasherModeOnMode() { } 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::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 = [[MTRBaseClusterOvenMode 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(); @@ -53461,7 +54563,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(@"LaundryWasherMode.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -53480,32 +54582,32 @@ class SubscribeAttributeOvenModeOnMode : public SubscribeAttribute { /* * Attribute GeneratedCommandList */ -class ReadOvenModeGeneratedCommandList : public ReadAttribute { +class ReadLaundryWasherModeGeneratedCommandList : public ReadAttribute { public: - ReadOvenModeGeneratedCommandList() + ReadLaundryWasherModeGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadOvenModeGeneratedCommandList() + ~ReadLaundryWasherModeGeneratedCommandList() { } 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::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 = [[MTRBaseClusterOvenMode 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(@"OvenMode.GeneratedCommandList response %@", [value description]); + NSLog(@"LaundryWasherMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenMode GeneratedCommandList read Error", error); + LogNSError("LaundryWasherMode GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -53514,25 +54616,25 @@ class ReadOvenModeGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeOvenModeGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherModeGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOvenModeGeneratedCommandList() + SubscribeAttributeLaundryWasherModeGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeOvenModeGeneratedCommandList() + ~SubscribeAttributeLaundryWasherModeGeneratedCommandList() { } 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::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 = [[MTRBaseClusterOvenMode 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(); @@ -53546,7 +54648,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(@"LaundryWasherMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -53565,32 +54667,32 @@ class SubscribeAttributeOvenModeGeneratedCommandList : public SubscribeAttribute /* * Attribute AcceptedCommandList */ -class ReadOvenModeAcceptedCommandList : public ReadAttribute { +class ReadLaundryWasherModeAcceptedCommandList : public ReadAttribute { public: - ReadOvenModeAcceptedCommandList() + ReadLaundryWasherModeAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadOvenModeAcceptedCommandList() + ~ReadLaundryWasherModeAcceptedCommandList() { } 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::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 = [[MTRBaseClusterOvenMode 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(@"OvenMode.AcceptedCommandList response %@", [value description]); + NSLog(@"LaundryWasherMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenMode AcceptedCommandList read Error", error); + LogNSError("LaundryWasherMode AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -53599,25 +54701,25 @@ class ReadOvenModeAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeOvenModeAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherModeAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeOvenModeAcceptedCommandList() + SubscribeAttributeLaundryWasherModeAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeOvenModeAcceptedCommandList() + ~SubscribeAttributeLaundryWasherModeAcceptedCommandList() { } 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::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 = [[MTRBaseClusterOvenMode 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(); @@ -53631,7 +54733,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(@"LaundryWasherMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -53650,32 +54752,32 @@ class SubscribeAttributeOvenModeAcceptedCommandList : public SubscribeAttribute /* * Attribute EventList */ -class ReadOvenModeEventList : public ReadAttribute { +class ReadLaundryWasherModeEventList : public ReadAttribute { public: - ReadOvenModeEventList() + ReadLaundryWasherModeEventList() : ReadAttribute("event-list") { } - ~ReadOvenModeEventList() + ~ReadLaundryWasherModeEventList() { } 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::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 = [[MTRBaseClusterOvenMode 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(@"OvenMode.EventList response %@", [value description]); + NSLog(@"LaundryWasherMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenMode EventList read Error", error); + LogNSError("LaundryWasherMode EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -53684,25 +54786,25 @@ class ReadOvenModeEventList : public ReadAttribute { } }; -class SubscribeAttributeOvenModeEventList : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherModeEventList : public SubscribeAttribute { public: - SubscribeAttributeOvenModeEventList() + SubscribeAttributeLaundryWasherModeEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeOvenModeEventList() + ~SubscribeAttributeLaundryWasherModeEventList() { } 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::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 = [[MTRBaseClusterOvenMode 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(); @@ -53716,7 +54818,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(@"LaundryWasherMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -53735,32 +54837,32 @@ class SubscribeAttributeOvenModeEventList : public SubscribeAttribute { /* * Attribute AttributeList */ -class ReadOvenModeAttributeList : public ReadAttribute { +class ReadLaundryWasherModeAttributeList : public ReadAttribute { public: - ReadOvenModeAttributeList() + ReadLaundryWasherModeAttributeList() : ReadAttribute("attribute-list") { } - ~ReadOvenModeAttributeList() + ~ReadLaundryWasherModeAttributeList() { } 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::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 = [[MTRBaseClusterOvenMode 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(@"OvenMode.AttributeList response %@", [value description]); + NSLog(@"LaundryWasherMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenMode AttributeList read Error", error); + LogNSError("LaundryWasherMode AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -53769,25 +54871,25 @@ class ReadOvenModeAttributeList : public ReadAttribute { } }; -class SubscribeAttributeOvenModeAttributeList : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherModeAttributeList : public SubscribeAttribute { public: - SubscribeAttributeOvenModeAttributeList() + SubscribeAttributeLaundryWasherModeAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeOvenModeAttributeList() + ~SubscribeAttributeLaundryWasherModeAttributeList() { } 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::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 = [[MTRBaseClusterOvenMode 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(); @@ -53801,7 +54903,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(@"LaundryWasherMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -53820,32 +54922,32 @@ class SubscribeAttributeOvenModeAttributeList : public SubscribeAttribute { /* * Attribute FeatureMap */ -class ReadOvenModeFeatureMap : public ReadAttribute { +class ReadLaundryWasherModeFeatureMap : public ReadAttribute { public: - ReadOvenModeFeatureMap() + ReadLaundryWasherModeFeatureMap() : ReadAttribute("feature-map") { } - ~ReadOvenModeFeatureMap() + ~ReadLaundryWasherModeFeatureMap() { } 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::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 = [[MTRBaseClusterOvenMode 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(@"OvenMode.FeatureMap response %@", [value description]); + NSLog(@"LaundryWasherMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenMode FeatureMap read Error", error); + LogNSError("LaundryWasherMode FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -53854,25 +54956,25 @@ class ReadOvenModeFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeOvenModeFeatureMap : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherModeFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeOvenModeFeatureMap() + SubscribeAttributeLaundryWasherModeFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeOvenModeFeatureMap() + ~SubscribeAttributeLaundryWasherModeFeatureMap() { } 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::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 = [[MTRBaseClusterOvenMode 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(); @@ -53886,7 +54988,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(@"LaundryWasherMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -53905,32 +55007,32 @@ class SubscribeAttributeOvenModeFeatureMap : public SubscribeAttribute { /* * Attribute ClusterRevision */ -class ReadOvenModeClusterRevision : public ReadAttribute { +class ReadLaundryWasherModeClusterRevision : public ReadAttribute { public: - ReadOvenModeClusterRevision() + ReadLaundryWasherModeClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadOvenModeClusterRevision() + ~ReadLaundryWasherModeClusterRevision() { } 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::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 = [[MTRBaseClusterOvenMode 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(@"OvenMode.ClusterRevision response %@", [value description]); + NSLog(@"LaundryWasherMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("OvenMode ClusterRevision read Error", error); + LogNSError("LaundryWasherMode ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -53939,25 +55041,25 @@ class ReadOvenModeClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeOvenModeClusterRevision : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherModeClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeOvenModeClusterRevision() + SubscribeAttributeLaundryWasherModeClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeOvenModeClusterRevision() + ~SubscribeAttributeLaundryWasherModeClusterRevision() { } 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::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 = [[MTRBaseClusterOvenMode 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(); @@ -53971,7 +55073,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(@"LaundryWasherMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -53988,13 +55090,16 @@ class SubscribeAttributeOvenModeClusterRevision : public SubscribeAttribute { #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster LaundryDryerControls | 0x004A | +| Cluster RefrigeratorAndTemperatureControlledCabinetMode | 0x0052 | |------------------------------------------------------------------------------| | Commands: | | +| * ChangeToMode | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * SupportedDrynessLevels | 0x0000 | -| * SelectedDrynessLevel | 0x0001 | +| * SupportedModes | 0x0000 | +| * CurrentMode | 0x0001 | +| * StartUpMode | 0x0002 | +| * OnMode | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -54005,37 +55110,97 @@ class SubscribeAttributeOvenModeClusterRevision : public SubscribeAttribute { | Events: | | \*----------------------------------------------------------------------------*/ +#if MTR_ENABLE_PROVISIONAL +/* + * Command ChangeToMode + */ +class RefrigeratorAndTemperatureControlledCabinetModeChangeToMode : public ClusterCommand { +public: + 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::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 = [[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: + ^(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); + constexpr chip::CommandId responseId = chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToModeResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToMode::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL + #if MTR_ENABLE_PROVISIONAL /* - * Attribute SupportedDrynessLevels + * Attribute SupportedModes */ -class ReadLaundryDryerControlsSupportedDrynessLevels : public ReadAttribute { +class ReadRefrigeratorAndTemperatureControlledCabinetModeSupportedModes : public ReadAttribute { public: - ReadLaundryDryerControlsSupportedDrynessLevels() - : ReadAttribute("supported-dryness-levels") + ReadRefrigeratorAndTemperatureControlledCabinetModeSupportedModes() + : ReadAttribute("supported-modes") { } - ~ReadLaundryDryerControlsSupportedDrynessLevels() + ~ReadRefrigeratorAndTemperatureControlledCabinetModeSupportedModes() { } 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::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 = [[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 = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryDryerControls SupportedDrynessLevels read Error", error); + LogNSError("RefrigeratorAndTemperatureControlledCabinetMode SupportedModes read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -54044,25 +55209,25 @@ class ReadLaundryDryerControlsSupportedDrynessLevels : public ReadAttribute { } }; -class SubscribeAttributeLaundryDryerControlsSupportedDrynessLevels : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeSupportedModes : public SubscribeAttribute { public: - SubscribeAttributeLaundryDryerControlsSupportedDrynessLevels() - : SubscribeAttribute("supported-dryness-levels") + SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeSupportedModes() + : SubscribeAttribute("supported-modes") { } - ~SubscribeAttributeLaundryDryerControlsSupportedDrynessLevels() + ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeSupportedModes() { } 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::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 = [[MTRBaseClusterLaundryDryerControls 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(); @@ -54073,10 +55238,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(@"RefrigeratorAndTemperatureControlledCabinetMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -54093,34 +55258,34 @@ class SubscribeAttributeLaundryDryerControlsSupportedDrynessLevels : public Subs #if MTR_ENABLE_PROVISIONAL /* - * Attribute SelectedDrynessLevel + * Attribute CurrentMode */ -class ReadLaundryDryerControlsSelectedDrynessLevel : public ReadAttribute { +class ReadRefrigeratorAndTemperatureControlledCabinetModeCurrentMode : public ReadAttribute { public: - ReadLaundryDryerControlsSelectedDrynessLevel() - : ReadAttribute("selected-dryness-level") + ReadRefrigeratorAndTemperatureControlledCabinetModeCurrentMode() + : ReadAttribute("current-mode") { } - ~ReadLaundryDryerControlsSelectedDrynessLevel() + ~ReadRefrigeratorAndTemperatureControlledCabinetModeCurrentMode() { } 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::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 = [[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 = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryDryerControls SelectedDrynessLevel read Error", error); + LogNSError("RefrigeratorAndTemperatureControlledCabinetMode CurrentMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -54129,28 +55294,113 @@ class ReadLaundryDryerControlsSelectedDrynessLevel : public ReadAttribute { } }; -class WriteLaundryDryerControlsSelectedDrynessLevel : public WriteAttribute { +class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeCurrentMode : public SubscribeAttribute { public: - WriteLaundryDryerControlsSelectedDrynessLevel() - : WriteAttribute("selected-dryness-level") + SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeCurrentMode() + : SubscribeAttribute("current-mode") { - AddArgument("attr-name", "selected-dryness-level"); + } + + ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeCurrentMode() + { + } + + 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; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%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 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(); } - ~WriteLaundryDryerControlsSelectedDrynessLevel() + ~WriteRefrigeratorAndTemperatureControlledCabinetModeStartUpMode() { } 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::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 = [[MTRBaseClusterLaundryDryerControls 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; @@ -54159,9 +55409,9 @@ class WriteLaundryDryerControlsSelectedDrynessLevel : public WriteAttribute { value = [NSNumber numberWithUnsignedChar:mValue.Value()]; } - [cluster writeAttributeSelectedDrynessLevelWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeStartUpModeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("LaundryDryerControls SelectedDrynessLevel write Error", error); + LogNSError("RefrigeratorAndTemperatureControlledCabinetMode StartUpMode write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -54173,25 +55423,25 @@ class WriteLaundryDryerControlsSelectedDrynessLevel : public WriteAttribute { chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeLaundryDryerControlsSelectedDrynessLevel : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeStartUpMode : public SubscribeAttribute { public: - SubscribeAttributeLaundryDryerControlsSelectedDrynessLevel() - : SubscribeAttribute("selected-dryness-level") + SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeStartUpMode() + : SubscribeAttribute("start-up-mode") { } - ~SubscribeAttributeLaundryDryerControlsSelectedDrynessLevel() + ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeStartUpMode() { } 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::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 = [[MTRBaseClusterLaundryDryerControls 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(); @@ -54202,10 +55452,139 @@ class SubscribeAttributeLaundryDryerControlsSelectedDrynessLevel : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSelectedDrynessLevelWithParams:params + [cluster subscribeAttributeStartUpModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryDryerControls.SelectedDrynessLevel response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.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 ReadRefrigeratorAndTemperatureControlledCabinetModeOnMode : public ReadAttribute { +public: + ReadRefrigeratorAndTemperatureControlledCabinetModeOnMode() + : ReadAttribute("on-mode") + { + } + + ~ReadRefrigeratorAndTemperatureControlledCabinetModeOnMode() + { + } + + 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; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%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 readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.OnMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("RefrigeratorAndTemperatureControlledCabinetMode OnMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteRefrigeratorAndTemperatureControlledCabinetModeOnMode : public WriteAttribute { +public: + WriteRefrigeratorAndTemperatureControlledCabinetModeOnMode() + : WriteAttribute("on-mode") + { + AddArgument("attr-name", "on-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteRefrigeratorAndTemperatureControlledCabinetModeOnMode() + { + } + + 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; + + 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 writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("RefrigeratorAndTemperatureControlledCabinetMode OnMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::Nullable mValue; +}; + +class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeOnMode : public SubscribeAttribute { +public: + SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeOnMode() + : SubscribeAttribute("on-mode") + { + } + + ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeOnMode() + { + } + + 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; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%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 subscribeAttributeOnModeWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -54224,32 +55603,32 @@ class SubscribeAttributeLaundryDryerControlsSelectedDrynessLevel : public Subscr /* * Attribute GeneratedCommandList */ -class ReadLaundryDryerControlsGeneratedCommandList : public ReadAttribute { +class ReadRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList : public ReadAttribute { public: - ReadLaundryDryerControlsGeneratedCommandList() + ReadRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadLaundryDryerControlsGeneratedCommandList() + ~ReadRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList() { } 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::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 = [[MTRBaseClusterLaundryDryerControls 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(@"LaundryDryerControls.GeneratedCommandList response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryDryerControls GeneratedCommandList read Error", error); + LogNSError("RefrigeratorAndTemperatureControlledCabinetMode GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -54258,25 +55637,25 @@ class ReadLaundryDryerControlsGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeLaundryDryerControlsGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeLaundryDryerControlsGeneratedCommandList() + SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeLaundryDryerControlsGeneratedCommandList() + ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList() { } 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::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 = [[MTRBaseClusterLaundryDryerControls 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(); @@ -54290,7 +55669,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(@"RefrigeratorAndTemperatureControlledCabinetMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -54309,32 +55688,32 @@ class SubscribeAttributeLaundryDryerControlsGeneratedCommandList : public Subscr /* * Attribute AcceptedCommandList */ -class ReadLaundryDryerControlsAcceptedCommandList : public ReadAttribute { +class ReadRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList : public ReadAttribute { public: - ReadLaundryDryerControlsAcceptedCommandList() + ReadRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadLaundryDryerControlsAcceptedCommandList() + ~ReadRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList() { } 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::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 = [[MTRBaseClusterLaundryDryerControls 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(@"LaundryDryerControls.AcceptedCommandList response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryDryerControls AcceptedCommandList read Error", error); + LogNSError("RefrigeratorAndTemperatureControlledCabinetMode AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -54343,25 +55722,25 @@ class ReadLaundryDryerControlsAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeLaundryDryerControlsAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeLaundryDryerControlsAcceptedCommandList() + SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeLaundryDryerControlsAcceptedCommandList() + ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList() { } 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::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 = [[MTRBaseClusterLaundryDryerControls 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(); @@ -54375,7 +55754,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(@"RefrigeratorAndTemperatureControlledCabinetMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -54394,32 +55773,32 @@ class SubscribeAttributeLaundryDryerControlsAcceptedCommandList : public Subscri /* * Attribute EventList */ -class ReadLaundryDryerControlsEventList : public ReadAttribute { +class ReadRefrigeratorAndTemperatureControlledCabinetModeEventList : public ReadAttribute { public: - ReadLaundryDryerControlsEventList() + ReadRefrigeratorAndTemperatureControlledCabinetModeEventList() : ReadAttribute("event-list") { } - ~ReadLaundryDryerControlsEventList() + ~ReadRefrigeratorAndTemperatureControlledCabinetModeEventList() { } 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::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 = [[MTRBaseClusterLaundryDryerControls 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(@"LaundryDryerControls.EventList response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryDryerControls EventList read Error", error); + LogNSError("RefrigeratorAndTemperatureControlledCabinetMode EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -54428,25 +55807,25 @@ class ReadLaundryDryerControlsEventList : public ReadAttribute { } }; -class SubscribeAttributeLaundryDryerControlsEventList : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeEventList : public SubscribeAttribute { public: - SubscribeAttributeLaundryDryerControlsEventList() + SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeLaundryDryerControlsEventList() + ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeEventList() { } 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::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 = [[MTRBaseClusterLaundryDryerControls 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(); @@ -54460,7 +55839,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(@"RefrigeratorAndTemperatureControlledCabinetMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -54479,32 +55858,32 @@ class SubscribeAttributeLaundryDryerControlsEventList : public SubscribeAttribut /* * Attribute AttributeList */ -class ReadLaundryDryerControlsAttributeList : public ReadAttribute { +class ReadRefrigeratorAndTemperatureControlledCabinetModeAttributeList : public ReadAttribute { public: - ReadLaundryDryerControlsAttributeList() + ReadRefrigeratorAndTemperatureControlledCabinetModeAttributeList() : ReadAttribute("attribute-list") { } - ~ReadLaundryDryerControlsAttributeList() + ~ReadRefrigeratorAndTemperatureControlledCabinetModeAttributeList() { } 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::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 = [[MTRBaseClusterLaundryDryerControls 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(@"LaundryDryerControls.AttributeList response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryDryerControls AttributeList read Error", error); + LogNSError("RefrigeratorAndTemperatureControlledCabinetMode AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -54513,25 +55892,25 @@ class ReadLaundryDryerControlsAttributeList : public ReadAttribute { } }; -class SubscribeAttributeLaundryDryerControlsAttributeList : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAttributeList : public SubscribeAttribute { public: - SubscribeAttributeLaundryDryerControlsAttributeList() + SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeLaundryDryerControlsAttributeList() + ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAttributeList() { } 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::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 = [[MTRBaseClusterLaundryDryerControls 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(); @@ -54545,7 +55924,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(@"RefrigeratorAndTemperatureControlledCabinetMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -54564,32 +55943,32 @@ class SubscribeAttributeLaundryDryerControlsAttributeList : public SubscribeAttr /* * Attribute FeatureMap */ -class ReadLaundryDryerControlsFeatureMap : public ReadAttribute { +class ReadRefrigeratorAndTemperatureControlledCabinetModeFeatureMap : public ReadAttribute { public: - ReadLaundryDryerControlsFeatureMap() + ReadRefrigeratorAndTemperatureControlledCabinetModeFeatureMap() : ReadAttribute("feature-map") { } - ~ReadLaundryDryerControlsFeatureMap() + ~ReadRefrigeratorAndTemperatureControlledCabinetModeFeatureMap() { } 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::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 = [[MTRBaseClusterLaundryDryerControls 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(@"LaundryDryerControls.FeatureMap response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryDryerControls FeatureMap read Error", error); + LogNSError("RefrigeratorAndTemperatureControlledCabinetMode FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -54598,25 +55977,25 @@ class ReadLaundryDryerControlsFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeLaundryDryerControlsFeatureMap : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeLaundryDryerControlsFeatureMap() + SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeLaundryDryerControlsFeatureMap() + ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeFeatureMap() { } 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::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 = [[MTRBaseClusterLaundryDryerControls 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(); @@ -54630,7 +56009,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(@"RefrigeratorAndTemperatureControlledCabinetMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -54649,32 +56028,32 @@ class SubscribeAttributeLaundryDryerControlsFeatureMap : public SubscribeAttribu /* * Attribute ClusterRevision */ -class ReadLaundryDryerControlsClusterRevision : public ReadAttribute { +class ReadRefrigeratorAndTemperatureControlledCabinetModeClusterRevision : public ReadAttribute { public: - ReadLaundryDryerControlsClusterRevision() + ReadRefrigeratorAndTemperatureControlledCabinetModeClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadLaundryDryerControlsClusterRevision() + ~ReadRefrigeratorAndTemperatureControlledCabinetModeClusterRevision() { } 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::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 = [[MTRBaseClusterLaundryDryerControls 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(@"LaundryDryerControls.ClusterRevision response %@", [value description]); + NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryDryerControls ClusterRevision read Error", error); + LogNSError("RefrigeratorAndTemperatureControlledCabinetMode ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -54683,25 +56062,25 @@ class ReadLaundryDryerControlsClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeLaundryDryerControlsClusterRevision : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeLaundryDryerControlsClusterRevision() + SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeLaundryDryerControlsClusterRevision() + ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeClusterRevision() { } 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::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 = [[MTRBaseClusterLaundryDryerControls 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(); @@ -54715,7 +56094,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(@"RefrigeratorAndTemperatureControlledCabinetMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -54730,19 +56109,17 @@ class SubscribeAttributeLaundryDryerControlsClusterRevision : public SubscribeAt #endif // MTR_ENABLE_PROVISIONAL #endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster ModeSelect | 0x0050 | +| Cluster LaundryWasherControls | 0x0053 | |------------------------------------------------------------------------------| | Commands: | | -| * ChangeToMode | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * Description | 0x0000 | -| * StandardNamespace | 0x0001 | -| * SupportedModes | 0x0002 | -| * CurrentMode | 0x0003 | -| * StartUpMode | 0x0004 | -| * OnMode | 0x0005 | +| * SpinSpeeds | 0x0000 | +| * SpinSpeedCurrent | 0x0001 | +| * NumberOfRinses | 0x0002 | +| * SupportedRinses | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -54753,82 +56130,37 @@ class SubscribeAttributeLaundryDryerControlsClusterRevision : public SubscribeAt | Events: | | \*----------------------------------------------------------------------------*/ -/* - * Command ChangeToMode - */ -class ModeSelectChangeToMode : public ClusterCommand { -public: - ModeSelectChangeToMode() - : 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::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 = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRModeSelectClusterChangeToModeParams 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: - ^(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::ModeSelect::Commands::ChangeToMode::Type mRequest; -}; +#if MTR_ENABLE_PROVISIONAL /* - * Attribute Description + * Attribute SpinSpeeds */ -class ReadModeSelectDescription : public ReadAttribute { +class ReadLaundryWasherControlsSpinSpeeds : public ReadAttribute { public: - ReadModeSelectDescription() - : ReadAttribute("description") + ReadLaundryWasherControlsSpinSpeeds() + : ReadAttribute("spin-speeds") { } - ~ReadModeSelectDescription() + ~ReadLaundryWasherControlsSpinSpeeds() { } 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; + 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 = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeDescriptionWithCompletion:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.Description 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("ModeSelect Description read Error", error); + LogNSError("LaundryWasherControls SpinSpeeds read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -54837,25 +56169,25 @@ class ReadModeSelectDescription : public ReadAttribute { } }; -class SubscribeAttributeModeSelectDescription : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherControlsSpinSpeeds : public SubscribeAttribute { public: - SubscribeAttributeModeSelectDescription() - : SubscribeAttribute("description") + SubscribeAttributeLaundryWasherControlsSpinSpeeds() + : SubscribeAttribute("spin-speeds") { } - ~SubscribeAttributeModeSelectDescription() + ~SubscribeAttributeLaundryWasherControlsSpinSpeeds() { } 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; + 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 = [[MTRBaseClusterModeSelect 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(); @@ -54866,10 +56198,10 @@ class SubscribeAttributeModeSelectDescription : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDescriptionWithParams:params + [cluster subscribeAttributeSpinSpeedsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSString * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.Description response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"LaundryWasherControls.SpinSpeeds response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -54882,117 +56214,38 @@ class SubscribeAttributeModeSelectDescription : public SubscribeAttribute { } }; -/* - * 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; - } -}; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* - * Attribute SupportedModes + * Attribute SpinSpeedCurrent */ -class ReadModeSelectSupportedModes : public ReadAttribute { +class ReadLaundryWasherControlsSpinSpeedCurrent : public ReadAttribute { public: - ReadModeSelectSupportedModes() - : ReadAttribute("supported-modes") + ReadLaundryWasherControlsSpinSpeedCurrent() + : ReadAttribute("spin-speed-current") { } - ~ReadModeSelectSupportedModes() + ~ReadLaundryWasherControlsSpinSpeedCurrent() { } 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::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 = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.SupportedModes 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("ModeSelect SupportedModes read Error", error); + LogNSError("LaundryWasherControls SpinSpeedCurrent read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -55001,107 +56254,69 @@ class ReadModeSelectSupportedModes : public ReadAttribute { } }; -class SubscribeAttributeModeSelectSupportedModes : public SubscribeAttribute { +class WriteLaundryWasherControlsSpinSpeedCurrent : public WriteAttribute { public: - SubscribeAttributeModeSelectSupportedModes() - : SubscribeAttribute("supported-modes") + WriteLaundryWasherControlsSpinSpeedCurrent() + : WriteAttribute("spin-speed-current") { + AddArgument("attr-name", "spin-speed-current"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeModeSelectSupportedModes() + ~WriteLaundryWasherControlsSpinSpeedCurrent() { } 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::LaundryWasherControls::Id; + constexpr chip::AttributeId 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); + 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 * 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 = [[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 subscribeAttributeSupportedModesWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.SupportedModes 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 CurrentMode - */ -class ReadModeSelectCurrentMode : public ReadAttribute { -public: - ReadModeSelectCurrentMode() - : ReadAttribute("current-mode") - { - } - - ~ReadModeSelectCurrentMode() - { - } - - 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; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%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 readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.CurrentMode response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("ModeSelect CurrentMode read Error", error); + [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 SubscribeAttributeModeSelectCurrentMode : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherControlsSpinSpeedCurrent : public SubscribeAttribute { public: - SubscribeAttributeModeSelectCurrentMode() - : SubscribeAttribute("current-mode") + SubscribeAttributeLaundryWasherControlsSpinSpeedCurrent() + : SubscribeAttribute("spin-speed-current") { } - ~SubscribeAttributeModeSelectCurrentMode() + ~SubscribeAttributeLaundryWasherControlsSpinSpeedCurrent() { } 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::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 = [[MTRBaseClusterModeSelect 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(); @@ -55112,10 +56327,10 @@ class SubscribeAttributeModeSelectCurrentMode : 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(@"ModeSelect.CurrentMode response %@", [value description]); + NSLog(@"LaundryWasherControls.SpinSpeedCurrent response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -55128,35 +56343,38 @@ class SubscribeAttributeModeSelectCurrentMode : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute StartUpMode + * Attribute NumberOfRinses */ -class ReadModeSelectStartUpMode : public ReadAttribute { +class ReadLaundryWasherControlsNumberOfRinses : public ReadAttribute { public: - ReadModeSelectStartUpMode() - : ReadAttribute("start-up-mode") + ReadLaundryWasherControlsNumberOfRinses() + : ReadAttribute("number-of-rinses") { } - ~ReadModeSelectStartUpMode() + ~ReadLaundryWasherControlsNumberOfRinses() { } 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::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 = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStartUpModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.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("ModeSelect StartUpMode read Error", error); + LogNSError("LaundryWasherControls NumberOfRinses read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -55165,39 +56383,36 @@ class ReadModeSelectStartUpMode : public ReadAttribute { } }; -class WriteModeSelectStartUpMode : public WriteAttribute { +class WriteLaundryWasherControlsNumberOfRinses : public WriteAttribute { public: - WriteModeSelectStartUpMode() - : 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(); } - ~WriteModeSelectStartUpMode() + ~WriteLaundryWasherControlsNumberOfRinses() { } 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::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 = [[MTRBaseClusterModeSelect 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("ModeSelect StartUpMode write Error", error); + LogNSError("LaundryWasherControls NumberOfRinses write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -55206,28 +56421,28 @@ class WriteModeSelectStartUpMode : public WriteAttribute { } private: - chip::app::DataModel::Nullable mValue; + uint8_t mValue; }; -class SubscribeAttributeModeSelectStartUpMode : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherControlsNumberOfRinses : public SubscribeAttribute { public: - SubscribeAttributeModeSelectStartUpMode() - : SubscribeAttribute("start-up-mode") + SubscribeAttributeLaundryWasherControlsNumberOfRinses() + : SubscribeAttribute("number-of-rinses") { } - ~SubscribeAttributeModeSelectStartUpMode() + ~SubscribeAttributeLaundryWasherControlsNumberOfRinses() { } 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::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 = [[MTRBaseClusterModeSelect 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(); @@ -55238,10 +56453,10 @@ class SubscribeAttributeModeSelectStartUpMode : 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(@"ModeSelect.StartUpMode response %@", [value description]); + NSLog(@"LaundryWasherControls.NumberOfRinses response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -55254,106 +56469,65 @@ class SubscribeAttributeModeSelectStartUpMode : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute OnMode + * Attribute SupportedRinses */ -class ReadModeSelectOnMode : public ReadAttribute { +class ReadLaundryWasherControlsSupportedRinses : public ReadAttribute { public: - ReadModeSelectOnMode() - : ReadAttribute("on-mode") + ReadLaundryWasherControlsSupportedRinses() + : ReadAttribute("supported-rinses") { } - ~ReadModeSelectOnMode() + ~ReadLaundryWasherControlsSupportedRinses() { } 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::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 = [[MTRBaseClusterModeSelect alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"ModeSelect.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("ModeSelect OnMode read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteModeSelectOnMode : public WriteAttribute { -public: - WriteModeSelectOnMode() - : WriteAttribute("on-mode") - { - AddArgument("attr-name", "on-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteModeSelectOnMode() - { - } - - 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; - - 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 * 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("ModeSelect 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 SubscribeAttributeModeSelectOnMode : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherControlsSupportedRinses : public SubscribeAttribute { public: - SubscribeAttributeModeSelectOnMode() - : SubscribeAttribute("on-mode") + SubscribeAttributeLaundryWasherControlsSupportedRinses() + : SubscribeAttribute("supported-rinses") { } - ~SubscribeAttributeModeSelectOnMode() + ~SubscribeAttributeLaundryWasherControlsSupportedRinses() { } 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::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 = [[MTRBaseClusterModeSelect 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(); @@ -55364,10 +56538,10 @@ class SubscribeAttributeModeSelectOnMode : 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(@"ModeSelect.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 { @@ -55380,35 +56554,38 @@ class SubscribeAttributeModeSelectOnMode : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute GeneratedCommandList */ -class ReadModeSelectGeneratedCommandList : public ReadAttribute { +class ReadLaundryWasherControlsGeneratedCommandList : public ReadAttribute { public: - ReadModeSelectGeneratedCommandList() + ReadLaundryWasherControlsGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadModeSelectGeneratedCommandList() + ~ReadLaundryWasherControlsGeneratedCommandList() { } 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::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 = [[MTRBaseClusterModeSelect 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(@"ModeSelect.GeneratedCommandList response %@", [value description]); + NSLog(@"LaundryWasherControls.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ModeSelect GeneratedCommandList read Error", error); + LogNSError("LaundryWasherControls GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -55417,25 +56594,25 @@ class ReadModeSelectGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeModeSelectGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherControlsGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeModeSelectGeneratedCommandList() + SubscribeAttributeLaundryWasherControlsGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeModeSelectGeneratedCommandList() + ~SubscribeAttributeLaundryWasherControlsGeneratedCommandList() { } 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::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 = [[MTRBaseClusterModeSelect 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(); @@ -55449,7 +56626,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(@"LaundryWasherControls.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -55462,35 +56639,38 @@ class SubscribeAttributeModeSelectGeneratedCommandList : public SubscribeAttribu } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute AcceptedCommandList */ -class ReadModeSelectAcceptedCommandList : public ReadAttribute { +class ReadLaundryWasherControlsAcceptedCommandList : public ReadAttribute { public: - ReadModeSelectAcceptedCommandList() + ReadLaundryWasherControlsAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadModeSelectAcceptedCommandList() + ~ReadLaundryWasherControlsAcceptedCommandList() { } 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::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 = [[MTRBaseClusterModeSelect 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(@"ModeSelect.AcceptedCommandList response %@", [value description]); + NSLog(@"LaundryWasherControls.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ModeSelect AcceptedCommandList read Error", error); + LogNSError("LaundryWasherControls AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -55499,25 +56679,25 @@ class ReadModeSelectAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeModeSelectAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherControlsAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeModeSelectAcceptedCommandList() + SubscribeAttributeLaundryWasherControlsAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeModeSelectAcceptedCommandList() + ~SubscribeAttributeLaundryWasherControlsAcceptedCommandList() { } 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::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 = [[MTRBaseClusterModeSelect 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(); @@ -55531,7 +56711,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(@"LaundryWasherControls.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -55544,37 +56724,38 @@ class SubscribeAttributeModeSelectAcceptedCommandList : public SubscribeAttribut } }; +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* * Attribute EventList */ -class ReadModeSelectEventList : public ReadAttribute { +class ReadLaundryWasherControlsEventList : public ReadAttribute { public: - ReadModeSelectEventList() + ReadLaundryWasherControlsEventList() : ReadAttribute("event-list") { } - ~ReadModeSelectEventList() + ~ReadLaundryWasherControlsEventList() { } 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::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 = [[MTRBaseClusterModeSelect 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(@"ModeSelect.EventList response %@", [value description]); + NSLog(@"LaundryWasherControls.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ModeSelect EventList read Error", error); + LogNSError("LaundryWasherControls EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -55583,25 +56764,25 @@ class ReadModeSelectEventList : public ReadAttribute { } }; -class SubscribeAttributeModeSelectEventList : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherControlsEventList : public SubscribeAttribute { public: - SubscribeAttributeModeSelectEventList() + SubscribeAttributeLaundryWasherControlsEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeModeSelectEventList() + ~SubscribeAttributeLaundryWasherControlsEventList() { } 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::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 = [[MTRBaseClusterModeSelect 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(); @@ -55615,7 +56796,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(@"LaundryWasherControls.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -55629,36 +56810,37 @@ class SubscribeAttributeModeSelectEventList : public SubscribeAttribute { }; #endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* * Attribute AttributeList */ -class ReadModeSelectAttributeList : public ReadAttribute { +class ReadLaundryWasherControlsAttributeList : public ReadAttribute { public: - ReadModeSelectAttributeList() + ReadLaundryWasherControlsAttributeList() : ReadAttribute("attribute-list") { } - ~ReadModeSelectAttributeList() + ~ReadLaundryWasherControlsAttributeList() { } 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::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 = [[MTRBaseClusterModeSelect 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(@"ModeSelect.AttributeList response %@", [value description]); + NSLog(@"LaundryWasherControls.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ModeSelect AttributeList read Error", error); + LogNSError("LaundryWasherControls AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -55667,25 +56849,25 @@ class ReadModeSelectAttributeList : public ReadAttribute { } }; -class SubscribeAttributeModeSelectAttributeList : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherControlsAttributeList : public SubscribeAttribute { public: - SubscribeAttributeModeSelectAttributeList() + SubscribeAttributeLaundryWasherControlsAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeModeSelectAttributeList() + ~SubscribeAttributeLaundryWasherControlsAttributeList() { } 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::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 = [[MTRBaseClusterModeSelect 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(); @@ -55699,7 +56881,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(@"LaundryWasherControls.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -55712,35 +56894,38 @@ class SubscribeAttributeModeSelectAttributeList : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute FeatureMap */ -class ReadModeSelectFeatureMap : public ReadAttribute { +class ReadLaundryWasherControlsFeatureMap : public ReadAttribute { public: - ReadModeSelectFeatureMap() + ReadLaundryWasherControlsFeatureMap() : ReadAttribute("feature-map") { } - ~ReadModeSelectFeatureMap() + ~ReadLaundryWasherControlsFeatureMap() { } 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::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 = [[MTRBaseClusterModeSelect 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(@"ModeSelect.FeatureMap response %@", [value description]); + NSLog(@"LaundryWasherControls.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ModeSelect FeatureMap read Error", error); + LogNSError("LaundryWasherControls FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -55749,25 +56934,25 @@ class ReadModeSelectFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeModeSelectFeatureMap : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherControlsFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeModeSelectFeatureMap() + SubscribeAttributeLaundryWasherControlsFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeModeSelectFeatureMap() + ~SubscribeAttributeLaundryWasherControlsFeatureMap() { } 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::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 = [[MTRBaseClusterModeSelect 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(); @@ -55781,7 +56966,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(@"LaundryWasherControls.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -55794,35 +56979,38 @@ class SubscribeAttributeModeSelectFeatureMap : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute ClusterRevision */ -class ReadModeSelectClusterRevision : public ReadAttribute { +class ReadLaundryWasherControlsClusterRevision : public ReadAttribute { public: - ReadModeSelectClusterRevision() + ReadLaundryWasherControlsClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadModeSelectClusterRevision() + ~ReadLaundryWasherControlsClusterRevision() { } 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::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 = [[MTRBaseClusterModeSelect 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(@"ModeSelect.ClusterRevision response %@", [value description]); + NSLog(@"LaundryWasherControls.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("ModeSelect ClusterRevision read Error", error); + LogNSError("LaundryWasherControls ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -55831,25 +57019,25 @@ class ReadModeSelectClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeModeSelectClusterRevision : public SubscribeAttribute { +class SubscribeAttributeLaundryWasherControlsClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeModeSelectClusterRevision() + SubscribeAttributeLaundryWasherControlsClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeModeSelectClusterRevision() + ~SubscribeAttributeLaundryWasherControlsClusterRevision() { } 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::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 = [[MTRBaseClusterModeSelect 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(); @@ -55863,7 +57051,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(@"LaundryWasherControls.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -55876,9 +57064,10 @@ class SubscribeAttributeModeSelectClusterRevision : public SubscribeAttribute { } }; -#if MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster LaundryWasherMode | 0x0051 | +| Cluster RvcRunMode | 0x0054 | |------------------------------------------------------------------------------| | Commands: | | | * ChangeToMode | 0x00 | @@ -55886,7 +57075,6 @@ class SubscribeAttributeModeSelectClusterRevision : public SubscribeAttribute { | Attributes: | | | * SupportedModes | 0x0000 | | * CurrentMode | 0x0001 | -| * StartUpMode | 0x0002 | | * OnMode | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | @@ -55898,50 +57086,45 @@ class SubscribeAttributeModeSelectClusterRevision : public SubscribeAttribute { | Events: | | \*----------------------------------------------------------------------------*/ -#if MTR_ENABLE_PROVISIONAL /* * Command ChangeToMode */ -class LaundryWasherModeChangeToMode : public ClusterCommand { +class RvcRunModeChangeToMode : public ClusterCommand { public: - LaundryWasherModeChangeToMode() + 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::LaundryWasherMode::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::LaundryWasherMode::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 = [[MTRBaseClusterLaundryWasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRLaundryWasherModeClusterChangeToModeParams 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: - ^(MTRLaundryWasherModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { + ^(MTRRVCRunModeClusterChangeToModeResponseParams * _Nullable values, NSError * _Nullable error) { NSLog(@"Values: %@", values); if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::LaundryWasherMode::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::LaundryWasherMode::Commands::ChangeToModeResponse::Id; + constexpr chip::CommandId responseId = chip::app::Clusters::RvcRunMode::Commands::ChangeToModeResponse::Id; RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { @@ -55953,42 +57136,38 @@ class LaundryWasherModeChangeToMode : public ClusterCommand { } private: - chip::app::Clusters::LaundryWasherMode::Commands::ChangeToMode::Type mRequest; + chip::app::Clusters::RvcRunMode::Commands::ChangeToMode::Type mRequest; }; -#endif // MTR_ENABLE_PROVISIONAL - -#if MTR_ENABLE_PROVISIONAL - /* * Attribute SupportedModes */ -class ReadLaundryWasherModeSupportedModes : public ReadAttribute { +class ReadRvcRunModeSupportedModes : public ReadAttribute { public: - ReadLaundryWasherModeSupportedModes() + ReadRvcRunModeSupportedModes() : ReadAttribute("supported-modes") { } - ~ReadLaundryWasherModeSupportedModes() + ~ReadRvcRunModeSupportedModes() { } 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::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 = [[MTRBaseClusterLaundryWasherMode 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(@"LaundryWasherMode.SupportedModes response %@", [value description]); + NSLog(@"RVCRunMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherMode SupportedModes read Error", error); + LogNSError("RVCRunMode SupportedModes read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -55997,25 +57176,25 @@ class ReadLaundryWasherModeSupportedModes : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherModeSupportedModes : public SubscribeAttribute { +class SubscribeAttributeRvcRunModeSupportedModes : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherModeSupportedModes() + SubscribeAttributeRvcRunModeSupportedModes() : SubscribeAttribute("supported-modes") { } - ~SubscribeAttributeLaundryWasherModeSupportedModes() + ~SubscribeAttributeRvcRunModeSupportedModes() { } 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::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 = [[MTRBaseClusterLaundryWasherMode 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(); @@ -56029,7 +57208,7 @@ class SubscribeAttributeLaundryWasherModeSupportedModes : public SubscribeAttrib [cluster subscribeAttributeSupportedModesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.SupportedModes response %@", [value description]); + NSLog(@"RVCRunMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -56042,38 +57221,35 @@ class SubscribeAttributeLaundryWasherModeSupportedModes : public SubscribeAttrib } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute CurrentMode */ -class ReadLaundryWasherModeCurrentMode : public ReadAttribute { +class ReadRvcRunModeCurrentMode : public ReadAttribute { public: - ReadLaundryWasherModeCurrentMode() + ReadRvcRunModeCurrentMode() : ReadAttribute("current-mode") { } - ~ReadLaundryWasherModeCurrentMode() + ~ReadRvcRunModeCurrentMode() { } 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::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 = [[MTRBaseClusterLaundryWasherMode 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(@"LaundryWasherMode.CurrentMode response %@", [value description]); + NSLog(@"RVCRunMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherMode CurrentMode read Error", error); + LogNSError("RVCRunMode CurrentMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -56082,25 +57258,25 @@ class ReadLaundryWasherModeCurrentMode : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherModeCurrentMode : public SubscribeAttribute { +class SubscribeAttributeRvcRunModeCurrentMode : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherModeCurrentMode() + SubscribeAttributeRvcRunModeCurrentMode() : SubscribeAttribute("current-mode") { } - ~SubscribeAttributeLaundryWasherModeCurrentMode() + ~SubscribeAttributeRvcRunModeCurrentMode() { } 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::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 = [[MTRBaseClusterLaundryWasherMode 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(); @@ -56114,136 +57290,7 @@ class SubscribeAttributeLaundryWasherModeCurrentMode : public SubscribeAttribute [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]); + NSLog(@"RVCRunMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -56256,38 +57303,37 @@ class SubscribeAttributeLaundryWasherModeStartUpMode : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* * Attribute OnMode */ -class ReadLaundryWasherModeOnMode : public ReadAttribute { +class ReadRvcRunModeOnMode : public ReadAttribute { public: - ReadLaundryWasherModeOnMode() + ReadRvcRunModeOnMode() : ReadAttribute("on-mode") { } - ~ReadLaundryWasherModeOnMode() + ~ReadRvcRunModeOnMode() { } 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::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 = [[MTRBaseClusterLaundryWasherMode 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(@"LaundryWasherMode.OnMode response %@", [value description]); + NSLog(@"RVCRunMode.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherMode OnMode read Error", error); + LogNSError("RVCRunMode OnMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -56296,9 +57342,9 @@ class ReadLaundryWasherModeOnMode : public ReadAttribute { } }; -class WriteLaundryWasherModeOnMode : public WriteAttribute { +class WriteRvcRunModeOnMode : public WriteAttribute { public: - WriteLaundryWasherModeOnMode() + WriteRvcRunModeOnMode() : WriteAttribute("on-mode") { AddArgument("attr-name", "on-mode"); @@ -56306,18 +57352,18 @@ class WriteLaundryWasherModeOnMode : public WriteAttribute { WriteAttribute::AddArguments(); } - ~WriteLaundryWasherModeOnMode() + ~WriteRvcRunModeOnMode() { } 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::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 = [[MTRBaseClusterLaundryWasherMode 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; @@ -56328,7 +57374,7 @@ class WriteLaundryWasherModeOnMode : public WriteAttribute { [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("LaundryWasherMode OnMode write Error", error); + LogNSError("RVCRunMode OnMode write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -56340,25 +57386,25 @@ class WriteLaundryWasherModeOnMode : public WriteAttribute { chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeLaundryWasherModeOnMode : public SubscribeAttribute { +class SubscribeAttributeRvcRunModeOnMode : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherModeOnMode() + SubscribeAttributeRvcRunModeOnMode() : SubscribeAttribute("on-mode") { } - ~SubscribeAttributeLaundryWasherModeOnMode() + ~SubscribeAttributeRvcRunModeOnMode() { } 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::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 = [[MTRBaseClusterLaundryWasherMode 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(); @@ -56372,7 +57418,7 @@ class SubscribeAttributeLaundryWasherModeOnMode : public SubscribeAttribute { [cluster subscribeAttributeOnModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherMode.OnMode response %@", [value description]); + NSLog(@"RVCRunMode.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -56386,37 +57432,36 @@ class SubscribeAttributeLaundryWasherModeOnMode : public SubscribeAttribute { }; #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* * Attribute GeneratedCommandList */ -class ReadLaundryWasherModeGeneratedCommandList : public ReadAttribute { +class ReadRvcRunModeGeneratedCommandList : public ReadAttribute { public: - ReadLaundryWasherModeGeneratedCommandList() + ReadRvcRunModeGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadLaundryWasherModeGeneratedCommandList() + ~ReadRvcRunModeGeneratedCommandList() { } 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::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 = [[MTRBaseClusterLaundryWasherMode 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(@"LaundryWasherMode.GeneratedCommandList response %@", [value description]); + NSLog(@"RVCRunMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherMode GeneratedCommandList read Error", error); + LogNSError("RVCRunMode GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -56425,25 +57470,25 @@ class ReadLaundryWasherModeGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherModeGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeRvcRunModeGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherModeGeneratedCommandList() + SubscribeAttributeRvcRunModeGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeLaundryWasherModeGeneratedCommandList() + ~SubscribeAttributeRvcRunModeGeneratedCommandList() { } 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::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 = [[MTRBaseClusterLaundryWasherMode 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(); @@ -56457,7 +57502,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(@"RVCRunMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -56470,38 +57515,35 @@ class SubscribeAttributeLaundryWasherModeGeneratedCommandList : public Subscribe } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute AcceptedCommandList */ -class ReadLaundryWasherModeAcceptedCommandList : public ReadAttribute { +class ReadRvcRunModeAcceptedCommandList : public ReadAttribute { public: - ReadLaundryWasherModeAcceptedCommandList() + ReadRvcRunModeAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadLaundryWasherModeAcceptedCommandList() + ~ReadRvcRunModeAcceptedCommandList() { } 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::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 = [[MTRBaseClusterLaundryWasherMode 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(@"LaundryWasherMode.AcceptedCommandList response %@", [value description]); + NSLog(@"RVCRunMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherMode AcceptedCommandList read Error", error); + LogNSError("RVCRunMode AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -56510,25 +57552,25 @@ class ReadLaundryWasherModeAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherModeAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeRvcRunModeAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherModeAcceptedCommandList() + SubscribeAttributeRvcRunModeAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeLaundryWasherModeAcceptedCommandList() + ~SubscribeAttributeRvcRunModeAcceptedCommandList() { } 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::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 = [[MTRBaseClusterLaundryWasherMode 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(); @@ -56542,7 +57584,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(@"RVCRunMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -56555,38 +57597,37 @@ class SubscribeAttributeLaundryWasherModeAcceptedCommandList : public SubscribeA } }; -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* * Attribute EventList */ -class ReadLaundryWasherModeEventList : public ReadAttribute { +class ReadRvcRunModeEventList : public ReadAttribute { public: - ReadLaundryWasherModeEventList() + ReadRvcRunModeEventList() : ReadAttribute("event-list") { } - ~ReadLaundryWasherModeEventList() + ~ReadRvcRunModeEventList() { } 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::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 = [[MTRBaseClusterLaundryWasherMode 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(@"LaundryWasherMode.EventList response %@", [value description]); + NSLog(@"RVCRunMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherMode EventList read Error", error); + LogNSError("RVCRunMode EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -56595,25 +57636,25 @@ class ReadLaundryWasherModeEventList : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherModeEventList : public SubscribeAttribute { +class SubscribeAttributeRvcRunModeEventList : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherModeEventList() + SubscribeAttributeRvcRunModeEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeLaundryWasherModeEventList() + ~SubscribeAttributeRvcRunModeEventList() { } 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::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 = [[MTRBaseClusterLaundryWasherMode 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(); @@ -56627,7 +57668,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(@"RVCRunMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -56641,37 +57682,36 @@ class SubscribeAttributeLaundryWasherModeEventList : public SubscribeAttribute { }; #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* * Attribute AttributeList */ -class ReadLaundryWasherModeAttributeList : public ReadAttribute { +class ReadRvcRunModeAttributeList : public ReadAttribute { public: - ReadLaundryWasherModeAttributeList() + ReadRvcRunModeAttributeList() : ReadAttribute("attribute-list") { } - ~ReadLaundryWasherModeAttributeList() + ~ReadRvcRunModeAttributeList() { } 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::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 = [[MTRBaseClusterLaundryWasherMode 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(@"LaundryWasherMode.AttributeList response %@", [value description]); + NSLog(@"RVCRunMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherMode AttributeList read Error", error); + LogNSError("RVCRunMode AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -56680,25 +57720,25 @@ class ReadLaundryWasherModeAttributeList : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherModeAttributeList : public SubscribeAttribute { +class SubscribeAttributeRvcRunModeAttributeList : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherModeAttributeList() + SubscribeAttributeRvcRunModeAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeLaundryWasherModeAttributeList() + ~SubscribeAttributeRvcRunModeAttributeList() { } 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::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 = [[MTRBaseClusterLaundryWasherMode 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(); @@ -56712,7 +57752,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(@"RVCRunMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -56725,38 +57765,35 @@ class SubscribeAttributeLaundryWasherModeAttributeList : public SubscribeAttribu } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute FeatureMap */ -class ReadLaundryWasherModeFeatureMap : public ReadAttribute { +class ReadRvcRunModeFeatureMap : public ReadAttribute { public: - ReadLaundryWasherModeFeatureMap() + ReadRvcRunModeFeatureMap() : ReadAttribute("feature-map") { } - ~ReadLaundryWasherModeFeatureMap() + ~ReadRvcRunModeFeatureMap() { } 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::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 = [[MTRBaseClusterLaundryWasherMode 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(@"LaundryWasherMode.FeatureMap response %@", [value description]); + NSLog(@"RVCRunMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherMode FeatureMap read Error", error); + LogNSError("RVCRunMode FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -56765,25 +57802,25 @@ class ReadLaundryWasherModeFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherModeFeatureMap : public SubscribeAttribute { +class SubscribeAttributeRvcRunModeFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherModeFeatureMap() + SubscribeAttributeRvcRunModeFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeLaundryWasherModeFeatureMap() + ~SubscribeAttributeRvcRunModeFeatureMap() { } 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::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 = [[MTRBaseClusterLaundryWasherMode 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(); @@ -56797,7 +57834,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(@"RVCRunMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -56810,38 +57847,35 @@ class SubscribeAttributeLaundryWasherModeFeatureMap : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute ClusterRevision */ -class ReadLaundryWasherModeClusterRevision : public ReadAttribute { +class ReadRvcRunModeClusterRevision : public ReadAttribute { public: - ReadLaundryWasherModeClusterRevision() + ReadRvcRunModeClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadLaundryWasherModeClusterRevision() + ~ReadRvcRunModeClusterRevision() { } 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::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 = [[MTRBaseClusterLaundryWasherMode 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(@"LaundryWasherMode.ClusterRevision response %@", [value description]); + NSLog(@"RVCRunMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherMode ClusterRevision read Error", error); + LogNSError("RVCRunMode ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -56850,25 +57884,25 @@ class ReadLaundryWasherModeClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherModeClusterRevision : public SubscribeAttribute { +class SubscribeAttributeRvcRunModeClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherModeClusterRevision() + SubscribeAttributeRvcRunModeClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeLaundryWasherModeClusterRevision() + ~SubscribeAttributeRvcRunModeClusterRevision() { } 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::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 = [[MTRBaseClusterLaundryWasherMode 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(); @@ -56882,7 +57916,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(@"RVCRunMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -56895,11 +57929,8 @@ class SubscribeAttributeLaundryWasherModeClusterRevision : public SubscribeAttri } }; -#endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster RefrigeratorAndTemperatureControlledCabinetMode | 0x0052 | +| Cluster RvcCleanMode | 0x0055 | |------------------------------------------------------------------------------| | Commands: | | | * ChangeToMode | 0x00 | @@ -56907,7 +57938,6 @@ class SubscribeAttributeLaundryWasherModeClusterRevision : public SubscribeAttri | Attributes: | | | * SupportedModes | 0x0000 | | * CurrentMode | 0x0001 | -| * StartUpMode | 0x0002 | | * OnMode | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | @@ -56919,50 +57949,45 @@ class SubscribeAttributeLaundryWasherModeClusterRevision : public SubscribeAttri | Events: | | \*----------------------------------------------------------------------------*/ -#if MTR_ENABLE_PROVISIONAL /* * Command ChangeToMode */ -class RefrigeratorAndTemperatureControlledCabinetModeChangeToMode : public ClusterCommand { +class RvcCleanModeChangeToMode : public ClusterCommand { public: - RefrigeratorAndTemperatureControlledCabinetModeChangeToMode() + RvcCleanModeChangeToMode() : 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::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 = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRRefrigeratorAndTemperatureControlledCabinetModeClusterChangeToModeParams alloc] init]; + __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; -#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) { + ^(MTRRVCCleanModeClusterChangeToModeResponseParams * _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::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::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToModeResponse::Id; + constexpr chip::CommandId responseId = chip::app::Clusters::RvcCleanMode::Commands::ChangeToModeResponse::Id; RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { @@ -56974,42 +57999,38 @@ class RefrigeratorAndTemperatureControlledCabinetModeChangeToMode : public Clust } private: - chip::app::Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Commands::ChangeToMode::Type mRequest; + chip::app::Clusters::RvcCleanMode::Commands::ChangeToMode::Type mRequest; }; -#endif // MTR_ENABLE_PROVISIONAL - -#if MTR_ENABLE_PROVISIONAL - /* * Attribute SupportedModes */ -class ReadRefrigeratorAndTemperatureControlledCabinetModeSupportedModes : public ReadAttribute { +class ReadRvcCleanModeSupportedModes : public ReadAttribute { public: - ReadRefrigeratorAndTemperatureControlledCabinetModeSupportedModes() + ReadRvcCleanModeSupportedModes() : ReadAttribute("supported-modes") { } - ~ReadRefrigeratorAndTemperatureControlledCabinetModeSupportedModes() + ~ReadRvcCleanModeSupportedModes() { } 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::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 = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeSupportedModesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.SupportedModes response %@", [value description]); + NSLog(@"RVCCleanMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode SupportedModes read Error", error); + LogNSError("RVCCleanMode SupportedModes read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -57018,25 +58039,25 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeSupportedModes : public } }; -class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeSupportedModes : public SubscribeAttribute { +class SubscribeAttributeRvcCleanModeSupportedModes : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeSupportedModes() + SubscribeAttributeRvcCleanModeSupportedModes() : SubscribeAttribute("supported-modes") { } - ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeSupportedModes() + ~SubscribeAttributeRvcCleanModeSupportedModes() { } 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::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 = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode 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(); @@ -57050,7 +58071,7 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeSupported [cluster subscribeAttributeSupportedModesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.SupportedModes response %@", [value description]); + NSLog(@"RVCCleanMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -57063,38 +58084,35 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeSupported } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute CurrentMode */ -class ReadRefrigeratorAndTemperatureControlledCabinetModeCurrentMode : public ReadAttribute { +class ReadRvcCleanModeCurrentMode : public ReadAttribute { public: - ReadRefrigeratorAndTemperatureControlledCabinetModeCurrentMode() + ReadRvcCleanModeCurrentMode() : ReadAttribute("current-mode") { } - ~ReadRefrigeratorAndTemperatureControlledCabinetModeCurrentMode() + ~ReadRvcCleanModeCurrentMode() { } 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::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 = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeCurrentModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.CurrentMode response %@", [value description]); + NSLog(@"RVCCleanMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode CurrentMode read Error", error); + LogNSError("RVCCleanMode CurrentMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -57103,25 +58121,25 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeCurrentMode : public Re } }; -class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeCurrentMode : public SubscribeAttribute { +class SubscribeAttributeRvcCleanModeCurrentMode : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeCurrentMode() + SubscribeAttributeRvcCleanModeCurrentMode() : SubscribeAttribute("current-mode") { } - ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeCurrentMode() + ~SubscribeAttributeRvcCleanModeCurrentMode() { } 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::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 = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode 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(); @@ -57135,136 +58153,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(@"RVCCleanMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -57277,38 +58166,37 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeStartUpMo } }; -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* * Attribute OnMode */ -class ReadRefrigeratorAndTemperatureControlledCabinetModeOnMode : public ReadAttribute { +class ReadRvcCleanModeOnMode : public ReadAttribute { public: - ReadRefrigeratorAndTemperatureControlledCabinetModeOnMode() + ReadRvcCleanModeOnMode() : ReadAttribute("on-mode") { } - ~ReadRefrigeratorAndTemperatureControlledCabinetModeOnMode() + ~ReadRvcCleanModeOnMode() { } 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::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 = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; [cluster readAttributeOnModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.OnMode response %@", [value description]); + NSLog(@"RVCCleanMode.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode OnMode read Error", error); + LogNSError("RVCCleanMode OnMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -57317,9 +58205,9 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeOnMode : public ReadAtt } }; -class WriteRefrigeratorAndTemperatureControlledCabinetModeOnMode : public WriteAttribute { +class WriteRvcCleanModeOnMode : public WriteAttribute { public: - WriteRefrigeratorAndTemperatureControlledCabinetModeOnMode() + WriteRvcCleanModeOnMode() : WriteAttribute("on-mode") { AddArgument("attr-name", "on-mode"); @@ -57327,18 +58215,18 @@ class WriteRefrigeratorAndTemperatureControlledCabinetModeOnMode : public WriteA WriteAttribute::AddArguments(); } - ~WriteRefrigeratorAndTemperatureControlledCabinetModeOnMode() + ~WriteRvcCleanModeOnMode() { } 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::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 = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __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; @@ -57349,7 +58237,7 @@ class WriteRefrigeratorAndTemperatureControlledCabinetModeOnMode : public WriteA [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode OnMode write Error", error); + LogNSError("RVCCleanMode OnMode write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -57361,25 +58249,25 @@ class WriteRefrigeratorAndTemperatureControlledCabinetModeOnMode : public WriteA chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeOnMode : public SubscribeAttribute { +class SubscribeAttributeRvcCleanModeOnMode : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeOnMode() + SubscribeAttributeRvcCleanModeOnMode() : SubscribeAttribute("on-mode") { } - ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeOnMode() + ~SubscribeAttributeRvcCleanModeOnMode() { } 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::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 = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode 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(); @@ -57393,7 +58281,7 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeOnMode : [cluster subscribeAttributeOnModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.OnMode response %@", [value description]); + NSLog(@"RVCCleanMode.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -57407,37 +58295,36 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeOnMode : }; #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* * Attribute GeneratedCommandList */ -class ReadRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList : public ReadAttribute { +class ReadRvcCleanModeGeneratedCommandList : public ReadAttribute { public: - ReadRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList() + ReadRvcCleanModeGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList() + ~ReadRvcCleanModeGeneratedCommandList() { } 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::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 = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode 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(@"RefrigeratorAndTemperatureControlledCabinetMode.GeneratedCommandList response %@", [value description]); + NSLog(@"RVCCleanMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode GeneratedCommandList read Error", error); + LogNSError("RVCCleanMode GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -57446,25 +58333,25 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList : } }; -class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeRvcCleanModeGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList() + SubscribeAttributeRvcCleanModeGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeGeneratedCommandList() + ~SubscribeAttributeRvcCleanModeGeneratedCommandList() { } 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::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 = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode 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(); @@ -57478,7 +58365,7 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeGenerated [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.GeneratedCommandList response %@", [value description]); + NSLog(@"RVCCleanMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -57491,38 +58378,35 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeGenerated } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute AcceptedCommandList */ -class ReadRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList : public ReadAttribute { +class ReadRvcCleanModeAcceptedCommandList : public ReadAttribute { public: - ReadRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList() + ReadRvcCleanModeAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList() + ~ReadRvcCleanModeAcceptedCommandList() { } 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::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 = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode 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(@"RefrigeratorAndTemperatureControlledCabinetMode.AcceptedCommandList response %@", [value description]); + NSLog(@"RVCCleanMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode AcceptedCommandList read Error", error); + LogNSError("RVCCleanMode AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -57531,25 +58415,25 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList : p } }; -class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeRvcCleanModeAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList() + SubscribeAttributeRvcCleanModeAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAcceptedCommandList() + ~SubscribeAttributeRvcCleanModeAcceptedCommandList() { } 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::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 = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode 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(); @@ -57563,7 +58447,7 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAcceptedC [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.AcceptedCommandList response %@", [value description]); + NSLog(@"RVCCleanMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -57576,38 +58460,37 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAcceptedC } }; -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* * Attribute EventList */ -class ReadRefrigeratorAndTemperatureControlledCabinetModeEventList : public ReadAttribute { +class ReadRvcCleanModeEventList : public ReadAttribute { public: - ReadRefrigeratorAndTemperatureControlledCabinetModeEventList() + ReadRvcCleanModeEventList() : ReadAttribute("event-list") { } - ~ReadRefrigeratorAndTemperatureControlledCabinetModeEventList() + ~ReadRvcCleanModeEventList() { } 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::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 = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode 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(@"RefrigeratorAndTemperatureControlledCabinetMode.EventList response %@", [value description]); + NSLog(@"RVCCleanMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode EventList read Error", error); + LogNSError("RVCCleanMode EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -57616,25 +58499,25 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeEventList : public Read } }; -class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeEventList : public SubscribeAttribute { +class SubscribeAttributeRvcCleanModeEventList : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeEventList() + SubscribeAttributeRvcCleanModeEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeEventList() + ~SubscribeAttributeRvcCleanModeEventList() { } 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::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 = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode 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(); @@ -57648,7 +58531,7 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeEventList [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.EventList response %@", [value description]); + NSLog(@"RVCCleanMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -57662,37 +58545,36 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeEventList }; #endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL /* * Attribute AttributeList */ -class ReadRefrigeratorAndTemperatureControlledCabinetModeAttributeList : public ReadAttribute { +class ReadRvcCleanModeAttributeList : public ReadAttribute { public: - ReadRefrigeratorAndTemperatureControlledCabinetModeAttributeList() + ReadRvcCleanModeAttributeList() : ReadAttribute("attribute-list") { } - ~ReadRefrigeratorAndTemperatureControlledCabinetModeAttributeList() + ~ReadRvcCleanModeAttributeList() { } 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::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 = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode 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(@"RefrigeratorAndTemperatureControlledCabinetMode.AttributeList response %@", [value description]); + NSLog(@"RVCCleanMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode AttributeList read Error", error); + LogNSError("RVCCleanMode AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -57701,25 +58583,25 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeAttributeList : public } }; -class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAttributeList : public SubscribeAttribute { +class SubscribeAttributeRvcCleanModeAttributeList : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAttributeList() + SubscribeAttributeRvcCleanModeAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAttributeList() + ~SubscribeAttributeRvcCleanModeAttributeList() { } 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::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 = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode 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(); @@ -57733,7 +58615,7 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAttribute [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.AttributeList response %@", [value description]); + NSLog(@"RVCCleanMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -57746,38 +58628,35 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute FeatureMap */ -class ReadRefrigeratorAndTemperatureControlledCabinetModeFeatureMap : public ReadAttribute { +class ReadRvcCleanModeFeatureMap : public ReadAttribute { public: - ReadRefrigeratorAndTemperatureControlledCabinetModeFeatureMap() + ReadRvcCleanModeFeatureMap() : ReadAttribute("feature-map") { } - ~ReadRefrigeratorAndTemperatureControlledCabinetModeFeatureMap() + ~ReadRvcCleanModeFeatureMap() { } 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::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 = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode 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(@"RefrigeratorAndTemperatureControlledCabinetMode.FeatureMap response %@", [value description]); + NSLog(@"RVCCleanMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode FeatureMap read Error", error); + LogNSError("RVCCleanMode FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -57786,25 +58665,25 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeFeatureMap : public Rea } }; -class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeFeatureMap : public SubscribeAttribute { +class SubscribeAttributeRvcCleanModeFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeFeatureMap() + SubscribeAttributeRvcCleanModeFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeFeatureMap() + ~SubscribeAttributeRvcCleanModeFeatureMap() { } 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::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 = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode 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(); @@ -57818,7 +58697,7 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeFeatureMa [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.FeatureMap response %@", [value description]); + NSLog(@"RVCCleanMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -57831,38 +58710,35 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeFeatureMa } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute ClusterRevision */ -class ReadRefrigeratorAndTemperatureControlledCabinetModeClusterRevision : public ReadAttribute { +class ReadRvcCleanModeClusterRevision : public ReadAttribute { public: - ReadRefrigeratorAndTemperatureControlledCabinetModeClusterRevision() + ReadRvcCleanModeClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadRefrigeratorAndTemperatureControlledCabinetModeClusterRevision() + ~ReadRvcCleanModeClusterRevision() { } 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::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 = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode 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(@"RefrigeratorAndTemperatureControlledCabinetMode.ClusterRevision response %@", [value description]); + NSLog(@"RVCCleanMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RefrigeratorAndTemperatureControlledCabinetMode ClusterRevision read Error", error); + LogNSError("RVCCleanMode ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -57871,25 +58747,25 @@ class ReadRefrigeratorAndTemperatureControlledCabinetModeClusterRevision : publi } }; -class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeClusterRevision : public SubscribeAttribute { +class SubscribeAttributeRvcCleanModeClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeClusterRevision() + SubscribeAttributeRvcCleanModeClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeClusterRevision() + ~SubscribeAttributeRvcCleanModeClusterRevision() { } 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::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 = [[MTRBaseClusterRefrigeratorAndTemperatureControlledCabinetMode 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(); @@ -57903,7 +58779,7 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeClusterRe [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAndTemperatureControlledCabinetMode.ClusterRevision response %@", [value description]); + NSLog(@"RVCCleanMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -57916,19 +58792,20 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeClusterRe } }; -#endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster LaundryWasherControls | 0x0053 | +| Cluster TemperatureControl | 0x0056 | |------------------------------------------------------------------------------| | Commands: | | +| * SetTemperature | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * SpinSpeeds | 0x0000 | -| * SpinSpeedCurrent | 0x0001 | -| * NumberOfRinses | 0x0002 | -| * SupportedRinses | 0x0003 | +| * TemperatureSetpoint | 0x0000 | +| * MinTemperature | 0x0001 | +| * MaxTemperature | 0x0002 | +| * Step | 0x0003 | +| * SelectedTemperatureLevel | 0x0004 | +| * SupportedTemperatureLevels | 0x0005 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -57939,37 +58816,105 @@ class SubscribeAttributeRefrigeratorAndTemperatureControlledCabinetModeClusterRe | Events: | | \*----------------------------------------------------------------------------*/ +#if MTR_ENABLE_PROVISIONAL +/* + * Command SetTemperature + */ +class TemperatureControlSetTemperature : public ClusterCommand { +public: + TemperatureControlSetTemperature() + : ClusterCommand("set-temperature") + { +#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::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 = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRTemperatureControlClusterSetTemperatureParams 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; + } +#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); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::TemperatureControl::Commands::SetTemperature::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL + #if MTR_ENABLE_PROVISIONAL /* - * Attribute SpinSpeeds + * Attribute TemperatureSetpoint */ -class ReadLaundryWasherControlsSpinSpeeds : public ReadAttribute { +class ReadTemperatureControlTemperatureSetpoint : public ReadAttribute { public: - ReadLaundryWasherControlsSpinSpeeds() - : ReadAttribute("spin-speeds") + ReadTemperatureControlTemperatureSetpoint() + : ReadAttribute("temperature-setpoint") { } - ~ReadLaundryWasherControlsSpinSpeeds() + ~ReadTemperatureControlTemperatureSetpoint() { } 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; + 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 = [[MTRBaseClusterLaundryWasherControls alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSpinSpeedsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.SpinSpeeds 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("LaundryWasherControls SpinSpeeds read Error", error); + LogNSError("TemperatureControl TemperatureSetpoint read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -57978,25 +58923,25 @@ class ReadLaundryWasherControlsSpinSpeeds : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherControlsSpinSpeeds : public SubscribeAttribute { +class SubscribeAttributeTemperatureControlTemperatureSetpoint : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherControlsSpinSpeeds() - : SubscribeAttribute("spin-speeds") + SubscribeAttributeTemperatureControlTemperatureSetpoint() + : SubscribeAttribute("temperature-setpoint") { } - ~SubscribeAttributeLaundryWasherControlsSpinSpeeds() + ~SubscribeAttributeTemperatureControlTemperatureSetpoint() { } 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; + 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 = [[MTRBaseClusterLaundryWasherControls 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(); @@ -58007,10 +58952,10 @@ class SubscribeAttributeLaundryWasherControlsSpinSpeeds : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSpinSpeedsWithParams:params + [cluster subscribeAttributeTemperatureSetpointWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.SpinSpeeds 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 { @@ -58027,34 +58972,34 @@ class SubscribeAttributeLaundryWasherControlsSpinSpeeds : public SubscribeAttrib #if MTR_ENABLE_PROVISIONAL /* - * Attribute SpinSpeedCurrent + * Attribute MinTemperature */ -class ReadLaundryWasherControlsSpinSpeedCurrent : public ReadAttribute { +class ReadTemperatureControlMinTemperature : public ReadAttribute { public: - ReadLaundryWasherControlsSpinSpeedCurrent() - : ReadAttribute("spin-speed-current") + ReadTemperatureControlMinTemperature() + : ReadAttribute("min-temperature") { } - ~ReadLaundryWasherControlsSpinSpeedCurrent() + ~ReadTemperatureControlMinTemperature() { } 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::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 = [[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 = [[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("LaundryWasherControls SpinSpeedCurrent read Error", error); + LogNSError("TemperatureControl MinTemperature read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -58063,69 +59008,110 @@ class ReadLaundryWasherControlsSpinSpeedCurrent : public ReadAttribute { } }; -class WriteLaundryWasherControlsSpinSpeedCurrent : public WriteAttribute { +class SubscribeAttributeTemperatureControlMinTemperature : public SubscribeAttribute { public: - WriteLaundryWasherControlsSpinSpeedCurrent() - : WriteAttribute("spin-speed-current") + SubscribeAttributeTemperatureControlMinTemperature() + : SubscribeAttribute("min-temperature") { - AddArgument("attr-name", "spin-speed-current"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); } - ~WriteLaundryWasherControlsSpinSpeedCurrent() + ~SubscribeAttributeTemperatureControlMinTemperature() { } 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::TemperatureControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::MinTemperature::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 = [[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()]; + __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 subscribeAttributeMinTemperatureWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"TemperatureControl.MinTemperature response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; - [cluster writeAttributeSpinSpeedCurrentWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("LaundryWasherControls SpinSpeedCurrent write Error", error); + return CHIP_NO_ERROR; + } +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute MaxTemperature + */ +class ReadTemperatureControlMaxTemperature : public ReadAttribute { +public: + ReadTemperatureControlMaxTemperature() + : ReadAttribute("max-temperature") + { + } + + ~ReadTemperatureControlMaxTemperature() + { + } + + 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; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%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]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("TemperatureControl MaxTemperature 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 SubscribeAttributeTemperatureControlMaxTemperature : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherControlsSpinSpeedCurrent() - : SubscribeAttribute("spin-speed-current") + SubscribeAttributeTemperatureControlMaxTemperature() + : SubscribeAttribute("max-temperature") { } - ~SubscribeAttributeLaundryWasherControlsSpinSpeedCurrent() + ~SubscribeAttributeTemperatureControlMaxTemperature() { } 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::TemperatureControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::TemperatureControl::Attributes::MaxTemperature::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%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 = [[MTRBaseClusterTemperatureControl 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 +59122,10 @@ class SubscribeAttributeLaundryWasherControlsSpinSpeedCurrent : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSpinSpeedCurrentWithParams:params + [cluster subscribeAttributeMaxTemperatureWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.SpinSpeedCurrent response %@", [value description]); + NSLog(@"TemperatureControl.MaxTemperature response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -58156,34 +59142,34 @@ class SubscribeAttributeLaundryWasherControlsSpinSpeedCurrent : public Subscribe #if MTR_ENABLE_PROVISIONAL /* - * Attribute NumberOfRinses + * Attribute Step */ -class ReadLaundryWasherControlsNumberOfRinses : public ReadAttribute { +class ReadTemperatureControlStep : public ReadAttribute { public: - ReadLaundryWasherControlsNumberOfRinses() - : ReadAttribute("number-of-rinses") + ReadTemperatureControlStep() + : ReadAttribute("step") { } - ~ReadLaundryWasherControlsNumberOfRinses() + ~ReadTemperatureControlStep() { } 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::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 = [[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 = [[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("LaundryWasherControls NumberOfRinses read Error", error); + LogNSError("TemperatureControl Step read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -58192,66 +59178,110 @@ class ReadLaundryWasherControlsNumberOfRinses : public ReadAttribute { } }; -class WriteLaundryWasherControlsNumberOfRinses : public WriteAttribute { +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; + } +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute SelectedTemperatureLevel + */ +class ReadTemperatureControlSelectedTemperatureLevel : public ReadAttribute { public: - WriteLaundryWasherControlsNumberOfRinses() - : WriteAttribute("number-of-rinses") + ReadTemperatureControlSelectedTemperatureLevel() + : ReadAttribute("selected-temperature-level") { - AddArgument("attr-name", "number-of-rinses"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); } - ~WriteLaundryWasherControlsNumberOfRinses() + ~ReadTemperatureControlSelectedTemperatureLevel() { } 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::TemperatureControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::TemperatureControl::Attributes::SelectedTemperatureLevel::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]; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - [cluster writeAttributeNumberOfRinsesWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("LaundryWasherControls NumberOfRinses write Error", error); + 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; } - -private: - uint8_t mValue; }; -class SubscribeAttributeLaundryWasherControlsNumberOfRinses : public SubscribeAttribute { +class SubscribeAttributeTemperatureControlSelectedTemperatureLevel : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherControlsNumberOfRinses() - : SubscribeAttribute("number-of-rinses") + SubscribeAttributeTemperatureControlSelectedTemperatureLevel() + : SubscribeAttribute("selected-temperature-level") { } - ~SubscribeAttributeLaundryWasherControlsNumberOfRinses() + ~SubscribeAttributeTemperatureControlSelectedTemperatureLevel() { } 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::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 = [[MTRBaseClusterLaundryWasherControls 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(); @@ -58262,10 +59292,10 @@ class SubscribeAttributeLaundryWasherControlsNumberOfRinses : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNumberOfRinsesWithParams:params + [cluster subscribeAttributeSelectedTemperatureLevelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.NumberOfRinses response %@", [value description]); + NSLog(@"TemperatureControl.SelectedTemperatureLevel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -58282,34 +59312,34 @@ class SubscribeAttributeLaundryWasherControlsNumberOfRinses : public SubscribeAt #if MTR_ENABLE_PROVISIONAL /* - * Attribute SupportedRinses + * Attribute SupportedTemperatureLevels */ -class ReadLaundryWasherControlsSupportedRinses : public ReadAttribute { +class ReadTemperatureControlSupportedTemperatureLevels : public ReadAttribute { public: - ReadLaundryWasherControlsSupportedRinses() - : ReadAttribute("supported-rinses") + ReadTemperatureControlSupportedTemperatureLevels() + : ReadAttribute("supported-temperature-levels") { } - ~ReadLaundryWasherControlsSupportedRinses() + ~ReadTemperatureControlSupportedTemperatureLevels() { } 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::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 = [[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 = [[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("LaundryWasherControls SupportedRinses read Error", error); + LogNSError("TemperatureControl SupportedTemperatureLevels read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -58318,25 +59348,25 @@ class ReadLaundryWasherControlsSupportedRinses : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherControlsSupportedRinses : public SubscribeAttribute { +class SubscribeAttributeTemperatureControlSupportedTemperatureLevels : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherControlsSupportedRinses() - : SubscribeAttribute("supported-rinses") + SubscribeAttributeTemperatureControlSupportedTemperatureLevels() + : SubscribeAttribute("supported-temperature-levels") { } - ~SubscribeAttributeLaundryWasherControlsSupportedRinses() + ~SubscribeAttributeTemperatureControlSupportedTemperatureLevels() { } 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::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 = [[MTRBaseClusterLaundryWasherControls 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(); @@ -58347,10 +59377,10 @@ class SubscribeAttributeLaundryWasherControlsSupportedRinses : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedRinsesWithParams:params + [cluster subscribeAttributeSupportedTemperatureLevelsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"LaundryWasherControls.SupportedRinses response %@", [value description]); + NSLog(@"TemperatureControl.SupportedTemperatureLevels response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -58369,32 +59399,32 @@ class SubscribeAttributeLaundryWasherControlsSupportedRinses : public SubscribeA /* * Attribute GeneratedCommandList */ -class ReadLaundryWasherControlsGeneratedCommandList : public ReadAttribute { +class ReadTemperatureControlGeneratedCommandList : public ReadAttribute { public: - ReadLaundryWasherControlsGeneratedCommandList() + ReadTemperatureControlGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadLaundryWasherControlsGeneratedCommandList() + ~ReadTemperatureControlGeneratedCommandList() { } 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::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 = [[MTRBaseClusterLaundryWasherControls 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(@"LaundryWasherControls.GeneratedCommandList response %@", [value description]); + NSLog(@"TemperatureControl.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherControls GeneratedCommandList read Error", error); + LogNSError("TemperatureControl GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -58403,25 +59433,25 @@ class ReadLaundryWasherControlsGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherControlsGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeTemperatureControlGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherControlsGeneratedCommandList() + SubscribeAttributeTemperatureControlGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeLaundryWasherControlsGeneratedCommandList() + ~SubscribeAttributeTemperatureControlGeneratedCommandList() { } 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::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 = [[MTRBaseClusterLaundryWasherControls 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(); @@ -58435,7 +59465,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(@"TemperatureControl.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -58454,32 +59484,32 @@ class SubscribeAttributeLaundryWasherControlsGeneratedCommandList : public Subsc /* * Attribute AcceptedCommandList */ -class ReadLaundryWasherControlsAcceptedCommandList : public ReadAttribute { +class ReadTemperatureControlAcceptedCommandList : public ReadAttribute { public: - ReadLaundryWasherControlsAcceptedCommandList() + ReadTemperatureControlAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadLaundryWasherControlsAcceptedCommandList() + ~ReadTemperatureControlAcceptedCommandList() { } 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::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 = [[MTRBaseClusterLaundryWasherControls 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(@"LaundryWasherControls.AcceptedCommandList response %@", [value description]); + NSLog(@"TemperatureControl.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherControls AcceptedCommandList read Error", error); + LogNSError("TemperatureControl AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -58488,25 +59518,25 @@ class ReadLaundryWasherControlsAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherControlsAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeTemperatureControlAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherControlsAcceptedCommandList() + SubscribeAttributeTemperatureControlAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeLaundryWasherControlsAcceptedCommandList() + ~SubscribeAttributeTemperatureControlAcceptedCommandList() { } 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::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 = [[MTRBaseClusterLaundryWasherControls 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(); @@ -58520,7 +59550,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(@"TemperatureControl.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -58539,32 +59569,32 @@ class SubscribeAttributeLaundryWasherControlsAcceptedCommandList : public Subscr /* * Attribute EventList */ -class ReadLaundryWasherControlsEventList : public ReadAttribute { +class ReadTemperatureControlEventList : public ReadAttribute { public: - ReadLaundryWasherControlsEventList() + ReadTemperatureControlEventList() : ReadAttribute("event-list") { } - ~ReadLaundryWasherControlsEventList() + ~ReadTemperatureControlEventList() { } 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::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 = [[MTRBaseClusterLaundryWasherControls 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(@"LaundryWasherControls.EventList response %@", [value description]); + NSLog(@"TemperatureControl.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherControls EventList read Error", error); + LogNSError("TemperatureControl EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -58573,25 +59603,25 @@ class ReadLaundryWasherControlsEventList : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherControlsEventList : public SubscribeAttribute { +class SubscribeAttributeTemperatureControlEventList : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherControlsEventList() + SubscribeAttributeTemperatureControlEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeLaundryWasherControlsEventList() + ~SubscribeAttributeTemperatureControlEventList() { } 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::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 = [[MTRBaseClusterLaundryWasherControls 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(); @@ -58605,7 +59635,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(@"TemperatureControl.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -58624,32 +59654,32 @@ class SubscribeAttributeLaundryWasherControlsEventList : public SubscribeAttribu /* * Attribute AttributeList */ -class ReadLaundryWasherControlsAttributeList : public ReadAttribute { +class ReadTemperatureControlAttributeList : public ReadAttribute { public: - ReadLaundryWasherControlsAttributeList() + ReadTemperatureControlAttributeList() : ReadAttribute("attribute-list") { } - ~ReadLaundryWasherControlsAttributeList() + ~ReadTemperatureControlAttributeList() { } 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::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 = [[MTRBaseClusterLaundryWasherControls 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(@"LaundryWasherControls.AttributeList response %@", [value description]); + NSLog(@"TemperatureControl.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherControls AttributeList read Error", error); + LogNSError("TemperatureControl AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -58658,25 +59688,25 @@ class ReadLaundryWasherControlsAttributeList : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherControlsAttributeList : public SubscribeAttribute { +class SubscribeAttributeTemperatureControlAttributeList : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherControlsAttributeList() + SubscribeAttributeTemperatureControlAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeLaundryWasherControlsAttributeList() + ~SubscribeAttributeTemperatureControlAttributeList() { } 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::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 = [[MTRBaseClusterLaundryWasherControls 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(); @@ -58690,7 +59720,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(@"TemperatureControl.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -58709,32 +59739,32 @@ class SubscribeAttributeLaundryWasherControlsAttributeList : public SubscribeAtt /* * Attribute FeatureMap */ -class ReadLaundryWasherControlsFeatureMap : public ReadAttribute { +class ReadTemperatureControlFeatureMap : public ReadAttribute { public: - ReadLaundryWasherControlsFeatureMap() + ReadTemperatureControlFeatureMap() : ReadAttribute("feature-map") { } - ~ReadLaundryWasherControlsFeatureMap() + ~ReadTemperatureControlFeatureMap() { } 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::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 = [[MTRBaseClusterLaundryWasherControls 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(@"LaundryWasherControls.FeatureMap response %@", [value description]); + NSLog(@"TemperatureControl.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherControls FeatureMap read Error", error); + LogNSError("TemperatureControl FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -58743,25 +59773,25 @@ class ReadLaundryWasherControlsFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherControlsFeatureMap : public SubscribeAttribute { +class SubscribeAttributeTemperatureControlFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherControlsFeatureMap() + SubscribeAttributeTemperatureControlFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeLaundryWasherControlsFeatureMap() + ~SubscribeAttributeTemperatureControlFeatureMap() { } 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::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 = [[MTRBaseClusterLaundryWasherControls 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(); @@ -58775,7 +59805,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(@"TemperatureControl.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -58794,32 +59824,32 @@ class SubscribeAttributeLaundryWasherControlsFeatureMap : public SubscribeAttrib /* * Attribute ClusterRevision */ -class ReadLaundryWasherControlsClusterRevision : public ReadAttribute { +class ReadTemperatureControlClusterRevision : public ReadAttribute { public: - ReadLaundryWasherControlsClusterRevision() + ReadTemperatureControlClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadLaundryWasherControlsClusterRevision() + ~ReadTemperatureControlClusterRevision() { } 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::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 = [[MTRBaseClusterLaundryWasherControls 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(@"LaundryWasherControls.ClusterRevision response %@", [value description]); + NSLog(@"TemperatureControl.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("LaundryWasherControls ClusterRevision read Error", error); + LogNSError("TemperatureControl ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -58828,25 +59858,25 @@ class ReadLaundryWasherControlsClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeLaundryWasherControlsClusterRevision : public SubscribeAttribute { +class SubscribeAttributeTemperatureControlClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeLaundryWasherControlsClusterRevision() + SubscribeAttributeTemperatureControlClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeLaundryWasherControlsClusterRevision() + ~SubscribeAttributeTemperatureControlClusterRevision() { } 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::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 = [[MTRBaseClusterLaundryWasherControls 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(); @@ -58860,7 +59890,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(@"TemperatureControl.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -58875,16 +59905,16 @@ class SubscribeAttributeLaundryWasherControlsClusterRevision : public SubscribeA #endif // MTR_ENABLE_PROVISIONAL #endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster RvcRunMode | 0x0054 | +| 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 | @@ -58893,90 +59923,40 @@ class SubscribeAttributeLaundryWasherControlsClusterRevision : public SubscribeA | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | +| * Notify | 0x0000 | \*----------------------------------------------------------------------------*/ -/* - * Command ChangeToMode - */ -class RvcRunModeChangeToMode : public ClusterCommand { -public: - RvcRunModeChangeToMode() - : 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::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 = [[MTRBaseClusterRVCRunMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRRVCRunModeClusterChangeToModeParams 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: - ^(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); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::RvcRunMode::Commands::ChangeToMode::Type mRequest; -}; +#if MTR_ENABLE_PROVISIONAL /* - * Attribute SupportedModes + * Attribute Mask */ -class ReadRvcRunModeSupportedModes : public ReadAttribute { +class ReadRefrigeratorAlarmMask : public ReadAttribute { public: - ReadRvcRunModeSupportedModes() - : ReadAttribute("supported-modes") + ReadRefrigeratorAlarmMask() + : ReadAttribute("mask") { } - ~ReadRvcRunModeSupportedModes() + ~ReadRefrigeratorAlarmMask() { } 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::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 = [[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 = [[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("RVCRunMode SupportedModes read Error", error); + LogNSError("RefrigeratorAlarm Mask read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -58985,25 +59965,25 @@ class ReadRvcRunModeSupportedModes : public ReadAttribute { } }; -class SubscribeAttributeRvcRunModeSupportedModes : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAlarmMask : public SubscribeAttribute { public: - SubscribeAttributeRvcRunModeSupportedModes() - : SubscribeAttribute("supported-modes") + SubscribeAttributeRefrigeratorAlarmMask() + : SubscribeAttribute("mask") { } - ~SubscribeAttributeRvcRunModeSupportedModes() + ~SubscribeAttributeRefrigeratorAlarmMask() { } 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::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 = [[MTRBaseClusterRVCRunMode 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(); @@ -59014,10 +59994,10 @@ class SubscribeAttributeRvcRunModeSupportedModes : 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(@"RVCRunMode.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 { @@ -59030,35 +60010,38 @@ class SubscribeAttributeRvcRunModeSupportedModes : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute CurrentMode + * Attribute State */ -class ReadRvcRunModeCurrentMode : public ReadAttribute { +class ReadRefrigeratorAlarmState : public ReadAttribute { public: - ReadRvcRunModeCurrentMode() - : ReadAttribute("current-mode") + ReadRefrigeratorAlarmState() + : ReadAttribute("state") { } - ~ReadRvcRunModeCurrentMode() + ~ReadRefrigeratorAlarmState() { } 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::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 = [[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 = [[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("RVCRunMode CurrentMode read Error", error); + LogNSError("RefrigeratorAlarm State read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -59067,25 +60050,25 @@ class ReadRvcRunModeCurrentMode : public ReadAttribute { } }; -class SubscribeAttributeRvcRunModeCurrentMode : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAlarmState : public SubscribeAttribute { public: - SubscribeAttributeRvcRunModeCurrentMode() - : SubscribeAttribute("current-mode") + SubscribeAttributeRefrigeratorAlarmState() + : SubscribeAttribute("state") { } - ~SubscribeAttributeRvcRunModeCurrentMode() + ~SubscribeAttributeRefrigeratorAlarmState() { } 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::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 = [[MTRBaseClusterRVCRunMode 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(); @@ -59096,10 +60079,10 @@ class SubscribeAttributeRvcRunModeCurrentMode : 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(@"RVCRunMode.CurrentMode response %@", [value description]); + NSLog(@"RefrigeratorAlarm.State response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -59112,108 +60095,65 @@ class SubscribeAttributeRvcRunModeCurrentMode : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* - * Attribute OnMode + * Attribute Supported */ -class ReadRvcRunModeOnMode : public ReadAttribute { +class ReadRefrigeratorAlarmSupported : public ReadAttribute { public: - ReadRvcRunModeOnMode() - : ReadAttribute("on-mode") + ReadRefrigeratorAlarmSupported() + : ReadAttribute("supported") { } - ~ReadRvcRunModeOnMode() + ~ReadRefrigeratorAlarmSupported() { } 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::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 = [[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 = [[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("RVCRunMode OnMode read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteRvcRunModeOnMode : public WriteAttribute { -public: - WriteRvcRunModeOnMode() - : WriteAttribute("on-mode") - { - AddArgument("attr-name", "on-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteRvcRunModeOnMode() - { - } - - 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; - - 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 = [[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()]; - } - - [cluster writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("RVCRunMode 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 SubscribeAttributeRvcRunModeOnMode : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAlarmSupported : public SubscribeAttribute { public: - SubscribeAttributeRvcRunModeOnMode() - : SubscribeAttribute("on-mode") + SubscribeAttributeRefrigeratorAlarmSupported() + : SubscribeAttribute("supported") { } - ~SubscribeAttributeRvcRunModeOnMode() + ~SubscribeAttributeRefrigeratorAlarmSupported() { } 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::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 = [[MTRBaseClusterRVCRunMode 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(); @@ -59224,10 +60164,10 @@ class SubscribeAttributeRvcRunModeOnMode : 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(@"RVCRunMode.OnMode response %@", [value description]); + NSLog(@"RefrigeratorAlarm.Supported response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -59241,36 +60181,37 @@ class SubscribeAttributeRvcRunModeOnMode : public SubscribeAttribute { }; #endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* * Attribute GeneratedCommandList */ -class ReadRvcRunModeGeneratedCommandList : public ReadAttribute { +class ReadRefrigeratorAlarmGeneratedCommandList : public ReadAttribute { public: - ReadRvcRunModeGeneratedCommandList() + ReadRefrigeratorAlarmGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadRvcRunModeGeneratedCommandList() + ~ReadRefrigeratorAlarmGeneratedCommandList() { } 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::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 = [[MTRBaseClusterRVCRunMode 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(@"RVCRunMode.GeneratedCommandList response %@", [value description]); + NSLog(@"RefrigeratorAlarm.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCRunMode GeneratedCommandList read Error", error); + LogNSError("RefrigeratorAlarm GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -59279,25 +60220,25 @@ class ReadRvcRunModeGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeRvcRunModeGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAlarmGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeRvcRunModeGeneratedCommandList() + SubscribeAttributeRefrigeratorAlarmGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeRvcRunModeGeneratedCommandList() + ~SubscribeAttributeRefrigeratorAlarmGeneratedCommandList() { } 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::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 = [[MTRBaseClusterRVCRunMode 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(); @@ -59311,7 +60252,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(@"RefrigeratorAlarm.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -59324,35 +60265,38 @@ class SubscribeAttributeRvcRunModeGeneratedCommandList : public SubscribeAttribu } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute AcceptedCommandList */ -class ReadRvcRunModeAcceptedCommandList : public ReadAttribute { +class ReadRefrigeratorAlarmAcceptedCommandList : public ReadAttribute { public: - ReadRvcRunModeAcceptedCommandList() + ReadRefrigeratorAlarmAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadRvcRunModeAcceptedCommandList() + ~ReadRefrigeratorAlarmAcceptedCommandList() { } 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::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 = [[MTRBaseClusterRVCRunMode 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(@"RVCRunMode.AcceptedCommandList response %@", [value description]); + NSLog(@"RefrigeratorAlarm.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCRunMode AcceptedCommandList read Error", error); + LogNSError("RefrigeratorAlarm AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -59361,25 +60305,25 @@ class ReadRvcRunModeAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeRvcRunModeAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAlarmAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeRvcRunModeAcceptedCommandList() + SubscribeAttributeRefrigeratorAlarmAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeRvcRunModeAcceptedCommandList() + ~SubscribeAttributeRefrigeratorAlarmAcceptedCommandList() { } 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::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 = [[MTRBaseClusterRVCRunMode 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(); @@ -59393,7 +60337,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(@"RefrigeratorAlarm.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -59406,37 +60350,38 @@ class SubscribeAttributeRvcRunModeAcceptedCommandList : public SubscribeAttribut } }; +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* * Attribute EventList */ -class ReadRvcRunModeEventList : public ReadAttribute { +class ReadRefrigeratorAlarmEventList : public ReadAttribute { public: - ReadRvcRunModeEventList() + ReadRefrigeratorAlarmEventList() : ReadAttribute("event-list") { } - ~ReadRvcRunModeEventList() + ~ReadRefrigeratorAlarmEventList() { } 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::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 = [[MTRBaseClusterRVCRunMode 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(@"RVCRunMode.EventList response %@", [value description]); + NSLog(@"RefrigeratorAlarm.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCRunMode EventList read Error", error); + LogNSError("RefrigeratorAlarm EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -59445,25 +60390,25 @@ class ReadRvcRunModeEventList : public ReadAttribute { } }; -class SubscribeAttributeRvcRunModeEventList : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAlarmEventList : public SubscribeAttribute { public: - SubscribeAttributeRvcRunModeEventList() + SubscribeAttributeRefrigeratorAlarmEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeRvcRunModeEventList() + ~SubscribeAttributeRefrigeratorAlarmEventList() { } 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::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 = [[MTRBaseClusterRVCRunMode 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(); @@ -59477,7 +60422,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(@"RefrigeratorAlarm.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -59491,36 +60436,37 @@ class SubscribeAttributeRvcRunModeEventList : public SubscribeAttribute { }; #endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* * Attribute AttributeList */ -class ReadRvcRunModeAttributeList : public ReadAttribute { +class ReadRefrigeratorAlarmAttributeList : public ReadAttribute { public: - ReadRvcRunModeAttributeList() + ReadRefrigeratorAlarmAttributeList() : ReadAttribute("attribute-list") { } - ~ReadRvcRunModeAttributeList() + ~ReadRefrigeratorAlarmAttributeList() { } 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::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 = [[MTRBaseClusterRVCRunMode 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(@"RVCRunMode.AttributeList response %@", [value description]); + NSLog(@"RefrigeratorAlarm.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCRunMode AttributeList read Error", error); + LogNSError("RefrigeratorAlarm AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -59529,25 +60475,25 @@ class ReadRvcRunModeAttributeList : public ReadAttribute { } }; -class SubscribeAttributeRvcRunModeAttributeList : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAlarmAttributeList : public SubscribeAttribute { public: - SubscribeAttributeRvcRunModeAttributeList() + SubscribeAttributeRefrigeratorAlarmAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeRvcRunModeAttributeList() + ~SubscribeAttributeRefrigeratorAlarmAttributeList() { } 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::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 = [[MTRBaseClusterRVCRunMode 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(); @@ -59561,7 +60507,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(@"RefrigeratorAlarm.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -59574,35 +60520,38 @@ class SubscribeAttributeRvcRunModeAttributeList : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute FeatureMap */ -class ReadRvcRunModeFeatureMap : public ReadAttribute { +class ReadRefrigeratorAlarmFeatureMap : public ReadAttribute { public: - ReadRvcRunModeFeatureMap() + ReadRefrigeratorAlarmFeatureMap() : ReadAttribute("feature-map") { } - ~ReadRvcRunModeFeatureMap() + ~ReadRefrigeratorAlarmFeatureMap() { } 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::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 = [[MTRBaseClusterRVCRunMode 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(@"RVCRunMode.FeatureMap response %@", [value description]); + NSLog(@"RefrigeratorAlarm.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCRunMode FeatureMap read Error", error); + LogNSError("RefrigeratorAlarm FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -59611,25 +60560,25 @@ class ReadRvcRunModeFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeRvcRunModeFeatureMap : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAlarmFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeRvcRunModeFeatureMap() + SubscribeAttributeRefrigeratorAlarmFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeRvcRunModeFeatureMap() + ~SubscribeAttributeRefrigeratorAlarmFeatureMap() { } 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::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 = [[MTRBaseClusterRVCRunMode 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(); @@ -59643,7 +60592,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(@"RefrigeratorAlarm.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -59656,35 +60605,38 @@ class SubscribeAttributeRvcRunModeFeatureMap : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* * Attribute ClusterRevision */ -class ReadRvcRunModeClusterRevision : public ReadAttribute { +class ReadRefrigeratorAlarmClusterRevision : public ReadAttribute { public: - ReadRvcRunModeClusterRevision() + ReadRefrigeratorAlarmClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadRvcRunModeClusterRevision() + ~ReadRefrigeratorAlarmClusterRevision() { } 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::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 = [[MTRBaseClusterRVCRunMode 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(@"RVCRunMode.ClusterRevision response %@", [value description]); + NSLog(@"RefrigeratorAlarm.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCRunMode ClusterRevision read Error", error); + LogNSError("RefrigeratorAlarm ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -59693,25 +60645,25 @@ class ReadRvcRunModeClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeRvcRunModeClusterRevision : public SubscribeAttribute { +class SubscribeAttributeRefrigeratorAlarmClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeRvcRunModeClusterRevision() + SubscribeAttributeRefrigeratorAlarmClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeRvcRunModeClusterRevision() + ~SubscribeAttributeRefrigeratorAlarmClusterRevision() { } 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::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 = [[MTRBaseClusterRVCRunMode 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(); @@ -59725,7 +60677,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(@"RefrigeratorAlarm.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -59738,8 +60690,11 @@ class SubscribeAttributeRvcRunModeClusterRevision : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster RvcCleanMode | 0x0055 | +| Cluster DishwasherMode | 0x0059 | |------------------------------------------------------------------------------| | Commands: | | | * ChangeToMode | 0x00 | @@ -59747,6 +60702,7 @@ class SubscribeAttributeRvcRunModeClusterRevision : public SubscribeAttribute { | Attributes: | | | * SupportedModes | 0x0000 | | * CurrentMode | 0x0001 | +| * StartUpMode | 0x0002 | | * OnMode | 0x0003 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | @@ -59758,382 +60714,97 @@ class SubscribeAttributeRvcRunModeClusterRevision : public SubscribeAttribute { | Events: | | \*----------------------------------------------------------------------------*/ +#if MTR_ENABLE_PROVISIONAL /* * Command ChangeToMode */ -class RvcCleanModeChangeToMode : public ClusterCommand { +class DishwasherModeChangeToMode : public ClusterCommand { public: - RvcCleanModeChangeToMode() + DishwasherModeChangeToMode() : 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::RvcCleanMode::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::RvcCleanMode::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, 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]; + __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 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: - ^(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; - } - -private: - chip::app::Clusters::RvcCleanMode::Commands::ChangeToMode::Type mRequest; -}; - -/* - * Attribute SupportedModes - */ -class ReadRvcCleanModeSupportedModes : public ReadAttribute { -public: - ReadRvcCleanModeSupportedModes() - : ReadAttribute("supported-modes") - { - } - - ~ReadRvcCleanModeSupportedModes() - { - } - - 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; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%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]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("RVCCleanMode SupportedModes read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeRvcCleanModeSupportedModes : public SubscribeAttribute { -public: - SubscribeAttributeRvcCleanModeSupportedModes() - : SubscribeAttribute("supported-modes") - { - } - - ~SubscribeAttributeRvcCleanModeSupportedModes() - { - } - - 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; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%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 = [[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 subscribeAttributeSupportedModesWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.SupportedModes 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 CurrentMode - */ -class ReadRvcCleanModeCurrentMode : public ReadAttribute { -public: - ReadRvcCleanModeCurrentMode() - : ReadAttribute("current-mode") - { - } - - ~ReadRvcCleanModeCurrentMode() - { - } - - 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; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%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]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("RVCCleanMode CurrentMode read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeRvcCleanModeCurrentMode : public SubscribeAttribute { -public: - SubscribeAttributeRvcCleanModeCurrentMode() - : SubscribeAttribute("current-mode") - { - } - - ~SubscribeAttributeRvcCleanModeCurrentMode() - { - } - - 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; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%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 = [[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(@"RVCCleanMode.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; - } -}; - -#if MTR_ENABLE_PROVISIONAL - -/* - * Attribute OnMode - */ -class ReadRvcCleanModeOnMode : public ReadAttribute { -public: - ReadRvcCleanModeOnMode() - : ReadAttribute("on-mode") - { - } - - ~ReadRvcCleanModeOnMode() - { - } - - 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 ") ReadAttribute (0x%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]); - 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); - 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 = [[MTRBaseClusterRVCCleanMode 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(); + ^(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 subscribeAttributeOnModeWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.OnMode 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::DishwasherMode::Commands::ChangeToMode::Type mRequest; }; #endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute GeneratedCommandList + * Attribute SupportedModes */ -class ReadRvcCleanModeGeneratedCommandList : public ReadAttribute { +class ReadDishwasherModeSupportedModes : public ReadAttribute { public: - ReadRvcCleanModeGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadDishwasherModeSupportedModes() + : ReadAttribute("supported-modes") { } - ~ReadRvcCleanModeGeneratedCommandList() + ~ReadDishwasherModeSupportedModes() { } 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::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 = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.GeneratedCommandList 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("RVCCleanMode GeneratedCommandList read Error", error); + LogNSError("DishwasherMode SupportedModes read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -60142,25 +60813,25 @@ class ReadRvcCleanModeGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeRvcCleanModeGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeDishwasherModeSupportedModes : public SubscribeAttribute { public: - SubscribeAttributeRvcCleanModeGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeDishwasherModeSupportedModes() + : SubscribeAttribute("supported-modes") { } - ~SubscribeAttributeRvcCleanModeGeneratedCommandList() + ~SubscribeAttributeDishwasherModeSupportedModes() { } 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::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 = [[MTRBaseClusterRVCCleanMode 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(); @@ -60171,10 +60842,10 @@ class SubscribeAttributeRvcCleanModeGeneratedCommandList : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeSupportedModesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.GeneratedCommandList response %@", [value description]); + NSLog(@"DishwasherMode.SupportedModes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -60187,35 +60858,38 @@ class SubscribeAttributeRvcCleanModeGeneratedCommandList : public SubscribeAttri } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute AcceptedCommandList + * Attribute CurrentMode */ -class ReadRvcCleanModeAcceptedCommandList : public ReadAttribute { +class ReadDishwasherModeCurrentMode : public ReadAttribute { public: - ReadRvcCleanModeAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadDishwasherModeCurrentMode() + : ReadAttribute("current-mode") { } - ~ReadRvcCleanModeAcceptedCommandList() + ~ReadDishwasherModeCurrentMode() { } 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::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 = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.AcceptedCommandList 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("RVCCleanMode AcceptedCommandList read Error", error); + LogNSError("DishwasherMode CurrentMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -60224,25 +60898,25 @@ class ReadRvcCleanModeAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeRvcCleanModeAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeDishwasherModeCurrentMode : public SubscribeAttribute { public: - SubscribeAttributeRvcCleanModeAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeDishwasherModeCurrentMode() + : SubscribeAttribute("current-mode") { } - ~SubscribeAttributeRvcCleanModeAcceptedCommandList() + ~SubscribeAttributeDishwasherModeCurrentMode() { } 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::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 = [[MTRBaseClusterRVCCleanMode 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(); @@ -60253,10 +60927,10 @@ class SubscribeAttributeRvcCleanModeAcceptedCommandList : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeCurrentModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -60269,37 +60943,38 @@ class SubscribeAttributeRvcCleanModeAcceptedCommandList : public SubscribeAttrib } }; +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* - * Attribute EventList + * Attribute StartUpMode */ -class ReadRvcCleanModeEventList : public ReadAttribute { +class ReadDishwasherModeStartUpMode : public ReadAttribute { public: - ReadRvcCleanModeEventList() - : ReadAttribute("event-list") + ReadDishwasherModeStartUpMode() + : ReadAttribute("start-up-mode") { } - ~ReadRvcCleanModeEventList() + ~ReadDishwasherModeStartUpMode() { } 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::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 = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.EventList 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("RVCCleanMode EventList read Error", error); + LogNSError("DishwasherMode StartUpMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -60308,25 +60983,69 @@ class ReadRvcCleanModeEventList : public ReadAttribute { } }; -class SubscribeAttributeRvcCleanModeEventList : public SubscribeAttribute { +class WriteDishwasherModeStartUpMode : public WriteAttribute { public: - SubscribeAttributeRvcCleanModeEventList() - : SubscribeAttribute("event-list") + WriteDishwasherModeStartUpMode() + : WriteAttribute("start-up-mode") { + AddArgument("attr-name", "start-up-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeRvcCleanModeEventList() + ~WriteDishwasherModeStartUpMode() { } 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::DishwasherMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::DishwasherMode::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 = [[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 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 SubscribeAttributeDishwasherModeStartUpMode : public SubscribeAttribute { +public: + SubscribeAttributeDishwasherModeStartUpMode() + : SubscribeAttribute("start-up-mode") + { + } + + ~SubscribeAttributeDishwasherModeStartUpMode() + { + } + + 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; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%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 = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -60337,10 +61056,10 @@ class SubscribeAttributeRvcCleanModeEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeStartUpModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherMode.StartUpMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -60354,36 +61073,37 @@ class SubscribeAttributeRvcCleanModeEventList : public SubscribeAttribute { }; #endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* - * Attribute AttributeList + * Attribute OnMode */ -class ReadRvcCleanModeAttributeList : public ReadAttribute { +class ReadDishwasherModeOnMode : public ReadAttribute { public: - ReadRvcCleanModeAttributeList() - : ReadAttribute("attribute-list") + ReadDishwasherModeOnMode() + : ReadAttribute("on-mode") { } - ~ReadRvcCleanModeAttributeList() + ~ReadDishwasherModeOnMode() { } 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::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 = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.AttributeList 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("RVCCleanMode AttributeList read Error", error); + LogNSError("DishwasherMode OnMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -60392,107 +61112,69 @@ class ReadRvcCleanModeAttributeList : public ReadAttribute { } }; -class SubscribeAttributeRvcCleanModeAttributeList : public SubscribeAttribute { +class WriteDishwasherModeOnMode : public WriteAttribute { public: - SubscribeAttributeRvcCleanModeAttributeList() - : SubscribeAttribute("attribute-list") + WriteDishwasherModeOnMode() + : WriteAttribute("on-mode") { + AddArgument("attr-name", "on-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeRvcCleanModeAttributeList() + ~WriteDishwasherModeOnMode() { } 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::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 = [[MTRBaseClusterRVCCleanMode 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 subscribeAttributeAttributeListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.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 ReadRvcCleanModeFeatureMap : public ReadAttribute { -public: - ReadRvcCleanModeFeatureMap() - : ReadAttribute("feature-map") - { - } - - ~ReadRvcCleanModeFeatureMap() - { - } - - 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; - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%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 readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.FeatureMap response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("RVCCleanMode FeatureMap 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 SubscribeAttributeRvcCleanModeFeatureMap : public SubscribeAttribute { +class SubscribeAttributeDishwasherModeOnMode : public SubscribeAttribute { public: - SubscribeAttributeRvcCleanModeFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeDishwasherModeOnMode() + : SubscribeAttribute("on-mode") { } - ~SubscribeAttributeRvcCleanModeFeatureMap() + ~SubscribeAttributeDishwasherModeOnMode() { } 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::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 = [[MTRBaseClusterRVCCleanMode 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(); @@ -60503,10 +61185,10 @@ class SubscribeAttributeRvcCleanModeFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeOnModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.FeatureMap response %@", [value description]); + NSLog(@"DishwasherMode.OnMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -60519,35 +61201,38 @@ class SubscribeAttributeRvcCleanModeFeatureMap : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ClusterRevision + * Attribute GeneratedCommandList */ -class ReadRvcCleanModeClusterRevision : public ReadAttribute { +class ReadDishwasherModeGeneratedCommandList : public ReadAttribute { public: - ReadRvcCleanModeClusterRevision() - : ReadAttribute("cluster-revision") + ReadDishwasherModeGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadRvcCleanModeClusterRevision() + ~ReadDishwasherModeGeneratedCommandList() { } 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::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 = [[MTRBaseClusterRVCCleanMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.ClusterRevision response %@", [value description]); + __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]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("RVCCleanMode ClusterRevision read Error", error); + LogNSError("DishwasherMode GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -60556,25 +61241,25 @@ class ReadRvcCleanModeClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeRvcCleanModeClusterRevision : public SubscribeAttribute { +class SubscribeAttributeDishwasherModeGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeRvcCleanModeClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeDishwasherModeGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeRvcCleanModeClusterRevision() + ~SubscribeAttributeDishwasherModeGeneratedCommandList() { } 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::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 = [[MTRBaseClusterRVCCleanMode 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(); @@ -60585,10 +61270,10 @@ class SubscribeAttributeRvcCleanModeClusterRevision : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RVCCleanMode.ClusterRevision response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -60601,129 +61286,38 @@ class SubscribeAttributeRvcCleanModeClusterRevision : public SubscribeAttribute } }; -#if MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| 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: | | -\*----------------------------------------------------------------------------*/ - -#if MTR_ENABLE_PROVISIONAL -/* - * Command SetTemperature - */ -class TemperatureControlSetTemperature : public ClusterCommand { -public: - TemperatureControlSetTemperature() - : ClusterCommand("set-temperature") - { -#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::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 = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRTemperatureControlClusterSetTemperatureParams 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; - } -#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); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::TemperatureControl::Commands::SetTemperature::Type mRequest; -}; - #endif // MTR_ENABLE_PROVISIONAL - #if MTR_ENABLE_PROVISIONAL /* - * Attribute TemperatureSetpoint + * Attribute AcceptedCommandList */ -class ReadTemperatureControlTemperatureSetpoint : public ReadAttribute { +class ReadDishwasherModeAcceptedCommandList : public ReadAttribute { public: - ReadTemperatureControlTemperatureSetpoint() - : ReadAttribute("temperature-setpoint") + ReadDishwasherModeAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadTemperatureControlTemperatureSetpoint() + ~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::TemperatureSetpoint::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]; - [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 readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TemperatureControl TemperatureSetpoint read Error", error); + LogNSError("DishwasherMode AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -60732,25 +61326,25 @@ class ReadTemperatureControlTemperatureSetpoint : public ReadAttribute { } }; -class SubscribeAttributeTemperatureControlTemperatureSetpoint : public SubscribeAttribute { +class SubscribeAttributeDishwasherModeAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeTemperatureControlTemperatureSetpoint() - : SubscribeAttribute("temperature-setpoint") + SubscribeAttributeDishwasherModeAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeTemperatureControlTemperatureSetpoint() + ~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::TemperatureSetpoint::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(); @@ -60761,10 +61355,10 @@ class SubscribeAttributeTemperatureControlTemperatureSetpoint : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTemperatureSetpointWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams: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.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -60781,34 +61375,34 @@ class SubscribeAttributeTemperatureControlTemperatureSetpoint : public Subscribe #if MTR_ENABLE_PROVISIONAL /* - * Attribute MinTemperature + * Attribute EventList */ -class ReadTemperatureControlMinTemperature : public ReadAttribute { +class ReadDishwasherModeEventList : public ReadAttribute { public: - ReadTemperatureControlMinTemperature() - : ReadAttribute("min-temperature") + ReadDishwasherModeEventList() + : ReadAttribute("event-list") { } - ~ReadTemperatureControlMinTemperature() + ~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::MinTemperature::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 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 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 MinTemperature read Error", error); + LogNSError("DishwasherMode EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -60817,25 +61411,25 @@ class ReadTemperatureControlMinTemperature : public ReadAttribute { } }; -class SubscribeAttributeTemperatureControlMinTemperature : public SubscribeAttribute { +class SubscribeAttributeDishwasherModeEventList : public SubscribeAttribute { public: - SubscribeAttributeTemperatureControlMinTemperature() - : SubscribeAttribute("min-temperature") + SubscribeAttributeDishwasherModeEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeTemperatureControlMinTemperature() + ~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::MinTemperature::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(); @@ -60846,10 +61440,10 @@ class SubscribeAttributeTemperatureControlMinTemperature : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinTemperatureWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.MinTemperature 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 { @@ -60866,34 +61460,34 @@ class SubscribeAttributeTemperatureControlMinTemperature : public SubscribeAttri #if MTR_ENABLE_PROVISIONAL /* - * Attribute MaxTemperature + * Attribute AttributeList */ -class ReadTemperatureControlMaxTemperature : public ReadAttribute { +class ReadDishwasherModeAttributeList : public ReadAttribute { public: - ReadTemperatureControlMaxTemperature() - : ReadAttribute("max-temperature") + ReadDishwasherModeAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadTemperatureControlMaxTemperature() + ~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::MaxTemperature::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 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 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 MaxTemperature read Error", error); + LogNSError("DishwasherMode AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -60902,25 +61496,25 @@ class ReadTemperatureControlMaxTemperature : public ReadAttribute { } }; -class SubscribeAttributeTemperatureControlMaxTemperature : public SubscribeAttribute { +class SubscribeAttributeDishwasherModeAttributeList : public SubscribeAttribute { public: - SubscribeAttributeTemperatureControlMaxTemperature() - : SubscribeAttribute("max-temperature") + SubscribeAttributeDishwasherModeAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeTemperatureControlMaxTemperature() + ~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::MaxTemperature::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(); @@ -60931,10 +61525,10 @@ class SubscribeAttributeTemperatureControlMaxTemperature : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxTemperatureWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.MaxTemperature 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 { @@ -60951,34 +61545,34 @@ class SubscribeAttributeTemperatureControlMaxTemperature : public SubscribeAttri #if MTR_ENABLE_PROVISIONAL /* - * Attribute Step + * Attribute FeatureMap */ -class ReadTemperatureControlStep : public ReadAttribute { +class ReadDishwasherModeFeatureMap : public ReadAttribute { public: - ReadTemperatureControlStep() - : ReadAttribute("step") + ReadDishwasherModeFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadTemperatureControlStep() + ~ReadDishwasherModeFeatureMap() { } 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; + 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 = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStepWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.Step 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("TemperatureControl Step read Error", error); + LogNSError("DishwasherMode FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -60987,25 +61581,25 @@ class ReadTemperatureControlStep : public ReadAttribute { } }; -class SubscribeAttributeTemperatureControlStep : public SubscribeAttribute { +class SubscribeAttributeDishwasherModeFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeTemperatureControlStep() - : SubscribeAttribute("step") + SubscribeAttributeDishwasherModeFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeTemperatureControlStep() + ~SubscribeAttributeDishwasherModeFeatureMap() { } 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::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 = [[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 +61610,10 @@ class SubscribeAttributeTemperatureControlStep : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeStepWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.Step response %@", [value description]); + NSLog(@"DishwasherMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -61036,34 +61630,34 @@ class SubscribeAttributeTemperatureControlStep : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute SelectedTemperatureLevel + * Attribute ClusterRevision */ -class ReadTemperatureControlSelectedTemperatureLevel : public ReadAttribute { +class ReadDishwasherModeClusterRevision : public ReadAttribute { public: - ReadTemperatureControlSelectedTemperatureLevel() - : ReadAttribute("selected-temperature-level") + ReadDishwasherModeClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadTemperatureControlSelectedTemperatureLevel() + ~ReadDishwasherModeClusterRevision() { } 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::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 = [[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 readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TemperatureControl SelectedTemperatureLevel read Error", error); + LogNSError("DishwasherMode ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -61072,25 +61666,25 @@ class ReadTemperatureControlSelectedTemperatureLevel : public ReadAttribute { } }; -class SubscribeAttributeTemperatureControlSelectedTemperatureLevel : public SubscribeAttribute { +class SubscribeAttributeDishwasherModeClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeTemperatureControlSelectedTemperatureLevel() - : SubscribeAttribute("selected-temperature-level") + SubscribeAttributeDishwasherModeClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeTemperatureControlSelectedTemperatureLevel() + ~SubscribeAttributeDishwasherModeClusterRevision() { } 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::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 = [[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(); @@ -61101,10 +61695,10 @@ class SubscribeAttributeTemperatureControlSelectedTemperatureLevel : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSelectedTemperatureLevelWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.SelectedTemperatureLevel response %@", [value description]); + NSLog(@"DishwasherMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -61118,37 +61712,56 @@ class SubscribeAttributeTemperatureControlSelectedTemperatureLevel : public Subs }; #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 SupportedTemperatureLevels + * Attribute AirQuality */ -class ReadTemperatureControlSupportedTemperatureLevels : public ReadAttribute { +class ReadAirQualityAirQuality : public ReadAttribute { public: - ReadTemperatureControlSupportedTemperatureLevels() - : ReadAttribute("supported-temperature-levels") + ReadAirQualityAirQuality() + : ReadAttribute("air-quality") { } - ~ReadTemperatureControlSupportedTemperatureLevels() + ~ReadAirQualityAirQuality() { } 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; + 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 = [[MTRBaseClusterTemperatureControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSupportedTemperatureLevelsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.SupportedTemperatureLevels 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("TemperatureControl SupportedTemperatureLevels read Error", error); + LogNSError("AirQuality AirQuality read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -61157,25 +61770,25 @@ class ReadTemperatureControlSupportedTemperatureLevels : public ReadAttribute { } }; -class SubscribeAttributeTemperatureControlSupportedTemperatureLevels : public SubscribeAttribute { +class SubscribeAttributeAirQualityAirQuality : public SubscribeAttribute { public: - SubscribeAttributeTemperatureControlSupportedTemperatureLevels() - : SubscribeAttribute("supported-temperature-levels") + SubscribeAttributeAirQualityAirQuality() + : SubscribeAttribute("air-quality") { } - ~SubscribeAttributeTemperatureControlSupportedTemperatureLevels() + ~SubscribeAttributeAirQualityAirQuality() { } 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::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 = [[MTRBaseClusterTemperatureControl 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(); @@ -61186,10 +61799,10 @@ class SubscribeAttributeTemperatureControlSupportedTemperatureLevels : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedTemperatureLevelsWithParams:params + [cluster subscribeAttributeAirQualityWithParams: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(@"AirQuality.AirQuality response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -61208,32 +61821,32 @@ class SubscribeAttributeTemperatureControlSupportedTemperatureLevels : public Su /* * Attribute GeneratedCommandList */ -class ReadTemperatureControlGeneratedCommandList : public ReadAttribute { +class ReadAirQualityGeneratedCommandList : public ReadAttribute { public: - ReadTemperatureControlGeneratedCommandList() + ReadAirQualityGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadTemperatureControlGeneratedCommandList() + ~ReadAirQualityGeneratedCommandList() { } 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::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 = [[MTRBaseClusterTemperatureControl 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(@"TemperatureControl.GeneratedCommandList response %@", [value description]); + NSLog(@"AirQuality.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TemperatureControl GeneratedCommandList read Error", error); + LogNSError("AirQuality GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -61242,25 +61855,25 @@ class ReadTemperatureControlGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeTemperatureControlGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeAirQualityGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeTemperatureControlGeneratedCommandList() + SubscribeAttributeAirQualityGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeTemperatureControlGeneratedCommandList() + ~SubscribeAttributeAirQualityGeneratedCommandList() { } 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::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 = [[MTRBaseClusterTemperatureControl 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(); @@ -61274,7 +61887,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(@"AirQuality.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -61293,32 +61906,32 @@ class SubscribeAttributeTemperatureControlGeneratedCommandList : public Subscrib /* * Attribute AcceptedCommandList */ -class ReadTemperatureControlAcceptedCommandList : public ReadAttribute { +class ReadAirQualityAcceptedCommandList : public ReadAttribute { public: - ReadTemperatureControlAcceptedCommandList() + ReadAirQualityAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadTemperatureControlAcceptedCommandList() + ~ReadAirQualityAcceptedCommandList() { } 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::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 = [[MTRBaseClusterTemperatureControl 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(@"TemperatureControl.AcceptedCommandList response %@", [value description]); + NSLog(@"AirQuality.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TemperatureControl AcceptedCommandList read Error", error); + LogNSError("AirQuality AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -61327,25 +61940,25 @@ class ReadTemperatureControlAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeTemperatureControlAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeAirQualityAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeTemperatureControlAcceptedCommandList() + SubscribeAttributeAirQualityAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeTemperatureControlAcceptedCommandList() + ~SubscribeAttributeAirQualityAcceptedCommandList() { } 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::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 = [[MTRBaseClusterTemperatureControl 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(); @@ -61359,7 +61972,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(@"AirQuality.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -61378,32 +61991,32 @@ class SubscribeAttributeTemperatureControlAcceptedCommandList : public Subscribe /* * Attribute EventList */ -class ReadTemperatureControlEventList : public ReadAttribute { +class ReadAirQualityEventList : public ReadAttribute { public: - ReadTemperatureControlEventList() + ReadAirQualityEventList() : ReadAttribute("event-list") { } - ~ReadTemperatureControlEventList() + ~ReadAirQualityEventList() { } 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; + 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 = [[MTRBaseClusterTemperatureControl 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(@"TemperatureControl.EventList response %@", [value description]); + NSLog(@"AirQuality.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TemperatureControl EventList read Error", error); + LogNSError("AirQuality EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -61412,25 +62025,25 @@ class ReadTemperatureControlEventList : public ReadAttribute { } }; -class SubscribeAttributeTemperatureControlEventList : public SubscribeAttribute { +class SubscribeAttributeAirQualityEventList : public SubscribeAttribute { public: - SubscribeAttributeTemperatureControlEventList() + SubscribeAttributeAirQualityEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeTemperatureControlEventList() + ~SubscribeAttributeAirQualityEventList() { } 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; + 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 = [[MTRBaseClusterTemperatureControl 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(); @@ -61444,7 +62057,7 @@ class SubscribeAttributeTemperatureControlEventList : public SubscribeAttribute [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.EventList response %@", [value description]); + NSLog(@"AirQuality.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -61463,32 +62076,32 @@ class SubscribeAttributeTemperatureControlEventList : public SubscribeAttribute /* * Attribute AttributeList */ -class ReadTemperatureControlAttributeList : public ReadAttribute { +class ReadAirQualityAttributeList : public ReadAttribute { public: - ReadTemperatureControlAttributeList() + ReadAirQualityAttributeList() : ReadAttribute("attribute-list") { } - ~ReadTemperatureControlAttributeList() + ~ReadAirQualityAttributeList() { } 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; + 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 = [[MTRBaseClusterTemperatureControl 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(@"TemperatureControl.AttributeList response %@", [value description]); + NSLog(@"AirQuality.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TemperatureControl AttributeList read Error", error); + LogNSError("AirQuality AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -61497,25 +62110,25 @@ class ReadTemperatureControlAttributeList : public ReadAttribute { } }; -class SubscribeAttributeTemperatureControlAttributeList : public SubscribeAttribute { +class SubscribeAttributeAirQualityAttributeList : public SubscribeAttribute { public: - SubscribeAttributeTemperatureControlAttributeList() + SubscribeAttributeAirQualityAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeTemperatureControlAttributeList() + ~SubscribeAttributeAirQualityAttributeList() { } 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; + 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 = [[MTRBaseClusterTemperatureControl 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(); @@ -61529,7 +62142,7 @@ class SubscribeAttributeTemperatureControlAttributeList : public SubscribeAttrib [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.AttributeList response %@", [value description]); + NSLog(@"AirQuality.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -61548,32 +62161,32 @@ class SubscribeAttributeTemperatureControlAttributeList : public SubscribeAttrib /* * Attribute FeatureMap */ -class ReadTemperatureControlFeatureMap : public ReadAttribute { +class ReadAirQualityFeatureMap : public ReadAttribute { public: - ReadTemperatureControlFeatureMap() + ReadAirQualityFeatureMap() : ReadAttribute("feature-map") { } - ~ReadTemperatureControlFeatureMap() + ~ReadAirQualityFeatureMap() { } 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::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 = [[MTRBaseClusterTemperatureControl 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(@"TemperatureControl.FeatureMap response %@", [value description]); + NSLog(@"AirQuality.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TemperatureControl FeatureMap read Error", error); + LogNSError("AirQuality FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -61582,25 +62195,25 @@ class ReadTemperatureControlFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeTemperatureControlFeatureMap : public SubscribeAttribute { +class SubscribeAttributeAirQualityFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeTemperatureControlFeatureMap() + SubscribeAttributeAirQualityFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeTemperatureControlFeatureMap() + ~SubscribeAttributeAirQualityFeatureMap() { } 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::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 = [[MTRBaseClusterTemperatureControl 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(); @@ -61614,7 +62227,7 @@ class SubscribeAttributeTemperatureControlFeatureMap : public SubscribeAttribute [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.FeatureMap response %@", [value description]); + NSLog(@"AirQuality.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -61633,32 +62246,32 @@ class SubscribeAttributeTemperatureControlFeatureMap : public SubscribeAttribute /* * Attribute ClusterRevision */ -class ReadTemperatureControlClusterRevision : public ReadAttribute { +class ReadAirQualityClusterRevision : public ReadAttribute { public: - ReadTemperatureControlClusterRevision() + ReadAirQualityClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadTemperatureControlClusterRevision() + ~ReadAirQualityClusterRevision() { } 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::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 = [[MTRBaseClusterTemperatureControl 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(@"TemperatureControl.ClusterRevision response %@", [value description]); + NSLog(@"AirQuality.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("TemperatureControl ClusterRevision read Error", error); + LogNSError("AirQuality ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -61667,25 +62280,25 @@ class ReadTemperatureControlClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeTemperatureControlClusterRevision : public SubscribeAttribute { +class SubscribeAttributeAirQualityClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeTemperatureControlClusterRevision() + SubscribeAttributeAirQualityClusterRevision() : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeTemperatureControlClusterRevision() + ~SubscribeAttributeAirQualityClusterRevision() { } 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::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 = [[MTRBaseClusterTemperatureControl 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(); @@ -61699,7 +62312,7 @@ class SubscribeAttributeTemperatureControlClusterRevision : public SubscribeAttr [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"TemperatureControl.ClusterRevision response %@", [value description]); + NSLog(@"AirQuality.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -61716,14 +62329,25 @@ class SubscribeAttributeTemperatureControlClusterRevision : public SubscribeAttr #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ -| Cluster RefrigeratorAlarm | 0x0057 | +| Cluster SmokeCoAlarm | 0x005C | |------------------------------------------------------------------------------| | Commands: | | +| * SelfTestRequest | 0x00 | |------------------------------------------------------------------------------| | Attributes: | | -| * Mask | 0x0000 | -| * State | 0x0002 | -| * Supported | 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 | @@ -61732,40 +62356,97 @@ class SubscribeAttributeTemperatureControlClusterRevision : public SubscribeAttr | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | -| * Notify | 0x0000 | +| * 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 SelfTestRequest + */ +class SmokeCoAlarmSelfTestRequest : public ClusterCommand { +public: + SmokeCoAlarmSelfTestRequest() + : ClusterCommand("self-test-request") + { + 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; + + 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]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + 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); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: +}; + +#endif // MTR_ENABLE_PROVISIONAL + #if MTR_ENABLE_PROVISIONAL /* - * Attribute Mask + * Attribute ExpressedState */ -class ReadRefrigeratorAlarmMask : public ReadAttribute { +class ReadSmokeCoAlarmExpressedState : public ReadAttribute { public: - ReadRefrigeratorAlarmMask() - : ReadAttribute("mask") + ReadSmokeCoAlarmExpressedState() + : ReadAttribute("expressed-state") { } - ~ReadRefrigeratorAlarmMask() + ~ReadSmokeCoAlarmExpressedState() { } 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::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 = [[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 = [[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("RefrigeratorAlarm Mask read Error", error); + LogNSError("SmokeCOAlarm ExpressedState read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -61774,25 +62455,25 @@ class ReadRefrigeratorAlarmMask : public ReadAttribute { } }; -class SubscribeAttributeRefrigeratorAlarmMask : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmExpressedState : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAlarmMask() - : SubscribeAttribute("mask") + SubscribeAttributeSmokeCoAlarmExpressedState() + : SubscribeAttribute("expressed-state") { } - ~SubscribeAttributeRefrigeratorAlarmMask() + ~SubscribeAttributeSmokeCoAlarmExpressedState() { } 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::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 = [[MTRBaseClusterRefrigeratorAlarm 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(); @@ -61803,10 +62484,10 @@ class SubscribeAttributeRefrigeratorAlarmMask : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaskWithParams:params + [cluster subscribeAttributeExpressedStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.Mask response %@", [value description]); + NSLog(@"SmokeCOAlarm.ExpressedState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -61823,34 +62504,34 @@ class SubscribeAttributeRefrigeratorAlarmMask : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute State + * Attribute SmokeState */ -class ReadRefrigeratorAlarmState : public ReadAttribute { +class ReadSmokeCoAlarmSmokeState : public ReadAttribute { public: - ReadRefrigeratorAlarmState() - : ReadAttribute("state") + ReadSmokeCoAlarmSmokeState() + : ReadAttribute("smoke-state") { } - ~ReadRefrigeratorAlarmState() + ~ReadSmokeCoAlarmSmokeState() { } 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::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 = [[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 = [[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("RefrigeratorAlarm State read Error", error); + LogNSError("SmokeCOAlarm SmokeState read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -61859,25 +62540,25 @@ class ReadRefrigeratorAlarmState : public ReadAttribute { } }; -class SubscribeAttributeRefrigeratorAlarmState : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmSmokeState : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAlarmState() - : SubscribeAttribute("state") + SubscribeAttributeSmokeCoAlarmSmokeState() + : SubscribeAttribute("smoke-state") { } - ~SubscribeAttributeRefrigeratorAlarmState() + ~SubscribeAttributeSmokeCoAlarmSmokeState() { } 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::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 = [[MTRBaseClusterRefrigeratorAlarm 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(); @@ -61888,10 +62569,10 @@ class SubscribeAttributeRefrigeratorAlarmState : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeStateWithParams:params + [cluster subscribeAttributeSmokeStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.State response %@", [value description]); + NSLog(@"SmokeCOAlarm.SmokeState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -61908,34 +62589,34 @@ class SubscribeAttributeRefrigeratorAlarmState : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute Supported + * Attribute COState */ -class ReadRefrigeratorAlarmSupported : public ReadAttribute { +class ReadSmokeCoAlarmCOState : public ReadAttribute { public: - ReadRefrigeratorAlarmSupported() - : ReadAttribute("supported") + ReadSmokeCoAlarmCOState() + : ReadAttribute("costate") { } - ~ReadRefrigeratorAlarmSupported() + ~ReadSmokeCoAlarmCOState() { } 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::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 = [[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 = [[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("RefrigeratorAlarm Supported read Error", error); + LogNSError("SmokeCOAlarm COState read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -61944,25 +62625,25 @@ class ReadRefrigeratorAlarmSupported : public ReadAttribute { } }; -class SubscribeAttributeRefrigeratorAlarmSupported : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmCOState : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAlarmSupported() - : SubscribeAttribute("supported") + SubscribeAttributeSmokeCoAlarmCOState() + : SubscribeAttribute("costate") { } - ~SubscribeAttributeRefrigeratorAlarmSupported() + ~SubscribeAttributeSmokeCoAlarmCOState() { } 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::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::COState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%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 = [[MTRBaseClusterSmokeCOAlarm 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 +62654,10 @@ class SubscribeAttributeRefrigeratorAlarmSupported : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedWithParams:params + [cluster subscribeAttributeCOStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.Supported response %@", [value description]); + NSLog(@"SmokeCOAlarm.COState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -61993,34 +62674,34 @@ class SubscribeAttributeRefrigeratorAlarmSupported : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute GeneratedCommandList + * Attribute BatteryAlert */ -class ReadRefrigeratorAlarmGeneratedCommandList : public ReadAttribute { +class ReadSmokeCoAlarmBatteryAlert : public ReadAttribute { public: - ReadRefrigeratorAlarmGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadSmokeCoAlarmBatteryAlert() + : ReadAttribute("battery-alert") { } - ~ReadRefrigeratorAlarmGeneratedCommandList() + ~ReadSmokeCoAlarmBatteryAlert() { } 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::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 = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.GeneratedCommandList response %@", [value description]); + __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("RefrigeratorAlarm GeneratedCommandList read Error", error); + LogNSError("SmokeCOAlarm BatteryAlert read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -62029,25 +62710,25 @@ class ReadRefrigeratorAlarmGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeRefrigeratorAlarmGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmBatteryAlert : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAlarmGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeSmokeCoAlarmBatteryAlert() + : SubscribeAttribute("battery-alert") { } - ~SubscribeAttributeRefrigeratorAlarmGeneratedCommandList() + ~SubscribeAttributeSmokeCoAlarmBatteryAlert() { } 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::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 = [[MTRBaseClusterRefrigeratorAlarm 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(); @@ -62058,10 +62739,10 @@ class SubscribeAttributeRefrigeratorAlarmGeneratedCommandList : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeBatteryAlertWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.BatteryAlert response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -62078,34 +62759,34 @@ class SubscribeAttributeRefrigeratorAlarmGeneratedCommandList : public Subscribe #if MTR_ENABLE_PROVISIONAL /* - * Attribute AcceptedCommandList + * Attribute DeviceMuted */ -class ReadRefrigeratorAlarmAcceptedCommandList : public ReadAttribute { +class ReadSmokeCoAlarmDeviceMuted : public ReadAttribute { public: - ReadRefrigeratorAlarmAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadSmokeCoAlarmDeviceMuted() + : ReadAttribute("device-muted") { } - ~ReadRefrigeratorAlarmAcceptedCommandList() + ~ReadSmokeCoAlarmDeviceMuted() { } 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::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 = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.AcceptedCommandList 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("RefrigeratorAlarm AcceptedCommandList read Error", error); + LogNSError("SmokeCOAlarm DeviceMuted read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -62114,25 +62795,25 @@ class ReadRefrigeratorAlarmAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeRefrigeratorAlarmAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmDeviceMuted : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAlarmAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeSmokeCoAlarmDeviceMuted() + : SubscribeAttribute("device-muted") { } - ~SubscribeAttributeRefrigeratorAlarmAcceptedCommandList() + ~SubscribeAttributeSmokeCoAlarmDeviceMuted() { } 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::SmokeCoAlarm::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::SmokeCoAlarm::Attributes::DeviceMuted::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%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 = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -62143,10 +62824,10 @@ class SubscribeAttributeRefrigeratorAlarmAcceptedCommandList : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeDeviceMutedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.DeviceMuted response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -62163,34 +62844,34 @@ class SubscribeAttributeRefrigeratorAlarmAcceptedCommandList : public SubscribeA #if MTR_ENABLE_PROVISIONAL /* - * Attribute EventList + * Attribute TestInProgress */ -class ReadRefrigeratorAlarmEventList : public ReadAttribute { +class ReadSmokeCoAlarmTestInProgress : public ReadAttribute { public: - ReadRefrigeratorAlarmEventList() - : ReadAttribute("event-list") + ReadSmokeCoAlarmTestInProgress() + : ReadAttribute("test-in-progress") { } - ~ReadRefrigeratorAlarmEventList() + ~ReadSmokeCoAlarmTestInProgress() { } 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::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 = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.EventList response %@", [value description]); + __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("RefrigeratorAlarm EventList read Error", error); + LogNSError("SmokeCOAlarm TestInProgress read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -62199,25 +62880,25 @@ class ReadRefrigeratorAlarmEventList : public ReadAttribute { } }; -class SubscribeAttributeRefrigeratorAlarmEventList : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmTestInProgress : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAlarmEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeSmokeCoAlarmTestInProgress() + : SubscribeAttribute("test-in-progress") { } - ~SubscribeAttributeRefrigeratorAlarmEventList() + ~SubscribeAttributeSmokeCoAlarmTestInProgress() { } 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::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 = [[MTRBaseClusterRefrigeratorAlarm 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(); @@ -62228,10 +62909,10 @@ class SubscribeAttributeRefrigeratorAlarmEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeTestInProgressWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.TestInProgress response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -62248,34 +62929,34 @@ class SubscribeAttributeRefrigeratorAlarmEventList : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute AttributeList + * Attribute HardwareFaultAlert */ -class ReadRefrigeratorAlarmAttributeList : public ReadAttribute { +class ReadSmokeCoAlarmHardwareFaultAlert : public ReadAttribute { public: - ReadRefrigeratorAlarmAttributeList() - : ReadAttribute("attribute-list") + ReadSmokeCoAlarmHardwareFaultAlert() + : ReadAttribute("hardware-fault-alert") { } - ~ReadRefrigeratorAlarmAttributeList() + ~ReadSmokeCoAlarmHardwareFaultAlert() { } 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::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 = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.AttributeList 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("RefrigeratorAlarm AttributeList read Error", error); + LogNSError("SmokeCOAlarm HardwareFaultAlert read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -62284,25 +62965,25 @@ class ReadRefrigeratorAlarmAttributeList : public ReadAttribute { } }; -class SubscribeAttributeRefrigeratorAlarmAttributeList : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmHardwareFaultAlert : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAlarmAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeSmokeCoAlarmHardwareFaultAlert() + : SubscribeAttribute("hardware-fault-alert") { } - ~SubscribeAttributeRefrigeratorAlarmAttributeList() + ~SubscribeAttributeSmokeCoAlarmHardwareFaultAlert() { } 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::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 = [[MTRBaseClusterRefrigeratorAlarm 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(); @@ -62313,10 +62994,10 @@ class SubscribeAttributeRefrigeratorAlarmAttributeList : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeHardwareFaultAlertWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.AttributeList 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 { @@ -62333,34 +63014,34 @@ class SubscribeAttributeRefrigeratorAlarmAttributeList : public SubscribeAttribu #if MTR_ENABLE_PROVISIONAL /* - * Attribute FeatureMap + * Attribute EndOfServiceAlert */ -class ReadRefrigeratorAlarmFeatureMap : public ReadAttribute { +class ReadSmokeCoAlarmEndOfServiceAlert : public ReadAttribute { public: - ReadRefrigeratorAlarmFeatureMap() - : ReadAttribute("feature-map") + ReadSmokeCoAlarmEndOfServiceAlert() + : ReadAttribute("end-of-service-alert") { } - ~ReadRefrigeratorAlarmFeatureMap() + ~ReadSmokeCoAlarmEndOfServiceAlert() { } 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::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 = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.FeatureMap 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("RefrigeratorAlarm FeatureMap read Error", error); + LogNSError("SmokeCOAlarm EndOfServiceAlert read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -62369,25 +63050,25 @@ class ReadRefrigeratorAlarmFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeRefrigeratorAlarmFeatureMap : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmEndOfServiceAlert : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAlarmFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeSmokeCoAlarmEndOfServiceAlert() + : SubscribeAttribute("end-of-service-alert") { } - ~SubscribeAttributeRefrigeratorAlarmFeatureMap() + ~SubscribeAttributeSmokeCoAlarmEndOfServiceAlert() { } 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::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 = [[MTRBaseClusterRefrigeratorAlarm 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(); @@ -62398,10 +63079,10 @@ class SubscribeAttributeRefrigeratorAlarmFeatureMap : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeEndOfServiceAlertWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.FeatureMap response %@", [value description]); + NSLog(@"SmokeCOAlarm.EndOfServiceAlert response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -62418,34 +63099,34 @@ class SubscribeAttributeRefrigeratorAlarmFeatureMap : public SubscribeAttribute #if MTR_ENABLE_PROVISIONAL /* - * Attribute ClusterRevision + * Attribute InterconnectSmokeAlarm */ -class ReadRefrigeratorAlarmClusterRevision : public ReadAttribute { +class ReadSmokeCoAlarmInterconnectSmokeAlarm : public ReadAttribute { public: - ReadRefrigeratorAlarmClusterRevision() - : ReadAttribute("cluster-revision") + ReadSmokeCoAlarmInterconnectSmokeAlarm() + : ReadAttribute("interconnect-smoke-alarm") { } - ~ReadRefrigeratorAlarmClusterRevision() + ~ReadSmokeCoAlarmInterconnectSmokeAlarm() { } 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::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 = [[MTRBaseClusterRefrigeratorAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.ClusterRevision 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("RefrigeratorAlarm ClusterRevision read Error", error); + LogNSError("SmokeCOAlarm InterconnectSmokeAlarm read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -62454,25 +63135,25 @@ class ReadRefrigeratorAlarmClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeRefrigeratorAlarmClusterRevision : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmInterconnectSmokeAlarm : public SubscribeAttribute { public: - SubscribeAttributeRefrigeratorAlarmClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeSmokeCoAlarmInterconnectSmokeAlarm() + : SubscribeAttribute("interconnect-smoke-alarm") { } - ~SubscribeAttributeRefrigeratorAlarmClusterRevision() + ~SubscribeAttributeSmokeCoAlarmInterconnectSmokeAlarm() { } 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::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 = [[MTRBaseClusterRefrigeratorAlarm 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(); @@ -62483,10 +63164,10 @@ class SubscribeAttributeRefrigeratorAlarmClusterRevision : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeInterconnectSmokeAlarmWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"RefrigeratorAlarm.ClusterRevision response %@", [value description]); + NSLog(@"SmokeCOAlarm.InterconnectSmokeAlarm response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -62500,120 +63181,37 @@ class SubscribeAttributeRefrigeratorAlarmClusterRevision : public SubscribeAttri }; #endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| 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: | | -\*----------------------------------------------------------------------------*/ - -#if MTR_ENABLE_PROVISIONAL -/* - * Command ChangeToMode - */ -class DishwasherModeChangeToMode : public ClusterCommand { -public: - DishwasherModeChangeToMode() - : 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::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 = [[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 - 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); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::DishwasherMode::Commands::ChangeToMode::Type mRequest; -}; - -#endif // MTR_ENABLE_PROVISIONAL - #if MTR_ENABLE_PROVISIONAL /* - * Attribute SupportedModes + * Attribute InterconnectCOAlarm */ -class ReadDishwasherModeSupportedModes : public ReadAttribute { +class ReadSmokeCoAlarmInterconnectCOAlarm : public ReadAttribute { public: - ReadDishwasherModeSupportedModes() - : ReadAttribute("supported-modes") + ReadSmokeCoAlarmInterconnectCOAlarm() + : ReadAttribute("interconnect-coalarm") { } - ~ReadDishwasherModeSupportedModes() + ~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::SupportedModes::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 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 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 SupportedModes read Error", error); + LogNSError("SmokeCOAlarm InterconnectCOAlarm read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -62622,25 +63220,25 @@ class ReadDishwasherModeSupportedModes : public ReadAttribute { } }; -class SubscribeAttributeDishwasherModeSupportedModes : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmInterconnectCOAlarm : public SubscribeAttribute { public: - SubscribeAttributeDishwasherModeSupportedModes() - : SubscribeAttribute("supported-modes") + SubscribeAttributeSmokeCoAlarmInterconnectCOAlarm() + : SubscribeAttribute("interconnect-coalarm") { } - ~SubscribeAttributeDishwasherModeSupportedModes() + ~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::SupportedModes::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(); @@ -62651,10 +63249,10 @@ class SubscribeAttributeDishwasherModeSupportedModes : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedModesWithParams:params + [cluster subscribeAttributeInterconnectCOAlarmWithParams: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.InterconnectCOAlarm response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -62671,34 +63269,34 @@ class SubscribeAttributeDishwasherModeSupportedModes : public SubscribeAttribute #if MTR_ENABLE_PROVISIONAL /* - * Attribute CurrentMode + * Attribute ContaminationState */ -class ReadDishwasherModeCurrentMode : public ReadAttribute { +class ReadSmokeCoAlarmContaminationState : public ReadAttribute { public: - ReadDishwasherModeCurrentMode() - : ReadAttribute("current-mode") + ReadSmokeCoAlarmContaminationState() + : ReadAttribute("contamination-state") { } - ~ReadDishwasherModeCurrentMode() + ~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::CurrentMode::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 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 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 CurrentMode read Error", error); + LogNSError("SmokeCOAlarm ContaminationState read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -62707,25 +63305,25 @@ class ReadDishwasherModeCurrentMode : public ReadAttribute { } }; -class SubscribeAttributeDishwasherModeCurrentMode : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmContaminationState : public SubscribeAttribute { public: - SubscribeAttributeDishwasherModeCurrentMode() - : SubscribeAttribute("current-mode") + SubscribeAttributeSmokeCoAlarmContaminationState() + : SubscribeAttribute("contamination-state") { } - ~SubscribeAttributeDishwasherModeCurrentMode() + ~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::CurrentMode::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(); @@ -62736,10 +63334,10 @@ class SubscribeAttributeDishwasherModeCurrentMode : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentModeWithParams:params + [cluster subscribeAttributeContaminationStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.CurrentMode response %@", [value description]); + NSLog(@"SmokeCOAlarm.ContaminationState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -62756,34 +63354,34 @@ class SubscribeAttributeDishwasherModeCurrentMode : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute StartUpMode + * Attribute SmokeSensitivityLevel */ -class ReadDishwasherModeStartUpMode : public ReadAttribute { +class ReadSmokeCoAlarmSmokeSensitivityLevel : public ReadAttribute { public: - ReadDishwasherModeStartUpMode() - : ReadAttribute("start-up-mode") + ReadSmokeCoAlarmSmokeSensitivityLevel() + : ReadAttribute("smoke-sensitivity-level") { } - ~ReadDishwasherModeStartUpMode() + ~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::StartUpMode::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 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 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 StartUpMode read Error", error); + LogNSError("SmokeCOAlarm SmokeSensitivityLevel read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -62792,39 +63390,36 @@ class ReadDishwasherModeStartUpMode : public ReadAttribute { } }; -class WriteDishwasherModeStartUpMode : public WriteAttribute { +class WriteSmokeCoAlarmSmokeSensitivityLevel : public WriteAttribute { public: - WriteDishwasherModeStartUpMode() - : WriteAttribute("start-up-mode") + WriteSmokeCoAlarmSmokeSensitivityLevel() + : WriteAttribute("smoke-sensitivity-level") { - AddArgument("attr-name", "start-up-mode"); + AddArgument("attr-name", "smoke-sensitivity-level"); AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteDishwasherModeStartUpMode() + ~WriteSmokeCoAlarmSmokeSensitivityLevel() { } 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::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 = [[MTRBaseClusterDishwasherMode alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __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 * _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 writeAttributeSmokeSensitivityLevelWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("DishwasherMode StartUpMode write Error", error); + LogNSError("SmokeCOAlarm SmokeSensitivityLevel write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -62833,28 +63428,28 @@ class WriteDishwasherModeStartUpMode : public WriteAttribute { } private: - chip::app::DataModel::Nullable mValue; + uint8_t mValue; }; -class SubscribeAttributeDishwasherModeStartUpMode : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmSmokeSensitivityLevel : public SubscribeAttribute { public: - SubscribeAttributeDishwasherModeStartUpMode() - : SubscribeAttribute("start-up-mode") + SubscribeAttributeSmokeCoAlarmSmokeSensitivityLevel() + : SubscribeAttribute("smoke-sensitivity-level") { } - ~SubscribeAttributeDishwasherModeStartUpMode() + ~SubscribeAttributeSmokeCoAlarmSmokeSensitivityLevel() { } 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::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(); @@ -62865,10 +63460,10 @@ class SubscribeAttributeDishwasherModeStartUpMode : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeStartUpModeWithParams:params + [cluster subscribeAttributeSmokeSensitivityLevelWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.StartUpMode response %@", [value description]); + NSLog(@"SmokeCOAlarm.SmokeSensitivityLevel response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -62885,105 +63480,61 @@ class SubscribeAttributeDishwasherModeStartUpMode : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute OnMode + * Attribute ExpiryDate */ -class ReadDishwasherModeOnMode : public ReadAttribute { +class ReadSmokeCoAlarmExpiryDate : public ReadAttribute { public: - ReadDishwasherModeOnMode() - : ReadAttribute("on-mode") + ReadSmokeCoAlarmExpiryDate() + : ReadAttribute("expiry-date") { } - ~ReadDishwasherModeOnMode() + ~ReadSmokeCoAlarmExpiryDate() { } 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::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 = [[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 readAttributeExpiryDateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.ExpiryDate response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherMode OnMode read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteDishwasherModeOnMode : public WriteAttribute { -public: - WriteDishwasherModeOnMode() - : WriteAttribute("on-mode") - { - AddArgument("attr-name", "on-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteDishwasherModeOnMode() - { - } - - 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; - - 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 = [[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 writeAttributeOnModeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("DishwasherMode OnMode write Error", error); + LogNSError("SmokeCOAlarm ExpiryDate 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 SubscribeAttributeSmokeCoAlarmExpiryDate : public SubscribeAttribute { public: - SubscribeAttributeDishwasherModeOnMode() - : SubscribeAttribute("on-mode") + SubscribeAttributeSmokeCoAlarmExpiryDate() + : SubscribeAttribute("expiry-date") { } - ~SubscribeAttributeDishwasherModeOnMode() + ~SubscribeAttributeSmokeCoAlarmExpiryDate() { } 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::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 = [[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 +63545,10 @@ class SubscribeAttributeDishwasherModeOnMode : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOnModeWithParams:params + [cluster subscribeAttributeExpiryDateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.OnMode response %@", [value description]); + NSLog(@"SmokeCOAlarm.ExpiryDate response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -63016,32 +63567,32 @@ class SubscribeAttributeDishwasherModeOnMode : public SubscribeAttribute { /* * Attribute GeneratedCommandList */ -class ReadDishwasherModeGeneratedCommandList : public ReadAttribute { +class ReadSmokeCoAlarmGeneratedCommandList : public ReadAttribute { public: - ReadDishwasherModeGeneratedCommandList() + ReadSmokeCoAlarmGeneratedCommandList() : ReadAttribute("generated-command-list") { } - ~ReadDishwasherModeGeneratedCommandList() + ~ReadSmokeCoAlarmGeneratedCommandList() { } 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::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 = [[MTRBaseClusterDishwasherMode 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(@"DishwasherMode.GeneratedCommandList response %@", [value description]); + NSLog(@"SmokeCOAlarm.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherMode GeneratedCommandList read Error", error); + LogNSError("SmokeCOAlarm GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -63050,25 +63601,25 @@ class ReadDishwasherModeGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeDishwasherModeGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeDishwasherModeGeneratedCommandList() + SubscribeAttributeSmokeCoAlarmGeneratedCommandList() : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeDishwasherModeGeneratedCommandList() + ~SubscribeAttributeSmokeCoAlarmGeneratedCommandList() { } 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::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 = [[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(); @@ -63082,7 +63633,7 @@ class SubscribeAttributeDishwasherModeGeneratedCommandList : public SubscribeAtt [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.GeneratedCommandList response %@", [value description]); + NSLog(@"SmokeCOAlarm.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -63101,32 +63652,32 @@ class SubscribeAttributeDishwasherModeGeneratedCommandList : public SubscribeAtt /* * Attribute AcceptedCommandList */ -class ReadDishwasherModeAcceptedCommandList : public ReadAttribute { +class ReadSmokeCoAlarmAcceptedCommandList : public ReadAttribute { public: - ReadDishwasherModeAcceptedCommandList() + ReadSmokeCoAlarmAcceptedCommandList() : ReadAttribute("accepted-command-list") { } - ~ReadDishwasherModeAcceptedCommandList() + ~ReadSmokeCoAlarmAcceptedCommandList() { } 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::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 = [[MTRBaseClusterDishwasherMode 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(@"DishwasherMode.AcceptedCommandList response %@", [value description]); + NSLog(@"SmokeCOAlarm.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherMode AcceptedCommandList read Error", error); + LogNSError("SmokeCOAlarm AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -63135,25 +63686,25 @@ class ReadDishwasherModeAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeDishwasherModeAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeDishwasherModeAcceptedCommandList() + SubscribeAttributeSmokeCoAlarmAcceptedCommandList() : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeDishwasherModeAcceptedCommandList() + ~SubscribeAttributeSmokeCoAlarmAcceptedCommandList() { } 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::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 = [[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(); @@ -63167,7 +63718,7 @@ class SubscribeAttributeDishwasherModeAcceptedCommandList : public SubscribeAttr [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.AcceptedCommandList response %@", [value description]); + NSLog(@"SmokeCOAlarm.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -63186,32 +63737,32 @@ class SubscribeAttributeDishwasherModeAcceptedCommandList : public SubscribeAttr /* * Attribute EventList */ -class ReadDishwasherModeEventList : public ReadAttribute { +class ReadSmokeCoAlarmEventList : public ReadAttribute { public: - ReadDishwasherModeEventList() + ReadSmokeCoAlarmEventList() : ReadAttribute("event-list") { } - ~ReadDishwasherModeEventList() + ~ReadSmokeCoAlarmEventList() { } 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::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 = [[MTRBaseClusterDishwasherMode 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(@"DishwasherMode.EventList response %@", [value description]); + NSLog(@"SmokeCOAlarm.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherMode EventList read Error", error); + LogNSError("SmokeCOAlarm EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -63220,25 +63771,25 @@ class ReadDishwasherModeEventList : public ReadAttribute { } }; -class SubscribeAttributeDishwasherModeEventList : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmEventList : public SubscribeAttribute { public: - SubscribeAttributeDishwasherModeEventList() + SubscribeAttributeSmokeCoAlarmEventList() : SubscribeAttribute("event-list") { } - ~SubscribeAttributeDishwasherModeEventList() + ~SubscribeAttributeSmokeCoAlarmEventList() { } 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::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 = [[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(); @@ -63252,7 +63803,7 @@ class SubscribeAttributeDishwasherModeEventList : public SubscribeAttribute { [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.EventList response %@", [value description]); + NSLog(@"SmokeCOAlarm.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -63271,32 +63822,32 @@ class SubscribeAttributeDishwasherModeEventList : public SubscribeAttribute { /* * Attribute AttributeList */ -class ReadDishwasherModeAttributeList : public ReadAttribute { +class ReadSmokeCoAlarmAttributeList : public ReadAttribute { public: - ReadDishwasherModeAttributeList() + ReadSmokeCoAlarmAttributeList() : ReadAttribute("attribute-list") { } - ~ReadDishwasherModeAttributeList() + ~ReadSmokeCoAlarmAttributeList() { } 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::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 = [[MTRBaseClusterDishwasherMode 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(@"DishwasherMode.AttributeList response %@", [value description]); + NSLog(@"SmokeCOAlarm.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherMode AttributeList read Error", error); + LogNSError("SmokeCOAlarm AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -63305,25 +63856,25 @@ class ReadDishwasherModeAttributeList : public ReadAttribute { } }; -class SubscribeAttributeDishwasherModeAttributeList : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmAttributeList : public SubscribeAttribute { public: - SubscribeAttributeDishwasherModeAttributeList() + SubscribeAttributeSmokeCoAlarmAttributeList() : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeDishwasherModeAttributeList() + ~SubscribeAttributeSmokeCoAlarmAttributeList() { } 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::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 = [[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(); @@ -63337,7 +63888,7 @@ class SubscribeAttributeDishwasherModeAttributeList : public SubscribeAttribute [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.AttributeList response %@", [value description]); + NSLog(@"SmokeCOAlarm.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -63356,32 +63907,32 @@ class SubscribeAttributeDishwasherModeAttributeList : public SubscribeAttribute /* * Attribute FeatureMap */ -class ReadDishwasherModeFeatureMap : public ReadAttribute { +class ReadSmokeCoAlarmFeatureMap : public ReadAttribute { public: - ReadDishwasherModeFeatureMap() + ReadSmokeCoAlarmFeatureMap() : ReadAttribute("feature-map") { } - ~ReadDishwasherModeFeatureMap() + ~ReadSmokeCoAlarmFeatureMap() { } 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::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 = [[MTRBaseClusterDishwasherMode 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(@"DishwasherMode.FeatureMap response %@", [value description]); + NSLog(@"SmokeCOAlarm.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherMode FeatureMap read Error", error); + LogNSError("SmokeCOAlarm FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -63390,25 +63941,25 @@ class ReadDishwasherModeFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeDishwasherModeFeatureMap : public SubscribeAttribute { +class SubscribeAttributeSmokeCoAlarmFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeDishwasherModeFeatureMap() + SubscribeAttributeSmokeCoAlarmFeatureMap() : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeDishwasherModeFeatureMap() + ~SubscribeAttributeSmokeCoAlarmFeatureMap() { } 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::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 = [[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(); @@ -63422,7 +63973,7 @@ class SubscribeAttributeDishwasherModeFeatureMap : public SubscribeAttribute { [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.FeatureMap response %@", [value description]); + NSLog(@"SmokeCOAlarm.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -63441,32 +63992,249 @@ class SubscribeAttributeDishwasherModeFeatureMap : public SubscribeAttribute { /* * Attribute ClusterRevision */ -class ReadDishwasherModeClusterRevision : public ReadAttribute { +class ReadSmokeCoAlarmClusterRevision : public ReadAttribute { public: - ReadDishwasherModeClusterRevision() + ReadSmokeCoAlarmClusterRevision() : ReadAttribute("cluster-revision") { } - ~ReadDishwasherModeClusterRevision() + ~ReadSmokeCoAlarmClusterRevision() + { + } + + 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; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%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 readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.ClusterRevision response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("SmokeCOAlarm ClusterRevision read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributeSmokeCoAlarmClusterRevision : public SubscribeAttribute { +public: + SubscribeAttributeSmokeCoAlarmClusterRevision() + : SubscribeAttribute("cluster-revision") + { + } + + ~SubscribeAttributeSmokeCoAlarmClusterRevision() + { + } + + 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; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%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(); + } + [cluster subscribeAttributeClusterRevisionWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"SmokeCOAlarm.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; + } +}; + +#endif // MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| 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 | +\*----------------------------------------------------------------------------*/ + +#if MTR_ENABLE_PROVISIONAL +/* + * Command Reset + */ +class DishwasherAlarmReset : public ClusterCommand { +public: + 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::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 = [[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 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 +/* + * Command ModifyEnabledAlarms + */ +class DishwasherAlarmModifyEnabledAlarms : public ClusterCommand { +public: + 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::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, 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]; + 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); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::DishwasherAlarm::Commands::ModifyEnabledAlarms::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL + +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute Mask + */ +class ReadDishwasherAlarmMask : public ReadAttribute { +public: + ReadDishwasherAlarmMask() + : ReadAttribute("mask") + { + } + + ~ReadDishwasherAlarmMask() { } 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::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 = [[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 = [[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("DishwasherMode ClusterRevision read Error", error); + LogNSError("DishwasherAlarm Mask read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -63475,25 +64243,25 @@ class ReadDishwasherModeClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeDishwasherModeClusterRevision : public SubscribeAttribute { +class SubscribeAttributeDishwasherAlarmMask : public SubscribeAttribute { public: - SubscribeAttributeDishwasherModeClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeDishwasherAlarmMask() + : SubscribeAttribute("mask") { } - ~SubscribeAttributeDishwasherModeClusterRevision() + ~SubscribeAttributeDishwasherAlarmMask() { } 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::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 = [[MTRBaseClusterDishwasherMode 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(); @@ -63504,10 +64272,10 @@ class SubscribeAttributeDishwasherModeClusterRevision : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeMaskWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherMode.ClusterRevision response %@", [value description]); + NSLog(@"DishwasherAlarm.Mask response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -63521,56 +64289,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 Latch */ -class ReadAirQualityAirQuality : public ReadAttribute { +class ReadDishwasherAlarmLatch : public ReadAttribute { public: - ReadAirQualityAirQuality() - : ReadAttribute("air-quality") + ReadDishwasherAlarmLatch() + : ReadAttribute("latch") { } - ~ReadAirQualityAirQuality() + ~ReadDishwasherAlarmLatch() { } 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::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 = [[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 = [[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("AirQuality AirQuality read Error", error); + LogNSError("DishwasherAlarm Latch read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -63579,25 +64328,25 @@ class ReadAirQualityAirQuality : public ReadAttribute { } }; -class SubscribeAttributeAirQualityAirQuality : public SubscribeAttribute { +class SubscribeAttributeDishwasherAlarmLatch : public SubscribeAttribute { public: - SubscribeAttributeAirQualityAirQuality() - : SubscribeAttribute("air-quality") + SubscribeAttributeDishwasherAlarmLatch() + : SubscribeAttribute("latch") { } - ~SubscribeAttributeAirQualityAirQuality() + ~SubscribeAttributeDishwasherAlarmLatch() { } 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::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 = [[MTRBaseClusterAirQuality 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(); @@ -63608,10 +64357,10 @@ class SubscribeAttributeAirQualityAirQuality : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAirQualityWithParams:params + [cluster subscribeAttributeLatchWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.AirQuality response %@", [value description]); + NSLog(@"DishwasherAlarm.Latch response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -63628,34 +64377,34 @@ class SubscribeAttributeAirQualityAirQuality : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute GeneratedCommandList + * Attribute State */ -class ReadAirQualityGeneratedCommandList : public ReadAttribute { +class ReadDishwasherAlarmState : public ReadAttribute { public: - ReadAirQualityGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadDishwasherAlarmState() + : ReadAttribute("state") { } - ~ReadAirQualityGeneratedCommandList() + ~ReadDishwasherAlarmState() { } 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::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 = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.GeneratedCommandList 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("AirQuality GeneratedCommandList read Error", error); + LogNSError("DishwasherAlarm State read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -63664,25 +64413,25 @@ class ReadAirQualityGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeAirQualityGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeDishwasherAlarmState : public SubscribeAttribute { public: - SubscribeAttributeAirQualityGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeDishwasherAlarmState() + : SubscribeAttribute("state") { } - ~SubscribeAttributeAirQualityGeneratedCommandList() + ~SubscribeAttributeDishwasherAlarmState() { } 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::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 = [[MTRBaseClusterAirQuality 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(); @@ -63693,10 +64442,10 @@ class SubscribeAttributeAirQualityGeneratedCommandList : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherAlarm.State response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -63713,34 +64462,34 @@ class SubscribeAttributeAirQualityGeneratedCommandList : public SubscribeAttribu #if MTR_ENABLE_PROVISIONAL /* - * Attribute AcceptedCommandList + * Attribute Supported */ -class ReadAirQualityAcceptedCommandList : public ReadAttribute { +class ReadDishwasherAlarmSupported : public ReadAttribute { public: - ReadAirQualityAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadDishwasherAlarmSupported() + : ReadAttribute("supported") { } - ~ReadAirQualityAcceptedCommandList() + ~ReadDishwasherAlarmSupported() { } 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::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 = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.AcceptedCommandList 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("AirQuality AcceptedCommandList read Error", error); + LogNSError("DishwasherAlarm Supported read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -63749,25 +64498,25 @@ class ReadAirQualityAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeAirQualityAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeDishwasherAlarmSupported : public SubscribeAttribute { public: - SubscribeAttributeAirQualityAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeDishwasherAlarmSupported() + : SubscribeAttribute("supported") { } - ~SubscribeAttributeAirQualityAcceptedCommandList() + ~SubscribeAttributeDishwasherAlarmSupported() { } 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::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 = [[MTRBaseClusterAirQuality 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(); @@ -63778,10 +64527,10 @@ class SubscribeAttributeAirQualityAcceptedCommandList : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeSupportedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"DishwasherAlarm.Supported response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -63798,34 +64547,34 @@ class SubscribeAttributeAirQualityAcceptedCommandList : public SubscribeAttribut #if MTR_ENABLE_PROVISIONAL /* - * Attribute EventList + * Attribute GeneratedCommandList */ -class ReadAirQualityEventList : public ReadAttribute { +class ReadDishwasherAlarmGeneratedCommandList : public ReadAttribute { public: - ReadAirQualityEventList() - : ReadAttribute("event-list") + ReadDishwasherAlarmGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadAirQualityEventList() + ~ReadDishwasherAlarmGeneratedCommandList() { } 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::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 = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.EventList 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("AirQuality EventList read Error", error); + LogNSError("DishwasherAlarm GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -63834,25 +64583,25 @@ class ReadAirQualityEventList : public ReadAttribute { } }; -class SubscribeAttributeAirQualityEventList : public SubscribeAttribute { +class SubscribeAttributeDishwasherAlarmGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeAirQualityEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeDishwasherAlarmGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeAirQualityEventList() + ~SubscribeAttributeDishwasherAlarmGeneratedCommandList() { } 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::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 = [[MTRBaseClusterAirQuality 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(); @@ -63863,10 +64612,10 @@ class SubscribeAttributeAirQualityEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.EventList response %@", [value description]); + NSLog(@"DishwasherAlarm.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -63883,34 +64632,34 @@ class SubscribeAttributeAirQualityEventList : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute AttributeList + * Attribute AcceptedCommandList */ -class ReadAirQualityAttributeList : public ReadAttribute { +class ReadDishwasherAlarmAcceptedCommandList : public ReadAttribute { public: - ReadAirQualityAttributeList() - : ReadAttribute("attribute-list") + ReadDishwasherAlarmAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadAirQualityAttributeList() + ~ReadDishwasherAlarmAcceptedCommandList() { } 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::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 = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.AttributeList 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("AirQuality AttributeList read Error", error); + LogNSError("DishwasherAlarm AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -63919,25 +64668,25 @@ class ReadAirQualityAttributeList : public ReadAttribute { } }; -class SubscribeAttributeAirQualityAttributeList : public SubscribeAttribute { +class SubscribeAttributeDishwasherAlarmAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeAirQualityAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeDishwasherAlarmAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeAirQualityAttributeList() + ~SubscribeAttributeDishwasherAlarmAcceptedCommandList() { } 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::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 = [[MTRBaseClusterAirQuality 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(); @@ -63948,10 +64697,10 @@ class SubscribeAttributeAirQualityAttributeList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.AttributeList response %@", [value description]); + NSLog(@"DishwasherAlarm.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -63968,34 +64717,34 @@ class SubscribeAttributeAirQualityAttributeList : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute FeatureMap + * Attribute EventList */ -class ReadAirQualityFeatureMap : public ReadAttribute { +class ReadDishwasherAlarmEventList : public ReadAttribute { public: - ReadAirQualityFeatureMap() - : ReadAttribute("feature-map") + ReadDishwasherAlarmEventList() + : ReadAttribute("event-list") { } - ~ReadAirQualityFeatureMap() + ~ReadDishwasherAlarmEventList() { } 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::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 = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.FeatureMap 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("AirQuality FeatureMap read Error", error); + LogNSError("DishwasherAlarm EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -64004,25 +64753,25 @@ class ReadAirQualityFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeAirQualityFeatureMap : public SubscribeAttribute { +class SubscribeAttributeDishwasherAlarmEventList : public SubscribeAttribute { public: - SubscribeAttributeAirQualityFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeDishwasherAlarmEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeAirQualityFeatureMap() + ~SubscribeAttributeDishwasherAlarmEventList() { } 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::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 = [[MTRBaseClusterAirQuality 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(); @@ -64033,10 +64782,10 @@ class SubscribeAttributeAirQualityFeatureMap : 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(@"AirQuality.FeatureMap 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 { @@ -64053,34 +64802,34 @@ class SubscribeAttributeAirQualityFeatureMap : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute ClusterRevision + * Attribute AttributeList */ -class ReadAirQualityClusterRevision : public ReadAttribute { +class ReadDishwasherAlarmAttributeList : public ReadAttribute { public: - ReadAirQualityClusterRevision() - : ReadAttribute("cluster-revision") + ReadDishwasherAlarmAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadAirQualityClusterRevision() + ~ReadDishwasherAlarmAttributeList() { } 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::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 = [[MTRBaseClusterAirQuality alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.ClusterRevision 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("AirQuality ClusterRevision read Error", error); + LogNSError("DishwasherAlarm AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -64089,25 +64838,25 @@ class ReadAirQualityClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeAirQualityClusterRevision : public SubscribeAttribute { +class SubscribeAttributeDishwasherAlarmAttributeList : public SubscribeAttribute { public: - SubscribeAttributeAirQualityClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeDishwasherAlarmAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeAirQualityClusterRevision() + ~SubscribeAttributeDishwasherAlarmAttributeList() { } 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::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 = [[MTRBaseClusterAirQuality 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(); @@ -64118,10 +64867,10 @@ class SubscribeAttributeAirQualityClusterRevision : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"AirQuality.ClusterRevision 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 { @@ -64135,127 +64884,37 @@ class SubscribeAttributeAirQualityClusterRevision : public SubscribeAttribute { }; #endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| Cluster SmokeCoAlarm | 0x005C | -|------------------------------------------------------------------------------| -| Commands: | | -| * SelfTestRequest | 0x00 | -|------------------------------------------------------------------------------| -| 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 | -\*----------------------------------------------------------------------------*/ - -#if MTR_ENABLE_PROVISIONAL -/* - * Command SelfTestRequest - */ -class SmokeCoAlarmSelfTestRequest : public ClusterCommand { -public: - SmokeCoAlarmSelfTestRequest() - : ClusterCommand("self-test-request") - { - 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; - - 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]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - 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); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: -}; - -#endif // MTR_ENABLE_PROVISIONAL - #if MTR_ENABLE_PROVISIONAL /* - * Attribute ExpressedState + * Attribute FeatureMap */ -class ReadSmokeCoAlarmExpressedState : public ReadAttribute { +class ReadDishwasherAlarmFeatureMap : public ReadAttribute { public: - ReadSmokeCoAlarmExpressedState() - : ReadAttribute("expressed-state") + ReadDishwasherAlarmFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadSmokeCoAlarmExpressedState() + ~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::ExpressedState::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 readAttributeExpressedStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.ExpressedState 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 ExpressedState read Error", error); + LogNSError("DishwasherAlarm FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -64264,25 +64923,25 @@ class ReadSmokeCoAlarmExpressedState : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmExpressedState : public SubscribeAttribute { +class SubscribeAttributeDishwasherAlarmFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmExpressedState() - : SubscribeAttribute("expressed-state") + SubscribeAttributeDishwasherAlarmFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeSmokeCoAlarmExpressedState() + ~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::ExpressedState::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(); @@ -64293,10 +64952,10 @@ class SubscribeAttributeSmokeCoAlarmExpressedState : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeExpressedStateWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.ExpressedState response %@", [value description]); + NSLog(@"DishwasherAlarm.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -64313,34 +64972,34 @@ class SubscribeAttributeSmokeCoAlarmExpressedState : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute SmokeState + * Attribute ClusterRevision */ -class ReadSmokeCoAlarmSmokeState : public ReadAttribute { +class ReadDishwasherAlarmClusterRevision : public ReadAttribute { public: - ReadSmokeCoAlarmSmokeState() - : ReadAttribute("smoke-state") + ReadDishwasherAlarmClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadSmokeCoAlarmSmokeState() + ~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::SmokeState::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 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 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 SmokeState read Error", error); + LogNSError("DishwasherAlarm ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -64349,25 +65008,25 @@ class ReadSmokeCoAlarmSmokeState : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmSmokeState : public SubscribeAttribute { +class SubscribeAttributeDishwasherAlarmClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmSmokeState() - : SubscribeAttribute("smoke-state") + SubscribeAttributeDishwasherAlarmClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeSmokeCoAlarmSmokeState() + ~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::SmokeState::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(); @@ -64378,10 +65037,10 @@ class SubscribeAttributeSmokeCoAlarmSmokeState : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSmokeStateWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.SmokeState response %@", [value description]); + NSLog(@"DishwasherAlarm.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -64395,37 +65054,57 @@ class SubscribeAttributeSmokeCoAlarmSmokeState : public SubscribeAttribute { }; #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 COState + * Attribute SupportedModes */ -class ReadSmokeCoAlarmCOState : public ReadAttribute { +class ReadMicrowaveOvenModeSupportedModes : public ReadAttribute { public: - ReadSmokeCoAlarmCOState() - : ReadAttribute("costate") + ReadMicrowaveOvenModeSupportedModes() + : ReadAttribute("supported-modes") { } - ~ReadSmokeCoAlarmCOState() + ~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::COState::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 readAttributeCOStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.COState response %@", [value description]); + __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("SmokeCOAlarm COState read Error", error); + LogNSError("MicrowaveOvenMode SupportedModes read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -64434,25 +65113,25 @@ class ReadSmokeCoAlarmCOState : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmCOState : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenModeSupportedModes : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmCOState() - : SubscribeAttribute("costate") + SubscribeAttributeMicrowaveOvenModeSupportedModes() + : SubscribeAttribute("supported-modes") { } - ~SubscribeAttributeSmokeCoAlarmCOState() + ~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::COState::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(); @@ -64463,10 +65142,10 @@ class SubscribeAttributeSmokeCoAlarmCOState : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCOStateWithParams:params + [cluster subscribeAttributeSupportedModesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.COState 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 { @@ -64483,34 +65162,34 @@ class SubscribeAttributeSmokeCoAlarmCOState : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute BatteryAlert + * Attribute CurrentMode */ -class ReadSmokeCoAlarmBatteryAlert : public ReadAttribute { +class ReadMicrowaveOvenModeCurrentMode : public ReadAttribute { public: - ReadSmokeCoAlarmBatteryAlert() - : ReadAttribute("battery-alert") + ReadMicrowaveOvenModeCurrentMode() + : ReadAttribute("current-mode") { } - ~ReadSmokeCoAlarmBatteryAlert() + ~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::BatteryAlert::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 readAttributeBatteryAlertWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.BatteryAlert 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 BatteryAlert read Error", error); + LogNSError("MicrowaveOvenMode CurrentMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -64519,25 +65198,25 @@ class ReadSmokeCoAlarmBatteryAlert : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmBatteryAlert : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenModeCurrentMode : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmBatteryAlert() - : SubscribeAttribute("battery-alert") + SubscribeAttributeMicrowaveOvenModeCurrentMode() + : SubscribeAttribute("current-mode") { } - ~SubscribeAttributeSmokeCoAlarmBatteryAlert() + ~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::BatteryAlert::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(); @@ -64548,10 +65227,10 @@ class SubscribeAttributeSmokeCoAlarmBatteryAlert : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeBatteryAlertWithParams:params + [cluster subscribeAttributeCurrentModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.BatteryAlert response %@", [value description]); + NSLog(@"MicrowaveOvenMode.CurrentMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -64568,34 +65247,34 @@ class SubscribeAttributeSmokeCoAlarmBatteryAlert : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute DeviceMuted + * Attribute GeneratedCommandList */ -class ReadSmokeCoAlarmDeviceMuted : public ReadAttribute { +class ReadMicrowaveOvenModeGeneratedCommandList : public ReadAttribute { public: - ReadSmokeCoAlarmDeviceMuted() - : ReadAttribute("device-muted") + ReadMicrowaveOvenModeGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadSmokeCoAlarmDeviceMuted() + ~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::DeviceMuted::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]; - [cluster readAttributeDeviceMutedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.DeviceMuted response %@", [value description]); + __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]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm DeviceMuted read Error", error); + LogNSError("MicrowaveOvenMode GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -64604,25 +65283,25 @@ class ReadSmokeCoAlarmDeviceMuted : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmDeviceMuted : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenModeGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmDeviceMuted() - : SubscribeAttribute("device-muted") + SubscribeAttributeMicrowaveOvenModeGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeSmokeCoAlarmDeviceMuted() + ~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::DeviceMuted::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(); @@ -64633,10 +65312,10 @@ class SubscribeAttributeSmokeCoAlarmDeviceMuted : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeDeviceMutedWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.DeviceMuted response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenMode.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -64653,34 +65332,34 @@ class SubscribeAttributeSmokeCoAlarmDeviceMuted : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute TestInProgress + * Attribute AcceptedCommandList */ -class ReadSmokeCoAlarmTestInProgress : public ReadAttribute { +class ReadMicrowaveOvenModeAcceptedCommandList : public ReadAttribute { public: - ReadSmokeCoAlarmTestInProgress() - : ReadAttribute("test-in-progress") + ReadMicrowaveOvenModeAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadSmokeCoAlarmTestInProgress() + ~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::TestInProgress::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]; - [cluster readAttributeTestInProgressWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.TestInProgress response %@", [value description]); + __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]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm TestInProgress read Error", error); + LogNSError("MicrowaveOvenMode AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -64689,25 +65368,25 @@ class ReadSmokeCoAlarmTestInProgress : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmTestInProgress : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenModeAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmTestInProgress() - : SubscribeAttribute("test-in-progress") + SubscribeAttributeMicrowaveOvenModeAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeSmokeCoAlarmTestInProgress() + ~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::TestInProgress::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(); @@ -64718,10 +65397,10 @@ class SubscribeAttributeSmokeCoAlarmTestInProgress : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTestInProgressWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams: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(@"MicrowaveOvenMode.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -64738,34 +65417,34 @@ class SubscribeAttributeSmokeCoAlarmTestInProgress : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute HardwareFaultAlert + * Attribute EventList */ -class ReadSmokeCoAlarmHardwareFaultAlert : public ReadAttribute { +class ReadMicrowaveOvenModeEventList : public ReadAttribute { public: - ReadSmokeCoAlarmHardwareFaultAlert() - : ReadAttribute("hardware-fault-alert") + ReadMicrowaveOvenModeEventList() + : ReadAttribute("event-list") { } - ~ReadSmokeCoAlarmHardwareFaultAlert() + ~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::HardwareFaultAlert::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]; - [cluster readAttributeHardwareFaultAlertWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.HardwareFaultAlert response %@", [value description]); + __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]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm HardwareFaultAlert read Error", error); + LogNSError("MicrowaveOvenMode EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -64774,25 +65453,25 @@ class ReadSmokeCoAlarmHardwareFaultAlert : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmHardwareFaultAlert : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenModeEventList : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmHardwareFaultAlert() - : SubscribeAttribute("hardware-fault-alert") + SubscribeAttributeMicrowaveOvenModeEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeSmokeCoAlarmHardwareFaultAlert() + ~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::HardwareFaultAlert::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(); @@ -64803,10 +65482,10 @@ class SubscribeAttributeSmokeCoAlarmHardwareFaultAlert : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeHardwareFaultAlertWithParams:params + [cluster subscribeAttributeEventListWithParams: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(@"MicrowaveOvenMode.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -64823,34 +65502,34 @@ class SubscribeAttributeSmokeCoAlarmHardwareFaultAlert : public SubscribeAttribu #if MTR_ENABLE_PROVISIONAL /* - * Attribute EndOfServiceAlert + * Attribute AttributeList */ -class ReadSmokeCoAlarmEndOfServiceAlert : public ReadAttribute { +class ReadMicrowaveOvenModeAttributeList : public ReadAttribute { public: - ReadSmokeCoAlarmEndOfServiceAlert() - : ReadAttribute("end-of-service-alert") + ReadMicrowaveOvenModeAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadSmokeCoAlarmEndOfServiceAlert() + ~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::EndOfServiceAlert::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]; - [cluster readAttributeEndOfServiceAlertWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.EndOfServiceAlert response %@", [value description]); + __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]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm EndOfServiceAlert read Error", error); + LogNSError("MicrowaveOvenMode AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -64859,25 +65538,25 @@ class ReadSmokeCoAlarmEndOfServiceAlert : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmEndOfServiceAlert : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenModeAttributeList : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmEndOfServiceAlert() - : SubscribeAttribute("end-of-service-alert") + SubscribeAttributeMicrowaveOvenModeAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeSmokeCoAlarmEndOfServiceAlert() + ~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::EndOfServiceAlert::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(); @@ -64888,10 +65567,10 @@ class SubscribeAttributeSmokeCoAlarmEndOfServiceAlert : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEndOfServiceAlertWithParams:params + [cluster subscribeAttributeAttributeListWithParams: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(@"MicrowaveOvenMode.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -64908,34 +65587,34 @@ class SubscribeAttributeSmokeCoAlarmEndOfServiceAlert : public SubscribeAttribut #if MTR_ENABLE_PROVISIONAL /* - * Attribute InterconnectSmokeAlarm + * Attribute FeatureMap */ -class ReadSmokeCoAlarmInterconnectSmokeAlarm : public ReadAttribute { +class ReadMicrowaveOvenModeFeatureMap : public ReadAttribute { public: - ReadSmokeCoAlarmInterconnectSmokeAlarm() - : ReadAttribute("interconnect-smoke-alarm") + ReadMicrowaveOvenModeFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadSmokeCoAlarmInterconnectSmokeAlarm() + ~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::InterconnectSmokeAlarm::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]; - [cluster readAttributeInterconnectSmokeAlarmWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.InterconnectSmokeAlarm response %@", [value description]); + __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]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm InterconnectSmokeAlarm read Error", error); + LogNSError("MicrowaveOvenMode FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -64944,25 +65623,25 @@ class ReadSmokeCoAlarmInterconnectSmokeAlarm : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmInterconnectSmokeAlarm : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenModeFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmInterconnectSmokeAlarm() - : SubscribeAttribute("interconnect-smoke-alarm") + SubscribeAttributeMicrowaveOvenModeFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeSmokeCoAlarmInterconnectSmokeAlarm() + ~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::InterconnectSmokeAlarm::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(); @@ -64973,10 +65652,10 @@ class SubscribeAttributeSmokeCoAlarmInterconnectSmokeAlarm : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeInterconnectSmokeAlarmWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.InterconnectSmokeAlarm response %@", [value description]); + NSLog(@"MicrowaveOvenMode.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -64993,34 +65672,34 @@ class SubscribeAttributeSmokeCoAlarmInterconnectSmokeAlarm : public SubscribeAtt #if MTR_ENABLE_PROVISIONAL /* - * Attribute InterconnectCOAlarm + * Attribute ClusterRevision */ -class ReadSmokeCoAlarmInterconnectCOAlarm : public ReadAttribute { +class ReadMicrowaveOvenModeClusterRevision : public ReadAttribute { public: - ReadSmokeCoAlarmInterconnectCOAlarm() - : ReadAttribute("interconnect-coalarm") + ReadMicrowaveOvenModeClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadSmokeCoAlarmInterconnectCOAlarm() + ~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::InterconnectCOAlarm::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]; - [cluster readAttributeInterconnectCOAlarmWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.InterconnectCOAlarm response %@", [value description]); + __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]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm InterconnectCOAlarm read Error", error); + LogNSError("MicrowaveOvenMode ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -65029,25 +65708,25 @@ class ReadSmokeCoAlarmInterconnectCOAlarm : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmInterconnectCOAlarm : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenModeClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmInterconnectCOAlarm() - : SubscribeAttribute("interconnect-coalarm") + SubscribeAttributeMicrowaveOvenModeClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeSmokeCoAlarmInterconnectCOAlarm() + ~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::InterconnectCOAlarm::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(); @@ -65058,10 +65737,10 @@ class SubscribeAttributeSmokeCoAlarmInterconnectCOAlarm : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeInterconnectCOAlarmWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.InterconnectCOAlarm response %@", [value description]); + NSLog(@"MicrowaveOvenMode.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -65074,191 +65753,245 @@ class SubscribeAttributeSmokeCoAlarmInterconnectCOAlarm : public SubscribeAttrib } }; +#endif // MTR_ENABLE_PROVISIONAL #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL +/*----------------------------------------------------------------------------*\ +| Cluster MicrowaveOvenControl | 0x005F | +|------------------------------------------------------------------------------| +| Commands: | | +| * SetCookingParameters | 0x00 | +| * AddMoreTime | 0x01 | +|------------------------------------------------------------------------------| +| Attributes: | | +| * CookTime | 0x0000 | +| * MaxCookTime | 0x0001 | +| * PowerSetting | 0x0002 | +| * MinPower | 0x0003 | +| * MaxPower | 0x0004 | +| * PowerStep | 0x0005 | +| * SupportedWatts | 0x0006 | +| * SelectedWattIndex | 0x0007 | +| * WattRating | 0x0008 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ +#if MTR_ENABLE_PROVISIONAL /* - * Attribute ContaminationState + * Command SetCookingParameters */ -class ReadSmokeCoAlarmContaminationState : public ReadAttribute { +class MicrowaveOvenControlSetCookingParameters : public ClusterCommand { public: - ReadSmokeCoAlarmContaminationState() - : ReadAttribute("contamination-state") - { - } - - ~ReadSmokeCoAlarmContaminationState() + 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 +#if MTR_ENABLE_PROVISIONAL + AddArgument("WattSettingIndex", 0, UINT8_MAX, &mRequest.wattSettingIndex); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("StartAfterSetting", 0, 1, &mRequest.startAfterSetting); +#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::ContaminationState::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 ") 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 = [[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("SmokeCOAlarm ContaminationState read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __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 +#if MTR_ENABLE_PROVISIONAL + if (mRequest.wattSettingIndex.HasValue()) { + params.wattSettingIndex = [NSNumber numberWithUnsignedChar:mRequest.wattSettingIndex.Value()]; + } else { + params.wattSettingIndex = nil; + } +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + if (mRequest.startAfterSetting.HasValue()) { + params.startAfterSetting = [NSNumber numberWithBool:mRequest.startAfterSetting.Value()]; + } else { + params.startAfterSetting = 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; }; -class SubscribeAttributeSmokeCoAlarmContaminationState : public SubscribeAttribute { +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command AddMoreTime + */ +class MicrowaveOvenControlAddMoreTime : public ClusterCommand { public: - SubscribeAttributeSmokeCoAlarmContaminationState() - : SubscribeAttribute("contamination-state") - { - } - - ~SubscribeAttributeSmokeCoAlarmContaminationState() + 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::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 = [[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 subscribeAttributeContaminationStateWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.ContaminationState response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + 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 SmokeSensitivityLevel + * Attribute CookTime */ -class ReadSmokeCoAlarmSmokeSensitivityLevel : public ReadAttribute { +class ReadMicrowaveOvenControlCookTime : public ReadAttribute { public: - ReadSmokeCoAlarmSmokeSensitivityLevel() - : ReadAttribute("smoke-sensitivity-level") + ReadMicrowaveOvenControlCookTime() + : ReadAttribute("cook-time") { } - ~ReadSmokeCoAlarmSmokeSensitivityLevel() + ~ReadMicrowaveOvenControlCookTime() { } 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::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 = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSmokeSensitivityLevelWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.SmokeSensitivityLevel 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("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); + LogNSError("MicrowaveOvenControl CookTime read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeSmokeCoAlarmSmokeSensitivityLevel : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenControlCookTime : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmSmokeSensitivityLevel() - : SubscribeAttribute("smoke-sensitivity-level") + SubscribeAttributeMicrowaveOvenControlCookTime() + : SubscribeAttribute("cook-time") { } - ~SubscribeAttributeSmokeCoAlarmSmokeSensitivityLevel() + ~SubscribeAttributeMicrowaveOvenControlCookTime() { } 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::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 = [[MTRBaseClusterSmokeCOAlarm 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(); @@ -65269,10 +66002,10 @@ class SubscribeAttributeSmokeCoAlarmSmokeSensitivityLevel : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSmokeSensitivityLevelWithParams:params + [cluster subscribeAttributeCookTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.SmokeSensitivityLevel response %@", [value description]); + NSLog(@"MicrowaveOvenControl.CookTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -65289,34 +66022,34 @@ class SubscribeAttributeSmokeCoAlarmSmokeSensitivityLevel : public SubscribeAttr #if MTR_ENABLE_PROVISIONAL /* - * Attribute ExpiryDate + * Attribute MaxCookTime */ -class ReadSmokeCoAlarmExpiryDate : public ReadAttribute { +class ReadMicrowaveOvenControlMaxCookTime : public ReadAttribute { public: - ReadSmokeCoAlarmExpiryDate() - : ReadAttribute("expiry-date") + ReadMicrowaveOvenControlMaxCookTime() + : ReadAttribute("max-cook-time") { } - ~ReadSmokeCoAlarmExpiryDate() + ~ReadMicrowaveOvenControlMaxCookTime() { } 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::MicrowaveOvenControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::MaxCookTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%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 = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxCookTimeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.MaxCookTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm ExpiryDate read Error", error); + LogNSError("MicrowaveOvenControl MaxCookTime read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -65325,25 +66058,25 @@ class ReadSmokeCoAlarmExpiryDate : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmExpiryDate : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenControlMaxCookTime : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmExpiryDate() - : SubscribeAttribute("expiry-date") + SubscribeAttributeMicrowaveOvenControlMaxCookTime() + : SubscribeAttribute("max-cook-time") { } - ~SubscribeAttributeSmokeCoAlarmExpiryDate() + ~SubscribeAttributeMicrowaveOvenControlMaxCookTime() { } 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::MicrowaveOvenControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::MaxCookTime::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%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 = [[MTRBaseClusterMicrowaveOvenControl 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 +66087,10 @@ class SubscribeAttributeSmokeCoAlarmExpiryDate : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeExpiryDateWithParams:params + [cluster subscribeAttributeMaxCookTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.ExpiryDate response %@", [value description]); + NSLog(@"MicrowaveOvenControl.MaxCookTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -65374,34 +66107,34 @@ class SubscribeAttributeSmokeCoAlarmExpiryDate : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute GeneratedCommandList + * Attribute PowerSetting */ -class ReadSmokeCoAlarmGeneratedCommandList : public ReadAttribute { +class ReadMicrowaveOvenControlPowerSetting : public ReadAttribute { public: - ReadSmokeCoAlarmGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadMicrowaveOvenControlPowerSetting() + : ReadAttribute("power-setting") { } - ~ReadSmokeCoAlarmGeneratedCommandList() + ~ReadMicrowaveOvenControlPowerSetting() { } 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::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 = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.GeneratedCommandList 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("SmokeCOAlarm GeneratedCommandList read Error", error); + LogNSError("MicrowaveOvenControl PowerSetting read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -65410,25 +66143,25 @@ class ReadSmokeCoAlarmGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenControlPowerSetting : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeMicrowaveOvenControlPowerSetting() + : SubscribeAttribute("power-setting") { } - ~SubscribeAttributeSmokeCoAlarmGeneratedCommandList() + ~SubscribeAttributeMicrowaveOvenControlPowerSetting() { } 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::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 = [[MTRBaseClusterSmokeCOAlarm 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(); @@ -65439,10 +66172,10 @@ class SubscribeAttributeSmokeCoAlarmGeneratedCommandList : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributePowerSettingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.PowerSetting response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -65459,34 +66192,34 @@ class SubscribeAttributeSmokeCoAlarmGeneratedCommandList : public SubscribeAttri #if MTR_ENABLE_PROVISIONAL /* - * Attribute AcceptedCommandList + * Attribute MinPower */ -class ReadSmokeCoAlarmAcceptedCommandList : public ReadAttribute { +class ReadMicrowaveOvenControlMinPower : public ReadAttribute { public: - ReadSmokeCoAlarmAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadMicrowaveOvenControlMinPower() + : ReadAttribute("min-power") { } - ~ReadSmokeCoAlarmAcceptedCommandList() + ~ReadMicrowaveOvenControlMinPower() { } 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::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 = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.AcceptedCommandList 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("SmokeCOAlarm AcceptedCommandList read Error", error); + LogNSError("MicrowaveOvenControl MinPower read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -65495,25 +66228,25 @@ class ReadSmokeCoAlarmAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenControlMinPower : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeMicrowaveOvenControlMinPower() + : SubscribeAttribute("min-power") { } - ~SubscribeAttributeSmokeCoAlarmAcceptedCommandList() + ~SubscribeAttributeMicrowaveOvenControlMinPower() { } 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::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 = [[MTRBaseClusterSmokeCOAlarm 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(); @@ -65524,10 +66257,10 @@ class SubscribeAttributeSmokeCoAlarmAcceptedCommandList : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeMinPowerWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.MinPower response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -65544,34 +66277,34 @@ class SubscribeAttributeSmokeCoAlarmAcceptedCommandList : public SubscribeAttrib #if MTR_ENABLE_PROVISIONAL /* - * Attribute EventList + * Attribute MaxPower */ -class ReadSmokeCoAlarmEventList : public ReadAttribute { +class ReadMicrowaveOvenControlMaxPower : public ReadAttribute { public: - ReadSmokeCoAlarmEventList() - : ReadAttribute("event-list") + ReadMicrowaveOvenControlMaxPower() + : ReadAttribute("max-power") { } - ~ReadSmokeCoAlarmEventList() + ~ReadMicrowaveOvenControlMaxPower() { } 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::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 = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.EventList 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("SmokeCOAlarm EventList read Error", error); + LogNSError("MicrowaveOvenControl MaxPower read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -65580,25 +66313,25 @@ class ReadSmokeCoAlarmEventList : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmEventList : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenControlMaxPower : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeMicrowaveOvenControlMaxPower() + : SubscribeAttribute("max-power") { } - ~SubscribeAttributeSmokeCoAlarmEventList() + ~SubscribeAttributeMicrowaveOvenControlMaxPower() { } 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::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 = [[MTRBaseClusterSmokeCOAlarm 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(); @@ -65609,10 +66342,10 @@ class SubscribeAttributeSmokeCoAlarmEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeMaxPowerWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.MaxPower response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -65629,34 +66362,34 @@ class SubscribeAttributeSmokeCoAlarmEventList : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute AttributeList + * Attribute PowerStep */ -class ReadSmokeCoAlarmAttributeList : public ReadAttribute { +class ReadMicrowaveOvenControlPowerStep : public ReadAttribute { public: - ReadSmokeCoAlarmAttributeList() - : ReadAttribute("attribute-list") + ReadMicrowaveOvenControlPowerStep() + : ReadAttribute("power-step") { } - ~ReadSmokeCoAlarmAttributeList() + ~ReadMicrowaveOvenControlPowerStep() { } 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::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 = [[MTRBaseClusterSmokeCOAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.AttributeList response %@", [value description]); + __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("SmokeCOAlarm AttributeList read Error", error); + LogNSError("MicrowaveOvenControl PowerStep read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -65665,25 +66398,25 @@ class ReadSmokeCoAlarmAttributeList : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmAttributeList : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenControlPowerStep : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeMicrowaveOvenControlPowerStep() + : SubscribeAttribute("power-step") { } - ~SubscribeAttributeSmokeCoAlarmAttributeList() + ~SubscribeAttributeMicrowaveOvenControlPowerStep() { } 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::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 = [[MTRBaseClusterSmokeCOAlarm 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(); @@ -65694,10 +66427,10 @@ class SubscribeAttributeSmokeCoAlarmAttributeList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributePowerStepWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.PowerStep response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -65714,34 +66447,34 @@ class SubscribeAttributeSmokeCoAlarmAttributeList : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute FeatureMap + * Attribute SupportedWatts */ -class ReadSmokeCoAlarmFeatureMap : public ReadAttribute { +class ReadMicrowaveOvenControlSupportedWatts : public ReadAttribute { public: - ReadSmokeCoAlarmFeatureMap() - : ReadAttribute("feature-map") + ReadMicrowaveOvenControlSupportedWatts() + : ReadAttribute("supported-watts") { } - ~ReadSmokeCoAlarmFeatureMap() + ~ReadMicrowaveOvenControlSupportedWatts() { } 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::MicrowaveOvenControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::SupportedWatts::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%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 readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSupportedWattsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.SupportedWatts response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm FeatureMap read Error", error); + LogNSError("MicrowaveOvenControl SupportedWatts read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -65750,25 +66483,25 @@ class ReadSmokeCoAlarmFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmFeatureMap : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenControlSupportedWatts : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeMicrowaveOvenControlSupportedWatts() + : SubscribeAttribute("supported-watts") { } - ~SubscribeAttributeSmokeCoAlarmFeatureMap() + ~SubscribeAttributeMicrowaveOvenControlSupportedWatts() { } 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::MicrowaveOvenControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::SupportedWatts::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%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 = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -65779,10 +66512,10 @@ class SubscribeAttributeSmokeCoAlarmFeatureMap : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeSupportedWattsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.FeatureMap response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.SupportedWatts response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -65799,34 +66532,34 @@ class SubscribeAttributeSmokeCoAlarmFeatureMap : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute ClusterRevision + * Attribute SelectedWattIndex */ -class ReadSmokeCoAlarmClusterRevision : public ReadAttribute { +class ReadMicrowaveOvenControlSelectedWattIndex : public ReadAttribute { public: - ReadSmokeCoAlarmClusterRevision() - : ReadAttribute("cluster-revision") + ReadMicrowaveOvenControlSelectedWattIndex() + : ReadAttribute("selected-watt-index") { } - ~ReadSmokeCoAlarmClusterRevision() + ~ReadMicrowaveOvenControlSelectedWattIndex() { } 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::MicrowaveOvenControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::SelectedWattIndex::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%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 readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSelectedWattIndexWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.SelectedWattIndex response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("SmokeCOAlarm ClusterRevision read Error", error); + LogNSError("MicrowaveOvenControl SelectedWattIndex read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -65835,25 +66568,25 @@ class ReadSmokeCoAlarmClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeSmokeCoAlarmClusterRevision : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenControlSelectedWattIndex : public SubscribeAttribute { public: - SubscribeAttributeSmokeCoAlarmClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeMicrowaveOvenControlSelectedWattIndex() + : SubscribeAttribute("selected-watt-index") { } - ~SubscribeAttributeSmokeCoAlarmClusterRevision() + ~SubscribeAttributeMicrowaveOvenControlSelectedWattIndex() { } 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::MicrowaveOvenControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::MicrowaveOvenControl::Attributes::SelectedWattIndex::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%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 = [[MTRBaseClusterMicrowaveOvenControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -65864,10 +66597,10 @@ class SubscribeAttributeSmokeCoAlarmClusterRevision : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeSelectedWattIndexWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"SmokeCOAlarm.ClusterRevision response %@", [value description]); + NSLog(@"MicrowaveOvenControl.SelectedWattIndex response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -65881,169 +66614,37 @@ class SubscribeAttributeSmokeCoAlarmClusterRevision : public SubscribeAttribute }; #endif // MTR_ENABLE_PROVISIONAL -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL -/*----------------------------------------------------------------------------*\ -| 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 | -\*----------------------------------------------------------------------------*/ - -#if MTR_ENABLE_PROVISIONAL -/* - * Command Reset - */ -class DishwasherAlarmReset : public ClusterCommand { -public: - 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::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 = [[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 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 -/* - * Command ModifyEnabledAlarms - */ -class DishwasherAlarmModifyEnabledAlarms : public ClusterCommand { -public: - 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::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, 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]; - 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); - } - }]; - } - return CHIP_NO_ERROR; - } - -private: - chip::app::Clusters::DishwasherAlarm::Commands::ModifyEnabledAlarms::Type mRequest; -}; - -#endif // MTR_ENABLE_PROVISIONAL - #if MTR_ENABLE_PROVISIONAL /* - * Attribute Mask + * Attribute WattRating */ -class ReadDishwasherAlarmMask : public ReadAttribute { +class ReadMicrowaveOvenControlWattRating : public ReadAttribute { public: - ReadDishwasherAlarmMask() - : ReadAttribute("mask") + ReadMicrowaveOvenControlWattRating() + : ReadAttribute("watt-rating") { } - ~ReadDishwasherAlarmMask() + ~ReadMicrowaveOvenControlWattRating() { } 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::WattRating::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%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 readAttributeWattRatingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.WattRating response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherAlarm Mask read Error", error); + LogNSError("MicrowaveOvenControl WattRating read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -66052,25 +66653,25 @@ class ReadDishwasherAlarmMask : public ReadAttribute { } }; -class SubscribeAttributeDishwasherAlarmMask : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenControlWattRating : public SubscribeAttribute { public: - SubscribeAttributeDishwasherAlarmMask() - : SubscribeAttribute("mask") + SubscribeAttributeMicrowaveOvenControlWattRating() + : SubscribeAttribute("watt-rating") { } - ~SubscribeAttributeDishwasherAlarmMask() + ~SubscribeAttributeMicrowaveOvenControlWattRating() { } 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::WattRating::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%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 +66682,10 @@ class SubscribeAttributeDishwasherAlarmMask : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaskWithParams:params + [cluster subscribeAttributeWattRatingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.Mask response %@", [value description]); + NSLog(@"MicrowaveOvenControl.WattRating response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -66101,34 +66702,34 @@ class SubscribeAttributeDishwasherAlarmMask : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute Latch + * Attribute GeneratedCommandList */ -class ReadDishwasherAlarmLatch : public ReadAttribute { +class ReadMicrowaveOvenControlGeneratedCommandList : public ReadAttribute { public: - ReadDishwasherAlarmLatch() - : ReadAttribute("latch") + ReadMicrowaveOvenControlGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadDishwasherAlarmLatch() + ~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::Latch::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]; - [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 readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherAlarm Latch read Error", error); + LogNSError("MicrowaveOvenControl GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -66137,25 +66738,25 @@ class ReadDishwasherAlarmLatch : public ReadAttribute { } }; -class SubscribeAttributeDishwasherAlarmLatch : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenControlGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeDishwasherAlarmLatch() - : SubscribeAttribute("latch") + SubscribeAttributeMicrowaveOvenControlGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeDishwasherAlarmLatch() + ~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::Latch::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(); @@ -66166,10 +66767,10 @@ class SubscribeAttributeDishwasherAlarmLatch : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLatchWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.Latch response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -66186,34 +66787,34 @@ class SubscribeAttributeDishwasherAlarmLatch : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute State + * Attribute AcceptedCommandList */ -class ReadDishwasherAlarmState : public ReadAttribute { +class ReadMicrowaveOvenControlAcceptedCommandList : public ReadAttribute { public: - ReadDishwasherAlarmState() - : ReadAttribute("state") + ReadMicrowaveOvenControlAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadDishwasherAlarmState() + ~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::State::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]; - [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 readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherAlarm State read Error", error); + LogNSError("MicrowaveOvenControl AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -66222,25 +66823,25 @@ class ReadDishwasherAlarmState : public ReadAttribute { } }; -class SubscribeAttributeDishwasherAlarmState : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenControlAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeDishwasherAlarmState() - : SubscribeAttribute("state") + SubscribeAttributeMicrowaveOvenControlAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeDishwasherAlarmState() + ~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::State::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(); @@ -66251,10 +66852,10 @@ class SubscribeAttributeDishwasherAlarmState : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeStateWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.State response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -66271,34 +66872,34 @@ class SubscribeAttributeDishwasherAlarmState : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute Supported + * Attribute EventList */ -class ReadDishwasherAlarmSupported : public ReadAttribute { +class ReadMicrowaveOvenControlEventList : public ReadAttribute { public: - ReadDishwasherAlarmSupported() - : ReadAttribute("supported") + ReadMicrowaveOvenControlEventList() + : ReadAttribute("event-list") { } - ~ReadDishwasherAlarmSupported() + ~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::Supported::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]; - [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 readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherAlarm Supported read Error", error); + LogNSError("MicrowaveOvenControl EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -66307,25 +66908,25 @@ class ReadDishwasherAlarmSupported : public ReadAttribute { } }; -class SubscribeAttributeDishwasherAlarmSupported : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenControlEventList : public SubscribeAttribute { public: - SubscribeAttributeDishwasherAlarmSupported() - : SubscribeAttribute("supported") + SubscribeAttributeMicrowaveOvenControlEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeDishwasherAlarmSupported() + ~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::Supported::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(); @@ -66336,10 +66937,10 @@ class SubscribeAttributeDishwasherAlarmSupported : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.Supported response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -66356,34 +66957,34 @@ class SubscribeAttributeDishwasherAlarmSupported : public SubscribeAttribute { #if MTR_ENABLE_PROVISIONAL /* - * Attribute GeneratedCommandList + * Attribute AttributeList */ -class ReadDishwasherAlarmGeneratedCommandList : public ReadAttribute { +class ReadMicrowaveOvenControlAttributeList : public ReadAttribute { public: - ReadDishwasherAlarmGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadMicrowaveOvenControlAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadDishwasherAlarmGeneratedCommandList() + ~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::GeneratedCommandList::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]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.GeneratedCommandList response %@", [value description]); + __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]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherAlarm GeneratedCommandList read Error", error); + LogNSError("MicrowaveOvenControl AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -66392,25 +66993,25 @@ class ReadDishwasherAlarmGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeDishwasherAlarmGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenControlAttributeList : public SubscribeAttribute { public: - SubscribeAttributeDishwasherAlarmGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeMicrowaveOvenControlAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeDishwasherAlarmGeneratedCommandList() + ~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::GeneratedCommandList::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(); @@ -66421,10 +67022,10 @@ class SubscribeAttributeDishwasherAlarmGeneratedCommandList : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.GeneratedCommandList response %@", [value description]); + NSLog(@"MicrowaveOvenControl.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -66441,34 +67042,34 @@ class SubscribeAttributeDishwasherAlarmGeneratedCommandList : public SubscribeAt #if MTR_ENABLE_PROVISIONAL /* - * Attribute AcceptedCommandList + * Attribute FeatureMap */ -class ReadDishwasherAlarmAcceptedCommandList : public ReadAttribute { +class ReadMicrowaveOvenControlFeatureMap : public ReadAttribute { public: - ReadDishwasherAlarmAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadMicrowaveOvenControlFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadDishwasherAlarmAcceptedCommandList() + ~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::AcceptedCommandList::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]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.AcceptedCommandList response %@", [value description]); + __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]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherAlarm AcceptedCommandList read Error", error); + LogNSError("MicrowaveOvenControl FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -66477,25 +67078,25 @@ class ReadDishwasherAlarmAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeDishwasherAlarmAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenControlFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeDishwasherAlarmAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeMicrowaveOvenControlFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeDishwasherAlarmAcceptedCommandList() + ~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::AcceptedCommandList::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(); @@ -66506,10 +67107,10 @@ class SubscribeAttributeDishwasherAlarmAcceptedCommandList : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -66526,34 +67127,34 @@ class SubscribeAttributeDishwasherAlarmAcceptedCommandList : public SubscribeAtt #if MTR_ENABLE_PROVISIONAL /* - * Attribute EventList + * Attribute ClusterRevision */ -class ReadDishwasherAlarmEventList : public ReadAttribute { +class ReadMicrowaveOvenControlClusterRevision : public ReadAttribute { public: - ReadDishwasherAlarmEventList() - : ReadAttribute("event-list") + ReadMicrowaveOvenControlClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadDishwasherAlarmEventList() + ~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::EventList::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]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.EventList response %@", [value description]); + __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]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("DishwasherAlarm EventList read Error", error); + LogNSError("MicrowaveOvenControl ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -66562,25 +67163,25 @@ class ReadDishwasherAlarmEventList : public ReadAttribute { } }; -class SubscribeAttributeDishwasherAlarmEventList : public SubscribeAttribute { +class SubscribeAttributeMicrowaveOvenControlClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeDishwasherAlarmEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeMicrowaveOvenControlClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeDishwasherAlarmEventList() + ~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::EventList::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(); @@ -66591,10 +67192,10 @@ class SubscribeAttributeDishwasherAlarmEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"MicrowaveOvenControl.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -66608,207 +67209,264 @@ class SubscribeAttributeDishwasherAlarmEventList : public SubscribeAttribute { }; #endif // MTR_ENABLE_PROVISIONAL -#if 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 | +\*----------------------------------------------------------------------------*/ /* - * Attribute AttributeList + * Command Pause */ -class ReadDishwasherAlarmAttributeList : public ReadAttribute { +class OperationalStatePause : public ClusterCommand { public: - ReadDishwasherAlarmAttributeList() - : ReadAttribute("attribute-list") - { - } - - ~ReadDishwasherAlarmAttributeList() + OperationalStatePause() + : ClusterCommand("pause") { + ClusterCommand::AddArguments(); } 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::OperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::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 = [[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("DishwasherAlarm AttributeList read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __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: }; -class SubscribeAttributeDishwasherAlarmAttributeList : public SubscribeAttribute { +/* + * Command Stop + */ +class OperationalStateStop : public ClusterCommand { public: - SubscribeAttributeDishwasherAlarmAttributeList() - : SubscribeAttribute("attribute-list") - { - } - - ~SubscribeAttributeDishwasherAlarmAttributeList() + OperationalStateStop() + : ClusterCommand("stop") { + ClusterCommand::AddArguments(); } 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::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); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%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 * 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 = [[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); + } + }]; } - [cluster subscribeAttributeAttributeListWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.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 +private: +}; /* - * Attribute FeatureMap + * Command Start */ -class ReadDishwasherAlarmFeatureMap : public ReadAttribute { +class OperationalStateStart : public ClusterCommand { public: - ReadDishwasherAlarmFeatureMap() - : ReadAttribute("feature-map") - { - } - - ~ReadDishwasherAlarmFeatureMap() + OperationalStateStart() + : ClusterCommand("start") { + ClusterCommand::AddArguments(); } 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::OperationalState::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::OperationalState::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 = [[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("DishwasherAlarm FeatureMap read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __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: }; -class SubscribeAttributeDishwasherAlarmFeatureMap : public SubscribeAttribute { +/* + * Command Resume + */ +class OperationalStateResume : public ClusterCommand { public: - SubscribeAttributeDishwasherAlarmFeatureMap() - : SubscribeAttribute("feature-map") - { - } - - ~SubscribeAttributeDishwasherAlarmFeatureMap() + OperationalStateResume() + : ClusterCommand("resume") { + ClusterCommand::AddArguments(); } 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::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); - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%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 * 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 = [[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); + } + }]; } - [cluster subscribeAttributeFeatureMapWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.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; } -}; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL +private: +}; /* - * Attribute ClusterRevision + * Attribute PhaseList */ -class ReadDishwasherAlarmClusterRevision : public ReadAttribute { +class ReadOperationalStatePhaseList : public ReadAttribute { public: - ReadDishwasherAlarmClusterRevision() - : ReadAttribute("cluster-revision") + ReadOperationalStatePhaseList() + : ReadAttribute("phase-list") { } - ~ReadDishwasherAlarmClusterRevision() + ~ReadOperationalStatePhaseList() { } 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::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 = [[MTRBaseClusterDishwasherAlarm alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.ClusterRevision 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("DishwasherAlarm ClusterRevision read Error", error); + LogNSError("OperationalState PhaseList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -66817,25 +67475,25 @@ class ReadDishwasherAlarmClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeDishwasherAlarmClusterRevision : public SubscribeAttribute { +class SubscribeAttributeOperationalStatePhaseList : public SubscribeAttribute { public: - SubscribeAttributeDishwasherAlarmClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeOperationalStatePhaseList() + : SubscribeAttribute("phase-list") { } - ~SubscribeAttributeDishwasherAlarmClusterRevision() + ~SubscribeAttributeOperationalStatePhaseList() { } 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::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 = [[MTRBaseClusterDishwasherAlarm 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(); @@ -66846,10 +67504,10 @@ class SubscribeAttributeDishwasherAlarmClusterRevision : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributePhaseListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"DishwasherAlarm.ClusterRevision response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.PhaseList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -66862,58 +67520,35 @@ class SubscribeAttributeDishwasherAlarmClusterRevision : 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 SupportedModes + * Attribute CurrentPhase */ -class ReadMicrowaveOvenModeSupportedModes : public ReadAttribute { +class ReadOperationalStateCurrentPhase : public ReadAttribute { public: - ReadMicrowaveOvenModeSupportedModes() - : ReadAttribute("supported-modes") + ReadOperationalStateCurrentPhase() + : ReadAttribute("current-phase") { } - ~ReadMicrowaveOvenModeSupportedModes() + ~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::SupportedModes::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 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 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 SupportedModes read Error", error); + LogNSError("OperationalState CurrentPhase read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -66922,25 +67557,25 @@ class ReadMicrowaveOvenModeSupportedModes : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenModeSupportedModes : public SubscribeAttribute { +class SubscribeAttributeOperationalStateCurrentPhase : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenModeSupportedModes() - : SubscribeAttribute("supported-modes") + SubscribeAttributeOperationalStateCurrentPhase() + : SubscribeAttribute("current-phase") { } - ~SubscribeAttributeMicrowaveOvenModeSupportedModes() + ~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::SupportedModes::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(); @@ -66951,10 +67586,10 @@ class SubscribeAttributeMicrowaveOvenModeSupportedModes : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSupportedModesWithParams:params + [cluster subscribeAttributeCurrentPhaseWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.SupportedModes response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.CurrentPhase response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -66967,38 +67602,35 @@ class SubscribeAttributeMicrowaveOvenModeSupportedModes : public SubscribeAttrib } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute CurrentMode + * Attribute CountdownTime */ -class ReadMicrowaveOvenModeCurrentMode : public ReadAttribute { +class ReadOperationalStateCountdownTime : public ReadAttribute { public: - ReadMicrowaveOvenModeCurrentMode() - : ReadAttribute("current-mode") + ReadOperationalStateCountdownTime() + : ReadAttribute("countdown-time") { } - ~ReadMicrowaveOvenModeCurrentMode() + ~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::CurrentMode::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 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 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 CurrentMode read Error", error); + LogNSError("OperationalState CountdownTime read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -67007,25 +67639,25 @@ class ReadMicrowaveOvenModeCurrentMode : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenModeCurrentMode : public SubscribeAttribute { +class SubscribeAttributeOperationalStateCountdownTime : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenModeCurrentMode() - : SubscribeAttribute("current-mode") + SubscribeAttributeOperationalStateCountdownTime() + : SubscribeAttribute("countdown-time") { } - ~SubscribeAttributeMicrowaveOvenModeCurrentMode() + ~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::CurrentMode::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(); @@ -67036,10 +67668,10 @@ class SubscribeAttributeMicrowaveOvenModeCurrentMode : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCurrentModeWithParams:params + [cluster subscribeAttributeCountdownTimeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.CurrentMode response %@", [value description]); + NSLog(@"OperationalState.CountdownTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -67052,38 +67684,35 @@ class SubscribeAttributeMicrowaveOvenModeCurrentMode : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute GeneratedCommandList + * Attribute OperationalStateList */ -class ReadMicrowaveOvenModeGeneratedCommandList : public ReadAttribute { +class ReadOperationalStateOperationalStateList : public ReadAttribute { public: - ReadMicrowaveOvenModeGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadOperationalStateOperationalStateList() + : ReadAttribute("operational-state-list") { } - ~ReadMicrowaveOvenModeGeneratedCommandList() + ~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::GeneratedCommandList::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 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 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 GeneratedCommandList read Error", error); + LogNSError("OperationalState OperationalStateList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -67092,25 +67721,25 @@ class ReadMicrowaveOvenModeGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenModeGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeOperationalStateOperationalStateList : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenModeGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeOperationalStateOperationalStateList() + : SubscribeAttribute("operational-state-list") { } - ~SubscribeAttributeMicrowaveOvenModeGeneratedCommandList() + ~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::GeneratedCommandList::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(); @@ -67121,10 +67750,10 @@ class SubscribeAttributeMicrowaveOvenModeGeneratedCommandList : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeOperationalStateListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.GeneratedCommandList response %@", [value description]); + NSLog(@"OperationalState.OperationalStateList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -67137,38 +67766,35 @@ class SubscribeAttributeMicrowaveOvenModeGeneratedCommandList : public Subscribe } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute AcceptedCommandList + * Attribute OperationalState */ -class ReadMicrowaveOvenModeAcceptedCommandList : public ReadAttribute { +class ReadOperationalStateOperationalState : public ReadAttribute { public: - ReadMicrowaveOvenModeAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadOperationalStateOperationalState() + : ReadAttribute("operational-state") { } - ~ReadMicrowaveOvenModeAcceptedCommandList() + ~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::AcceptedCommandList::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 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 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 AcceptedCommandList read Error", error); + LogNSError("OperationalState OperationalState read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -67177,25 +67803,25 @@ class ReadMicrowaveOvenModeAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenModeAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeOperationalStateOperationalState : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenModeAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeOperationalStateOperationalState() + : SubscribeAttribute("operational-state") { } - ~SubscribeAttributeMicrowaveOvenModeAcceptedCommandList() + ~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::AcceptedCommandList::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(); @@ -67206,10 +67832,10 @@ class SubscribeAttributeMicrowaveOvenModeAcceptedCommandList : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeOperationalStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.AcceptedCommandList 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 { @@ -67222,38 +67848,35 @@ class SubscribeAttributeMicrowaveOvenModeAcceptedCommandList : public SubscribeA } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute OperationalError */ -class ReadMicrowaveOvenModeEventList : public ReadAttribute { +class ReadOperationalStateOperationalError : public ReadAttribute { public: - ReadMicrowaveOvenModeEventList() - : ReadAttribute("event-list") + ReadOperationalStateOperationalError() + : ReadAttribute("operational-error") { } - ~ReadMicrowaveOvenModeEventList() + ~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::EventList::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 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 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 EventList read Error", error); + LogNSError("OperationalState OperationalError read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -67262,25 +67885,25 @@ class ReadMicrowaveOvenModeEventList : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenModeEventList : public SubscribeAttribute { +class SubscribeAttributeOperationalStateOperationalError : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenModeEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeOperationalStateOperationalError() + : SubscribeAttribute("operational-error") { } - ~SubscribeAttributeMicrowaveOvenModeEventList() + ~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::EventList::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(); @@ -67291,10 +67914,10 @@ class SubscribeAttributeMicrowaveOvenModeEventList : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeOperationalErrorWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.EventList 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 { @@ -67307,38 +67930,35 @@ class SubscribeAttributeMicrowaveOvenModeEventList : public SubscribeAttribute { } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute GeneratedCommandList */ -class ReadMicrowaveOvenModeAttributeList : public ReadAttribute { +class ReadOperationalStateGeneratedCommandList : public ReadAttribute { public: - ReadMicrowaveOvenModeAttributeList() - : ReadAttribute("attribute-list") + ReadOperationalStateGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadMicrowaveOvenModeAttributeList() + ~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::AttributeList::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 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 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 AttributeList read Error", error); + LogNSError("OperationalState GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -67347,25 +67967,25 @@ class ReadMicrowaveOvenModeAttributeList : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenModeAttributeList : public SubscribeAttribute { +class SubscribeAttributeOperationalStateGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenModeAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeOperationalStateGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributeMicrowaveOvenModeAttributeList() + ~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::AttributeList::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(); @@ -67376,10 +67996,10 @@ class SubscribeAttributeMicrowaveOvenModeAttributeList : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenMode.AttributeList response %@", [value description]); + NSLog(@"OperationalState.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -67392,38 +68012,35 @@ class SubscribeAttributeMicrowaveOvenModeAttributeList : public SubscribeAttribu } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute FeatureMap + * Attribute AcceptedCommandList */ -class ReadMicrowaveOvenModeFeatureMap : public ReadAttribute { +class ReadOperationalStateAcceptedCommandList : public ReadAttribute { public: - ReadMicrowaveOvenModeFeatureMap() - : ReadAttribute("feature-map") + ReadOperationalStateAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadMicrowaveOvenModeFeatureMap() + ~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::FeatureMap::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 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 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 FeatureMap read Error", error); + LogNSError("OperationalState AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -67432,25 +68049,25 @@ class ReadMicrowaveOvenModeFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenModeFeatureMap : public SubscribeAttribute { +class SubscribeAttributeOperationalStateAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenModeFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeOperationalStateAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributeMicrowaveOvenModeFeatureMap() + ~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::FeatureMap::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(); @@ -67461,10 +68078,10 @@ class SubscribeAttributeMicrowaveOvenModeFeatureMap : 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(@"MicrowaveOvenMode.FeatureMap 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 { @@ -67477,38 +68094,37 @@ class SubscribeAttributeMicrowaveOvenModeFeatureMap : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /* - * Attribute ClusterRevision + * Attribute EventList */ -class ReadMicrowaveOvenModeClusterRevision : public ReadAttribute { +class ReadOperationalStateEventList : public ReadAttribute { public: - ReadMicrowaveOvenModeClusterRevision() - : ReadAttribute("cluster-revision") + ReadOperationalStateEventList() + : ReadAttribute("event-list") { } - ~ReadMicrowaveOvenModeClusterRevision() + ~ReadOperationalStateEventList() { } 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::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 = [[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 readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"OperationalState.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenMode ClusterRevision read Error", error); + LogNSError("OperationalState EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -67517,25 +68133,25 @@ class ReadMicrowaveOvenModeClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenModeClusterRevision : public SubscribeAttribute { +class SubscribeAttributeOperationalStateEventList : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenModeClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeOperationalStateEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributeMicrowaveOvenModeClusterRevision() + ~SubscribeAttributeOperationalStateEventList() { } 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::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 = [[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 +68162,10 @@ class SubscribeAttributeMicrowaveOvenModeClusterRevision : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeEventListWithParams: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.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -67563,193 +68179,36 @@ 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 AttributeList */ -class ReadMicrowaveOvenControlCookTime : public ReadAttribute { +class ReadOperationalStateAttributeList : public ReadAttribute { public: - ReadMicrowaveOvenControlCookTime() - : ReadAttribute("cook-time") + ReadOperationalStateAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadMicrowaveOvenControlCookTime() + ~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::CookTime::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 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 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 CookTime read Error", error); + LogNSError("OperationalState AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -67758,25 +68217,25 @@ class ReadMicrowaveOvenControlCookTime : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenControlCookTime : public SubscribeAttribute { +class SubscribeAttributeOperationalStateAttributeList : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenControlCookTime() - : SubscribeAttribute("cook-time") + SubscribeAttributeOperationalStateAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributeMicrowaveOvenControlCookTime() + ~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::CookTime::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(); @@ -67787,10 +68246,10 @@ class SubscribeAttributeMicrowaveOvenControlCookTime : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCookTimeWithParams:params + [cluster subscribeAttributeAttributeListWithParams: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.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -67803,38 +68262,35 @@ class SubscribeAttributeMicrowaveOvenControlCookTime : public SubscribeAttribute } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute PowerSetting + * Attribute FeatureMap */ -class ReadMicrowaveOvenControlPowerSetting : public ReadAttribute { +class ReadOperationalStateFeatureMap : public ReadAttribute { public: - ReadMicrowaveOvenControlPowerSetting() - : ReadAttribute("power-setting") + ReadOperationalStateFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadMicrowaveOvenControlPowerSetting() + ~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::PowerSetting::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 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 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 PowerSetting read Error", error); + LogNSError("OperationalState FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -67843,25 +68299,25 @@ class ReadMicrowaveOvenControlPowerSetting : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenControlPowerSetting : public SubscribeAttribute { +class SubscribeAttributeOperationalStateFeatureMap : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenControlPowerSetting() - : SubscribeAttribute("power-setting") + SubscribeAttributeOperationalStateFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributeMicrowaveOvenControlPowerSetting() + ~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::PowerSetting::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(); @@ -67872,10 +68328,10 @@ class SubscribeAttributeMicrowaveOvenControlPowerSetting : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePowerSettingWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.PowerSetting response %@", [value description]); + NSLog(@"OperationalState.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -67888,38 +68344,35 @@ class SubscribeAttributeMicrowaveOvenControlPowerSetting : public SubscribeAttri } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute MinPower + * Attribute ClusterRevision */ -class ReadMicrowaveOvenControlMinPower : public ReadAttribute { +class ReadOperationalStateClusterRevision : public ReadAttribute { public: - ReadMicrowaveOvenControlMinPower() - : ReadAttribute("min-power") + ReadOperationalStateClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadMicrowaveOvenControlMinPower() + ~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::MinPower::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 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 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 MinPower read Error", error); + LogNSError("OperationalState ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -67928,25 +68381,25 @@ class ReadMicrowaveOvenControlMinPower : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenControlMinPower : public SubscribeAttribute { +class SubscribeAttributeOperationalStateClusterRevision : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenControlMinPower() - : SubscribeAttribute("min-power") + SubscribeAttributeOperationalStateClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributeMicrowaveOvenControlMinPower() + ~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::MinPower::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(); @@ -67957,10 +68410,10 @@ class SubscribeAttributeMicrowaveOvenControlMinPower : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinPowerWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.MinPower response %@", [value description]); + NSLog(@"OperationalState.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -67973,208 +68426,267 @@ class SubscribeAttributeMicrowaveOvenControlMinPower : 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 MaxPower + * Command Pause */ -class ReadMicrowaveOvenControlMaxPower : public ReadAttribute { +class RvcOperationalStatePause : public ClusterCommand { public: - ReadMicrowaveOvenControlMaxPower() - : ReadAttribute("max-power") - { - } - - ~ReadMicrowaveOvenControlMaxPower() + 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::MaxPower::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 readAttributeMaxPowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.MaxPower response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("MicrowaveOvenControl MaxPower 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 SubscribeAttributeMicrowaveOvenControlMaxPower : public SubscribeAttribute { +#if MTR_ENABLE_PROVISIONAL +/* + * Command Stop + */ +class RvcOperationalStateStop : public ClusterCommand { public: - SubscribeAttributeMicrowaveOvenControlMaxPower() - : SubscribeAttribute("max-power") - { - } - - ~SubscribeAttributeMicrowaveOvenControlMaxPower() + 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::MaxPower::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 subscribeAttributeMaxPowerWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - 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; } + +private: }; #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - /* - * Attribute PowerStep + * Command Start */ -class ReadMicrowaveOvenControlPowerStep : public ReadAttribute { +class RvcOperationalStateStart : public ClusterCommand { public: - ReadMicrowaveOvenControlPowerStep() - : ReadAttribute("power-step") - { - } - - ~ReadMicrowaveOvenControlPowerStep() + 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::PowerStep::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 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 = [[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 SubscribeAttributeMicrowaveOvenControlPowerStep : public SubscribeAttribute { +#endif // MTR_ENABLE_PROVISIONAL +/* + * Command Resume + */ +class RvcOperationalStateResume : public ClusterCommand { public: - SubscribeAttributeMicrowaveOvenControlPowerStep() - : SubscribeAttribute("power-step") - { - } - - ~SubscribeAttributeMicrowaveOvenControlPowerStep() + 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::PowerStep::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 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; } -}; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL +private: +}; /* - * Attribute GeneratedCommandList + * Attribute PhaseList */ -class ReadMicrowaveOvenControlGeneratedCommandList : public ReadAttribute { +class ReadRvcOperationalStatePhaseList : public ReadAttribute { public: - ReadMicrowaveOvenControlGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadRvcOperationalStatePhaseList() + : ReadAttribute("phase-list") { } - ~ReadMicrowaveOvenControlGeneratedCommandList() + ~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::GeneratedCommandList::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 readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.GeneratedCommandList 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 GeneratedCommandList read Error", error); + LogNSError("RVCOperationalState PhaseList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -68183,25 +68695,25 @@ class ReadMicrowaveOvenControlGeneratedCommandList : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenControlGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeRvcOperationalStatePhaseList : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenControlGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeRvcOperationalStatePhaseList() + : SubscribeAttribute("phase-list") { } - ~SubscribeAttributeMicrowaveOvenControlGeneratedCommandList() + ~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::GeneratedCommandList::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(); @@ -68212,10 +68724,10 @@ class SubscribeAttributeMicrowaveOvenControlGeneratedCommandList : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributePhaseListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.GeneratedCommandList response %@", [value description]); + NSLog(@"RVCOperationalState.PhaseList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -68228,38 +68740,35 @@ class SubscribeAttributeMicrowaveOvenControlGeneratedCommandList : public Subscr } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute AcceptedCommandList + * Attribute CurrentPhase */ -class ReadMicrowaveOvenControlAcceptedCommandList : public ReadAttribute { +class ReadRvcOperationalStateCurrentPhase : public ReadAttribute { public: - ReadMicrowaveOvenControlAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadRvcOperationalStateCurrentPhase() + : ReadAttribute("current-phase") { } - ~ReadMicrowaveOvenControlAcceptedCommandList() + ~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::AcceptedCommandList::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 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 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 AcceptedCommandList read Error", error); + LogNSError("RVCOperationalState CurrentPhase read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -68268,25 +68777,25 @@ class ReadMicrowaveOvenControlAcceptedCommandList : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenControlAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeRvcOperationalStateCurrentPhase : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenControlAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeRvcOperationalStateCurrentPhase() + : SubscribeAttribute("current-phase") { } - ~SubscribeAttributeMicrowaveOvenControlAcceptedCommandList() + ~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::AcceptedCommandList::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(); @@ -68297,10 +68806,10 @@ class SubscribeAttributeMicrowaveOvenControlAcceptedCommandList : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeCurrentPhaseWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.AcceptedCommandList 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 { @@ -68313,38 +68822,35 @@ class SubscribeAttributeMicrowaveOvenControlAcceptedCommandList : public Subscri } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute CountdownTime */ -class ReadMicrowaveOvenControlEventList : public ReadAttribute { +class ReadRvcOperationalStateCountdownTime : public ReadAttribute { public: - ReadMicrowaveOvenControlEventList() - : ReadAttribute("event-list") + ReadRvcOperationalStateCountdownTime() + : ReadAttribute("countdown-time") { } - ~ReadMicrowaveOvenControlEventList() + ~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::EventList::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 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 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 EventList read Error", error); + LogNSError("RVCOperationalState CountdownTime read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -68353,25 +68859,25 @@ class ReadMicrowaveOvenControlEventList : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenControlEventList : public SubscribeAttribute { +class SubscribeAttributeRvcOperationalStateCountdownTime : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenControlEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeRvcOperationalStateCountdownTime() + : SubscribeAttribute("countdown-time") { } - ~SubscribeAttributeMicrowaveOvenControlEventList() + ~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::EventList::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(); @@ -68382,10 +68888,10 @@ class SubscribeAttributeMicrowaveOvenControlEventList : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeCountdownTimeWithParams: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.CountdownTime response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -68398,38 +68904,35 @@ class SubscribeAttributeMicrowaveOvenControlEventList : public SubscribeAttribut } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute OperationalStateList */ -class ReadMicrowaveOvenControlAttributeList : public ReadAttribute { +class ReadRvcOperationalStateOperationalStateList : public ReadAttribute { public: - ReadMicrowaveOvenControlAttributeList() - : ReadAttribute("attribute-list") + ReadRvcOperationalStateOperationalStateList() + : ReadAttribute("operational-state-list") { } - ~ReadMicrowaveOvenControlAttributeList() + ~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::AttributeList::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 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 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 AttributeList read Error", error); + LogNSError("RVCOperationalState OperationalStateList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -68438,25 +68941,25 @@ class ReadMicrowaveOvenControlAttributeList : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenControlAttributeList : public SubscribeAttribute { +class SubscribeAttributeRvcOperationalStateOperationalStateList : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenControlAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeRvcOperationalStateOperationalStateList() + : SubscribeAttribute("operational-state-list") { } - ~SubscribeAttributeMicrowaveOvenControlAttributeList() + ~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::AttributeList::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(); @@ -68467,10 +68970,10 @@ class SubscribeAttributeMicrowaveOvenControlAttributeList : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeOperationalStateListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.AttributeList response %@", [value description]); + NSLog(@"RVCOperationalState.OperationalStateList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -68483,38 +68986,35 @@ class SubscribeAttributeMicrowaveOvenControlAttributeList : public SubscribeAttr } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute FeatureMap + * Attribute OperationalState */ -class ReadMicrowaveOvenControlFeatureMap : public ReadAttribute { +class ReadRvcOperationalStateOperationalState : public ReadAttribute { public: - ReadMicrowaveOvenControlFeatureMap() - : ReadAttribute("feature-map") + ReadRvcOperationalStateOperationalState() + : ReadAttribute("operational-state") { } - ~ReadMicrowaveOvenControlFeatureMap() + ~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::FeatureMap::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 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 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 FeatureMap read Error", error); + LogNSError("RVCOperationalState OperationalState read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -68523,25 +69023,25 @@ class ReadMicrowaveOvenControlFeatureMap : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenControlFeatureMap : public SubscribeAttribute { +class SubscribeAttributeRvcOperationalStateOperationalState : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenControlFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeRvcOperationalStateOperationalState() + : SubscribeAttribute("operational-state") { } - ~SubscribeAttributeMicrowaveOvenControlFeatureMap() + ~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::FeatureMap::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(); @@ -68552,10 +69052,10 @@ class SubscribeAttributeMicrowaveOvenControlFeatureMap : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributeOperationalStateWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.FeatureMap response %@", [value description]); + NSLog(@"RVCOperationalState.OperationalState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -68568,38 +69068,35 @@ class SubscribeAttributeMicrowaveOvenControlFeatureMap : public SubscribeAttribu } }; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute ClusterRevision + * Attribute OperationalError */ -class ReadMicrowaveOvenControlClusterRevision : public ReadAttribute { +class ReadRvcOperationalStateOperationalError : public ReadAttribute { public: - ReadMicrowaveOvenControlClusterRevision() - : ReadAttribute("cluster-revision") + ReadRvcOperationalStateOperationalError() + : ReadAttribute("operational-error") { } - ~ReadMicrowaveOvenControlClusterRevision() + ~ReadRvcOperationalStateOperationalError() { } 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::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 = [[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 readAttributeOperationalErrorWithCompletion:^(MTRRVCOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCOperationalState.OperationalError response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("MicrowaveOvenControl ClusterRevision read Error", error); + LogNSError("RVCOperationalState OperationalError read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -68608,25 +69105,25 @@ class ReadMicrowaveOvenControlClusterRevision : public ReadAttribute { } }; -class SubscribeAttributeMicrowaveOvenControlClusterRevision : public SubscribeAttribute { +class SubscribeAttributeRvcOperationalStateOperationalError : public SubscribeAttribute { public: - SubscribeAttributeMicrowaveOvenControlClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeRvcOperationalStateOperationalError() + : SubscribeAttribute("operational-error") { } - ~SubscribeAttributeMicrowaveOvenControlClusterRevision() + ~SubscribeAttributeRvcOperationalStateOperationalError() { } 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::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 = [[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 +69134,10 @@ class SubscribeAttributeMicrowaveOvenControlClusterRevision : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributeOperationalErrorWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"MicrowaveOvenControl.ClusterRevision response %@", [value description]); + reportHandler:^(MTRRVCOperationalStateClusterErrorStateStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"RVCOperationalState.OperationalError response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -68653,265 +69150,35 @@ 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 - */ -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: -}; - -/* - * Command Stop - */ -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 + * 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 +69187,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 +69216,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 +69233,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 +69269,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 +69298,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 +69314,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 +69353,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 +69382,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 +69398,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 +69437,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 +69466,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 +69483,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 +69519,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 +69548,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 +69565,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 +69601,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 +69630,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 +69646,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") + 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::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, 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 = [[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]; + } + 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; } - ~ReadOperationalStateGeneratedCommandList() +private: + chip::app::Clusters::ScenesManagement::Commands::AddScene::Type mRequest; + TypedComplexArgument> mComplex_ExtensionFieldSets; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command ViewScene + */ +class ScenesManagementViewScene : public ClusterCommand { +public: + 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::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::ViewScene::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); - } - SetCommandExitStatus(error); - }]; + __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); + } + }]; + } return CHIP_NO_ERROR; } + +private: + chip::app::Clusters::ScenesManagement::Commands::ViewScene::Type mRequest; }; -class SubscribeAttributeOperationalStateGeneratedCommandList : public SubscribeAttribute { +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command RemoveScene + */ +class ScenesManagementRemoveScene : public ClusterCommand { public: - SubscribeAttributeOperationalStateGeneratedCommandList() - : SubscribeAttribute("generated-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(); } - ~SubscribeAttributeOperationalStateGeneratedCommandList() + 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::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::RemoveAllScenes::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 = [[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); + } + }]; } - [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::RemoveAllScenes::Type mRequest; }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL /* - * Attribute AcceptedCommandList + * Command StoreScene */ -class ReadOperationalStateAcceptedCommandList : public ReadAttribute { +class ScenesManagementStoreScene : public ClusterCommand { public: - ReadOperationalStateAcceptedCommandList() - : ReadAttribute("accepted-command-list") - { - } - - ~ReadOperationalStateAcceptedCommandList() + 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(); } 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::StoreScene::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 = [[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; }; -class SubscribeAttributeOperationalStateAcceptedCommandList : public SubscribeAttribute { +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command RecallScene + */ +class ScenesManagementRecallScene : public ClusterCommand { public: - SubscribeAttributeOperationalStateAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") - { - } - - ~SubscribeAttributeOperationalStateAcceptedCommandList() + 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 +70465,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 +70494,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 +70510,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 +70550,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 +70579,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 +70595,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 +70635,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 +70664,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 +70680,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 +70720,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 +70749,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 +70765,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 +70805,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 +70834,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 +70850,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 +70890,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 +70919,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 +70935,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 +70975,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 +71004,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 +71020,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 +71064,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 +71093,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 +71109,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 +71149,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 +71181,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 +71194,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 +71234,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 +71266,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 +71279,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 +71319,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 +71351,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 +71365,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 +71404,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 +71436,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 +71449,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 +71489,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 +71521,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 +71534,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 +71574,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 +71606,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 +71619,8 @@ class SubscribeAttributeRvcOperationalStateClusterRevision : public SubscribeAtt } }; +#endif // MTR_ENABLE_PROVISIONAL +#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL /*----------------------------------------------------------------------------*\ | Cluster HepaFilterMonitoring | 0x0071 | @@ -95899,21 +96429,923 @@ class ReadPumpConfigurationAndControlMaxConstPressure : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlMaxConstPressure : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlMaxConstPressure : public SubscribeAttribute { +public: + SubscribeAttributePumpConfigurationAndControlMaxConstPressure() + : SubscribeAttribute("max-const-pressure") + { + } + + ~SubscribeAttributePumpConfigurationAndControlMaxConstPressure() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstPressure::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl 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 subscribeAttributeMaxConstPressureWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MaxConstPressure 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 MinCompPressure + */ +class ReadPumpConfigurationAndControlMinCompPressure : public ReadAttribute { +public: + ReadPumpConfigurationAndControlMinCompPressure() + : ReadAttribute("min-comp-pressure") + { + } + + ~ReadPumpConfigurationAndControlMinCompPressure() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinCompPressure::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinCompPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MinCompPressure response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("PumpConfigurationAndControl MinCompPressure read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributePumpConfigurationAndControlMinCompPressure : public SubscribeAttribute { +public: + SubscribeAttributePumpConfigurationAndControlMinCompPressure() + : SubscribeAttribute("min-comp-pressure") + { + } + + ~SubscribeAttributePumpConfigurationAndControlMinCompPressure() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinCompPressure::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl 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 subscribeAttributeMinCompPressureWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MinCompPressure 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 MaxCompPressure + */ +class ReadPumpConfigurationAndControlMaxCompPressure : public ReadAttribute { +public: + ReadPumpConfigurationAndControlMaxCompPressure() + : ReadAttribute("max-comp-pressure") + { + } + + ~ReadPumpConfigurationAndControlMaxCompPressure() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxCompPressure::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxCompPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MaxCompPressure response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("PumpConfigurationAndControl MaxCompPressure read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributePumpConfigurationAndControlMaxCompPressure : public SubscribeAttribute { +public: + SubscribeAttributePumpConfigurationAndControlMaxCompPressure() + : SubscribeAttribute("max-comp-pressure") + { + } + + ~SubscribeAttributePumpConfigurationAndControlMaxCompPressure() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxCompPressure::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl 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 subscribeAttributeMaxCompPressureWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MaxCompPressure 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 MinConstSpeed + */ +class ReadPumpConfigurationAndControlMinConstSpeed : public ReadAttribute { +public: + ReadPumpConfigurationAndControlMinConstSpeed() + : ReadAttribute("min-const-speed") + { + } + + ~ReadPumpConfigurationAndControlMinConstSpeed() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstSpeed::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinConstSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MinConstSpeed response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("PumpConfigurationAndControl MinConstSpeed read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributePumpConfigurationAndControlMinConstSpeed : public SubscribeAttribute { +public: + SubscribeAttributePumpConfigurationAndControlMinConstSpeed() + : SubscribeAttribute("min-const-speed") + { + } + + ~SubscribeAttributePumpConfigurationAndControlMinConstSpeed() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstSpeed::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl 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 subscribeAttributeMinConstSpeedWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MinConstSpeed 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 MaxConstSpeed + */ +class ReadPumpConfigurationAndControlMaxConstSpeed : public ReadAttribute { +public: + ReadPumpConfigurationAndControlMaxConstSpeed() + : ReadAttribute("max-const-speed") + { + } + + ~ReadPumpConfigurationAndControlMaxConstSpeed() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstSpeed::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxConstSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MaxConstSpeed response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("PumpConfigurationAndControl MaxConstSpeed read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributePumpConfigurationAndControlMaxConstSpeed : public SubscribeAttribute { +public: + SubscribeAttributePumpConfigurationAndControlMaxConstSpeed() + : SubscribeAttribute("max-const-speed") + { + } + + ~SubscribeAttributePumpConfigurationAndControlMaxConstSpeed() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstSpeed::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl 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 subscribeAttributeMaxConstSpeedWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MaxConstSpeed 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 MinConstFlow + */ +class ReadPumpConfigurationAndControlMinConstFlow : public ReadAttribute { +public: + ReadPumpConfigurationAndControlMinConstFlow() + : ReadAttribute("min-const-flow") + { + } + + ~ReadPumpConfigurationAndControlMinConstFlow() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstFlow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinConstFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MinConstFlow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("PumpConfigurationAndControl MinConstFlow read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributePumpConfigurationAndControlMinConstFlow : public SubscribeAttribute { +public: + SubscribeAttributePumpConfigurationAndControlMinConstFlow() + : SubscribeAttribute("min-const-flow") + { + } + + ~SubscribeAttributePumpConfigurationAndControlMinConstFlow() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstFlow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl 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 subscribeAttributeMinConstFlowWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MinConstFlow 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 MaxConstFlow + */ +class ReadPumpConfigurationAndControlMaxConstFlow : public ReadAttribute { +public: + ReadPumpConfigurationAndControlMaxConstFlow() + : ReadAttribute("max-const-flow") + { + } + + ~ReadPumpConfigurationAndControlMaxConstFlow() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstFlow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxConstFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MaxConstFlow response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("PumpConfigurationAndControl MaxConstFlow read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributePumpConfigurationAndControlMaxConstFlow : public SubscribeAttribute { +public: + SubscribeAttributePumpConfigurationAndControlMaxConstFlow() + : SubscribeAttribute("max-const-flow") + { + } + + ~SubscribeAttributePumpConfigurationAndControlMaxConstFlow() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstFlow::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl 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 subscribeAttributeMaxConstFlowWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MaxConstFlow 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 MinConstTemp + */ +class ReadPumpConfigurationAndControlMinConstTemp : public ReadAttribute { +public: + ReadPumpConfigurationAndControlMinConstTemp() + : ReadAttribute("min-const-temp") + { + } + + ~ReadPumpConfigurationAndControlMinConstTemp() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstTemp::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMinConstTempWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MinConstTemp response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("PumpConfigurationAndControl MinConstTemp read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributePumpConfigurationAndControlMinConstTemp : public SubscribeAttribute { +public: + SubscribeAttributePumpConfigurationAndControlMinConstTemp() + : SubscribeAttribute("min-const-temp") + { + } + + ~SubscribeAttributePumpConfigurationAndControlMinConstTemp() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstTemp::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl 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 subscribeAttributeMinConstTempWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MinConstTemp 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 MaxConstTemp + */ +class ReadPumpConfigurationAndControlMaxConstTemp : public ReadAttribute { +public: + ReadPumpConfigurationAndControlMaxConstTemp() + : ReadAttribute("max-const-temp") + { + } + + ~ReadPumpConfigurationAndControlMaxConstTemp() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstTemp::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeMaxConstTempWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MaxConstTemp response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("PumpConfigurationAndControl MaxConstTemp read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributePumpConfigurationAndControlMaxConstTemp : public SubscribeAttribute { +public: + SubscribeAttributePumpConfigurationAndControlMaxConstTemp() + : SubscribeAttribute("max-const-temp") + { + } + + ~SubscribeAttributePumpConfigurationAndControlMaxConstTemp() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstTemp::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl 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 subscribeAttributeMaxConstTempWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.MaxConstTemp 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 PumpStatus + */ +class ReadPumpConfigurationAndControlPumpStatus : public ReadAttribute { +public: + ReadPumpConfigurationAndControlPumpStatus() + : ReadAttribute("pump-status") + { + } + + ~ReadPumpConfigurationAndControlPumpStatus() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::PumpStatus::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePumpStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.PumpStatus response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("PumpConfigurationAndControl PumpStatus read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributePumpConfigurationAndControlPumpStatus : public SubscribeAttribute { +public: + SubscribeAttributePumpConfigurationAndControlPumpStatus() + : SubscribeAttribute("pump-status") + { + } + + ~SubscribeAttributePumpConfigurationAndControlPumpStatus() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::PumpStatus::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl 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 subscribeAttributePumpStatusWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.PumpStatus 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 EffectiveOperationMode + */ +class ReadPumpConfigurationAndControlEffectiveOperationMode : public ReadAttribute { +public: + ReadPumpConfigurationAndControlEffectiveOperationMode() + : ReadAttribute("effective-operation-mode") + { + } + + ~ReadPumpConfigurationAndControlEffectiveOperationMode() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::EffectiveOperationMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEffectiveOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.EffectiveOperationMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("PumpConfigurationAndControl EffectiveOperationMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributePumpConfigurationAndControlEffectiveOperationMode : public SubscribeAttribute { +public: + SubscribeAttributePumpConfigurationAndControlEffectiveOperationMode() + : SubscribeAttribute("effective-operation-mode") + { + } + + ~SubscribeAttributePumpConfigurationAndControlEffectiveOperationMode() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::EffectiveOperationMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl 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 subscribeAttributeEffectiveOperationModeWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.EffectiveOperationMode 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 EffectiveControlMode + */ +class ReadPumpConfigurationAndControlEffectiveControlMode : public ReadAttribute { +public: + ReadPumpConfigurationAndControlEffectiveControlMode() + : ReadAttribute("effective-control-mode") + { + } + + ~ReadPumpConfigurationAndControlEffectiveControlMode() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::EffectiveControlMode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeEffectiveControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.EffectiveControlMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("PumpConfigurationAndControl EffectiveControlMode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class SubscribeAttributePumpConfigurationAndControlEffectiveControlMode : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlMaxConstPressure() - : SubscribeAttribute("max-const-pressure") + SubscribeAttributePumpConfigurationAndControlEffectiveControlMode() + : SubscribeAttribute("effective-control-mode") { } - ~SubscribeAttributePumpConfigurationAndControlMaxConstPressure() + ~SubscribeAttributePumpConfigurationAndControlEffectiveControlMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstPressure::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::EffectiveControlMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -95928,10 +97360,10 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstPressure : public Sub if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxConstPressureWithParams:params + [cluster subscribeAttributeEffectiveControlModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxConstPressure response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.EffectiveControlMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -95945,34 +97377,34 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstPressure : public Sub }; /* - * Attribute MinCompPressure + * Attribute Capacity */ -class ReadPumpConfigurationAndControlMinCompPressure : public ReadAttribute { +class ReadPumpConfigurationAndControlCapacity : public ReadAttribute { public: - ReadPumpConfigurationAndControlMinCompPressure() - : ReadAttribute("min-comp-pressure") + ReadPumpConfigurationAndControlCapacity() + : ReadAttribute("capacity") { } - ~ReadPumpConfigurationAndControlMinCompPressure() + ~ReadPumpConfigurationAndControlCapacity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinCompPressure::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::Capacity::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinCompPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MinCompPressure response %@", [value description]); + [cluster readAttributeCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.Capacity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl MinCompPressure read Error", error); + LogNSError("PumpConfigurationAndControl Capacity read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -95981,21 +97413,21 @@ class ReadPumpConfigurationAndControlMinCompPressure : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlMinCompPressure : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlCapacity : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlMinCompPressure() - : SubscribeAttribute("min-comp-pressure") + SubscribeAttributePumpConfigurationAndControlCapacity() + : SubscribeAttribute("capacity") { } - ~SubscribeAttributePumpConfigurationAndControlMinCompPressure() + ~SubscribeAttributePumpConfigurationAndControlCapacity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinCompPressure::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::Capacity::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -96010,10 +97442,10 @@ class SubscribeAttributePumpConfigurationAndControlMinCompPressure : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinCompPressureWithParams:params + [cluster subscribeAttributeCapacityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MinCompPressure response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.Capacity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -96027,34 +97459,34 @@ class SubscribeAttributePumpConfigurationAndControlMinCompPressure : public Subs }; /* - * Attribute MaxCompPressure + * Attribute Speed */ -class ReadPumpConfigurationAndControlMaxCompPressure : public ReadAttribute { +class ReadPumpConfigurationAndControlSpeed : public ReadAttribute { public: - ReadPumpConfigurationAndControlMaxCompPressure() - : ReadAttribute("max-comp-pressure") + ReadPumpConfigurationAndControlSpeed() + : ReadAttribute("speed") { } - ~ReadPumpConfigurationAndControlMaxCompPressure() + ~ReadPumpConfigurationAndControlSpeed() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxCompPressure::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::Speed::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxCompPressureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxCompPressure response %@", [value description]); + [cluster readAttributeSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.Speed response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl MaxCompPressure read Error", error); + LogNSError("PumpConfigurationAndControl Speed read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -96063,21 +97495,21 @@ class ReadPumpConfigurationAndControlMaxCompPressure : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlMaxCompPressure : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlSpeed : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlMaxCompPressure() - : SubscribeAttribute("max-comp-pressure") + SubscribeAttributePumpConfigurationAndControlSpeed() + : SubscribeAttribute("speed") { } - ~SubscribeAttributePumpConfigurationAndControlMaxCompPressure() + ~SubscribeAttributePumpConfigurationAndControlSpeed() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxCompPressure::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::Speed::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -96092,10 +97524,10 @@ class SubscribeAttributePumpConfigurationAndControlMaxCompPressure : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxCompPressureWithParams:params + [cluster subscribeAttributeSpeedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxCompPressure response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.Speed response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -96109,34 +97541,34 @@ class SubscribeAttributePumpConfigurationAndControlMaxCompPressure : public Subs }; /* - * Attribute MinConstSpeed + * Attribute LifetimeRunningHours */ -class ReadPumpConfigurationAndControlMinConstSpeed : public ReadAttribute { +class ReadPumpConfigurationAndControlLifetimeRunningHours : public ReadAttribute { public: - ReadPumpConfigurationAndControlMinConstSpeed() - : ReadAttribute("min-const-speed") + ReadPumpConfigurationAndControlLifetimeRunningHours() + : ReadAttribute("lifetime-running-hours") { } - ~ReadPumpConfigurationAndControlMinConstSpeed() + ~ReadPumpConfigurationAndControlLifetimeRunningHours() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstSpeed::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeRunningHours::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinConstSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MinConstSpeed response %@", [value description]); + [cluster readAttributeLifetimeRunningHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.LifetimeRunningHours response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl MinConstSpeed read Error", error); + LogNSError("PumpConfigurationAndControl LifetimeRunningHours read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -96145,21 +97577,65 @@ class ReadPumpConfigurationAndControlMinConstSpeed : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlMinConstSpeed : public SubscribeAttribute { +class WritePumpConfigurationAndControlLifetimeRunningHours : public WriteAttribute { public: - SubscribeAttributePumpConfigurationAndControlMinConstSpeed() - : SubscribeAttribute("min-const-speed") + WritePumpConfigurationAndControlLifetimeRunningHours() + : WriteAttribute("lifetime-running-hours") { + AddArgument("attr-name", "lifetime-running-hours"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributePumpConfigurationAndControlMinConstSpeed() + ~WritePumpConfigurationAndControlLifetimeRunningHours() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstSpeed::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeRunningHours::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 = [[MTRBaseClusterPumpConfigurationAndControl 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 numberWithUnsignedInt:mValue.Value()]; + } + + [cluster writeAttributeLifetimeRunningHoursWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("PumpConfigurationAndControl LifetimeRunningHours write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::Nullable mValue; +}; + +class SubscribeAttributePumpConfigurationAndControlLifetimeRunningHours : public SubscribeAttribute { +public: + SubscribeAttributePumpConfigurationAndControlLifetimeRunningHours() + : SubscribeAttribute("lifetime-running-hours") + { + } + + ~SubscribeAttributePumpConfigurationAndControlLifetimeRunningHours() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeRunningHours::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -96174,10 +97650,10 @@ class SubscribeAttributePumpConfigurationAndControlMinConstSpeed : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinConstSpeedWithParams:params + [cluster subscribeAttributeLifetimeRunningHoursWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MinConstSpeed response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.LifetimeRunningHours response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -96191,34 +97667,34 @@ class SubscribeAttributePumpConfigurationAndControlMinConstSpeed : public Subscr }; /* - * Attribute MaxConstSpeed + * Attribute Power */ -class ReadPumpConfigurationAndControlMaxConstSpeed : public ReadAttribute { +class ReadPumpConfigurationAndControlPower : public ReadAttribute { public: - ReadPumpConfigurationAndControlMaxConstSpeed() - : ReadAttribute("max-const-speed") + ReadPumpConfigurationAndControlPower() + : ReadAttribute("power") { } - ~ReadPumpConfigurationAndControlMaxConstSpeed() + ~ReadPumpConfigurationAndControlPower() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstSpeed::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::Power::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxConstSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxConstSpeed response %@", [value description]); + [cluster readAttributePowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.Power response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl MaxConstSpeed read Error", error); + LogNSError("PumpConfigurationAndControl Power read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -96227,21 +97703,21 @@ class ReadPumpConfigurationAndControlMaxConstSpeed : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlMaxConstSpeed : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlPower : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlMaxConstSpeed() - : SubscribeAttribute("max-const-speed") + SubscribeAttributePumpConfigurationAndControlPower() + : SubscribeAttribute("power") { } - ~SubscribeAttributePumpConfigurationAndControlMaxConstSpeed() + ~SubscribeAttributePumpConfigurationAndControlPower() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstSpeed::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::Power::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -96256,10 +97732,10 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstSpeed : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxConstSpeedWithParams:params + [cluster subscribeAttributePowerWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxConstSpeed response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.Power response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -96273,34 +97749,34 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstSpeed : public Subscr }; /* - * Attribute MinConstFlow + * Attribute LifetimeEnergyConsumed */ -class ReadPumpConfigurationAndControlMinConstFlow : public ReadAttribute { +class ReadPumpConfigurationAndControlLifetimeEnergyConsumed : public ReadAttribute { public: - ReadPumpConfigurationAndControlMinConstFlow() - : ReadAttribute("min-const-flow") + ReadPumpConfigurationAndControlLifetimeEnergyConsumed() + : ReadAttribute("lifetime-energy-consumed") { } - ~ReadPumpConfigurationAndControlMinConstFlow() + ~ReadPumpConfigurationAndControlLifetimeEnergyConsumed() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstFlow::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinConstFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MinConstFlow response %@", [value description]); + [cluster readAttributeLifetimeEnergyConsumedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.LifetimeEnergyConsumed response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl MinConstFlow read Error", error); + LogNSError("PumpConfigurationAndControl LifetimeEnergyConsumed read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -96309,21 +97785,65 @@ class ReadPumpConfigurationAndControlMinConstFlow : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlMinConstFlow : public SubscribeAttribute { +class WritePumpConfigurationAndControlLifetimeEnergyConsumed : public WriteAttribute { public: - SubscribeAttributePumpConfigurationAndControlMinConstFlow() - : SubscribeAttribute("min-const-flow") + WritePumpConfigurationAndControlLifetimeEnergyConsumed() + : WriteAttribute("lifetime-energy-consumed") { + AddArgument("attr-name", "lifetime-energy-consumed"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributePumpConfigurationAndControlMinConstFlow() + ~WritePumpConfigurationAndControlLifetimeEnergyConsumed() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstFlow::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::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 = [[MTRBaseClusterPumpConfigurationAndControl 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 numberWithUnsignedInt:mValue.Value()]; + } + + [cluster writeAttributeLifetimeEnergyConsumedWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("PumpConfigurationAndControl LifetimeEnergyConsumed write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + chip::app::DataModel::Nullable mValue; +}; + +class SubscribeAttributePumpConfigurationAndControlLifetimeEnergyConsumed : public SubscribeAttribute { +public: + SubscribeAttributePumpConfigurationAndControlLifetimeEnergyConsumed() + : SubscribeAttribute("lifetime-energy-consumed") + { + } + + ~SubscribeAttributePumpConfigurationAndControlLifetimeEnergyConsumed() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -96338,10 +97858,10 @@ class SubscribeAttributePumpConfigurationAndControlMinConstFlow : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinConstFlowWithParams:params + [cluster subscribeAttributeLifetimeEnergyConsumedWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MinConstFlow response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.LifetimeEnergyConsumed response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -96355,34 +97875,34 @@ class SubscribeAttributePumpConfigurationAndControlMinConstFlow : public Subscri }; /* - * Attribute MaxConstFlow + * Attribute OperationMode */ -class ReadPumpConfigurationAndControlMaxConstFlow : public ReadAttribute { +class ReadPumpConfigurationAndControlOperationMode : public ReadAttribute { public: - ReadPumpConfigurationAndControlMaxConstFlow() - : ReadAttribute("max-const-flow") + ReadPumpConfigurationAndControlOperationMode() + : ReadAttribute("operation-mode") { } - ~ReadPumpConfigurationAndControlMaxConstFlow() + ~ReadPumpConfigurationAndControlOperationMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstFlow::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::OperationMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxConstFlowWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxConstFlow response %@", [value description]); + [cluster readAttributeOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.OperationMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl MaxConstFlow read Error", error); + LogNSError("PumpConfigurationAndControl OperationMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -96391,21 +97911,62 @@ class ReadPumpConfigurationAndControlMaxConstFlow : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlMaxConstFlow : public SubscribeAttribute { +class WritePumpConfigurationAndControlOperationMode : public WriteAttribute { public: - SubscribeAttributePumpConfigurationAndControlMaxConstFlow() - : SubscribeAttribute("max-const-flow") + WritePumpConfigurationAndControlOperationMode() + : WriteAttribute("operation-mode") { + AddArgument("attr-name", "operation-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributePumpConfigurationAndControlMaxConstFlow() + ~WritePumpConfigurationAndControlOperationMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstFlow::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::OperationMode::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 = [[MTRBaseClusterPumpConfigurationAndControl 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 writeAttributeOperationModeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("PumpConfigurationAndControl OperationMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributePumpConfigurationAndControlOperationMode : public SubscribeAttribute { +public: + SubscribeAttributePumpConfigurationAndControlOperationMode() + : SubscribeAttribute("operation-mode") + { + } + + ~SubscribeAttributePumpConfigurationAndControlOperationMode() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::OperationMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -96420,10 +97981,10 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstFlow : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxConstFlowWithParams:params + [cluster subscribeAttributeOperationModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxConstFlow response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.OperationMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -96437,34 +97998,34 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstFlow : public Subscri }; /* - * Attribute MinConstTemp + * Attribute ControlMode */ -class ReadPumpConfigurationAndControlMinConstTemp : public ReadAttribute { +class ReadPumpConfigurationAndControlControlMode : public ReadAttribute { public: - ReadPumpConfigurationAndControlMinConstTemp() - : ReadAttribute("min-const-temp") + ReadPumpConfigurationAndControlControlMode() + : ReadAttribute("control-mode") { } - ~ReadPumpConfigurationAndControlMinConstTemp() + ~ReadPumpConfigurationAndControlControlMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstTemp::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::ControlMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinConstTempWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MinConstTemp response %@", [value description]); + [cluster readAttributeControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.ControlMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl MinConstTemp read Error", error); + LogNSError("PumpConfigurationAndControl ControlMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -96473,21 +98034,62 @@ class ReadPumpConfigurationAndControlMinConstTemp : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlMinConstTemp : public SubscribeAttribute { +class WritePumpConfigurationAndControlControlMode : public WriteAttribute { public: - SubscribeAttributePumpConfigurationAndControlMinConstTemp() - : SubscribeAttribute("min-const-temp") + WritePumpConfigurationAndControlControlMode() + : WriteAttribute("control-mode") { + AddArgument("attr-name", "control-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributePumpConfigurationAndControlMinConstTemp() + ~WritePumpConfigurationAndControlControlMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MinConstTemp::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::ControlMode::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 = [[MTRBaseClusterPumpConfigurationAndControl 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 writeAttributeControlModeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("PumpConfigurationAndControl ControlMode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributePumpConfigurationAndControlControlMode : public SubscribeAttribute { +public: + SubscribeAttributePumpConfigurationAndControlControlMode() + : SubscribeAttribute("control-mode") + { + } + + ~SubscribeAttributePumpConfigurationAndControlControlMode() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::ControlMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -96502,10 +98104,10 @@ class SubscribeAttributePumpConfigurationAndControlMinConstTemp : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinConstTempWithParams:params + [cluster subscribeAttributeControlModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MinConstTemp response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.ControlMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -96519,34 +98121,34 @@ class SubscribeAttributePumpConfigurationAndControlMinConstTemp : public Subscri }; /* - * Attribute MaxConstTemp + * Attribute GeneratedCommandList */ -class ReadPumpConfigurationAndControlMaxConstTemp : public ReadAttribute { +class ReadPumpConfigurationAndControlGeneratedCommandList : public ReadAttribute { public: - ReadPumpConfigurationAndControlMaxConstTemp() - : ReadAttribute("max-const-temp") + ReadPumpConfigurationAndControlGeneratedCommandList() + : ReadAttribute("generated-command-list") { } - ~ReadPumpConfigurationAndControlMaxConstTemp() + ~ReadPumpConfigurationAndControlGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstTemp::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::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 = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxConstTempWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxConstTemp response %@", [value description]); + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl MaxConstTemp read Error", error); + LogNSError("PumpConfigurationAndControl GeneratedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -96555,21 +98157,21 @@ class ReadPumpConfigurationAndControlMaxConstTemp : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlMaxConstTemp : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlGeneratedCommandList : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlMaxConstTemp() - : SubscribeAttribute("max-const-temp") + SubscribeAttributePumpConfigurationAndControlGeneratedCommandList() + : SubscribeAttribute("generated-command-list") { } - ~SubscribeAttributePumpConfigurationAndControlMaxConstTemp() + ~SubscribeAttributePumpConfigurationAndControlGeneratedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::MaxConstTemp::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::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); @@ -96584,10 +98186,10 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstTemp : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxConstTempWithParams:params + [cluster subscribeAttributeGeneratedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.MaxConstTemp response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.GeneratedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -96601,34 +98203,34 @@ class SubscribeAttributePumpConfigurationAndControlMaxConstTemp : public Subscri }; /* - * Attribute PumpStatus + * Attribute AcceptedCommandList */ -class ReadPumpConfigurationAndControlPumpStatus : public ReadAttribute { +class ReadPumpConfigurationAndControlAcceptedCommandList : public ReadAttribute { public: - ReadPumpConfigurationAndControlPumpStatus() - : ReadAttribute("pump-status") + ReadPumpConfigurationAndControlAcceptedCommandList() + : ReadAttribute("accepted-command-list") { } - ~ReadPumpConfigurationAndControlPumpStatus() + ~ReadPumpConfigurationAndControlAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::PumpStatus::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::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 = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePumpStatusWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.PumpStatus response %@", [value description]); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl PumpStatus read Error", error); + LogNSError("PumpConfigurationAndControl AcceptedCommandList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -96637,21 +98239,21 @@ class ReadPumpConfigurationAndControlPumpStatus : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlPumpStatus : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlAcceptedCommandList : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlPumpStatus() - : SubscribeAttribute("pump-status") + SubscribeAttributePumpConfigurationAndControlAcceptedCommandList() + : SubscribeAttribute("accepted-command-list") { } - ~SubscribeAttributePumpConfigurationAndControlPumpStatus() + ~SubscribeAttributePumpConfigurationAndControlAcceptedCommandList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::PumpStatus::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::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); @@ -96666,10 +98268,10 @@ class SubscribeAttributePumpConfigurationAndControlPumpStatus : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePumpStatusWithParams:params + [cluster subscribeAttributeAcceptedCommandListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.PumpStatus response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.AcceptedCommandList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -96682,35 +98284,37 @@ class SubscribeAttributePumpConfigurationAndControlPumpStatus : public Subscribe } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute EffectiveOperationMode + * Attribute EventList */ -class ReadPumpConfigurationAndControlEffectiveOperationMode : public ReadAttribute { +class ReadPumpConfigurationAndControlEventList : public ReadAttribute { public: - ReadPumpConfigurationAndControlEffectiveOperationMode() - : ReadAttribute("effective-operation-mode") + ReadPumpConfigurationAndControlEventList() + : ReadAttribute("event-list") { } - ~ReadPumpConfigurationAndControlEffectiveOperationMode() + ~ReadPumpConfigurationAndControlEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::EffectiveOperationMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::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 = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEffectiveOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.EffectiveOperationMode response %@", [value description]); + [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl EffectiveOperationMode read Error", error); + LogNSError("PumpConfigurationAndControl EventList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -96719,21 +98323,21 @@ class ReadPumpConfigurationAndControlEffectiveOperationMode : public ReadAttribu } }; -class SubscribeAttributePumpConfigurationAndControlEffectiveOperationMode : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlEventList : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlEffectiveOperationMode() - : SubscribeAttribute("effective-operation-mode") + SubscribeAttributePumpConfigurationAndControlEventList() + : SubscribeAttribute("event-list") { } - ~SubscribeAttributePumpConfigurationAndControlEffectiveOperationMode() + ~SubscribeAttributePumpConfigurationAndControlEventList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::EffectiveOperationMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::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); @@ -96748,10 +98352,10 @@ class SubscribeAttributePumpConfigurationAndControlEffectiveOperationMode : publ if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEffectiveOperationModeWithParams:params + [cluster subscribeAttributeEventListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.EffectiveOperationMode response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.EventList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -96764,35 +98368,37 @@ class SubscribeAttributePumpConfigurationAndControlEffectiveOperationMode : publ } }; +#endif // MTR_ENABLE_PROVISIONAL + /* - * Attribute EffectiveControlMode + * Attribute AttributeList */ -class ReadPumpConfigurationAndControlEffectiveControlMode : public ReadAttribute { +class ReadPumpConfigurationAndControlAttributeList : public ReadAttribute { public: - ReadPumpConfigurationAndControlEffectiveControlMode() - : ReadAttribute("effective-control-mode") + ReadPumpConfigurationAndControlAttributeList() + : ReadAttribute("attribute-list") { } - ~ReadPumpConfigurationAndControlEffectiveControlMode() + ~ReadPumpConfigurationAndControlAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::EffectiveControlMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::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 = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEffectiveControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.EffectiveControlMode response %@", [value description]); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl EffectiveControlMode read Error", error); + LogNSError("PumpConfigurationAndControl AttributeList read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -96801,21 +98407,21 @@ class ReadPumpConfigurationAndControlEffectiveControlMode : public ReadAttribute } }; -class SubscribeAttributePumpConfigurationAndControlEffectiveControlMode : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlAttributeList : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlEffectiveControlMode() - : SubscribeAttribute("effective-control-mode") + SubscribeAttributePumpConfigurationAndControlAttributeList() + : SubscribeAttribute("attribute-list") { } - ~SubscribeAttributePumpConfigurationAndControlEffectiveControlMode() + ~SubscribeAttributePumpConfigurationAndControlAttributeList() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::EffectiveControlMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::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); @@ -96830,10 +98436,10 @@ class SubscribeAttributePumpConfigurationAndControlEffectiveControlMode : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEffectiveControlModeWithParams:params + [cluster subscribeAttributeAttributeListWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.EffectiveControlMode response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.AttributeList response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -96847,34 +98453,34 @@ class SubscribeAttributePumpConfigurationAndControlEffectiveControlMode : public }; /* - * Attribute Capacity + * Attribute FeatureMap */ -class ReadPumpConfigurationAndControlCapacity : public ReadAttribute { +class ReadPumpConfigurationAndControlFeatureMap : public ReadAttribute { public: - ReadPumpConfigurationAndControlCapacity() - : ReadAttribute("capacity") + ReadPumpConfigurationAndControlFeatureMap() + : ReadAttribute("feature-map") { } - ~ReadPumpConfigurationAndControlCapacity() + ~ReadPumpConfigurationAndControlFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::Capacity::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::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 = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.Capacity response %@", [value description]); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl Capacity read Error", error); + LogNSError("PumpConfigurationAndControl FeatureMap read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -96883,21 +98489,21 @@ class ReadPumpConfigurationAndControlCapacity : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlCapacity : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlFeatureMap : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlCapacity() - : SubscribeAttribute("capacity") + SubscribeAttributePumpConfigurationAndControlFeatureMap() + : SubscribeAttribute("feature-map") { } - ~SubscribeAttributePumpConfigurationAndControlCapacity() + ~SubscribeAttributePumpConfigurationAndControlFeatureMap() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::Capacity::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::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); @@ -96912,10 +98518,10 @@ class SubscribeAttributePumpConfigurationAndControlCapacity : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeCapacityWithParams:params + [cluster subscribeAttributeFeatureMapWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.Capacity response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.FeatureMap response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -96929,34 +98535,34 @@ class SubscribeAttributePumpConfigurationAndControlCapacity : public SubscribeAt }; /* - * Attribute Speed + * Attribute ClusterRevision */ -class ReadPumpConfigurationAndControlSpeed : public ReadAttribute { +class ReadPumpConfigurationAndControlClusterRevision : public ReadAttribute { public: - ReadPumpConfigurationAndControlSpeed() - : ReadAttribute("speed") + ReadPumpConfigurationAndControlClusterRevision() + : ReadAttribute("cluster-revision") { } - ~ReadPumpConfigurationAndControlSpeed() + ~ReadPumpConfigurationAndControlClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::Speed::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::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 = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSpeedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.Speed response %@", [value description]); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"PumpConfigurationAndControl.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl Speed read Error", error); + LogNSError("PumpConfigurationAndControl ClusterRevision read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -96965,21 +98571,21 @@ class ReadPumpConfigurationAndControlSpeed : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlSpeed : public SubscribeAttribute { +class SubscribeAttributePumpConfigurationAndControlClusterRevision : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlSpeed() - : SubscribeAttribute("speed") + SubscribeAttributePumpConfigurationAndControlClusterRevision() + : SubscribeAttribute("cluster-revision") { } - ~SubscribeAttributePumpConfigurationAndControlSpeed() + ~SubscribeAttributePumpConfigurationAndControlClusterRevision() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::Speed::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::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); @@ -96994,10 +98600,10 @@ class SubscribeAttributePumpConfigurationAndControlSpeed : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSpeedWithParams:params + [cluster subscribeAttributeClusterRevisionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.Speed response %@", [value description]); + NSLog(@"PumpConfigurationAndControl.ClusterRevision response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -97010,314 +98616,735 @@ class SubscribeAttributePumpConfigurationAndControlSpeed : public SubscribeAttri } }; +/*----------------------------------------------------------------------------*\ +| Cluster Thermostat | 0x0201 | +|------------------------------------------------------------------------------| +| Commands: | | +| * SetpointRaiseLower | 0x00 | +| * SetWeeklySchedule | 0x01 | +| * GetWeeklySchedule | 0x02 | +| * ClearWeeklySchedule | 0x03 | +| * SetActiveScheduleRequest | 0x05 | +| * SetActivePresetRequest | 0x06 | +| * StartPresetsSchedulesEditRequest | 0x07 | +| * CancelPresetsSchedulesEditRequest | 0x08 | +| * CommitPresetsSchedulesRequest | 0x09 | +| * CancelSetActivePresetRequest | 0x0A | +| * SetTemperatureSetpointHoldPolicy | 0x0B | +|------------------------------------------------------------------------------| +| Attributes: | | +| * LocalTemperature | 0x0000 | +| * OutdoorTemperature | 0x0001 | +| * Occupancy | 0x0002 | +| * AbsMinHeatSetpointLimit | 0x0003 | +| * AbsMaxHeatSetpointLimit | 0x0004 | +| * AbsMinCoolSetpointLimit | 0x0005 | +| * AbsMaxCoolSetpointLimit | 0x0006 | +| * PICoolingDemand | 0x0007 | +| * PIHeatingDemand | 0x0008 | +| * HVACSystemTypeConfiguration | 0x0009 | +| * LocalTemperatureCalibration | 0x0010 | +| * OccupiedCoolingSetpoint | 0x0011 | +| * OccupiedHeatingSetpoint | 0x0012 | +| * UnoccupiedCoolingSetpoint | 0x0013 | +| * UnoccupiedHeatingSetpoint | 0x0014 | +| * MinHeatSetpointLimit | 0x0015 | +| * MaxHeatSetpointLimit | 0x0016 | +| * MinCoolSetpointLimit | 0x0017 | +| * MaxCoolSetpointLimit | 0x0018 | +| * MinSetpointDeadBand | 0x0019 | +| * RemoteSensing | 0x001A | +| * ControlSequenceOfOperation | 0x001B | +| * SystemMode | 0x001C | +| * ThermostatRunningMode | 0x001E | +| * StartOfWeek | 0x0020 | +| * NumberOfWeeklyTransitions | 0x0021 | +| * NumberOfDailyTransitions | 0x0022 | +| * TemperatureSetpointHold | 0x0023 | +| * TemperatureSetpointHoldDuration | 0x0024 | +| * ThermostatProgrammingOperationMode | 0x0025 | +| * ThermostatRunningState | 0x0029 | +| * SetpointChangeSource | 0x0030 | +| * SetpointChangeAmount | 0x0031 | +| * SetpointChangeSourceTimestamp | 0x0032 | +| * OccupiedSetback | 0x0034 | +| * OccupiedSetbackMin | 0x0035 | +| * OccupiedSetbackMax | 0x0036 | +| * UnoccupiedSetback | 0x0037 | +| * UnoccupiedSetbackMin | 0x0038 | +| * UnoccupiedSetbackMax | 0x0039 | +| * EmergencyHeatDelta | 0x003A | +| * ACType | 0x0040 | +| * ACCapacity | 0x0041 | +| * ACRefrigerantType | 0x0042 | +| * ACCompressorType | 0x0043 | +| * ACErrorCode | 0x0044 | +| * ACLouverPosition | 0x0045 | +| * ACCoilTemperature | 0x0046 | +| * ACCapacityformat | 0x0047 | +| * PresetTypes | 0x0048 | +| * ScheduleTypes | 0x0049 | +| * NumberOfPresets | 0x004A | +| * NumberOfSchedules | 0x004B | +| * NumberOfScheduleTransitions | 0x004C | +| * NumberOfScheduleTransitionPerDay | 0x004D | +| * ActivePresetHandle | 0x004E | +| * ActiveScheduleHandle | 0x004F | +| * Presets | 0x0050 | +| * Schedules | 0x0051 | +| * PresetsSchedulesEditable | 0x0052 | +| * TemperatureSetpointHoldPolicy | 0x0053 | +| * SetpointHoldExpiryTimestamp | 0x0054 | +| * QueuedPreset | 0x0055 | +| * GeneratedCommandList | 0xFFF8 | +| * AcceptedCommandList | 0xFFF9 | +| * EventList | 0xFFFA | +| * AttributeList | 0xFFFB | +| * FeatureMap | 0xFFFC | +| * ClusterRevision | 0xFFFD | +|------------------------------------------------------------------------------| +| Events: | | +\*----------------------------------------------------------------------------*/ + /* - * Attribute LifetimeRunningHours + * Command SetpointRaiseLower */ -class ReadPumpConfigurationAndControlLifetimeRunningHours : public ReadAttribute { +class ThermostatSetpointRaiseLower : public ClusterCommand { public: - ReadPumpConfigurationAndControlLifetimeRunningHours() - : ReadAttribute("lifetime-running-hours") + ThermostatSetpointRaiseLower() + : ClusterCommand("setpoint-raise-lower") { + AddArgument("Mode", 0, UINT8_MAX, &mRequest.mode); + AddArgument("Amount", INT8_MIN, INT8_MAX, &mRequest.amount); + ClusterCommand::AddArguments(); } - ~ReadPumpConfigurationAndControlLifetimeRunningHours() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::SetpointRaiseLower::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 = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRThermostatClusterSetpointRaiseLowerParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.mode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.mode)]; + params.amount = [NSNumber numberWithChar:mRequest.amount]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setpointRaiseLowerWithParams: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::Thermostat::Commands::SetpointRaiseLower::Type mRequest; +}; + +/* + * Command SetWeeklySchedule + */ +class ThermostatSetWeeklySchedule : public ClusterCommand { +public: + ThermostatSetWeeklySchedule() + : ClusterCommand("set-weekly-schedule") + , mComplex_Transitions(&mRequest.transitions) { + AddArgument("NumberOfTransitionsForSequence", 0, UINT8_MAX, &mRequest.numberOfTransitionsForSequence); + AddArgument("DayOfWeekForSequence", 0, UINT8_MAX, &mRequest.dayOfWeekForSequence); + AddArgument("ModeForSequence", 0, UINT8_MAX, &mRequest.modeForSequence); + AddArgument("Transitions", &mComplex_Transitions); + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeRunningHours::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::SetWeeklySchedule::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 = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLifetimeRunningHoursWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.LifetimeRunningHours response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("PumpConfigurationAndControl LifetimeRunningHours read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRThermostatClusterSetWeeklyScheduleParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.numberOfTransitionsForSequence = [NSNumber numberWithUnsignedChar:mRequest.numberOfTransitionsForSequence]; + params.dayOfWeekForSequence = [NSNumber numberWithUnsignedChar:mRequest.dayOfWeekForSequence.Raw()]; + params.modeForSequence = [NSNumber numberWithUnsignedChar:mRequest.modeForSequence.Raw()]; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + for (auto & entry_0 : mRequest.transitions) { + MTRThermostatClusterWeeklyScheduleTransitionStruct * newElement_0; + newElement_0 = [MTRThermostatClusterWeeklyScheduleTransitionStruct new]; + newElement_0.transitionTime = [NSNumber numberWithUnsignedShort:entry_0.transitionTime]; + if (entry_0.heatSetpoint.IsNull()) { + newElement_0.heatSetpoint = nil; + } else { + newElement_0.heatSetpoint = [NSNumber numberWithShort:entry_0.heatSetpoint.Value()]; + } + if (entry_0.coolSetpoint.IsNull()) { + newElement_0.coolSetpoint = nil; + } else { + newElement_0.coolSetpoint = [NSNumber numberWithShort:entry_0.coolSetpoint.Value()]; + } + [array_0 addObject:newElement_0]; } - SetCommandExitStatus(error); - }]; + params.transitions = array_0; + } + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setWeeklyScheduleWithParams: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::Thermostat::Commands::SetWeeklySchedule::Type mRequest; + TypedComplexArgument> mComplex_Transitions; }; -class WritePumpConfigurationAndControlLifetimeRunningHours : public WriteAttribute { +/* + * Command GetWeeklySchedule + */ +class ThermostatGetWeeklySchedule : public ClusterCommand { public: - WritePumpConfigurationAndControlLifetimeRunningHours() - : WriteAttribute("lifetime-running-hours") + ThermostatGetWeeklySchedule() + : ClusterCommand("get-weekly-schedule") { - AddArgument("attr-name", "lifetime-running-hours"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); + AddArgument("DaysToReturn", 0, UINT8_MAX, &mRequest.daysToReturn); + AddArgument("ModeToReturn", 0, UINT8_MAX, &mRequest.modeToReturn); + ClusterCommand::AddArguments(); } - ~WritePumpConfigurationAndControlLifetimeRunningHours() + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::GetWeeklySchedule::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 = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRThermostatClusterGetWeeklyScheduleParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.daysToReturn = [NSNumber numberWithUnsignedChar:mRequest.daysToReturn.Raw()]; + params.modeToReturn = [NSNumber numberWithUnsignedChar:mRequest.modeToReturn.Raw()]; + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster getWeeklyScheduleWithParams:params completion: + ^(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::Thermostat::Commands::GetWeeklyScheduleResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } + responsesNeeded--; + if (error != nil) { + mError = error; + LogNSError("Error", error); + constexpr chip::CommandId responseId = chip::app::Clusters::Thermostat::Commands::GetWeeklyScheduleResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); + } + if (responsesNeeded == 0) { + SetCommandExitStatus(mError); + } + }]; + } + return CHIP_NO_ERROR; + } + +private: + chip::app::Clusters::Thermostat::Commands::GetWeeklySchedule::Type mRequest; +}; + +/* + * Command ClearWeeklySchedule + */ +class ThermostatClearWeeklySchedule : public ClusterCommand { +public: + ThermostatClearWeeklySchedule() + : ClusterCommand("clear-weekly-schedule") { + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeRunningHours::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::ClearWeeklySchedule::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 ") 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 = [[MTRBaseClusterPumpConfigurationAndControl 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 numberWithUnsignedInt:mValue.Value()]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRThermostatClusterClearWeeklyScheduleParams 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 clearWeeklyScheduleWithParams: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: +}; + +#if MTR_ENABLE_PROVISIONAL +/* + * Command SetActiveScheduleRequest + */ +class ThermostatSetActiveScheduleRequest : public ClusterCommand { +public: + ThermostatSetActiveScheduleRequest() + : ClusterCommand("set-active-schedule-request") + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("ScheduleHandle", &mRequest.scheduleHandle); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::SetActiveScheduleRequest::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 = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRThermostatClusterSetActiveScheduleRequestParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.scheduleHandle = [NSData dataWithBytes:mRequest.scheduleHandle.data() length:mRequest.scheduleHandle.size()]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setActiveScheduleRequestWithParams: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::Thermostat::Commands::SetActiveScheduleRequest::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command SetActivePresetRequest + */ +class ThermostatSetActivePresetRequest : public ClusterCommand { +public: + ThermostatSetActivePresetRequest() + : ClusterCommand("set-active-preset-request") + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("PresetHandle", &mRequest.presetHandle); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("DelayMinutes", 0, UINT16_MAX, &mRequest.delayMinutes); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::SetActivePresetRequest::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 = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRThermostatClusterSetActivePresetRequestParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.presetHandle = [NSData dataWithBytes:mRequest.presetHandle.data() length:mRequest.presetHandle.size()]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + if (mRequest.delayMinutes.HasValue()) { + params.delayMinutes = [NSNumber numberWithUnsignedShort:mRequest.delayMinutes.Value()]; + } else { + params.delayMinutes = nil; + } +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setActivePresetRequestWithParams: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::Thermostat::Commands::SetActivePresetRequest::Type mRequest; +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command StartPresetsSchedulesEditRequest + */ +class ThermostatStartPresetsSchedulesEditRequest : public ClusterCommand { +public: + ThermostatStartPresetsSchedulesEditRequest() + : ClusterCommand("start-presets-schedules-edit-request") + { +#if MTR_ENABLE_PROVISIONAL + AddArgument("TimeoutSeconds", 0, UINT16_MAX, &mRequest.timeoutSeconds); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::StartPresetsSchedulesEditRequest::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 = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRThermostatClusterStartPresetsSchedulesEditRequestParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.timeoutSeconds = [NSNumber numberWithUnsignedShort:mRequest.timeoutSeconds]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster startPresetsSchedulesEditRequestWithParams: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 writeAttributeLifetimeRunningHoursWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("PumpConfigurationAndControl LifetimeRunningHours write Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; return CHIP_NO_ERROR; } private: - chip::app::DataModel::Nullable mValue; + chip::app::Clusters::Thermostat::Commands::StartPresetsSchedulesEditRequest::Type mRequest; }; -class SubscribeAttributePumpConfigurationAndControlLifetimeRunningHours : public SubscribeAttribute { +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command CancelPresetsSchedulesEditRequest + */ +class ThermostatCancelPresetsSchedulesEditRequest : public ClusterCommand { public: - SubscribeAttributePumpConfigurationAndControlLifetimeRunningHours() - : SubscribeAttribute("lifetime-running-hours") - { - } - - ~SubscribeAttributePumpConfigurationAndControlLifetimeRunningHours() + ThermostatCancelPresetsSchedulesEditRequest() + : ClusterCommand("cancel-presets-schedules-edit-request") { + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeRunningHours::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::CancelPresetsSchedulesEditRequest::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 = [[MTRBaseClusterPumpConfigurationAndControl 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 = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRThermostatClusterCancelPresetsSchedulesEditRequestParams 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 cancelPresetsSchedulesEditRequestWithParams: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 subscribeAttributeLifetimeRunningHoursWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.LifetimeRunningHours 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 Power + * Command CommitPresetsSchedulesRequest */ -class ReadPumpConfigurationAndControlPower : public ReadAttribute { +class ThermostatCommitPresetsSchedulesRequest : public ClusterCommand { public: - ReadPumpConfigurationAndControlPower() - : ReadAttribute("power") - { - } - - ~ReadPumpConfigurationAndControlPower() + ThermostatCommitPresetsSchedulesRequest() + : ClusterCommand("commit-presets-schedules-request") { + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::Power::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::CommitPresetsSchedulesRequest::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 = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePowerWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.Power response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("PumpConfigurationAndControl Power read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRThermostatClusterCommitPresetsSchedulesRequestParams 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 commitPresetsSchedulesRequestWithParams: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 SubscribeAttributePumpConfigurationAndControlPower : public SubscribeAttribute { +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL +/* + * Command CancelSetActivePresetRequest + */ +class ThermostatCancelSetActivePresetRequest : public ClusterCommand { public: - SubscribeAttributePumpConfigurationAndControlPower() - : SubscribeAttribute("power") - { - } - - ~SubscribeAttributePumpConfigurationAndControlPower() + ThermostatCancelSetActivePresetRequest() + : ClusterCommand("cancel-set-active-preset-request") { + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::Power::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::CancelSetActivePresetRequest::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 = [[MTRBaseClusterPumpConfigurationAndControl 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 = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRThermostatClusterCancelSetActivePresetRequestParams 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 cancelSetActivePresetRequestWithParams: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 subscribeAttributePowerWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.Power 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 LifetimeEnergyConsumed + * Command SetTemperatureSetpointHoldPolicy */ -class ReadPumpConfigurationAndControlLifetimeEnergyConsumed : public ReadAttribute { +class ThermostatSetTemperatureSetpointHoldPolicy : public ClusterCommand { public: - ReadPumpConfigurationAndControlLifetimeEnergyConsumed() - : ReadAttribute("lifetime-energy-consumed") - { - } - - ~ReadPumpConfigurationAndControlLifetimeEnergyConsumed() + ThermostatSetTemperatureSetpointHoldPolicy() + : ClusterCommand("set-temperature-setpoint-hold-policy") { +#if MTR_ENABLE_PROVISIONAL + AddArgument("TemperatureSetpointHoldPolicy", 0, UINT8_MAX, &mRequest.temperatureSetpointHoldPolicy); +#endif // MTR_ENABLE_PROVISIONAL + ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::SetTemperatureSetpointHoldPolicy::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 = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLifetimeEnergyConsumedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.LifetimeEnergyConsumed response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("PumpConfigurationAndControl LifetimeEnergyConsumed read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRThermostatClusterSetTemperatureSetpointHoldPolicyParams alloc] init]; + params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; +#if MTR_ENABLE_PROVISIONAL + params.temperatureSetpointHoldPolicy = [NSNumber numberWithUnsignedChar:mRequest.temperatureSetpointHoldPolicy.Raw()]; +#endif // MTR_ENABLE_PROVISIONAL + uint16_t repeatCount = mRepeatCount.ValueOr(1); + uint16_t __block responsesNeeded = repeatCount; + while (repeatCount--) { + [cluster setTemperatureSetpointHoldPolicyWithParams: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::Thermostat::Commands::SetTemperatureSetpointHoldPolicy::Type mRequest; }; -class WritePumpConfigurationAndControlLifetimeEnergyConsumed : public WriteAttribute { +#endif // MTR_ENABLE_PROVISIONAL + +/* + * Attribute LocalTemperature + */ +class ReadThermostatLocalTemperature : public ReadAttribute { public: - WritePumpConfigurationAndControlLifetimeEnergyConsumed() - : WriteAttribute("lifetime-energy-consumed") + ReadThermostatLocalTemperature() + : ReadAttribute("local-temperature") { - AddArgument("attr-name", "lifetime-energy-consumed"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); } - ~WritePumpConfigurationAndControlLifetimeEnergyConsumed() + ~ReadThermostatLocalTemperature() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::LocalTemperature::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 = [[MTRBaseClusterPumpConfigurationAndControl 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 numberWithUnsignedInt:mValue.Value()]; - } + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - [cluster writeAttributeLifetimeEnergyConsumedWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("PumpConfigurationAndControl LifetimeEnergyConsumed write Error", error); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeLocalTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.LocalTemperature response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("Thermostat LocalTemperature read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributePumpConfigurationAndControlLifetimeEnergyConsumed : public SubscribeAttribute { +class SubscribeAttributeThermostatLocalTemperature : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlLifetimeEnergyConsumed() - : SubscribeAttribute("lifetime-energy-consumed") + SubscribeAttributeThermostatLocalTemperature() + : SubscribeAttribute("local-temperature") { } - ~SubscribeAttributePumpConfigurationAndControlLifetimeEnergyConsumed() + ~SubscribeAttributeThermostatLocalTemperature() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::LifetimeEnergyConsumed::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::LocalTemperature::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -97328,10 +99355,10 @@ class SubscribeAttributePumpConfigurationAndControlLifetimeEnergyConsumed : publ if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLifetimeEnergyConsumedWithParams:params + [cluster subscribeAttributeLocalTemperatureWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.LifetimeEnergyConsumed response %@", [value description]); + NSLog(@"Thermostat.LocalTemperature response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -97345,102 +99372,61 @@ class SubscribeAttributePumpConfigurationAndControlLifetimeEnergyConsumed : publ }; /* - * Attribute OperationMode + * Attribute OutdoorTemperature */ -class ReadPumpConfigurationAndControlOperationMode : public ReadAttribute { +class ReadThermostatOutdoorTemperature : public ReadAttribute { public: - ReadPumpConfigurationAndControlOperationMode() - : ReadAttribute("operation-mode") + ReadThermostatOutdoorTemperature() + : ReadAttribute("outdoor-temperature") { } - ~ReadPumpConfigurationAndControlOperationMode() + ~ReadThermostatOutdoorTemperature() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::OperationMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OutdoorTemperature::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.OperationMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOutdoorTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.OutdoorTemperature response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl OperationMode read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WritePumpConfigurationAndControlOperationMode : public WriteAttribute { -public: - WritePumpConfigurationAndControlOperationMode() - : WriteAttribute("operation-mode") - { - AddArgument("attr-name", "operation-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WritePumpConfigurationAndControlOperationMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::OperationMode::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 = [[MTRBaseClusterPumpConfigurationAndControl 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 writeAttributeOperationModeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("PumpConfigurationAndControl OperationMode write Error", error); + LogNSError("Thermostat OutdoorTemperature read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributePumpConfigurationAndControlOperationMode : public SubscribeAttribute { +class SubscribeAttributeThermostatOutdoorTemperature : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlOperationMode() - : SubscribeAttribute("operation-mode") + SubscribeAttributeThermostatOutdoorTemperature() + : SubscribeAttribute("outdoor-temperature") { } - ~SubscribeAttributePumpConfigurationAndControlOperationMode() + ~SubscribeAttributeThermostatOutdoorTemperature() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::OperationMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::OutdoorTemperature::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -97451,10 +99437,10 @@ class SubscribeAttributePumpConfigurationAndControlOperationMode : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOperationModeWithParams:params + [cluster subscribeAttributeOutdoorTemperatureWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.OperationMode response %@", [value description]); + NSLog(@"Thermostat.OutdoorTemperature response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -97468,102 +99454,61 @@ class SubscribeAttributePumpConfigurationAndControlOperationMode : public Subscr }; /* - * Attribute ControlMode + * Attribute Occupancy */ -class ReadPumpConfigurationAndControlControlMode : public ReadAttribute { +class ReadThermostatOccupancy : public ReadAttribute { public: - ReadPumpConfigurationAndControlControlMode() - : ReadAttribute("control-mode") + ReadThermostatOccupancy() + : ReadAttribute("occupancy") { } - ~ReadPumpConfigurationAndControlControlMode() + ~ReadThermostatOccupancy() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::ControlMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::Occupancy::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeControlModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.ControlMode response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOccupancyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.Occupancy response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl ControlMode read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WritePumpConfigurationAndControlControlMode : public WriteAttribute { -public: - WritePumpConfigurationAndControlControlMode() - : WriteAttribute("control-mode") - { - AddArgument("attr-name", "control-mode"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WritePumpConfigurationAndControlControlMode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::ControlMode::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 = [[MTRBaseClusterPumpConfigurationAndControl 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 writeAttributeControlModeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("PumpConfigurationAndControl ControlMode write Error", error); + LogNSError("Thermostat Occupancy read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributePumpConfigurationAndControlControlMode : public SubscribeAttribute { +class SubscribeAttributeThermostatOccupancy : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlControlMode() - : SubscribeAttribute("control-mode") + SubscribeAttributeThermostatOccupancy() + : SubscribeAttribute("occupancy") { } - ~SubscribeAttributePumpConfigurationAndControlControlMode() + ~SubscribeAttributeThermostatOccupancy() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::ControlMode::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::Occupancy::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -97574,10 +99519,10 @@ class SubscribeAttributePumpConfigurationAndControlControlMode : public Subscrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeControlModeWithParams:params + [cluster subscribeAttributeOccupancyWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.ControlMode response %@", [value description]); + NSLog(@"Thermostat.Occupancy response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -97591,34 +99536,34 @@ class SubscribeAttributePumpConfigurationAndControlControlMode : public Subscrib }; /* - * Attribute GeneratedCommandList + * Attribute AbsMinHeatSetpointLimit */ -class ReadPumpConfigurationAndControlGeneratedCommandList : public ReadAttribute { +class ReadThermostatAbsMinHeatSetpointLimit : public ReadAttribute { public: - ReadPumpConfigurationAndControlGeneratedCommandList() - : ReadAttribute("generated-command-list") + ReadThermostatAbsMinHeatSetpointLimit() + : ReadAttribute("abs-min-heat-setpoint-limit") { } - ~ReadPumpConfigurationAndControlGeneratedCommandList() + ~ReadThermostatAbsMinHeatSetpointLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMinHeatSetpointLimit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.GeneratedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAbsMinHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.AbsMinHeatSetpointLimit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl GeneratedCommandList read Error", error); + LogNSError("Thermostat AbsMinHeatSetpointLimit read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -97627,25 +99572,25 @@ class ReadPumpConfigurationAndControlGeneratedCommandList : public ReadAttribute } }; -class SubscribeAttributePumpConfigurationAndControlGeneratedCommandList : public SubscribeAttribute { +class SubscribeAttributeThermostatAbsMinHeatSetpointLimit : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlGeneratedCommandList() - : SubscribeAttribute("generated-command-list") + SubscribeAttributeThermostatAbsMinHeatSetpointLimit() + : SubscribeAttribute("abs-min-heat-setpoint-limit") { } - ~SubscribeAttributePumpConfigurationAndControlGeneratedCommandList() + ~SubscribeAttributeThermostatAbsMinHeatSetpointLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::GeneratedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMinHeatSetpointLimit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -97656,10 +99601,10 @@ class SubscribeAttributePumpConfigurationAndControlGeneratedCommandList : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeGeneratedCommandListWithParams:params + [cluster subscribeAttributeAbsMinHeatSetpointLimitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.GeneratedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.AbsMinHeatSetpointLimit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -97673,34 +99618,34 @@ class SubscribeAttributePumpConfigurationAndControlGeneratedCommandList : public }; /* - * Attribute AcceptedCommandList + * Attribute AbsMaxHeatSetpointLimit */ -class ReadPumpConfigurationAndControlAcceptedCommandList : public ReadAttribute { +class ReadThermostatAbsMaxHeatSetpointLimit : public ReadAttribute { public: - ReadPumpConfigurationAndControlAcceptedCommandList() - : ReadAttribute("accepted-command-list") + ReadThermostatAbsMaxHeatSetpointLimit() + : ReadAttribute("abs-max-heat-setpoint-limit") { } - ~ReadPumpConfigurationAndControlAcceptedCommandList() + ~ReadThermostatAbsMaxHeatSetpointLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMaxHeatSetpointLimit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.AcceptedCommandList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAbsMaxHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.AbsMaxHeatSetpointLimit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl AcceptedCommandList read Error", error); + LogNSError("Thermostat AbsMaxHeatSetpointLimit read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -97709,25 +99654,25 @@ class ReadPumpConfigurationAndControlAcceptedCommandList : public ReadAttribute } }; -class SubscribeAttributePumpConfigurationAndControlAcceptedCommandList : public SubscribeAttribute { +class SubscribeAttributeThermostatAbsMaxHeatSetpointLimit : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlAcceptedCommandList() - : SubscribeAttribute("accepted-command-list") + SubscribeAttributeThermostatAbsMaxHeatSetpointLimit() + : SubscribeAttribute("abs-max-heat-setpoint-limit") { } - ~SubscribeAttributePumpConfigurationAndControlAcceptedCommandList() + ~SubscribeAttributeThermostatAbsMaxHeatSetpointLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::AcceptedCommandList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMaxHeatSetpointLimit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -97738,10 +99683,10 @@ class SubscribeAttributePumpConfigurationAndControlAcceptedCommandList : public if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAcceptedCommandListWithParams:params + [cluster subscribeAttributeAbsMaxHeatSetpointLimitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.AcceptedCommandList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.AbsMaxHeatSetpointLimit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -97754,37 +99699,35 @@ class SubscribeAttributePumpConfigurationAndControlAcceptedCommandList : public } }; -#if MTR_ENABLE_PROVISIONAL - /* - * Attribute EventList + * Attribute AbsMinCoolSetpointLimit */ -class ReadPumpConfigurationAndControlEventList : public ReadAttribute { +class ReadThermostatAbsMinCoolSetpointLimit : public ReadAttribute { public: - ReadPumpConfigurationAndControlEventList() - : ReadAttribute("event-list") + ReadThermostatAbsMinCoolSetpointLimit() + : ReadAttribute("abs-min-cool-setpoint-limit") { } - ~ReadPumpConfigurationAndControlEventList() + ~ReadThermostatAbsMinCoolSetpointLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMinCoolSetpointLimit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.EventList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAbsMinCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.AbsMinCoolSetpointLimit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl EventList read Error", error); + LogNSError("Thermostat AbsMinCoolSetpointLimit read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -97793,25 +99736,25 @@ class ReadPumpConfigurationAndControlEventList : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlEventList : public SubscribeAttribute { +class SubscribeAttributeThermostatAbsMinCoolSetpointLimit : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlEventList() - : SubscribeAttribute("event-list") + SubscribeAttributeThermostatAbsMinCoolSetpointLimit() + : SubscribeAttribute("abs-min-cool-setpoint-limit") { } - ~SubscribeAttributePumpConfigurationAndControlEventList() + ~SubscribeAttributeThermostatAbsMinCoolSetpointLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::EventList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMinCoolSetpointLimit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -97822,10 +99765,10 @@ class SubscribeAttributePumpConfigurationAndControlEventList : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEventListWithParams:params + [cluster subscribeAttributeAbsMinCoolSetpointLimitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.EventList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.AbsMinCoolSetpointLimit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -97838,37 +99781,35 @@ class SubscribeAttributePumpConfigurationAndControlEventList : public SubscribeA } }; -#endif // MTR_ENABLE_PROVISIONAL - /* - * Attribute AttributeList + * Attribute AbsMaxCoolSetpointLimit */ -class ReadPumpConfigurationAndControlAttributeList : public ReadAttribute { +class ReadThermostatAbsMaxCoolSetpointLimit : public ReadAttribute { public: - ReadPumpConfigurationAndControlAttributeList() - : ReadAttribute("attribute-list") + ReadThermostatAbsMaxCoolSetpointLimit() + : ReadAttribute("abs-max-cool-setpoint-limit") { } - ~ReadPumpConfigurationAndControlAttributeList() + ~ReadThermostatAbsMaxCoolSetpointLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMaxCoolSetpointLimit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.AttributeList response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeAbsMaxCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.AbsMaxCoolSetpointLimit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl AttributeList read Error", error); + LogNSError("Thermostat AbsMaxCoolSetpointLimit read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -97877,25 +99818,25 @@ class ReadPumpConfigurationAndControlAttributeList : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlAttributeList : public SubscribeAttribute { +class SubscribeAttributeThermostatAbsMaxCoolSetpointLimit : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlAttributeList() - : SubscribeAttribute("attribute-list") + SubscribeAttributeThermostatAbsMaxCoolSetpointLimit() + : SubscribeAttribute("abs-max-cool-setpoint-limit") { } - ~SubscribeAttributePumpConfigurationAndControlAttributeList() + ~SubscribeAttributeThermostatAbsMaxCoolSetpointLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::AttributeList::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMaxCoolSetpointLimit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -97906,10 +99847,10 @@ class SubscribeAttributePumpConfigurationAndControlAttributeList : public Subscr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAttributeListWithParams:params + [cluster subscribeAttributeAbsMaxCoolSetpointLimitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.AttributeList response %@", [value description]); + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.AbsMaxCoolSetpointLimit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -97923,34 +99864,34 @@ class SubscribeAttributePumpConfigurationAndControlAttributeList : public Subscr }; /* - * Attribute FeatureMap + * Attribute PICoolingDemand */ -class ReadPumpConfigurationAndControlFeatureMap : public ReadAttribute { +class ReadThermostatPICoolingDemand : public ReadAttribute { public: - ReadPumpConfigurationAndControlFeatureMap() - : ReadAttribute("feature-map") + ReadThermostatPICoolingDemand() + : ReadAttribute("picooling-demand") { } - ~ReadPumpConfigurationAndControlFeatureMap() + ~ReadThermostatPICoolingDemand() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::PICoolingDemand::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.FeatureMap response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePICoolingDemandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.PICoolingDemand response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl FeatureMap read Error", error); + LogNSError("Thermostat PICoolingDemand read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -97959,25 +99900,25 @@ class ReadPumpConfigurationAndControlFeatureMap : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlFeatureMap : public SubscribeAttribute { +class SubscribeAttributeThermostatPICoolingDemand : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlFeatureMap() - : SubscribeAttribute("feature-map") + SubscribeAttributeThermostatPICoolingDemand() + : SubscribeAttribute("picooling-demand") { } - ~SubscribeAttributePumpConfigurationAndControlFeatureMap() + ~SubscribeAttributeThermostatPICoolingDemand() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::FeatureMap::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::PICoolingDemand::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -97988,10 +99929,10 @@ class SubscribeAttributePumpConfigurationAndControlFeatureMap : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeFeatureMapWithParams:params + [cluster subscribeAttributePICoolingDemandWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.FeatureMap response %@", [value description]); + NSLog(@"Thermostat.PICoolingDemand response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -98005,34 +99946,34 @@ class SubscribeAttributePumpConfigurationAndControlFeatureMap : public Subscribe }; /* - * Attribute ClusterRevision + * Attribute PIHeatingDemand */ -class ReadPumpConfigurationAndControlClusterRevision : public ReadAttribute { +class ReadThermostatPIHeatingDemand : public ReadAttribute { public: - ReadPumpConfigurationAndControlClusterRevision() - : ReadAttribute("cluster-revision") + ReadThermostatPIHeatingDemand() + : ReadAttribute("piheating-demand") { } - ~ReadPumpConfigurationAndControlClusterRevision() + ~ReadThermostatPIHeatingDemand() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::PIHeatingDemand::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.ClusterRevision response %@", [value description]); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributePIHeatingDemandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.PIHeatingDemand response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("PumpConfigurationAndControl ClusterRevision read Error", error); + LogNSError("Thermostat PIHeatingDemand read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -98041,25 +99982,25 @@ class ReadPumpConfigurationAndControlClusterRevision : public ReadAttribute { } }; -class SubscribeAttributePumpConfigurationAndControlClusterRevision : public SubscribeAttribute { +class SubscribeAttributeThermostatPIHeatingDemand : public SubscribeAttribute { public: - SubscribeAttributePumpConfigurationAndControlClusterRevision() - : SubscribeAttribute("cluster-revision") + SubscribeAttributeThermostatPIHeatingDemand() + : SubscribeAttribute("piheating-demand") { } - ~SubscribeAttributePumpConfigurationAndControlClusterRevision() + ~SubscribeAttributeThermostatPIHeatingDemand() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { - constexpr chip::ClusterId clusterId = chip::app::Clusters::PumpConfigurationAndControl::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::PumpConfigurationAndControl::Attributes::ClusterRevision::Id; + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::PIHeatingDemand::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterPumpConfigurationAndControl alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; if (mKeepSubscriptions.HasValue()) { params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); @@ -98070,10 +100011,10 @@ class SubscribeAttributePumpConfigurationAndControlClusterRevision : public Subs if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeClusterRevisionWithParams:params + [cluster subscribeAttributePIHeatingDemandWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"PumpConfigurationAndControl.ClusterRevision response %@", [value description]); + NSLog(@"Thermostat.PIHeatingDemand response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -98086,349 +100027,222 @@ class SubscribeAttributePumpConfigurationAndControlClusterRevision : public Subs } }; -/*----------------------------------------------------------------------------*\ -| Cluster Thermostat | 0x0201 | -|------------------------------------------------------------------------------| -| Commands: | | -| * SetpointRaiseLower | 0x00 | -| * SetWeeklySchedule | 0x01 | -| * GetWeeklySchedule | 0x02 | -| * ClearWeeklySchedule | 0x03 | -|------------------------------------------------------------------------------| -| Attributes: | | -| * LocalTemperature | 0x0000 | -| * OutdoorTemperature | 0x0001 | -| * Occupancy | 0x0002 | -| * AbsMinHeatSetpointLimit | 0x0003 | -| * AbsMaxHeatSetpointLimit | 0x0004 | -| * AbsMinCoolSetpointLimit | 0x0005 | -| * AbsMaxCoolSetpointLimit | 0x0006 | -| * PICoolingDemand | 0x0007 | -| * PIHeatingDemand | 0x0008 | -| * HVACSystemTypeConfiguration | 0x0009 | -| * LocalTemperatureCalibration | 0x0010 | -| * OccupiedCoolingSetpoint | 0x0011 | -| * OccupiedHeatingSetpoint | 0x0012 | -| * UnoccupiedCoolingSetpoint | 0x0013 | -| * UnoccupiedHeatingSetpoint | 0x0014 | -| * MinHeatSetpointLimit | 0x0015 | -| * MaxHeatSetpointLimit | 0x0016 | -| * MinCoolSetpointLimit | 0x0017 | -| * MaxCoolSetpointLimit | 0x0018 | -| * MinSetpointDeadBand | 0x0019 | -| * RemoteSensing | 0x001A | -| * ControlSequenceOfOperation | 0x001B | -| * SystemMode | 0x001C | -| * ThermostatRunningMode | 0x001E | -| * StartOfWeek | 0x0020 | -| * NumberOfWeeklyTransitions | 0x0021 | -| * NumberOfDailyTransitions | 0x0022 | -| * TemperatureSetpointHold | 0x0023 | -| * TemperatureSetpointHoldDuration | 0x0024 | -| * ThermostatProgrammingOperationMode | 0x0025 | -| * ThermostatRunningState | 0x0029 | -| * SetpointChangeSource | 0x0030 | -| * SetpointChangeAmount | 0x0031 | -| * SetpointChangeSourceTimestamp | 0x0032 | -| * OccupiedSetback | 0x0034 | -| * OccupiedSetbackMin | 0x0035 | -| * OccupiedSetbackMax | 0x0036 | -| * UnoccupiedSetback | 0x0037 | -| * UnoccupiedSetbackMin | 0x0038 | -| * UnoccupiedSetbackMax | 0x0039 | -| * EmergencyHeatDelta | 0x003A | -| * ACType | 0x0040 | -| * ACCapacity | 0x0041 | -| * ACRefrigerantType | 0x0042 | -| * ACCompressorType | 0x0043 | -| * ACErrorCode | 0x0044 | -| * ACLouverPosition | 0x0045 | -| * ACCoilTemperature | 0x0046 | -| * ACCapacityformat | 0x0047 | -| * GeneratedCommandList | 0xFFF8 | -| * AcceptedCommandList | 0xFFF9 | -| * EventList | 0xFFFA | -| * AttributeList | 0xFFFB | -| * FeatureMap | 0xFFFC | -| * ClusterRevision | 0xFFFD | -|------------------------------------------------------------------------------| -| Events: | | -\*----------------------------------------------------------------------------*/ - /* - * Command SetpointRaiseLower + * Attribute HVACSystemTypeConfiguration */ -class ThermostatSetpointRaiseLower : public ClusterCommand { +class ReadThermostatHVACSystemTypeConfiguration : public ReadAttribute { public: - ThermostatSetpointRaiseLower() - : ClusterCommand("setpoint-raise-lower") + ReadThermostatHVACSystemTypeConfiguration() + : ReadAttribute("hvacsystem-type-configuration") + { + } + + ~ReadThermostatHVACSystemTypeConfiguration() { - AddArgument("Mode", 0, UINT8_MAX, &mRequest.mode); - AddArgument("Amount", INT8_MIN, INT8_MAX, &mRequest.amount); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::SetpointRaiseLower::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::HVACSystemTypeConfiguration::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 = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRThermostatClusterSetpointRaiseLowerParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.mode = [NSNumber numberWithUnsignedChar:chip::to_underlying(mRequest.mode)]; - params.amount = [NSNumber numberWithChar:mRequest.amount]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setpointRaiseLowerWithParams: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 readAttributeHVACSystemTypeConfigurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.HVACSystemTypeConfiguration response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("Thermostat HVACSystemTypeConfiguration read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: - chip::app::Clusters::Thermostat::Commands::SetpointRaiseLower::Type mRequest; }; -/* - * Command SetWeeklySchedule - */ -class ThermostatSetWeeklySchedule : public ClusterCommand { +class WriteThermostatHVACSystemTypeConfiguration : public WriteAttribute { public: - ThermostatSetWeeklySchedule() - : ClusterCommand("set-weekly-schedule") - , mComplex_Transitions(&mRequest.transitions) + WriteThermostatHVACSystemTypeConfiguration() + : WriteAttribute("hvacsystem-type-configuration") + { + AddArgument("attr-name", "hvacsystem-type-configuration"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteThermostatHVACSystemTypeConfiguration() { - AddArgument("NumberOfTransitionsForSequence", 0, UINT8_MAX, &mRequest.numberOfTransitionsForSequence); - AddArgument("DayOfWeekForSequence", 0, UINT8_MAX, &mRequest.dayOfWeekForSequence); - AddArgument("ModeForSequence", 0, UINT8_MAX, &mRequest.modeForSequence); - AddArgument("Transitions", &mComplex_Transitions); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::SetWeeklySchedule::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::HVACSystemTypeConfiguration::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 = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRThermostatClusterSetWeeklyScheduleParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.numberOfTransitionsForSequence = [NSNumber numberWithUnsignedChar:mRequest.numberOfTransitionsForSequence]; - params.dayOfWeekForSequence = [NSNumber numberWithUnsignedChar:mRequest.dayOfWeekForSequence.Raw()]; - params.modeForSequence = [NSNumber numberWithUnsignedChar:mRequest.modeForSequence.Raw()]; - { // Scope for our temporary variables - auto * array_0 = [NSMutableArray new]; - for (auto & entry_0 : mRequest.transitions) { - MTRThermostatClusterWeeklyScheduleTransitionStruct * newElement_0; - newElement_0 = [MTRThermostatClusterWeeklyScheduleTransitionStruct new]; - newElement_0.transitionTime = [NSNumber numberWithUnsignedShort:entry_0.transitionTime]; - if (entry_0.heatSetpoint.IsNull()) { - newElement_0.heatSetpoint = nil; - } else { - newElement_0.heatSetpoint = [NSNumber numberWithShort:entry_0.heatSetpoint.Value()]; - } - if (entry_0.coolSetpoint.IsNull()) { - newElement_0.coolSetpoint = nil; - } else { - newElement_0.coolSetpoint = [NSNumber numberWithShort:entry_0.coolSetpoint.Value()]; - } - [array_0 addObject:newElement_0]; + __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 writeAttributeHVACSystemTypeConfigurationWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat HVACSystemTypeConfiguration write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } - params.transitions = array_0; - } - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster setWeeklyScheduleWithParams: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); - } - }]; - } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } private: - chip::app::Clusters::Thermostat::Commands::SetWeeklySchedule::Type mRequest; - TypedComplexArgument> mComplex_Transitions; + uint8_t mValue; }; -/* - * Command GetWeeklySchedule - */ -class ThermostatGetWeeklySchedule : public ClusterCommand { +class SubscribeAttributeThermostatHVACSystemTypeConfiguration : public SubscribeAttribute { public: - ThermostatGetWeeklySchedule() - : ClusterCommand("get-weekly-schedule") + SubscribeAttributeThermostatHVACSystemTypeConfiguration() + : SubscribeAttribute("hvacsystem-type-configuration") + { + } + + ~SubscribeAttributeThermostatHVACSystemTypeConfiguration() { - AddArgument("DaysToReturn", 0, UINT8_MAX, &mRequest.daysToReturn); - AddArgument("ModeToReturn", 0, UINT8_MAX, &mRequest.modeToReturn); - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::GetWeeklySchedule::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") command (0x%08" PRIX32 ") on endpoint %u", clusterId, commandId, endpointId); + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::HVACSystemTypeConfiguration::Id; + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRThermostatClusterGetWeeklyScheduleParams alloc] init]; - params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.daysToReturn = [NSNumber numberWithUnsignedChar:mRequest.daysToReturn.Raw()]; - params.modeToReturn = [NSNumber numberWithUnsignedChar:mRequest.modeToReturn.Raw()]; - uint16_t repeatCount = mRepeatCount.ValueOr(1); - uint16_t __block responsesNeeded = repeatCount; - while (repeatCount--) { - [cluster getWeeklyScheduleWithParams:params completion: - ^(MTRThermostatClusterGetWeeklyScheduleResponseParams * _Nullable values, NSError * _Nullable error) { - NSLog(@"Values: %@", values); - if (error == nil) { - constexpr chip::CommandId responseId = chip::app::Clusters::Thermostat::Commands::GetWeeklyScheduleResponse::Id; - RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); - } - responsesNeeded--; - if (error != nil) { - mError = error; - LogNSError("Error", error); - constexpr chip::CommandId responseId = chip::app::Clusters::Thermostat::Commands::GetWeeklyScheduleResponse::Id; - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); - } - if (responsesNeeded == 0) { - SetCommandExitStatus(mError); - } - }]; + __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 subscribeAttributeHVACSystemTypeConfigurationWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.HVACSystemTypeConfiguration 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::Thermostat::Commands::GetWeeklySchedule::Type mRequest; }; /* - * Command ClearWeeklySchedule + * Attribute LocalTemperatureCalibration */ -class ThermostatClearWeeklySchedule : public ClusterCommand { +class ReadThermostatLocalTemperatureCalibration : public ReadAttribute { public: - ThermostatClearWeeklySchedule() - : ClusterCommand("clear-weekly-schedule") + ReadThermostatLocalTemperatureCalibration() + : ReadAttribute("local-temperature-calibration") + { + } + + ~ReadThermostatLocalTemperatureCalibration() { - ClusterCommand::AddArguments(); } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId commandId = chip::app::Clusters::Thermostat::Commands::ClearWeeklySchedule::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::LocalTemperatureCalibration::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 = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRThermostatClusterClearWeeklyScheduleParams 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 clearWeeklyScheduleWithParams: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 readAttributeLocalTemperatureCalibrationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.LocalTemperatureCalibration response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("Thermostat LocalTemperatureCalibration read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; return CHIP_NO_ERROR; } - -private: }; -/* - * Attribute LocalTemperature - */ -class ReadThermostatLocalTemperature : public ReadAttribute { +class WriteThermostatLocalTemperatureCalibration : public WriteAttribute { public: - ReadThermostatLocalTemperature() - : ReadAttribute("local-temperature") + WriteThermostatLocalTemperatureCalibration() + : WriteAttribute("local-temperature-calibration") { + AddArgument("attr-name", "local-temperature-calibration"); + AddArgument("attr-value", INT8_MIN, INT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~ReadThermostatLocalTemperature() + ~WriteThermostatLocalTemperatureCalibration() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::LocalTemperature::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::LocalTemperatureCalibration::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 = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLocalTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.LocalTemperature response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("Thermostat LocalTemperature read Error", error); + __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 numberWithChar:mValue]; + + [cluster writeAttributeLocalTemperatureCalibrationWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat LocalTemperatureCalibration write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + int8_t mValue; }; -class SubscribeAttributeThermostatLocalTemperature : public SubscribeAttribute { +class SubscribeAttributeThermostatLocalTemperatureCalibration : public SubscribeAttribute { public: - SubscribeAttributeThermostatLocalTemperature() - : SubscribeAttribute("local-temperature") + SubscribeAttributeThermostatLocalTemperatureCalibration() + : SubscribeAttribute("local-temperature-calibration") { } - ~SubscribeAttributeThermostatLocalTemperature() + ~SubscribeAttributeThermostatLocalTemperatureCalibration() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::LocalTemperature::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::LocalTemperatureCalibration::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -98443,10 +100257,10 @@ class SubscribeAttributeThermostatLocalTemperature : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLocalTemperatureWithParams:params + [cluster subscribeAttributeLocalTemperatureCalibrationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.LocalTemperature response %@", [value description]); + NSLog(@"Thermostat.LocalTemperatureCalibration response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -98460,34 +100274,34 @@ class SubscribeAttributeThermostatLocalTemperature : public SubscribeAttribute { }; /* - * Attribute OutdoorTemperature + * Attribute OccupiedCoolingSetpoint */ -class ReadThermostatOutdoorTemperature : public ReadAttribute { +class ReadThermostatOccupiedCoolingSetpoint : public ReadAttribute { public: - ReadThermostatOutdoorTemperature() - : ReadAttribute("outdoor-temperature") + ReadThermostatOccupiedCoolingSetpoint() + : ReadAttribute("occupied-cooling-setpoint") { } - ~ReadThermostatOutdoorTemperature() + ~ReadThermostatOccupiedCoolingSetpoint() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OutdoorTemperature::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedCoolingSetpoint::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOutdoorTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OutdoorTemperature response %@", [value description]); + [cluster readAttributeOccupiedCoolingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.OccupiedCoolingSetpoint response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat OutdoorTemperature read Error", error); + LogNSError("Thermostat OccupiedCoolingSetpoint read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -98496,21 +100310,62 @@ class ReadThermostatOutdoorTemperature : public ReadAttribute { } }; -class SubscribeAttributeThermostatOutdoorTemperature : public SubscribeAttribute { +class WriteThermostatOccupiedCoolingSetpoint : public WriteAttribute { public: - SubscribeAttributeThermostatOutdoorTemperature() - : SubscribeAttribute("outdoor-temperature") + WriteThermostatOccupiedCoolingSetpoint() + : WriteAttribute("occupied-cooling-setpoint") { + AddArgument("attr-name", "occupied-cooling-setpoint"); + AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeThermostatOutdoorTemperature() + ~WriteThermostatOccupiedCoolingSetpoint() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::OutdoorTemperature::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedCoolingSetpoint::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 = [[MTRBaseClusterThermostat 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 numberWithShort:mValue]; + + [cluster writeAttributeOccupiedCoolingSetpointWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat OccupiedCoolingSetpoint write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + int16_t mValue; +}; + +class SubscribeAttributeThermostatOccupiedCoolingSetpoint : public SubscribeAttribute { +public: + SubscribeAttributeThermostatOccupiedCoolingSetpoint() + : SubscribeAttribute("occupied-cooling-setpoint") + { + } + + ~SubscribeAttributeThermostatOccupiedCoolingSetpoint() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedCoolingSetpoint::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -98525,10 +100380,10 @@ class SubscribeAttributeThermostatOutdoorTemperature : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOutdoorTemperatureWithParams:params + [cluster subscribeAttributeOccupiedCoolingSetpointWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OutdoorTemperature response %@", [value description]); + NSLog(@"Thermostat.OccupiedCoolingSetpoint response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -98542,34 +100397,34 @@ class SubscribeAttributeThermostatOutdoorTemperature : public SubscribeAttribute }; /* - * Attribute Occupancy + * Attribute OccupiedHeatingSetpoint */ -class ReadThermostatOccupancy : public ReadAttribute { +class ReadThermostatOccupiedHeatingSetpoint : public ReadAttribute { public: - ReadThermostatOccupancy() - : ReadAttribute("occupancy") + ReadThermostatOccupiedHeatingSetpoint() + : ReadAttribute("occupied-heating-setpoint") { } - ~ReadThermostatOccupancy() + ~ReadThermostatOccupiedHeatingSetpoint() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::Occupancy::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedHeatingSetpoint::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOccupancyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.Occupancy response %@", [value description]); + [cluster readAttributeOccupiedHeatingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.OccupiedHeatingSetpoint response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat Occupancy read Error", error); + LogNSError("Thermostat OccupiedHeatingSetpoint read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -98578,21 +100433,62 @@ class ReadThermostatOccupancy : public ReadAttribute { } }; -class SubscribeAttributeThermostatOccupancy : public SubscribeAttribute { +class WriteThermostatOccupiedHeatingSetpoint : public WriteAttribute { public: - SubscribeAttributeThermostatOccupancy() - : SubscribeAttribute("occupancy") + WriteThermostatOccupiedHeatingSetpoint() + : WriteAttribute("occupied-heating-setpoint") { + AddArgument("attr-name", "occupied-heating-setpoint"); + AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeThermostatOccupancy() + ~WriteThermostatOccupiedHeatingSetpoint() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::Occupancy::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedHeatingSetpoint::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 = [[MTRBaseClusterThermostat 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 numberWithShort:mValue]; + + [cluster writeAttributeOccupiedHeatingSetpointWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat OccupiedHeatingSetpoint write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + int16_t mValue; +}; + +class SubscribeAttributeThermostatOccupiedHeatingSetpoint : public SubscribeAttribute { +public: + SubscribeAttributeThermostatOccupiedHeatingSetpoint() + : SubscribeAttribute("occupied-heating-setpoint") + { + } + + ~SubscribeAttributeThermostatOccupiedHeatingSetpoint() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedHeatingSetpoint::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -98607,10 +100503,10 @@ class SubscribeAttributeThermostatOccupancy : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOccupancyWithParams:params + [cluster subscribeAttributeOccupiedHeatingSetpointWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.Occupancy response %@", [value description]); + NSLog(@"Thermostat.OccupiedHeatingSetpoint response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -98624,34 +100520,34 @@ class SubscribeAttributeThermostatOccupancy : public SubscribeAttribute { }; /* - * Attribute AbsMinHeatSetpointLimit + * Attribute UnoccupiedCoolingSetpoint */ -class ReadThermostatAbsMinHeatSetpointLimit : public ReadAttribute { +class ReadThermostatUnoccupiedCoolingSetpoint : public ReadAttribute { public: - ReadThermostatAbsMinHeatSetpointLimit() - : ReadAttribute("abs-min-heat-setpoint-limit") + ReadThermostatUnoccupiedCoolingSetpoint() + : ReadAttribute("unoccupied-cooling-setpoint") { } - ~ReadThermostatAbsMinHeatSetpointLimit() + ~ReadThermostatUnoccupiedCoolingSetpoint() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMinHeatSetpointLimit::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedCoolingSetpoint::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAbsMinHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AbsMinHeatSetpointLimit response %@", [value description]); + [cluster readAttributeUnoccupiedCoolingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.UnoccupiedCoolingSetpoint response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat AbsMinHeatSetpointLimit read Error", error); + LogNSError("Thermostat UnoccupiedCoolingSetpoint read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -98660,21 +100556,62 @@ class ReadThermostatAbsMinHeatSetpointLimit : public ReadAttribute { } }; -class SubscribeAttributeThermostatAbsMinHeatSetpointLimit : public SubscribeAttribute { +class WriteThermostatUnoccupiedCoolingSetpoint : public WriteAttribute { public: - SubscribeAttributeThermostatAbsMinHeatSetpointLimit() - : SubscribeAttribute("abs-min-heat-setpoint-limit") + WriteThermostatUnoccupiedCoolingSetpoint() + : WriteAttribute("unoccupied-cooling-setpoint") { + AddArgument("attr-name", "unoccupied-cooling-setpoint"); + AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeThermostatAbsMinHeatSetpointLimit() + ~WriteThermostatUnoccupiedCoolingSetpoint() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMinHeatSetpointLimit::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedCoolingSetpoint::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 = [[MTRBaseClusterThermostat 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 numberWithShort:mValue]; + + [cluster writeAttributeUnoccupiedCoolingSetpointWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat UnoccupiedCoolingSetpoint write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + int16_t mValue; +}; + +class SubscribeAttributeThermostatUnoccupiedCoolingSetpoint : public SubscribeAttribute { +public: + SubscribeAttributeThermostatUnoccupiedCoolingSetpoint() + : SubscribeAttribute("unoccupied-cooling-setpoint") + { + } + + ~SubscribeAttributeThermostatUnoccupiedCoolingSetpoint() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedCoolingSetpoint::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -98689,10 +100626,10 @@ class SubscribeAttributeThermostatAbsMinHeatSetpointLimit : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAbsMinHeatSetpointLimitWithParams:params + [cluster subscribeAttributeUnoccupiedCoolingSetpointWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AbsMinHeatSetpointLimit response %@", [value description]); + NSLog(@"Thermostat.UnoccupiedCoolingSetpoint response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -98706,34 +100643,34 @@ class SubscribeAttributeThermostatAbsMinHeatSetpointLimit : public SubscribeAttr }; /* - * Attribute AbsMaxHeatSetpointLimit + * Attribute UnoccupiedHeatingSetpoint */ -class ReadThermostatAbsMaxHeatSetpointLimit : public ReadAttribute { +class ReadThermostatUnoccupiedHeatingSetpoint : public ReadAttribute { public: - ReadThermostatAbsMaxHeatSetpointLimit() - : ReadAttribute("abs-max-heat-setpoint-limit") + ReadThermostatUnoccupiedHeatingSetpoint() + : ReadAttribute("unoccupied-heating-setpoint") { } - ~ReadThermostatAbsMaxHeatSetpointLimit() + ~ReadThermostatUnoccupiedHeatingSetpoint() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMaxHeatSetpointLimit::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedHeatingSetpoint::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAbsMaxHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AbsMaxHeatSetpointLimit response %@", [value description]); + [cluster readAttributeUnoccupiedHeatingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.UnoccupiedHeatingSetpoint response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat AbsMaxHeatSetpointLimit read Error", error); + LogNSError("Thermostat UnoccupiedHeatingSetpoint read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -98742,21 +100679,62 @@ class ReadThermostatAbsMaxHeatSetpointLimit : public ReadAttribute { } }; -class SubscribeAttributeThermostatAbsMaxHeatSetpointLimit : public SubscribeAttribute { +class WriteThermostatUnoccupiedHeatingSetpoint : public WriteAttribute { public: - SubscribeAttributeThermostatAbsMaxHeatSetpointLimit() - : SubscribeAttribute("abs-max-heat-setpoint-limit") + WriteThermostatUnoccupiedHeatingSetpoint() + : WriteAttribute("unoccupied-heating-setpoint") { + AddArgument("attr-name", "unoccupied-heating-setpoint"); + AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeThermostatAbsMaxHeatSetpointLimit() + ~WriteThermostatUnoccupiedHeatingSetpoint() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMaxHeatSetpointLimit::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedHeatingSetpoint::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 = [[MTRBaseClusterThermostat 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 numberWithShort:mValue]; + + [cluster writeAttributeUnoccupiedHeatingSetpointWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat UnoccupiedHeatingSetpoint write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + int16_t mValue; +}; + +class SubscribeAttributeThermostatUnoccupiedHeatingSetpoint : public SubscribeAttribute { +public: + SubscribeAttributeThermostatUnoccupiedHeatingSetpoint() + : SubscribeAttribute("unoccupied-heating-setpoint") + { + } + + ~SubscribeAttributeThermostatUnoccupiedHeatingSetpoint() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedHeatingSetpoint::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -98771,10 +100749,10 @@ class SubscribeAttributeThermostatAbsMaxHeatSetpointLimit : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAbsMaxHeatSetpointLimitWithParams:params + [cluster subscribeAttributeUnoccupiedHeatingSetpointWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AbsMaxHeatSetpointLimit response %@", [value description]); + NSLog(@"Thermostat.UnoccupiedHeatingSetpoint response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -98788,34 +100766,34 @@ class SubscribeAttributeThermostatAbsMaxHeatSetpointLimit : public SubscribeAttr }; /* - * Attribute AbsMinCoolSetpointLimit + * Attribute MinHeatSetpointLimit */ -class ReadThermostatAbsMinCoolSetpointLimit : public ReadAttribute { +class ReadThermostatMinHeatSetpointLimit : public ReadAttribute { public: - ReadThermostatAbsMinCoolSetpointLimit() - : ReadAttribute("abs-min-cool-setpoint-limit") + ReadThermostatMinHeatSetpointLimit() + : ReadAttribute("min-heat-setpoint-limit") { } - ~ReadThermostatAbsMinCoolSetpointLimit() + ~ReadThermostatMinHeatSetpointLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMinCoolSetpointLimit::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MinHeatSetpointLimit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAbsMinCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AbsMinCoolSetpointLimit response %@", [value description]); + [cluster readAttributeMinHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.MinHeatSetpointLimit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat AbsMinCoolSetpointLimit read Error", error); + LogNSError("Thermostat MinHeatSetpointLimit read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -98824,21 +100802,62 @@ class ReadThermostatAbsMinCoolSetpointLimit : public ReadAttribute { } }; -class SubscribeAttributeThermostatAbsMinCoolSetpointLimit : public SubscribeAttribute { +class WriteThermostatMinHeatSetpointLimit : public WriteAttribute { public: - SubscribeAttributeThermostatAbsMinCoolSetpointLimit() - : SubscribeAttribute("abs-min-cool-setpoint-limit") + WriteThermostatMinHeatSetpointLimit() + : WriteAttribute("min-heat-setpoint-limit") { + AddArgument("attr-name", "min-heat-setpoint-limit"); + AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeThermostatAbsMinCoolSetpointLimit() + ~WriteThermostatMinHeatSetpointLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMinCoolSetpointLimit::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MinHeatSetpointLimit::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 = [[MTRBaseClusterThermostat 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 numberWithShort:mValue]; + + [cluster writeAttributeMinHeatSetpointLimitWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat MinHeatSetpointLimit write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + int16_t mValue; +}; + +class SubscribeAttributeThermostatMinHeatSetpointLimit : public SubscribeAttribute { +public: + SubscribeAttributeThermostatMinHeatSetpointLimit() + : SubscribeAttribute("min-heat-setpoint-limit") + { + } + + ~SubscribeAttributeThermostatMinHeatSetpointLimit() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::MinHeatSetpointLimit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -98853,10 +100872,10 @@ class SubscribeAttributeThermostatAbsMinCoolSetpointLimit : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAbsMinCoolSetpointLimitWithParams:params + [cluster subscribeAttributeMinHeatSetpointLimitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AbsMinCoolSetpointLimit response %@", [value description]); + NSLog(@"Thermostat.MinHeatSetpointLimit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -98870,34 +100889,34 @@ class SubscribeAttributeThermostatAbsMinCoolSetpointLimit : public SubscribeAttr }; /* - * Attribute AbsMaxCoolSetpointLimit + * Attribute MaxHeatSetpointLimit */ -class ReadThermostatAbsMaxCoolSetpointLimit : public ReadAttribute { +class ReadThermostatMaxHeatSetpointLimit : public ReadAttribute { public: - ReadThermostatAbsMaxCoolSetpointLimit() - : ReadAttribute("abs-max-cool-setpoint-limit") + ReadThermostatMaxHeatSetpointLimit() + : ReadAttribute("max-heat-setpoint-limit") { } - ~ReadThermostatAbsMaxCoolSetpointLimit() + ~ReadThermostatMaxHeatSetpointLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMaxCoolSetpointLimit::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MaxHeatSetpointLimit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeAbsMaxCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AbsMaxCoolSetpointLimit response %@", [value description]); + [cluster readAttributeMaxHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.MaxHeatSetpointLimit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat AbsMaxCoolSetpointLimit read Error", error); + LogNSError("Thermostat MaxHeatSetpointLimit read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -98906,21 +100925,62 @@ class ReadThermostatAbsMaxCoolSetpointLimit : public ReadAttribute { } }; -class SubscribeAttributeThermostatAbsMaxCoolSetpointLimit : public SubscribeAttribute { +class WriteThermostatMaxHeatSetpointLimit : public WriteAttribute { public: - SubscribeAttributeThermostatAbsMaxCoolSetpointLimit() - : SubscribeAttribute("abs-max-cool-setpoint-limit") + WriteThermostatMaxHeatSetpointLimit() + : WriteAttribute("max-heat-setpoint-limit") { + AddArgument("attr-name", "max-heat-setpoint-limit"); + AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeThermostatAbsMaxCoolSetpointLimit() + ~WriteThermostatMaxHeatSetpointLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::AbsMaxCoolSetpointLimit::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MaxHeatSetpointLimit::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 = [[MTRBaseClusterThermostat 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 numberWithShort:mValue]; + + [cluster writeAttributeMaxHeatSetpointLimitWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat MaxHeatSetpointLimit write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + int16_t mValue; +}; + +class SubscribeAttributeThermostatMaxHeatSetpointLimit : public SubscribeAttribute { +public: + SubscribeAttributeThermostatMaxHeatSetpointLimit() + : SubscribeAttribute("max-heat-setpoint-limit") + { + } + + ~SubscribeAttributeThermostatMaxHeatSetpointLimit() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::MaxHeatSetpointLimit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -98935,10 +100995,10 @@ class SubscribeAttributeThermostatAbsMaxCoolSetpointLimit : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeAbsMaxCoolSetpointLimitWithParams:params + [cluster subscribeAttributeMaxHeatSetpointLimitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.AbsMaxCoolSetpointLimit response %@", [value description]); + NSLog(@"Thermostat.MaxHeatSetpointLimit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -98952,34 +101012,34 @@ class SubscribeAttributeThermostatAbsMaxCoolSetpointLimit : public SubscribeAttr }; /* - * Attribute PICoolingDemand + * Attribute MinCoolSetpointLimit */ -class ReadThermostatPICoolingDemand : public ReadAttribute { +class ReadThermostatMinCoolSetpointLimit : public ReadAttribute { public: - ReadThermostatPICoolingDemand() - : ReadAttribute("picooling-demand") + ReadThermostatMinCoolSetpointLimit() + : ReadAttribute("min-cool-setpoint-limit") { } - ~ReadThermostatPICoolingDemand() + ~ReadThermostatMinCoolSetpointLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::PICoolingDemand::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MinCoolSetpointLimit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePICoolingDemandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.PICoolingDemand response %@", [value description]); + [cluster readAttributeMinCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.MinCoolSetpointLimit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat PICoolingDemand read Error", error); + LogNSError("Thermostat MinCoolSetpointLimit read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -98988,21 +101048,62 @@ class ReadThermostatPICoolingDemand : public ReadAttribute { } }; -class SubscribeAttributeThermostatPICoolingDemand : public SubscribeAttribute { +class WriteThermostatMinCoolSetpointLimit : public WriteAttribute { public: - SubscribeAttributeThermostatPICoolingDemand() - : SubscribeAttribute("picooling-demand") + WriteThermostatMinCoolSetpointLimit() + : WriteAttribute("min-cool-setpoint-limit") { + AddArgument("attr-name", "min-cool-setpoint-limit"); + AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeThermostatPICoolingDemand() + ~WriteThermostatMinCoolSetpointLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::PICoolingDemand::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MinCoolSetpointLimit::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 = [[MTRBaseClusterThermostat 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 numberWithShort:mValue]; + + [cluster writeAttributeMinCoolSetpointLimitWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat MinCoolSetpointLimit write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + int16_t mValue; +}; + +class SubscribeAttributeThermostatMinCoolSetpointLimit : public SubscribeAttribute { +public: + SubscribeAttributeThermostatMinCoolSetpointLimit() + : SubscribeAttribute("min-cool-setpoint-limit") + { + } + + ~SubscribeAttributeThermostatMinCoolSetpointLimit() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::MinCoolSetpointLimit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -99017,10 +101118,10 @@ class SubscribeAttributeThermostatPICoolingDemand : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePICoolingDemandWithParams:params + [cluster subscribeAttributeMinCoolSetpointLimitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.PICoolingDemand response %@", [value description]); + NSLog(@"Thermostat.MinCoolSetpointLimit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -99034,34 +101135,34 @@ class SubscribeAttributeThermostatPICoolingDemand : public SubscribeAttribute { }; /* - * Attribute PIHeatingDemand + * Attribute MaxCoolSetpointLimit */ -class ReadThermostatPIHeatingDemand : public ReadAttribute { +class ReadThermostatMaxCoolSetpointLimit : public ReadAttribute { public: - ReadThermostatPIHeatingDemand() - : ReadAttribute("piheating-demand") + ReadThermostatMaxCoolSetpointLimit() + : ReadAttribute("max-cool-setpoint-limit") { } - ~ReadThermostatPIHeatingDemand() + ~ReadThermostatMaxCoolSetpointLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::PIHeatingDemand::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MaxCoolSetpointLimit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributePIHeatingDemandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.PIHeatingDemand response %@", [value description]); + [cluster readAttributeMaxCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.MaxCoolSetpointLimit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat PIHeatingDemand read Error", error); + LogNSError("Thermostat MaxCoolSetpointLimit read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -99070,21 +101171,62 @@ class ReadThermostatPIHeatingDemand : public ReadAttribute { } }; -class SubscribeAttributeThermostatPIHeatingDemand : public SubscribeAttribute { +class WriteThermostatMaxCoolSetpointLimit : public WriteAttribute { public: - SubscribeAttributeThermostatPIHeatingDemand() - : SubscribeAttribute("piheating-demand") + WriteThermostatMaxCoolSetpointLimit() + : WriteAttribute("max-cool-setpoint-limit") { + AddArgument("attr-name", "max-cool-setpoint-limit"); + AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeThermostatPIHeatingDemand() + ~WriteThermostatMaxCoolSetpointLimit() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::PIHeatingDemand::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MaxCoolSetpointLimit::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 = [[MTRBaseClusterThermostat 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 numberWithShort:mValue]; + + [cluster writeAttributeMaxCoolSetpointLimitWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat MaxCoolSetpointLimit write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + int16_t mValue; +}; + +class SubscribeAttributeThermostatMaxCoolSetpointLimit : public SubscribeAttribute { +public: + SubscribeAttributeThermostatMaxCoolSetpointLimit() + : SubscribeAttribute("max-cool-setpoint-limit") + { + } + + ~SubscribeAttributeThermostatMaxCoolSetpointLimit() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::MaxCoolSetpointLimit::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -99099,10 +101241,10 @@ class SubscribeAttributeThermostatPIHeatingDemand : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributePIHeatingDemandWithParams:params + [cluster subscribeAttributeMaxCoolSetpointLimitWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.PIHeatingDemand response %@", [value description]); + NSLog(@"Thermostat.MaxCoolSetpointLimit response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -99116,34 +101258,34 @@ class SubscribeAttributeThermostatPIHeatingDemand : public SubscribeAttribute { }; /* - * Attribute HVACSystemTypeConfiguration + * Attribute MinSetpointDeadBand */ -class ReadThermostatHVACSystemTypeConfiguration : public ReadAttribute { +class ReadThermostatMinSetpointDeadBand : public ReadAttribute { public: - ReadThermostatHVACSystemTypeConfiguration() - : ReadAttribute("hvacsystem-type-configuration") + ReadThermostatMinSetpointDeadBand() + : ReadAttribute("min-setpoint-dead-band") { } - ~ReadThermostatHVACSystemTypeConfiguration() + ~ReadThermostatMinSetpointDeadBand() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::HVACSystemTypeConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MinSetpointDeadBand::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeHVACSystemTypeConfigurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.HVACSystemTypeConfiguration response %@", [value description]); + [cluster readAttributeMinSetpointDeadBandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.MinSetpointDeadBand response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat HVACSystemTypeConfiguration read Error", error); + LogNSError("Thermostat MinSetpointDeadBand read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -99152,24 +101294,24 @@ class ReadThermostatHVACSystemTypeConfiguration : public ReadAttribute { } }; -class WriteThermostatHVACSystemTypeConfiguration : public WriteAttribute { +class WriteThermostatMinSetpointDeadBand : public WriteAttribute { public: - WriteThermostatHVACSystemTypeConfiguration() - : WriteAttribute("hvacsystem-type-configuration") + WriteThermostatMinSetpointDeadBand() + : WriteAttribute("min-setpoint-dead-band") { - AddArgument("attr-name", "hvacsystem-type-configuration"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); + AddArgument("attr-name", "min-setpoint-dead-band"); + AddArgument("attr-value", INT8_MIN, INT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteThermostatHVACSystemTypeConfiguration() + ~WriteThermostatMinSetpointDeadBand() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::HVACSystemTypeConfiguration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MinSetpointDeadBand::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); @@ -99177,11 +101319,11 @@ class WriteThermostatHVACSystemTypeConfiguration : public WriteAttribute { __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]; + NSNumber * _Nonnull value = [NSNumber numberWithChar:mValue]; - [cluster writeAttributeHVACSystemTypeConfigurationWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeMinSetpointDeadBandWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("Thermostat HVACSystemTypeConfiguration write Error", error); + LogNSError("Thermostat MinSetpointDeadBand write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -99190,24 +101332,24 @@ class WriteThermostatHVACSystemTypeConfiguration : public WriteAttribute { } private: - uint8_t mValue; + int8_t mValue; }; -class SubscribeAttributeThermostatHVACSystemTypeConfiguration : public SubscribeAttribute { +class SubscribeAttributeThermostatMinSetpointDeadBand : public SubscribeAttribute { public: - SubscribeAttributeThermostatHVACSystemTypeConfiguration() - : SubscribeAttribute("hvacsystem-type-configuration") + SubscribeAttributeThermostatMinSetpointDeadBand() + : SubscribeAttribute("min-setpoint-dead-band") { } - ~SubscribeAttributeThermostatHVACSystemTypeConfiguration() + ~SubscribeAttributeThermostatMinSetpointDeadBand() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::HVACSystemTypeConfiguration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::MinSetpointDeadBand::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -99222,10 +101364,10 @@ class SubscribeAttributeThermostatHVACSystemTypeConfiguration : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeHVACSystemTypeConfigurationWithParams:params + [cluster subscribeAttributeMinSetpointDeadBandWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.HVACSystemTypeConfiguration response %@", [value description]); + NSLog(@"Thermostat.MinSetpointDeadBand response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -99239,34 +101381,34 @@ class SubscribeAttributeThermostatHVACSystemTypeConfiguration : public Subscribe }; /* - * Attribute LocalTemperatureCalibration + * Attribute RemoteSensing */ -class ReadThermostatLocalTemperatureCalibration : public ReadAttribute { +class ReadThermostatRemoteSensing : public ReadAttribute { public: - ReadThermostatLocalTemperatureCalibration() - : ReadAttribute("local-temperature-calibration") + ReadThermostatRemoteSensing() + : ReadAttribute("remote-sensing") { } - ~ReadThermostatLocalTemperatureCalibration() + ~ReadThermostatRemoteSensing() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::LocalTemperatureCalibration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::RemoteSensing::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeLocalTemperatureCalibrationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.LocalTemperatureCalibration response %@", [value description]); + [cluster readAttributeRemoteSensingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.RemoteSensing response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat LocalTemperatureCalibration read Error", error); + LogNSError("Thermostat RemoteSensing read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -99275,24 +101417,24 @@ class ReadThermostatLocalTemperatureCalibration : public ReadAttribute { } }; -class WriteThermostatLocalTemperatureCalibration : public WriteAttribute { +class WriteThermostatRemoteSensing : public WriteAttribute { public: - WriteThermostatLocalTemperatureCalibration() - : WriteAttribute("local-temperature-calibration") + WriteThermostatRemoteSensing() + : WriteAttribute("remote-sensing") { - AddArgument("attr-name", "local-temperature-calibration"); - AddArgument("attr-value", INT8_MIN, INT8_MAX, &mValue); + AddArgument("attr-name", "remote-sensing"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteThermostatLocalTemperatureCalibration() + ~WriteThermostatRemoteSensing() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::LocalTemperatureCalibration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::RemoteSensing::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); @@ -99300,11 +101442,11 @@ class WriteThermostatLocalTemperatureCalibration : public WriteAttribute { __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 numberWithChar:mValue]; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeLocalTemperatureCalibrationWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeRemoteSensingWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("Thermostat LocalTemperatureCalibration write Error", error); + LogNSError("Thermostat RemoteSensing write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -99313,24 +101455,24 @@ class WriteThermostatLocalTemperatureCalibration : public WriteAttribute { } private: - int8_t mValue; + uint8_t mValue; }; -class SubscribeAttributeThermostatLocalTemperatureCalibration : public SubscribeAttribute { +class SubscribeAttributeThermostatRemoteSensing : public SubscribeAttribute { public: - SubscribeAttributeThermostatLocalTemperatureCalibration() - : SubscribeAttribute("local-temperature-calibration") + SubscribeAttributeThermostatRemoteSensing() + : SubscribeAttribute("remote-sensing") { } - ~SubscribeAttributeThermostatLocalTemperatureCalibration() + ~SubscribeAttributeThermostatRemoteSensing() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::LocalTemperatureCalibration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::RemoteSensing::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -99345,10 +101487,10 @@ class SubscribeAttributeThermostatLocalTemperatureCalibration : public Subscribe if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeLocalTemperatureCalibrationWithParams:params + [cluster subscribeAttributeRemoteSensingWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.LocalTemperatureCalibration response %@", [value description]); + NSLog(@"Thermostat.RemoteSensing response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -99362,34 +101504,34 @@ class SubscribeAttributeThermostatLocalTemperatureCalibration : public Subscribe }; /* - * Attribute OccupiedCoolingSetpoint + * Attribute ControlSequenceOfOperation */ -class ReadThermostatOccupiedCoolingSetpoint : public ReadAttribute { +class ReadThermostatControlSequenceOfOperation : public ReadAttribute { public: - ReadThermostatOccupiedCoolingSetpoint() - : ReadAttribute("occupied-cooling-setpoint") + ReadThermostatControlSequenceOfOperation() + : ReadAttribute("control-sequence-of-operation") { } - ~ReadThermostatOccupiedCoolingSetpoint() + ~ReadThermostatControlSequenceOfOperation() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedCoolingSetpoint::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ControlSequenceOfOperation::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOccupiedCoolingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OccupiedCoolingSetpoint response %@", [value description]); + [cluster readAttributeControlSequenceOfOperationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ControlSequenceOfOperation response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat OccupiedCoolingSetpoint read Error", error); + LogNSError("Thermostat ControlSequenceOfOperation read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -99398,24 +101540,24 @@ class ReadThermostatOccupiedCoolingSetpoint : public ReadAttribute { } }; -class WriteThermostatOccupiedCoolingSetpoint : public WriteAttribute { +class WriteThermostatControlSequenceOfOperation : public WriteAttribute { public: - WriteThermostatOccupiedCoolingSetpoint() - : WriteAttribute("occupied-cooling-setpoint") + WriteThermostatControlSequenceOfOperation() + : WriteAttribute("control-sequence-of-operation") { - AddArgument("attr-name", "occupied-cooling-setpoint"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); + AddArgument("attr-name", "control-sequence-of-operation"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteThermostatOccupiedCoolingSetpoint() + ~WriteThermostatControlSequenceOfOperation() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedCoolingSetpoint::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ControlSequenceOfOperation::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); @@ -99423,11 +101565,11 @@ class WriteThermostatOccupiedCoolingSetpoint : public WriteAttribute { __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 numberWithShort:mValue]; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeOccupiedCoolingSetpointWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeControlSequenceOfOperationWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("Thermostat OccupiedCoolingSetpoint write Error", error); + LogNSError("Thermostat ControlSequenceOfOperation write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -99436,24 +101578,24 @@ class WriteThermostatOccupiedCoolingSetpoint : public WriteAttribute { } private: - int16_t mValue; + uint8_t mValue; }; -class SubscribeAttributeThermostatOccupiedCoolingSetpoint : public SubscribeAttribute { +class SubscribeAttributeThermostatControlSequenceOfOperation : public SubscribeAttribute { public: - SubscribeAttributeThermostatOccupiedCoolingSetpoint() - : SubscribeAttribute("occupied-cooling-setpoint") + SubscribeAttributeThermostatControlSequenceOfOperation() + : SubscribeAttribute("control-sequence-of-operation") { } - ~SubscribeAttributeThermostatOccupiedCoolingSetpoint() + ~SubscribeAttributeThermostatControlSequenceOfOperation() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedCoolingSetpoint::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ControlSequenceOfOperation::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -99468,10 +101610,10 @@ class SubscribeAttributeThermostatOccupiedCoolingSetpoint : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOccupiedCoolingSetpointWithParams:params + [cluster subscribeAttributeControlSequenceOfOperationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OccupiedCoolingSetpoint response %@", [value description]); + NSLog(@"Thermostat.ControlSequenceOfOperation response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -99485,34 +101627,34 @@ class SubscribeAttributeThermostatOccupiedCoolingSetpoint : public SubscribeAttr }; /* - * Attribute OccupiedHeatingSetpoint + * Attribute SystemMode */ -class ReadThermostatOccupiedHeatingSetpoint : public ReadAttribute { +class ReadThermostatSystemMode : public ReadAttribute { public: - ReadThermostatOccupiedHeatingSetpoint() - : ReadAttribute("occupied-heating-setpoint") + ReadThermostatSystemMode() + : ReadAttribute("system-mode") { } - ~ReadThermostatOccupiedHeatingSetpoint() + ~ReadThermostatSystemMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedHeatingSetpoint::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::SystemMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOccupiedHeatingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OccupiedHeatingSetpoint response %@", [value description]); + [cluster readAttributeSystemModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.SystemMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat OccupiedHeatingSetpoint read Error", error); + LogNSError("Thermostat SystemMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -99521,24 +101663,24 @@ class ReadThermostatOccupiedHeatingSetpoint : public ReadAttribute { } }; -class WriteThermostatOccupiedHeatingSetpoint : public WriteAttribute { +class WriteThermostatSystemMode : public WriteAttribute { public: - WriteThermostatOccupiedHeatingSetpoint() - : WriteAttribute("occupied-heating-setpoint") + WriteThermostatSystemMode() + : WriteAttribute("system-mode") { - AddArgument("attr-name", "occupied-heating-setpoint"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); + AddArgument("attr-name", "system-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteThermostatOccupiedHeatingSetpoint() + ~WriteThermostatSystemMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedHeatingSetpoint::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::SystemMode::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); @@ -99546,11 +101688,11 @@ class WriteThermostatOccupiedHeatingSetpoint : public WriteAttribute { __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 numberWithShort:mValue]; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeOccupiedHeatingSetpointWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeSystemModeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("Thermostat OccupiedHeatingSetpoint write Error", error); + LogNSError("Thermostat SystemMode write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -99559,24 +101701,24 @@ class WriteThermostatOccupiedHeatingSetpoint : public WriteAttribute { } private: - int16_t mValue; + uint8_t mValue; }; -class SubscribeAttributeThermostatOccupiedHeatingSetpoint : public SubscribeAttribute { +class SubscribeAttributeThermostatSystemMode : public SubscribeAttribute { public: - SubscribeAttributeThermostatOccupiedHeatingSetpoint() - : SubscribeAttribute("occupied-heating-setpoint") + SubscribeAttributeThermostatSystemMode() + : SubscribeAttribute("system-mode") { } - ~SubscribeAttributeThermostatOccupiedHeatingSetpoint() + ~SubscribeAttributeThermostatSystemMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedHeatingSetpoint::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::SystemMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -99591,10 +101733,10 @@ class SubscribeAttributeThermostatOccupiedHeatingSetpoint : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOccupiedHeatingSetpointWithParams:params + [cluster subscribeAttributeSystemModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OccupiedHeatingSetpoint response %@", [value description]); + NSLog(@"Thermostat.SystemMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -99608,34 +101750,34 @@ class SubscribeAttributeThermostatOccupiedHeatingSetpoint : public SubscribeAttr }; /* - * Attribute UnoccupiedCoolingSetpoint + * Attribute ThermostatRunningMode */ -class ReadThermostatUnoccupiedCoolingSetpoint : public ReadAttribute { +class ReadThermostatThermostatRunningMode : public ReadAttribute { public: - ReadThermostatUnoccupiedCoolingSetpoint() - : ReadAttribute("unoccupied-cooling-setpoint") + ReadThermostatThermostatRunningMode() + : ReadAttribute("thermostat-running-mode") { } - ~ReadThermostatUnoccupiedCoolingSetpoint() + ~ReadThermostatThermostatRunningMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedCoolingSetpoint::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ThermostatRunningMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUnoccupiedCoolingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.UnoccupiedCoolingSetpoint response %@", [value description]); + [cluster readAttributeThermostatRunningModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ThermostatRunningMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat UnoccupiedCoolingSetpoint read Error", error); + LogNSError("Thermostat ThermostatRunningMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -99644,62 +101786,103 @@ class ReadThermostatUnoccupiedCoolingSetpoint : public ReadAttribute { } }; -class WriteThermostatUnoccupiedCoolingSetpoint : public WriteAttribute { +class SubscribeAttributeThermostatThermostatRunningMode : public SubscribeAttribute { public: - WriteThermostatUnoccupiedCoolingSetpoint() - : WriteAttribute("unoccupied-cooling-setpoint") + SubscribeAttributeThermostatThermostatRunningMode() + : SubscribeAttribute("thermostat-running-mode") { - AddArgument("attr-name", "unoccupied-cooling-setpoint"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); - WriteAttribute::AddArguments(); } - ~WriteThermostatUnoccupiedCoolingSetpoint() + ~SubscribeAttributeThermostatThermostatRunningMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedCoolingSetpoint::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ThermostatRunningMode::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 = [[MTRBaseClusterThermostat 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 numberWithShort:mValue]; + __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 subscribeAttributeThermostatRunningModeWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ThermostatRunningMode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; - [cluster writeAttributeUnoccupiedCoolingSetpointWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat UnoccupiedCoolingSetpoint write Error", error); + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute StartOfWeek + */ +class ReadThermostatStartOfWeek : public ReadAttribute { +public: + ReadThermostatStartOfWeek() + : ReadAttribute("start-of-week") + { + } + + ~ReadThermostatStartOfWeek() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::StartOfWeek::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeStartOfWeekWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.StartOfWeek response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("Thermostat StartOfWeek read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - int16_t mValue; }; -class SubscribeAttributeThermostatUnoccupiedCoolingSetpoint : public SubscribeAttribute { +class SubscribeAttributeThermostatStartOfWeek : public SubscribeAttribute { public: - SubscribeAttributeThermostatUnoccupiedCoolingSetpoint() - : SubscribeAttribute("unoccupied-cooling-setpoint") + SubscribeAttributeThermostatStartOfWeek() + : SubscribeAttribute("start-of-week") { } - ~SubscribeAttributeThermostatUnoccupiedCoolingSetpoint() + ~SubscribeAttributeThermostatStartOfWeek() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedCoolingSetpoint::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::StartOfWeek::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -99714,10 +101897,10 @@ class SubscribeAttributeThermostatUnoccupiedCoolingSetpoint : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUnoccupiedCoolingSetpointWithParams:params + [cluster subscribeAttributeStartOfWeekWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.UnoccupiedCoolingSetpoint response %@", [value description]); + NSLog(@"Thermostat.StartOfWeek response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -99731,34 +101914,34 @@ class SubscribeAttributeThermostatUnoccupiedCoolingSetpoint : public SubscribeAt }; /* - * Attribute UnoccupiedHeatingSetpoint + * Attribute NumberOfWeeklyTransitions */ -class ReadThermostatUnoccupiedHeatingSetpoint : public ReadAttribute { +class ReadThermostatNumberOfWeeklyTransitions : public ReadAttribute { public: - ReadThermostatUnoccupiedHeatingSetpoint() - : ReadAttribute("unoccupied-heating-setpoint") + ReadThermostatNumberOfWeeklyTransitions() + : ReadAttribute("number-of-weekly-transitions") { } - ~ReadThermostatUnoccupiedHeatingSetpoint() + ~ReadThermostatNumberOfWeeklyTransitions() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedHeatingSetpoint::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::NumberOfWeeklyTransitions::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUnoccupiedHeatingSetpointWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.UnoccupiedHeatingSetpoint response %@", [value description]); + [cluster readAttributeNumberOfWeeklyTransitionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.NumberOfWeeklyTransitions response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat UnoccupiedHeatingSetpoint read Error", error); + LogNSError("Thermostat NumberOfWeeklyTransitions read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -99767,62 +101950,103 @@ class ReadThermostatUnoccupiedHeatingSetpoint : public ReadAttribute { } }; -class WriteThermostatUnoccupiedHeatingSetpoint : public WriteAttribute { +class SubscribeAttributeThermostatNumberOfWeeklyTransitions : public SubscribeAttribute { public: - WriteThermostatUnoccupiedHeatingSetpoint() - : WriteAttribute("unoccupied-heating-setpoint") + SubscribeAttributeThermostatNumberOfWeeklyTransitions() + : SubscribeAttribute("number-of-weekly-transitions") { - AddArgument("attr-name", "unoccupied-heating-setpoint"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); - WriteAttribute::AddArguments(); } - ~WriteThermostatUnoccupiedHeatingSetpoint() + ~SubscribeAttributeThermostatNumberOfWeeklyTransitions() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedHeatingSetpoint::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::NumberOfWeeklyTransitions::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat 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 subscribeAttributeNumberOfWeeklyTransitionsWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.NumberOfWeeklyTransitions 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 NumberOfDailyTransitions + */ +class ReadThermostatNumberOfDailyTransitions : public ReadAttribute { +public: + ReadThermostatNumberOfDailyTransitions() + : ReadAttribute("number-of-daily-transitions") + { + } + + ~ReadThermostatNumberOfDailyTransitions() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::NumberOfDailyTransitions::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 ") 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 = [[MTRBaseClusterThermostat 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 numberWithShort:mValue]; - - [cluster writeAttributeUnoccupiedHeatingSetpointWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat UnoccupiedHeatingSetpoint write Error", error); + [cluster readAttributeNumberOfDailyTransitionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.NumberOfDailyTransitions response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("Thermostat NumberOfDailyTransitions read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - int16_t mValue; }; -class SubscribeAttributeThermostatUnoccupiedHeatingSetpoint : public SubscribeAttribute { +class SubscribeAttributeThermostatNumberOfDailyTransitions : public SubscribeAttribute { public: - SubscribeAttributeThermostatUnoccupiedHeatingSetpoint() - : SubscribeAttribute("unoccupied-heating-setpoint") + SubscribeAttributeThermostatNumberOfDailyTransitions() + : SubscribeAttribute("number-of-daily-transitions") { } - ~SubscribeAttributeThermostatUnoccupiedHeatingSetpoint() + ~SubscribeAttributeThermostatNumberOfDailyTransitions() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedHeatingSetpoint::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::NumberOfDailyTransitions::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -99837,10 +102061,10 @@ class SubscribeAttributeThermostatUnoccupiedHeatingSetpoint : public SubscribeAt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUnoccupiedHeatingSetpointWithParams:params + [cluster subscribeAttributeNumberOfDailyTransitionsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.UnoccupiedHeatingSetpoint response %@", [value description]); + NSLog(@"Thermostat.NumberOfDailyTransitions response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -99854,34 +102078,34 @@ class SubscribeAttributeThermostatUnoccupiedHeatingSetpoint : public SubscribeAt }; /* - * Attribute MinHeatSetpointLimit + * Attribute TemperatureSetpointHold */ -class ReadThermostatMinHeatSetpointLimit : public ReadAttribute { +class ReadThermostatTemperatureSetpointHold : public ReadAttribute { public: - ReadThermostatMinHeatSetpointLimit() - : ReadAttribute("min-heat-setpoint-limit") + ReadThermostatTemperatureSetpointHold() + : ReadAttribute("temperature-setpoint-hold") { } - ~ReadThermostatMinHeatSetpointLimit() + ~ReadThermostatTemperatureSetpointHold() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MinHeatSetpointLimit::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::TemperatureSetpointHold::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.MinHeatSetpointLimit response %@", [value description]); + [cluster readAttributeTemperatureSetpointHoldWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.TemperatureSetpointHold response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat MinHeatSetpointLimit read Error", error); + LogNSError("Thermostat TemperatureSetpointHold read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -99890,24 +102114,24 @@ class ReadThermostatMinHeatSetpointLimit : public ReadAttribute { } }; -class WriteThermostatMinHeatSetpointLimit : public WriteAttribute { +class WriteThermostatTemperatureSetpointHold : public WriteAttribute { public: - WriteThermostatMinHeatSetpointLimit() - : WriteAttribute("min-heat-setpoint-limit") + WriteThermostatTemperatureSetpointHold() + : WriteAttribute("temperature-setpoint-hold") { - AddArgument("attr-name", "min-heat-setpoint-limit"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); + AddArgument("attr-name", "temperature-setpoint-hold"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteThermostatMinHeatSetpointLimit() + ~WriteThermostatTemperatureSetpointHold() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MinHeatSetpointLimit::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::TemperatureSetpointHold::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); @@ -99915,11 +102139,11 @@ class WriteThermostatMinHeatSetpointLimit : public WriteAttribute { __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 numberWithShort:mValue]; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeMinHeatSetpointLimitWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeTemperatureSetpointHoldWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("Thermostat MinHeatSetpointLimit write Error", error); + LogNSError("Thermostat TemperatureSetpointHold write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -99928,24 +102152,24 @@ class WriteThermostatMinHeatSetpointLimit : public WriteAttribute { } private: - int16_t mValue; + uint8_t mValue; }; -class SubscribeAttributeThermostatMinHeatSetpointLimit : public SubscribeAttribute { +class SubscribeAttributeThermostatTemperatureSetpointHold : public SubscribeAttribute { public: - SubscribeAttributeThermostatMinHeatSetpointLimit() - : SubscribeAttribute("min-heat-setpoint-limit") + SubscribeAttributeThermostatTemperatureSetpointHold() + : SubscribeAttribute("temperature-setpoint-hold") { } - ~SubscribeAttributeThermostatMinHeatSetpointLimit() + ~SubscribeAttributeThermostatTemperatureSetpointHold() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::MinHeatSetpointLimit::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::TemperatureSetpointHold::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -99960,10 +102184,10 @@ class SubscribeAttributeThermostatMinHeatSetpointLimit : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinHeatSetpointLimitWithParams:params + [cluster subscribeAttributeTemperatureSetpointHoldWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.MinHeatSetpointLimit response %@", [value description]); + NSLog(@"Thermostat.TemperatureSetpointHold response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -99977,34 +102201,34 @@ class SubscribeAttributeThermostatMinHeatSetpointLimit : public SubscribeAttribu }; /* - * Attribute MaxHeatSetpointLimit + * Attribute TemperatureSetpointHoldDuration */ -class ReadThermostatMaxHeatSetpointLimit : public ReadAttribute { +class ReadThermostatTemperatureSetpointHoldDuration : public ReadAttribute { public: - ReadThermostatMaxHeatSetpointLimit() - : ReadAttribute("max-heat-setpoint-limit") + ReadThermostatTemperatureSetpointHoldDuration() + : ReadAttribute("temperature-setpoint-hold-duration") { } - ~ReadThermostatMaxHeatSetpointLimit() + ~ReadThermostatTemperatureSetpointHoldDuration() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MaxHeatSetpointLimit::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::TemperatureSetpointHoldDuration::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxHeatSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.MaxHeatSetpointLimit response %@", [value description]); + [cluster readAttributeTemperatureSetpointHoldDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.TemperatureSetpointHoldDuration response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat MaxHeatSetpointLimit read Error", error); + LogNSError("Thermostat TemperatureSetpointHoldDuration read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -100013,24 +102237,24 @@ class ReadThermostatMaxHeatSetpointLimit : public ReadAttribute { } }; -class WriteThermostatMaxHeatSetpointLimit : public WriteAttribute { +class WriteThermostatTemperatureSetpointHoldDuration : public WriteAttribute { public: - WriteThermostatMaxHeatSetpointLimit() - : WriteAttribute("max-heat-setpoint-limit") + WriteThermostatTemperatureSetpointHoldDuration() + : WriteAttribute("temperature-setpoint-hold-duration") { - AddArgument("attr-name", "max-heat-setpoint-limit"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); + AddArgument("attr-name", "temperature-setpoint-hold-duration"); + AddArgument("attr-value", 0, UINT16_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteThermostatMaxHeatSetpointLimit() + ~WriteThermostatTemperatureSetpointHoldDuration() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MaxHeatSetpointLimit::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::TemperatureSetpointHoldDuration::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); @@ -100038,11 +102262,14 @@ class WriteThermostatMaxHeatSetpointLimit : public WriteAttribute { __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 numberWithShort:mValue]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedShort:mValue.Value()]; + } - [cluster writeAttributeMaxHeatSetpointLimitWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeTemperatureSetpointHoldDurationWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("Thermostat MaxHeatSetpointLimit write Error", error); + LogNSError("Thermostat TemperatureSetpointHoldDuration write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -100051,24 +102278,24 @@ class WriteThermostatMaxHeatSetpointLimit : public WriteAttribute { } private: - int16_t mValue; + chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeThermostatMaxHeatSetpointLimit : public SubscribeAttribute { +class SubscribeAttributeThermostatTemperatureSetpointHoldDuration : public SubscribeAttribute { public: - SubscribeAttributeThermostatMaxHeatSetpointLimit() - : SubscribeAttribute("max-heat-setpoint-limit") + SubscribeAttributeThermostatTemperatureSetpointHoldDuration() + : SubscribeAttribute("temperature-setpoint-hold-duration") { } - ~SubscribeAttributeThermostatMaxHeatSetpointLimit() + ~SubscribeAttributeThermostatTemperatureSetpointHoldDuration() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::MaxHeatSetpointLimit::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::TemperatureSetpointHoldDuration::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -100083,10 +102310,10 @@ class SubscribeAttributeThermostatMaxHeatSetpointLimit : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxHeatSetpointLimitWithParams:params + [cluster subscribeAttributeTemperatureSetpointHoldDurationWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.MaxHeatSetpointLimit response %@", [value description]); + NSLog(@"Thermostat.TemperatureSetpointHoldDuration response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -100100,34 +102327,34 @@ class SubscribeAttributeThermostatMaxHeatSetpointLimit : public SubscribeAttribu }; /* - * Attribute MinCoolSetpointLimit + * Attribute ThermostatProgrammingOperationMode */ -class ReadThermostatMinCoolSetpointLimit : public ReadAttribute { +class ReadThermostatThermostatProgrammingOperationMode : public ReadAttribute { public: - ReadThermostatMinCoolSetpointLimit() - : ReadAttribute("min-cool-setpoint-limit") + ReadThermostatThermostatProgrammingOperationMode() + : ReadAttribute("thermostat-programming-operation-mode") { } - ~ReadThermostatMinCoolSetpointLimit() + ~ReadThermostatThermostatProgrammingOperationMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MinCoolSetpointLimit::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ThermostatProgrammingOperationMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.MinCoolSetpointLimit response %@", [value description]); + [cluster readAttributeThermostatProgrammingOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ThermostatProgrammingOperationMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat MinCoolSetpointLimit read Error", error); + LogNSError("Thermostat ThermostatProgrammingOperationMode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -100136,24 +102363,24 @@ class ReadThermostatMinCoolSetpointLimit : public ReadAttribute { } }; -class WriteThermostatMinCoolSetpointLimit : public WriteAttribute { +class WriteThermostatThermostatProgrammingOperationMode : public WriteAttribute { public: - WriteThermostatMinCoolSetpointLimit() - : WriteAttribute("min-cool-setpoint-limit") + WriteThermostatThermostatProgrammingOperationMode() + : WriteAttribute("thermostat-programming-operation-mode") { - AddArgument("attr-name", "min-cool-setpoint-limit"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); + AddArgument("attr-name", "thermostat-programming-operation-mode"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteThermostatMinCoolSetpointLimit() + ~WriteThermostatThermostatProgrammingOperationMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MinCoolSetpointLimit::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ThermostatProgrammingOperationMode::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); @@ -100161,11 +102388,11 @@ class WriteThermostatMinCoolSetpointLimit : public WriteAttribute { __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 numberWithShort:mValue]; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeMinCoolSetpointLimitWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeThermostatProgrammingOperationModeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("Thermostat MinCoolSetpointLimit write Error", error); + LogNSError("Thermostat ThermostatProgrammingOperationMode write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -100174,24 +102401,24 @@ class WriteThermostatMinCoolSetpointLimit : public WriteAttribute { } private: - int16_t mValue; + uint8_t mValue; }; -class SubscribeAttributeThermostatMinCoolSetpointLimit : public SubscribeAttribute { +class SubscribeAttributeThermostatThermostatProgrammingOperationMode : public SubscribeAttribute { public: - SubscribeAttributeThermostatMinCoolSetpointLimit() - : SubscribeAttribute("min-cool-setpoint-limit") + SubscribeAttributeThermostatThermostatProgrammingOperationMode() + : SubscribeAttribute("thermostat-programming-operation-mode") { } - ~SubscribeAttributeThermostatMinCoolSetpointLimit() + ~SubscribeAttributeThermostatThermostatProgrammingOperationMode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::MinCoolSetpointLimit::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ThermostatProgrammingOperationMode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -100206,10 +102433,10 @@ class SubscribeAttributeThermostatMinCoolSetpointLimit : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinCoolSetpointLimitWithParams:params + [cluster subscribeAttributeThermostatProgrammingOperationModeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.MinCoolSetpointLimit response %@", [value description]); + NSLog(@"Thermostat.ThermostatProgrammingOperationMode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -100223,34 +102450,34 @@ class SubscribeAttributeThermostatMinCoolSetpointLimit : public SubscribeAttribu }; /* - * Attribute MaxCoolSetpointLimit + * Attribute ThermostatRunningState */ -class ReadThermostatMaxCoolSetpointLimit : public ReadAttribute { +class ReadThermostatThermostatRunningState : public ReadAttribute { public: - ReadThermostatMaxCoolSetpointLimit() - : ReadAttribute("max-cool-setpoint-limit") + ReadThermostatThermostatRunningState() + : ReadAttribute("thermostat-running-state") { } - ~ReadThermostatMaxCoolSetpointLimit() + ~ReadThermostatThermostatRunningState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MaxCoolSetpointLimit::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ThermostatRunningState::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMaxCoolSetpointLimitWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.MaxCoolSetpointLimit response %@", [value description]); + [cluster readAttributeThermostatRunningStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ThermostatRunningState response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat MaxCoolSetpointLimit read Error", error); + LogNSError("Thermostat ThermostatRunningState read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -100259,62 +102486,103 @@ class ReadThermostatMaxCoolSetpointLimit : public ReadAttribute { } }; -class WriteThermostatMaxCoolSetpointLimit : public WriteAttribute { +class SubscribeAttributeThermostatThermostatRunningState : public SubscribeAttribute { public: - WriteThermostatMaxCoolSetpointLimit() - : WriteAttribute("max-cool-setpoint-limit") + SubscribeAttributeThermostatThermostatRunningState() + : SubscribeAttribute("thermostat-running-state") { - AddArgument("attr-name", "max-cool-setpoint-limit"); - AddArgument("attr-value", INT16_MIN, INT16_MAX, &mValue); - WriteAttribute::AddArguments(); } - ~WriteThermostatMaxCoolSetpointLimit() + ~SubscribeAttributeThermostatThermostatRunningState() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MaxCoolSetpointLimit::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ThermostatRunningState::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 = [[MTRBaseClusterThermostat 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 numberWithShort:mValue]; + __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 subscribeAttributeThermostatRunningStateWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ThermostatRunningState response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; - [cluster writeAttributeMaxCoolSetpointLimitWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat MaxCoolSetpointLimit write Error", error); + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute SetpointChangeSource + */ +class ReadThermostatSetpointChangeSource : public ReadAttribute { +public: + ReadThermostatSetpointChangeSource() + : ReadAttribute("setpoint-change-source") + { + } + + ~ReadThermostatSetpointChangeSource() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::SetpointChangeSource::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSetpointChangeSourceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.SetpointChangeSource response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("Thermostat SetpointChangeSource read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - int16_t mValue; }; -class SubscribeAttributeThermostatMaxCoolSetpointLimit : public SubscribeAttribute { +class SubscribeAttributeThermostatSetpointChangeSource : public SubscribeAttribute { public: - SubscribeAttributeThermostatMaxCoolSetpointLimit() - : SubscribeAttribute("max-cool-setpoint-limit") + SubscribeAttributeThermostatSetpointChangeSource() + : SubscribeAttribute("setpoint-change-source") { } - ~SubscribeAttributeThermostatMaxCoolSetpointLimit() + ~SubscribeAttributeThermostatSetpointChangeSource() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::MaxCoolSetpointLimit::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::SetpointChangeSource::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -100329,10 +102597,10 @@ class SubscribeAttributeThermostatMaxCoolSetpointLimit : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMaxCoolSetpointLimitWithParams:params + [cluster subscribeAttributeSetpointChangeSourceWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.MaxCoolSetpointLimit response %@", [value description]); + NSLog(@"Thermostat.SetpointChangeSource response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -100346,34 +102614,34 @@ class SubscribeAttributeThermostatMaxCoolSetpointLimit : public SubscribeAttribu }; /* - * Attribute MinSetpointDeadBand + * Attribute SetpointChangeAmount */ -class ReadThermostatMinSetpointDeadBand : public ReadAttribute { +class ReadThermostatSetpointChangeAmount : public ReadAttribute { public: - ReadThermostatMinSetpointDeadBand() - : ReadAttribute("min-setpoint-dead-band") + ReadThermostatSetpointChangeAmount() + : ReadAttribute("setpoint-change-amount") { } - ~ReadThermostatMinSetpointDeadBand() + ~ReadThermostatSetpointChangeAmount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MinSetpointDeadBand::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::SetpointChangeAmount::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeMinSetpointDeadBandWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.MinSetpointDeadBand response %@", [value description]); + [cluster readAttributeSetpointChangeAmountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.SetpointChangeAmount response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat MinSetpointDeadBand read Error", error); + LogNSError("Thermostat SetpointChangeAmount read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -100382,62 +102650,103 @@ class ReadThermostatMinSetpointDeadBand : public ReadAttribute { } }; -class WriteThermostatMinSetpointDeadBand : public WriteAttribute { +class SubscribeAttributeThermostatSetpointChangeAmount : public SubscribeAttribute { public: - WriteThermostatMinSetpointDeadBand() - : WriteAttribute("min-setpoint-dead-band") + SubscribeAttributeThermostatSetpointChangeAmount() + : SubscribeAttribute("setpoint-change-amount") { - AddArgument("attr-name", "min-setpoint-dead-band"); - AddArgument("attr-value", INT8_MIN, INT8_MAX, &mValue); - WriteAttribute::AddArguments(); } - ~WriteThermostatMinSetpointDeadBand() + ~SubscribeAttributeThermostatSetpointChangeAmount() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::MinSetpointDeadBand::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::SetpointChangeAmount::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 = [[MTRBaseClusterThermostat 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 numberWithChar:mValue]; + __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 subscribeAttributeSetpointChangeAmountWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.SetpointChangeAmount response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; - [cluster writeAttributeMinSetpointDeadBandWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat MinSetpointDeadBand write Error", error); + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute SetpointChangeSourceTimestamp + */ +class ReadThermostatSetpointChangeSourceTimestamp : public ReadAttribute { +public: + ReadThermostatSetpointChangeSourceTimestamp() + : ReadAttribute("setpoint-change-source-timestamp") + { + } + + ~ReadThermostatSetpointChangeSourceTimestamp() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::SetpointChangeSourceTimestamp::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeSetpointChangeSourceTimestampWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.SetpointChangeSourceTimestamp response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("Thermostat SetpointChangeSourceTimestamp read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - int8_t mValue; }; -class SubscribeAttributeThermostatMinSetpointDeadBand : public SubscribeAttribute { +class SubscribeAttributeThermostatSetpointChangeSourceTimestamp : public SubscribeAttribute { public: - SubscribeAttributeThermostatMinSetpointDeadBand() - : SubscribeAttribute("min-setpoint-dead-band") + SubscribeAttributeThermostatSetpointChangeSourceTimestamp() + : SubscribeAttribute("setpoint-change-source-timestamp") { } - ~SubscribeAttributeThermostatMinSetpointDeadBand() + ~SubscribeAttributeThermostatSetpointChangeSourceTimestamp() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::MinSetpointDeadBand::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::SetpointChangeSourceTimestamp::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -100452,10 +102761,10 @@ class SubscribeAttributeThermostatMinSetpointDeadBand : public SubscribeAttribut if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeMinSetpointDeadBandWithParams:params + [cluster subscribeAttributeSetpointChangeSourceTimestampWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.MinSetpointDeadBand response %@", [value description]); + NSLog(@"Thermostat.SetpointChangeSourceTimestamp response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -100469,34 +102778,34 @@ class SubscribeAttributeThermostatMinSetpointDeadBand : public SubscribeAttribut }; /* - * Attribute RemoteSensing + * Attribute OccupiedSetback */ -class ReadThermostatRemoteSensing : public ReadAttribute { +class ReadThermostatOccupiedSetback : public ReadAttribute { public: - ReadThermostatRemoteSensing() - : ReadAttribute("remote-sensing") + ReadThermostatOccupiedSetback() + : ReadAttribute("occupied-setback") { } - ~ReadThermostatRemoteSensing() + ~ReadThermostatOccupiedSetback() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::RemoteSensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedSetback::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRemoteSensingWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.RemoteSensing response %@", [value description]); + [cluster readAttributeOccupiedSetbackWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.OccupiedSetback response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat RemoteSensing read Error", error); + LogNSError("Thermostat OccupiedSetback read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -100505,24 +102814,24 @@ class ReadThermostatRemoteSensing : public ReadAttribute { } }; -class WriteThermostatRemoteSensing : public WriteAttribute { +class WriteThermostatOccupiedSetback : public WriteAttribute { public: - WriteThermostatRemoteSensing() - : WriteAttribute("remote-sensing") + WriteThermostatOccupiedSetback() + : WriteAttribute("occupied-setback") { - AddArgument("attr-name", "remote-sensing"); + AddArgument("attr-name", "occupied-setback"); AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteThermostatRemoteSensing() + ~WriteThermostatOccupiedSetback() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::RemoteSensing::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedSetback::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); @@ -100530,11 +102839,14 @@ class WriteThermostatRemoteSensing : public WriteAttribute { __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]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } - [cluster writeAttributeRemoteSensingWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeOccupiedSetbackWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("Thermostat RemoteSensing write Error", error); + LogNSError("Thermostat OccupiedSetback write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -100543,24 +102855,24 @@ class WriteThermostatRemoteSensing : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeThermostatRemoteSensing : public SubscribeAttribute { +class SubscribeAttributeThermostatOccupiedSetback : public SubscribeAttribute { public: - SubscribeAttributeThermostatRemoteSensing() - : SubscribeAttribute("remote-sensing") + SubscribeAttributeThermostatOccupiedSetback() + : SubscribeAttribute("occupied-setback") { } - ~SubscribeAttributeThermostatRemoteSensing() + ~SubscribeAttributeThermostatOccupiedSetback() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::RemoteSensing::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedSetback::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -100575,10 +102887,10 @@ class SubscribeAttributeThermostatRemoteSensing : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeRemoteSensingWithParams:params + [cluster subscribeAttributeOccupiedSetbackWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.RemoteSensing response %@", [value description]); + NSLog(@"Thermostat.OccupiedSetback response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -100592,34 +102904,34 @@ class SubscribeAttributeThermostatRemoteSensing : public SubscribeAttribute { }; /* - * Attribute ControlSequenceOfOperation + * Attribute OccupiedSetbackMin */ -class ReadThermostatControlSequenceOfOperation : public ReadAttribute { +class ReadThermostatOccupiedSetbackMin : public ReadAttribute { public: - ReadThermostatControlSequenceOfOperation() - : ReadAttribute("control-sequence-of-operation") + ReadThermostatOccupiedSetbackMin() + : ReadAttribute("occupied-setback-min") { } - ~ReadThermostatControlSequenceOfOperation() + ~ReadThermostatOccupiedSetbackMin() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ControlSequenceOfOperation::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedSetbackMin::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeControlSequenceOfOperationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ControlSequenceOfOperation response %@", [value description]); + [cluster readAttributeOccupiedSetbackMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.OccupiedSetbackMin response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat ControlSequenceOfOperation read Error", error); + LogNSError("Thermostat OccupiedSetbackMin read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -100628,62 +102940,103 @@ class ReadThermostatControlSequenceOfOperation : public ReadAttribute { } }; -class WriteThermostatControlSequenceOfOperation : public WriteAttribute { +class SubscribeAttributeThermostatOccupiedSetbackMin : public SubscribeAttribute { public: - WriteThermostatControlSequenceOfOperation() - : WriteAttribute("control-sequence-of-operation") + SubscribeAttributeThermostatOccupiedSetbackMin() + : SubscribeAttribute("occupied-setback-min") { - AddArgument("attr-name", "control-sequence-of-operation"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); } - ~WriteThermostatControlSequenceOfOperation() + ~SubscribeAttributeThermostatOccupiedSetbackMin() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ControlSequenceOfOperation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedSetbackMin::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 = [[MTRBaseClusterThermostat 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]; + __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 subscribeAttributeOccupiedSetbackMinWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.OccupiedSetbackMin response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; - [cluster writeAttributeControlSequenceOfOperationWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat ControlSequenceOfOperation write Error", error); + return CHIP_NO_ERROR; + } +}; + +/* + * Attribute OccupiedSetbackMax + */ +class ReadThermostatOccupiedSetbackMax : public ReadAttribute { +public: + ReadThermostatOccupiedSetbackMax() + : ReadAttribute("occupied-setback-max") + { + } + + ~ReadThermostatOccupiedSetbackMax() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedSetbackMax::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeOccupiedSetbackMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.OccupiedSetbackMax response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("Thermostat OccupiedSetbackMax read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeThermostatControlSequenceOfOperation : public SubscribeAttribute { +class SubscribeAttributeThermostatOccupiedSetbackMax : public SubscribeAttribute { public: - SubscribeAttributeThermostatControlSequenceOfOperation() - : SubscribeAttribute("control-sequence-of-operation") + SubscribeAttributeThermostatOccupiedSetbackMax() + : SubscribeAttribute("occupied-setback-max") { } - ~SubscribeAttributeThermostatControlSequenceOfOperation() + ~SubscribeAttributeThermostatOccupiedSetbackMax() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ControlSequenceOfOperation::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedSetbackMax::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -100698,10 +103051,10 @@ class SubscribeAttributeThermostatControlSequenceOfOperation : public SubscribeA if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeControlSequenceOfOperationWithParams:params + [cluster subscribeAttributeOccupiedSetbackMaxWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ControlSequenceOfOperation response %@", [value description]); + NSLog(@"Thermostat.OccupiedSetbackMax response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -100715,34 +103068,34 @@ class SubscribeAttributeThermostatControlSequenceOfOperation : public SubscribeA }; /* - * Attribute SystemMode + * Attribute UnoccupiedSetback */ -class ReadThermostatSystemMode : public ReadAttribute { +class ReadThermostatUnoccupiedSetback : public ReadAttribute { public: - ReadThermostatSystemMode() - : ReadAttribute("system-mode") + ReadThermostatUnoccupiedSetback() + : ReadAttribute("unoccupied-setback") { } - ~ReadThermostatSystemMode() + ~ReadThermostatUnoccupiedSetback() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::SystemMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetback::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSystemModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.SystemMode response %@", [value description]); + [cluster readAttributeUnoccupiedSetbackWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.UnoccupiedSetback response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat SystemMode read Error", error); + LogNSError("Thermostat UnoccupiedSetback read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -100751,24 +103104,24 @@ class ReadThermostatSystemMode : public ReadAttribute { } }; -class WriteThermostatSystemMode : public WriteAttribute { +class WriteThermostatUnoccupiedSetback : public WriteAttribute { public: - WriteThermostatSystemMode() - : WriteAttribute("system-mode") + WriteThermostatUnoccupiedSetback() + : WriteAttribute("unoccupied-setback") { - AddArgument("attr-name", "system-mode"); + AddArgument("attr-name", "unoccupied-setback"); AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteThermostatSystemMode() + ~WriteThermostatUnoccupiedSetback() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::SystemMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetback::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); @@ -100776,11 +103129,14 @@ class WriteThermostatSystemMode : public WriteAttribute { __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]; + NSNumber * _Nullable value = nil; + if (!mValue.IsNull()) { + value = [NSNumber numberWithUnsignedChar:mValue.Value()]; + } - [cluster writeAttributeSystemModeWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeUnoccupiedSetbackWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("Thermostat SystemMode write Error", error); + LogNSError("Thermostat UnoccupiedSetback write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -100789,24 +103145,24 @@ class WriteThermostatSystemMode : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeThermostatSystemMode : public SubscribeAttribute { +class SubscribeAttributeThermostatUnoccupiedSetback : public SubscribeAttribute { public: - SubscribeAttributeThermostatSystemMode() - : SubscribeAttribute("system-mode") + SubscribeAttributeThermostatUnoccupiedSetback() + : SubscribeAttribute("unoccupied-setback") { } - ~SubscribeAttributeThermostatSystemMode() + ~SubscribeAttributeThermostatUnoccupiedSetback() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::SystemMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetback::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -100821,10 +103177,10 @@ class SubscribeAttributeThermostatSystemMode : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSystemModeWithParams:params + [cluster subscribeAttributeUnoccupiedSetbackWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.SystemMode response %@", [value description]); + NSLog(@"Thermostat.UnoccupiedSetback response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -100838,34 +103194,34 @@ class SubscribeAttributeThermostatSystemMode : public SubscribeAttribute { }; /* - * Attribute ThermostatRunningMode + * Attribute UnoccupiedSetbackMin */ -class ReadThermostatThermostatRunningMode : public ReadAttribute { +class ReadThermostatUnoccupiedSetbackMin : public ReadAttribute { public: - ReadThermostatThermostatRunningMode() - : ReadAttribute("thermostat-running-mode") + ReadThermostatUnoccupiedSetbackMin() + : ReadAttribute("unoccupied-setback-min") { } - ~ReadThermostatThermostatRunningMode() + ~ReadThermostatUnoccupiedSetbackMin() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ThermostatRunningMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetbackMin::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeThermostatRunningModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ThermostatRunningMode response %@", [value description]); + [cluster readAttributeUnoccupiedSetbackMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.UnoccupiedSetbackMin response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat ThermostatRunningMode read Error", error); + LogNSError("Thermostat UnoccupiedSetbackMin read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -100874,21 +103230,21 @@ class ReadThermostatThermostatRunningMode : public ReadAttribute { } }; -class SubscribeAttributeThermostatThermostatRunningMode : public SubscribeAttribute { +class SubscribeAttributeThermostatUnoccupiedSetbackMin : public SubscribeAttribute { public: - SubscribeAttributeThermostatThermostatRunningMode() - : SubscribeAttribute("thermostat-running-mode") + SubscribeAttributeThermostatUnoccupiedSetbackMin() + : SubscribeAttribute("unoccupied-setback-min") { } - ~SubscribeAttributeThermostatThermostatRunningMode() + ~SubscribeAttributeThermostatUnoccupiedSetbackMin() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ThermostatRunningMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetbackMin::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -100903,10 +103259,10 @@ class SubscribeAttributeThermostatThermostatRunningMode : public SubscribeAttrib if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeThermostatRunningModeWithParams:params + [cluster subscribeAttributeUnoccupiedSetbackMinWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ThermostatRunningMode response %@", [value description]); + NSLog(@"Thermostat.UnoccupiedSetbackMin response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -100920,34 +103276,34 @@ class SubscribeAttributeThermostatThermostatRunningMode : public SubscribeAttrib }; /* - * Attribute StartOfWeek + * Attribute UnoccupiedSetbackMax */ -class ReadThermostatStartOfWeek : public ReadAttribute { +class ReadThermostatUnoccupiedSetbackMax : public ReadAttribute { public: - ReadThermostatStartOfWeek() - : ReadAttribute("start-of-week") + ReadThermostatUnoccupiedSetbackMax() + : ReadAttribute("unoccupied-setback-max") { } - ~ReadThermostatStartOfWeek() + ~ReadThermostatUnoccupiedSetbackMax() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::StartOfWeek::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetbackMax::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeStartOfWeekWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.StartOfWeek response %@", [value description]); + [cluster readAttributeUnoccupiedSetbackMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.UnoccupiedSetbackMax response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat StartOfWeek read Error", error); + LogNSError("Thermostat UnoccupiedSetbackMax read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -100956,21 +103312,21 @@ class ReadThermostatStartOfWeek : public ReadAttribute { } }; -class SubscribeAttributeThermostatStartOfWeek : public SubscribeAttribute { +class SubscribeAttributeThermostatUnoccupiedSetbackMax : public SubscribeAttribute { public: - SubscribeAttributeThermostatStartOfWeek() - : SubscribeAttribute("start-of-week") + SubscribeAttributeThermostatUnoccupiedSetbackMax() + : SubscribeAttribute("unoccupied-setback-max") { } - ~SubscribeAttributeThermostatStartOfWeek() + ~SubscribeAttributeThermostatUnoccupiedSetbackMax() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::StartOfWeek::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetbackMax::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -100985,10 +103341,10 @@ class SubscribeAttributeThermostatStartOfWeek : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeStartOfWeekWithParams:params + [cluster subscribeAttributeUnoccupiedSetbackMaxWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.StartOfWeek response %@", [value description]); + NSLog(@"Thermostat.UnoccupiedSetbackMax response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -101002,34 +103358,34 @@ class SubscribeAttributeThermostatStartOfWeek : public SubscribeAttribute { }; /* - * Attribute NumberOfWeeklyTransitions + * Attribute EmergencyHeatDelta */ -class ReadThermostatNumberOfWeeklyTransitions : public ReadAttribute { +class ReadThermostatEmergencyHeatDelta : public ReadAttribute { public: - ReadThermostatNumberOfWeeklyTransitions() - : ReadAttribute("number-of-weekly-transitions") + ReadThermostatEmergencyHeatDelta() + : ReadAttribute("emergency-heat-delta") { } - ~ReadThermostatNumberOfWeeklyTransitions() + ~ReadThermostatEmergencyHeatDelta() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::NumberOfWeeklyTransitions::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::EmergencyHeatDelta::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfWeeklyTransitionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.NumberOfWeeklyTransitions response %@", [value description]); + [cluster readAttributeEmergencyHeatDeltaWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.EmergencyHeatDelta response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat NumberOfWeeklyTransitions read Error", error); + LogNSError("Thermostat EmergencyHeatDelta read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -101038,103 +103394,62 @@ class ReadThermostatNumberOfWeeklyTransitions : public ReadAttribute { } }; -class SubscribeAttributeThermostatNumberOfWeeklyTransitions : public SubscribeAttribute { +class WriteThermostatEmergencyHeatDelta : public WriteAttribute { public: - SubscribeAttributeThermostatNumberOfWeeklyTransitions() - : SubscribeAttribute("number-of-weekly-transitions") + WriteThermostatEmergencyHeatDelta() + : WriteAttribute("emergency-heat-delta") { + AddArgument("attr-name", "emergency-heat-delta"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeThermostatNumberOfWeeklyTransitions() + ~WriteThermostatEmergencyHeatDelta() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::NumberOfWeeklyTransitions::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::EmergencyHeatDelta::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 = [[MTRBaseClusterThermostat 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 subscribeAttributeNumberOfWeeklyTransitionsWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.NumberOfWeeklyTransitions 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 NumberOfDailyTransitions - */ -class ReadThermostatNumberOfDailyTransitions : public ReadAttribute { -public: - ReadThermostatNumberOfDailyTransitions() - : ReadAttribute("number-of-daily-transitions") - { - } - - ~ReadThermostatNumberOfDailyTransitions() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::NumberOfDailyTransitions::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + __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]; - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeNumberOfDailyTransitionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.NumberOfDailyTransitions response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("Thermostat NumberOfDailyTransitions read Error", error); + [cluster writeAttributeEmergencyHeatDeltaWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat EmergencyHeatDelta write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + uint8_t mValue; }; -class SubscribeAttributeThermostatNumberOfDailyTransitions : public SubscribeAttribute { +class SubscribeAttributeThermostatEmergencyHeatDelta : public SubscribeAttribute { public: - SubscribeAttributeThermostatNumberOfDailyTransitions() - : SubscribeAttribute("number-of-daily-transitions") + SubscribeAttributeThermostatEmergencyHeatDelta() + : SubscribeAttribute("emergency-heat-delta") { } - ~SubscribeAttributeThermostatNumberOfDailyTransitions() + ~SubscribeAttributeThermostatEmergencyHeatDelta() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::NumberOfDailyTransitions::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::EmergencyHeatDelta::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -101149,10 +103464,10 @@ class SubscribeAttributeThermostatNumberOfDailyTransitions : public SubscribeAtt if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeNumberOfDailyTransitionsWithParams:params + [cluster subscribeAttributeEmergencyHeatDeltaWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.NumberOfDailyTransitions response %@", [value description]); + NSLog(@"Thermostat.EmergencyHeatDelta response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -101166,34 +103481,34 @@ class SubscribeAttributeThermostatNumberOfDailyTransitions : public SubscribeAtt }; /* - * Attribute TemperatureSetpointHold + * Attribute ACType */ -class ReadThermostatTemperatureSetpointHold : public ReadAttribute { +class ReadThermostatACType : public ReadAttribute { public: - ReadThermostatTemperatureSetpointHold() - : ReadAttribute("temperature-setpoint-hold") + ReadThermostatACType() + : ReadAttribute("actype") { } - ~ReadThermostatTemperatureSetpointHold() + ~ReadThermostatACType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::TemperatureSetpointHold::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACType::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTemperatureSetpointHoldWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.TemperatureSetpointHold response %@", [value description]); + [cluster readAttributeACTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ACType response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat TemperatureSetpointHold read Error", error); + LogNSError("Thermostat ACType read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -101202,24 +103517,24 @@ class ReadThermostatTemperatureSetpointHold : public ReadAttribute { } }; -class WriteThermostatTemperatureSetpointHold : public WriteAttribute { +class WriteThermostatACType : public WriteAttribute { public: - WriteThermostatTemperatureSetpointHold() - : WriteAttribute("temperature-setpoint-hold") + WriteThermostatACType() + : WriteAttribute("actype") { - AddArgument("attr-name", "temperature-setpoint-hold"); + AddArgument("attr-name", "actype"); AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteThermostatTemperatureSetpointHold() + ~WriteThermostatACType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::TemperatureSetpointHold::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACType::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); @@ -101229,9 +103544,9 @@ class WriteThermostatTemperatureSetpointHold : public WriteAttribute { params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeTemperatureSetpointHoldWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeACTypeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("Thermostat TemperatureSetpointHold write Error", error); + LogNSError("Thermostat ACType write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -101243,21 +103558,21 @@ class WriteThermostatTemperatureSetpointHold : public WriteAttribute { uint8_t mValue; }; -class SubscribeAttributeThermostatTemperatureSetpointHold : public SubscribeAttribute { +class SubscribeAttributeThermostatACType : public SubscribeAttribute { public: - SubscribeAttributeThermostatTemperatureSetpointHold() - : SubscribeAttribute("temperature-setpoint-hold") + SubscribeAttributeThermostatACType() + : SubscribeAttribute("actype") { } - ~SubscribeAttributeThermostatTemperatureSetpointHold() + ~SubscribeAttributeThermostatACType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::TemperatureSetpointHold::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACType::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -101272,10 +103587,10 @@ class SubscribeAttributeThermostatTemperatureSetpointHold : public SubscribeAttr if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTemperatureSetpointHoldWithParams:params + [cluster subscribeAttributeACTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.TemperatureSetpointHold response %@", [value description]); + NSLog(@"Thermostat.ACType response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -101289,34 +103604,34 @@ class SubscribeAttributeThermostatTemperatureSetpointHold : public SubscribeAttr }; /* - * Attribute TemperatureSetpointHoldDuration + * Attribute ACCapacity */ -class ReadThermostatTemperatureSetpointHoldDuration : public ReadAttribute { +class ReadThermostatACCapacity : public ReadAttribute { public: - ReadThermostatTemperatureSetpointHoldDuration() - : ReadAttribute("temperature-setpoint-hold-duration") + ReadThermostatACCapacity() + : ReadAttribute("accapacity") { } - ~ReadThermostatTemperatureSetpointHoldDuration() + ~ReadThermostatACCapacity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::TemperatureSetpointHoldDuration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCapacity::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeTemperatureSetpointHoldDurationWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.TemperatureSetpointHoldDuration response %@", [value description]); + [cluster readAttributeACCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ACCapacity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat TemperatureSetpointHoldDuration read Error", error); + LogNSError("Thermostat ACCapacity read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -101325,24 +103640,24 @@ class ReadThermostatTemperatureSetpointHoldDuration : public ReadAttribute { } }; -class WriteThermostatTemperatureSetpointHoldDuration : public WriteAttribute { +class WriteThermostatACCapacity : public WriteAttribute { public: - WriteThermostatTemperatureSetpointHoldDuration() - : WriteAttribute("temperature-setpoint-hold-duration") + WriteThermostatACCapacity() + : WriteAttribute("accapacity") { - AddArgument("attr-name", "temperature-setpoint-hold-duration"); + AddArgument("attr-name", "accapacity"); AddArgument("attr-value", 0, UINT16_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteThermostatTemperatureSetpointHoldDuration() + ~WriteThermostatACCapacity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::TemperatureSetpointHoldDuration::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCapacity::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); @@ -101350,14 +103665,11 @@ class WriteThermostatTemperatureSetpointHoldDuration : public WriteAttribute { __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 numberWithUnsignedShort:mValue.Value()]; - } + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedShort:mValue]; - [cluster writeAttributeTemperatureSetpointHoldDurationWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeACCapacityWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("Thermostat TemperatureSetpointHoldDuration write Error", error); + LogNSError("Thermostat ACCapacity write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -101366,24 +103678,24 @@ class WriteThermostatTemperatureSetpointHoldDuration : public WriteAttribute { } private: - chip::app::DataModel::Nullable mValue; + uint16_t mValue; }; -class SubscribeAttributeThermostatTemperatureSetpointHoldDuration : public SubscribeAttribute { +class SubscribeAttributeThermostatACCapacity : public SubscribeAttribute { public: - SubscribeAttributeThermostatTemperatureSetpointHoldDuration() - : SubscribeAttribute("temperature-setpoint-hold-duration") + SubscribeAttributeThermostatACCapacity() + : SubscribeAttribute("accapacity") { } - ~SubscribeAttributeThermostatTemperatureSetpointHoldDuration() + ~SubscribeAttributeThermostatACCapacity() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::TemperatureSetpointHoldDuration::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCapacity::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -101398,10 +103710,10 @@ class SubscribeAttributeThermostatTemperatureSetpointHoldDuration : public Subsc if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeTemperatureSetpointHoldDurationWithParams:params + [cluster subscribeAttributeACCapacityWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.TemperatureSetpointHoldDuration response %@", [value description]); + NSLog(@"Thermostat.ACCapacity response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -101415,34 +103727,34 @@ class SubscribeAttributeThermostatTemperatureSetpointHoldDuration : public Subsc }; /* - * Attribute ThermostatProgrammingOperationMode + * Attribute ACRefrigerantType */ -class ReadThermostatThermostatProgrammingOperationMode : public ReadAttribute { +class ReadThermostatACRefrigerantType : public ReadAttribute { public: - ReadThermostatThermostatProgrammingOperationMode() - : ReadAttribute("thermostat-programming-operation-mode") + ReadThermostatACRefrigerantType() + : ReadAttribute("acrefrigerant-type") { } - ~ReadThermostatThermostatProgrammingOperationMode() + ~ReadThermostatACRefrigerantType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ThermostatProgrammingOperationMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACRefrigerantType::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeThermostatProgrammingOperationModeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ThermostatProgrammingOperationMode response %@", [value description]); + [cluster readAttributeACRefrigerantTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ACRefrigerantType response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat ThermostatProgrammingOperationMode read Error", error); + LogNSError("Thermostat ACRefrigerantType read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -101451,24 +103763,24 @@ class ReadThermostatThermostatProgrammingOperationMode : public ReadAttribute { } }; -class WriteThermostatThermostatProgrammingOperationMode : public WriteAttribute { +class WriteThermostatACRefrigerantType : public WriteAttribute { public: - WriteThermostatThermostatProgrammingOperationMode() - : WriteAttribute("thermostat-programming-operation-mode") + WriteThermostatACRefrigerantType() + : WriteAttribute("acrefrigerant-type") { - AddArgument("attr-name", "thermostat-programming-operation-mode"); + AddArgument("attr-name", "acrefrigerant-type"); AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteThermostatThermostatProgrammingOperationMode() + ~WriteThermostatACRefrigerantType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ThermostatProgrammingOperationMode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACRefrigerantType::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); @@ -101478,9 +103790,9 @@ class WriteThermostatThermostatProgrammingOperationMode : public WriteAttribute params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; - [cluster writeAttributeThermostatProgrammingOperationModeWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeACRefrigerantTypeWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("Thermostat ThermostatProgrammingOperationMode write Error", error); + LogNSError("Thermostat ACRefrigerantType write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -101492,21 +103804,21 @@ class WriteThermostatThermostatProgrammingOperationMode : public WriteAttribute uint8_t mValue; }; -class SubscribeAttributeThermostatThermostatProgrammingOperationMode : public SubscribeAttribute { +class SubscribeAttributeThermostatACRefrigerantType : public SubscribeAttribute { public: - SubscribeAttributeThermostatThermostatProgrammingOperationMode() - : SubscribeAttribute("thermostat-programming-operation-mode") + SubscribeAttributeThermostatACRefrigerantType() + : SubscribeAttribute("acrefrigerant-type") { } - ~SubscribeAttributeThermostatThermostatProgrammingOperationMode() + ~SubscribeAttributeThermostatACRefrigerantType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ThermostatProgrammingOperationMode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACRefrigerantType::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -101521,10 +103833,10 @@ class SubscribeAttributeThermostatThermostatProgrammingOperationMode : public Su if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeThermostatProgrammingOperationModeWithParams:params + [cluster subscribeAttributeACRefrigerantTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ThermostatProgrammingOperationMode response %@", [value description]); + NSLog(@"Thermostat.ACRefrigerantType response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -101538,57 +103850,98 @@ class SubscribeAttributeThermostatThermostatProgrammingOperationMode : public Su }; /* - * Attribute ThermostatRunningState + * Attribute ACCompressorType */ -class ReadThermostatThermostatRunningState : public ReadAttribute { +class ReadThermostatACCompressorType : public ReadAttribute { public: - ReadThermostatThermostatRunningState() - : ReadAttribute("thermostat-running-state") + ReadThermostatACCompressorType() + : ReadAttribute("accompressor-type") { } - ~ReadThermostatThermostatRunningState() + ~ReadThermostatACCompressorType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ThermostatRunningState::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCompressorType::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeThermostatRunningStateWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ThermostatRunningState response %@", [value description]); + [cluster readAttributeACCompressorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ACCompressorType response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat ThermostatRunningState read Error", error); + LogNSError("Thermostat ACCompressorType read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteThermostatACCompressorType : public WriteAttribute { +public: + WriteThermostatACCompressorType() + : WriteAttribute("accompressor-type") + { + AddArgument("attr-name", "accompressor-type"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteThermostatACCompressorType() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCompressorType::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 = [[MTRBaseClusterThermostat 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 writeAttributeACCompressorTypeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat ACCompressorType write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } + +private: + uint8_t mValue; }; -class SubscribeAttributeThermostatThermostatRunningState : public SubscribeAttribute { +class SubscribeAttributeThermostatACCompressorType : public SubscribeAttribute { public: - SubscribeAttributeThermostatThermostatRunningState() - : SubscribeAttribute("thermostat-running-state") + SubscribeAttributeThermostatACCompressorType() + : SubscribeAttribute("accompressor-type") { } - ~SubscribeAttributeThermostatThermostatRunningState() + ~SubscribeAttributeThermostatACCompressorType() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ThermostatRunningState::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCompressorType::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -101603,10 +103956,10 @@ class SubscribeAttributeThermostatThermostatRunningState : public SubscribeAttri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeThermostatRunningStateWithParams:params + [cluster subscribeAttributeACCompressorTypeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ThermostatRunningState response %@", [value description]); + NSLog(@"Thermostat.ACCompressorType response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -101620,34 +103973,34 @@ class SubscribeAttributeThermostatThermostatRunningState : public SubscribeAttri }; /* - * Attribute SetpointChangeSource + * Attribute ACErrorCode */ -class ReadThermostatSetpointChangeSource : public ReadAttribute { +class ReadThermostatACErrorCode : public ReadAttribute { public: - ReadThermostatSetpointChangeSource() - : ReadAttribute("setpoint-change-source") + ReadThermostatACErrorCode() + : ReadAttribute("acerror-code") { } - ~ReadThermostatSetpointChangeSource() + ~ReadThermostatACErrorCode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::SetpointChangeSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACErrorCode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSetpointChangeSourceWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.SetpointChangeSource response %@", [value description]); + [cluster readAttributeACErrorCodeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ACErrorCode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat SetpointChangeSource read Error", error); + LogNSError("Thermostat ACErrorCode read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -101656,21 +104009,62 @@ class ReadThermostatSetpointChangeSource : public ReadAttribute { } }; -class SubscribeAttributeThermostatSetpointChangeSource : public SubscribeAttribute { +class WriteThermostatACErrorCode : public WriteAttribute { public: - SubscribeAttributeThermostatSetpointChangeSource() - : SubscribeAttribute("setpoint-change-source") + WriteThermostatACErrorCode() + : WriteAttribute("acerror-code") { + AddArgument("attr-name", "acerror-code"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeThermostatSetpointChangeSource() + ~WriteThermostatACErrorCode() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::SetpointChangeSource::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACErrorCode::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 = [[MTRBaseClusterThermostat 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 numberWithUnsignedInt:mValue]; + + [cluster writeAttributeACErrorCodeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat ACErrorCode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint32_t mValue; +}; + +class SubscribeAttributeThermostatACErrorCode : public SubscribeAttribute { +public: + SubscribeAttributeThermostatACErrorCode() + : SubscribeAttribute("acerror-code") + { + } + + ~SubscribeAttributeThermostatACErrorCode() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACErrorCode::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -101685,10 +104079,10 @@ class SubscribeAttributeThermostatSetpointChangeSource : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSetpointChangeSourceWithParams:params + [cluster subscribeAttributeACErrorCodeWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.SetpointChangeSource response %@", [value description]); + NSLog(@"Thermostat.ACErrorCode response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -101702,34 +104096,34 @@ class SubscribeAttributeThermostatSetpointChangeSource : public SubscribeAttribu }; /* - * Attribute SetpointChangeAmount + * Attribute ACLouverPosition */ -class ReadThermostatSetpointChangeAmount : public ReadAttribute { +class ReadThermostatACLouverPosition : public ReadAttribute { public: - ReadThermostatSetpointChangeAmount() - : ReadAttribute("setpoint-change-amount") + ReadThermostatACLouverPosition() + : ReadAttribute("aclouver-position") { } - ~ReadThermostatSetpointChangeAmount() + ~ReadThermostatACLouverPosition() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::SetpointChangeAmount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACLouverPosition::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSetpointChangeAmountWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.SetpointChangeAmount response %@", [value description]); + [cluster readAttributeACLouverPositionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ACLouverPosition response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat SetpointChangeAmount read Error", error); + LogNSError("Thermostat ACLouverPosition read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -101738,21 +104132,62 @@ class ReadThermostatSetpointChangeAmount : public ReadAttribute { } }; -class SubscribeAttributeThermostatSetpointChangeAmount : public SubscribeAttribute { +class WriteThermostatACLouverPosition : public WriteAttribute { public: - SubscribeAttributeThermostatSetpointChangeAmount() - : SubscribeAttribute("setpoint-change-amount") + WriteThermostatACLouverPosition() + : WriteAttribute("aclouver-position") { + AddArgument("attr-name", "aclouver-position"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); } - ~SubscribeAttributeThermostatSetpointChangeAmount() + ~WriteThermostatACLouverPosition() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::SetpointChangeAmount::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACLouverPosition::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 = [[MTRBaseClusterThermostat 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 writeAttributeACLouverPositionWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("Thermostat ACLouverPosition write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeThermostatACLouverPosition : public SubscribeAttribute { +public: + SubscribeAttributeThermostatACLouverPosition() + : SubscribeAttribute("aclouver-position") + { + } + + ~SubscribeAttributeThermostatACLouverPosition() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACLouverPosition::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -101767,10 +104202,10 @@ class SubscribeAttributeThermostatSetpointChangeAmount : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSetpointChangeAmountWithParams:params + [cluster subscribeAttributeACLouverPositionWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.SetpointChangeAmount response %@", [value description]); + NSLog(@"Thermostat.ACLouverPosition response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -101784,34 +104219,34 @@ class SubscribeAttributeThermostatSetpointChangeAmount : public SubscribeAttribu }; /* - * Attribute SetpointChangeSourceTimestamp + * Attribute ACCoilTemperature */ -class ReadThermostatSetpointChangeSourceTimestamp : public ReadAttribute { +class ReadThermostatACCoilTemperature : public ReadAttribute { public: - ReadThermostatSetpointChangeSourceTimestamp() - : ReadAttribute("setpoint-change-source-timestamp") + ReadThermostatACCoilTemperature() + : ReadAttribute("accoil-temperature") { } - ~ReadThermostatSetpointChangeSourceTimestamp() + ~ReadThermostatACCoilTemperature() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::SetpointChangeSourceTimestamp::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCoilTemperature::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeSetpointChangeSourceTimestampWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.SetpointChangeSourceTimestamp response %@", [value description]); + [cluster readAttributeACCoilTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ACCoilTemperature response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat SetpointChangeSourceTimestamp read Error", error); + LogNSError("Thermostat ACCoilTemperature read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -101820,21 +104255,21 @@ class ReadThermostatSetpointChangeSourceTimestamp : public ReadAttribute { } }; -class SubscribeAttributeThermostatSetpointChangeSourceTimestamp : public SubscribeAttribute { +class SubscribeAttributeThermostatACCoilTemperature : public SubscribeAttribute { public: - SubscribeAttributeThermostatSetpointChangeSourceTimestamp() - : SubscribeAttribute("setpoint-change-source-timestamp") + SubscribeAttributeThermostatACCoilTemperature() + : SubscribeAttribute("accoil-temperature") { } - ~SubscribeAttributeThermostatSetpointChangeSourceTimestamp() + ~SubscribeAttributeThermostatACCoilTemperature() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::SetpointChangeSourceTimestamp::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCoilTemperature::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -101849,10 +104284,10 @@ class SubscribeAttributeThermostatSetpointChangeSourceTimestamp : public Subscri if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeSetpointChangeSourceTimestampWithParams:params + [cluster subscribeAttributeACCoilTemperatureWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.SetpointChangeSourceTimestamp response %@", [value description]); + NSLog(@"Thermostat.ACCoilTemperature response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -101866,34 +104301,34 @@ class SubscribeAttributeThermostatSetpointChangeSourceTimestamp : public Subscri }; /* - * Attribute OccupiedSetback + * Attribute ACCapacityformat */ -class ReadThermostatOccupiedSetback : public ReadAttribute { +class ReadThermostatACCapacityformat : public ReadAttribute { public: - ReadThermostatOccupiedSetback() - : ReadAttribute("occupied-setback") + ReadThermostatACCapacityformat() + : ReadAttribute("accapacityformat") { } - ~ReadThermostatOccupiedSetback() + ~ReadThermostatACCapacityformat() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedSetback::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCapacityformat::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOccupiedSetbackWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OccupiedSetback response %@", [value description]); + [cluster readAttributeACCapacityformatWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ACCapacityformat response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat OccupiedSetback read Error", error); + LogNSError("Thermostat ACCapacityformat read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -101902,24 +104337,24 @@ class ReadThermostatOccupiedSetback : public ReadAttribute { } }; -class WriteThermostatOccupiedSetback : public WriteAttribute { +class WriteThermostatACCapacityformat : public WriteAttribute { public: - WriteThermostatOccupiedSetback() - : WriteAttribute("occupied-setback") + WriteThermostatACCapacityformat() + : WriteAttribute("accapacityformat") { - AddArgument("attr-name", "occupied-setback"); + AddArgument("attr-name", "accapacityformat"); AddArgument("attr-value", 0, UINT8_MAX, &mValue); WriteAttribute::AddArguments(); } - ~WriteThermostatOccupiedSetback() + ~WriteThermostatACCapacityformat() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedSetback::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCapacityformat::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); @@ -101927,14 +104362,11 @@ class WriteThermostatOccupiedSetback : public WriteAttribute { __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 writeAttributeOccupiedSetbackWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeACCapacityformatWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("Thermostat OccupiedSetback write Error", error); + LogNSError("Thermostat ACCapacityformat write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -101943,24 +104375,24 @@ class WriteThermostatOccupiedSetback : public WriteAttribute { } private: - chip::app::DataModel::Nullable mValue; + uint8_t mValue; }; -class SubscribeAttributeThermostatOccupiedSetback : public SubscribeAttribute { +class SubscribeAttributeThermostatACCapacityformat : public SubscribeAttribute { public: - SubscribeAttributeThermostatOccupiedSetback() - : SubscribeAttribute("occupied-setback") + SubscribeAttributeThermostatACCapacityformat() + : SubscribeAttribute("accapacityformat") { } - ~SubscribeAttributeThermostatOccupiedSetback() + ~SubscribeAttributeThermostatACCapacityformat() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedSetback::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCapacityformat::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -101975,10 +104407,10 @@ class SubscribeAttributeThermostatOccupiedSetback : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOccupiedSetbackWithParams:params + [cluster subscribeAttributeACCapacityformatWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OccupiedSetback response %@", [value description]); + NSLog(@"Thermostat.ACCapacityformat response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -101991,35 +104423,37 @@ class SubscribeAttributeThermostatOccupiedSetback : public SubscribeAttribute { } }; +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute OccupiedSetbackMin + * Attribute PresetTypes */ -class ReadThermostatOccupiedSetbackMin : public ReadAttribute { +class ReadThermostatPresetTypes : public ReadAttribute { public: - ReadThermostatOccupiedSetbackMin() - : ReadAttribute("occupied-setback-min") + ReadThermostatPresetTypes() + : ReadAttribute("preset-types") { } - ~ReadThermostatOccupiedSetbackMin() + ~ReadThermostatPresetTypes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedSetbackMin::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::PresetTypes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOccupiedSetbackMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OccupiedSetbackMin response %@", [value description]); + [cluster readAttributePresetTypesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.PresetTypes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat OccupiedSetbackMin read Error", error); + LogNSError("Thermostat PresetTypes read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -102028,21 +104462,21 @@ class ReadThermostatOccupiedSetbackMin : public ReadAttribute { } }; -class SubscribeAttributeThermostatOccupiedSetbackMin : public SubscribeAttribute { +class SubscribeAttributeThermostatPresetTypes : public SubscribeAttribute { public: - SubscribeAttributeThermostatOccupiedSetbackMin() - : SubscribeAttribute("occupied-setback-min") + SubscribeAttributeThermostatPresetTypes() + : SubscribeAttribute("preset-types") { } - ~SubscribeAttributeThermostatOccupiedSetbackMin() + ~SubscribeAttributeThermostatPresetTypes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedSetbackMin::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::PresetTypes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -102057,10 +104491,10 @@ class SubscribeAttributeThermostatOccupiedSetbackMin : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOccupiedSetbackMinWithParams:params + [cluster subscribeAttributePresetTypesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OccupiedSetbackMin response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.PresetTypes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -102073,35 +104507,38 @@ class SubscribeAttributeThermostatOccupiedSetbackMin : public SubscribeAttribute } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute OccupiedSetbackMax + * Attribute ScheduleTypes */ -class ReadThermostatOccupiedSetbackMax : public ReadAttribute { +class ReadThermostatScheduleTypes : public ReadAttribute { public: - ReadThermostatOccupiedSetbackMax() - : ReadAttribute("occupied-setback-max") + ReadThermostatScheduleTypes() + : ReadAttribute("schedule-types") { } - ~ReadThermostatOccupiedSetbackMax() + ~ReadThermostatScheduleTypes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedSetbackMax::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ScheduleTypes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeOccupiedSetbackMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OccupiedSetbackMax response %@", [value description]); + [cluster readAttributeScheduleTypesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ScheduleTypes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat OccupiedSetbackMax read Error", error); + LogNSError("Thermostat ScheduleTypes read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -102110,21 +104547,21 @@ class ReadThermostatOccupiedSetbackMax : public ReadAttribute { } }; -class SubscribeAttributeThermostatOccupiedSetbackMax : public SubscribeAttribute { +class SubscribeAttributeThermostatScheduleTypes : public SubscribeAttribute { public: - SubscribeAttributeThermostatOccupiedSetbackMax() - : SubscribeAttribute("occupied-setback-max") + SubscribeAttributeThermostatScheduleTypes() + : SubscribeAttribute("schedule-types") { } - ~SubscribeAttributeThermostatOccupiedSetbackMax() + ~SubscribeAttributeThermostatScheduleTypes() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::OccupiedSetbackMax::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ScheduleTypes::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -102139,10 +104576,10 @@ class SubscribeAttributeThermostatOccupiedSetbackMax : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeOccupiedSetbackMaxWithParams:params + [cluster subscribeAttributeScheduleTypesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.OccupiedSetbackMax response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ScheduleTypes response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -102155,102 +104592,61 @@ class SubscribeAttributeThermostatOccupiedSetbackMax : public SubscribeAttribute } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute UnoccupiedSetback + * Attribute NumberOfPresets */ -class ReadThermostatUnoccupiedSetback : public ReadAttribute { +class ReadThermostatNumberOfPresets : public ReadAttribute { public: - ReadThermostatUnoccupiedSetback() - : ReadAttribute("unoccupied-setback") + ReadThermostatNumberOfPresets() + : ReadAttribute("number-of-presets") { } - ~ReadThermostatUnoccupiedSetback() + ~ReadThermostatNumberOfPresets() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetback::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::NumberOfPresets::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUnoccupiedSetbackWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.UnoccupiedSetback response %@", [value description]); + [cluster readAttributeNumberOfPresetsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.NumberOfPresets response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat UnoccupiedSetback read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatUnoccupiedSetback : public WriteAttribute { -public: - WriteThermostatUnoccupiedSetback() - : WriteAttribute("unoccupied-setback") - { - AddArgument("attr-name", "unoccupied-setback"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatUnoccupiedSetback() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetback::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 = [[MTRBaseClusterThermostat 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 writeAttributeUnoccupiedSetbackWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat UnoccupiedSetback write Error", error); + LogNSError("Thermostat NumberOfPresets read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - chip::app::DataModel::Nullable mValue; }; -class SubscribeAttributeThermostatUnoccupiedSetback : public SubscribeAttribute { +class SubscribeAttributeThermostatNumberOfPresets : public SubscribeAttribute { public: - SubscribeAttributeThermostatUnoccupiedSetback() - : SubscribeAttribute("unoccupied-setback") + SubscribeAttributeThermostatNumberOfPresets() + : SubscribeAttribute("number-of-presets") { } - ~SubscribeAttributeThermostatUnoccupiedSetback() + ~SubscribeAttributeThermostatNumberOfPresets() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetback::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::NumberOfPresets::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -102265,10 +104661,10 @@ class SubscribeAttributeThermostatUnoccupiedSetback : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUnoccupiedSetbackWithParams:params + [cluster subscribeAttributeNumberOfPresetsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.UnoccupiedSetback response %@", [value description]); + NSLog(@"Thermostat.NumberOfPresets response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -102281,35 +104677,38 @@ class SubscribeAttributeThermostatUnoccupiedSetback : public SubscribeAttribute } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute UnoccupiedSetbackMin + * Attribute NumberOfSchedules */ -class ReadThermostatUnoccupiedSetbackMin : public ReadAttribute { +class ReadThermostatNumberOfSchedules : public ReadAttribute { public: - ReadThermostatUnoccupiedSetbackMin() - : ReadAttribute("unoccupied-setback-min") + ReadThermostatNumberOfSchedules() + : ReadAttribute("number-of-schedules") { } - ~ReadThermostatUnoccupiedSetbackMin() + ~ReadThermostatNumberOfSchedules() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetbackMin::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::NumberOfSchedules::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUnoccupiedSetbackMinWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.UnoccupiedSetbackMin response %@", [value description]); + [cluster readAttributeNumberOfSchedulesWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.NumberOfSchedules response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat UnoccupiedSetbackMin read Error", error); + LogNSError("Thermostat NumberOfSchedules read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -102318,21 +104717,21 @@ class ReadThermostatUnoccupiedSetbackMin : public ReadAttribute { } }; -class SubscribeAttributeThermostatUnoccupiedSetbackMin : public SubscribeAttribute { +class SubscribeAttributeThermostatNumberOfSchedules : public SubscribeAttribute { public: - SubscribeAttributeThermostatUnoccupiedSetbackMin() - : SubscribeAttribute("unoccupied-setback-min") + SubscribeAttributeThermostatNumberOfSchedules() + : SubscribeAttribute("number-of-schedules") { } - ~SubscribeAttributeThermostatUnoccupiedSetbackMin() + ~SubscribeAttributeThermostatNumberOfSchedules() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetbackMin::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::NumberOfSchedules::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -102347,10 +104746,10 @@ class SubscribeAttributeThermostatUnoccupiedSetbackMin : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUnoccupiedSetbackMinWithParams:params + [cluster subscribeAttributeNumberOfSchedulesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.UnoccupiedSetbackMin response %@", [value description]); + NSLog(@"Thermostat.NumberOfSchedules response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -102363,35 +104762,38 @@ class SubscribeAttributeThermostatUnoccupiedSetbackMin : public SubscribeAttribu } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute UnoccupiedSetbackMax + * Attribute NumberOfScheduleTransitions */ -class ReadThermostatUnoccupiedSetbackMax : public ReadAttribute { +class ReadThermostatNumberOfScheduleTransitions : public ReadAttribute { public: - ReadThermostatUnoccupiedSetbackMax() - : ReadAttribute("unoccupied-setback-max") + ReadThermostatNumberOfScheduleTransitions() + : ReadAttribute("number-of-schedule-transitions") { } - ~ReadThermostatUnoccupiedSetbackMax() + ~ReadThermostatNumberOfScheduleTransitions() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetbackMax::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::NumberOfScheduleTransitions::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeUnoccupiedSetbackMaxWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.UnoccupiedSetbackMax response %@", [value description]); + [cluster readAttributeNumberOfScheduleTransitionsWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.NumberOfScheduleTransitions response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat UnoccupiedSetbackMax read Error", error); + LogNSError("Thermostat NumberOfScheduleTransitions read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -102400,21 +104802,21 @@ class ReadThermostatUnoccupiedSetbackMax : public ReadAttribute { } }; -class SubscribeAttributeThermostatUnoccupiedSetbackMax : public SubscribeAttribute { +class SubscribeAttributeThermostatNumberOfScheduleTransitions : public SubscribeAttribute { public: - SubscribeAttributeThermostatUnoccupiedSetbackMax() - : SubscribeAttribute("unoccupied-setback-max") + SubscribeAttributeThermostatNumberOfScheduleTransitions() + : SubscribeAttribute("number-of-schedule-transitions") { } - ~SubscribeAttributeThermostatUnoccupiedSetbackMax() + ~SubscribeAttributeThermostatNumberOfScheduleTransitions() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::UnoccupiedSetbackMax::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::NumberOfScheduleTransitions::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -102429,10 +104831,10 @@ class SubscribeAttributeThermostatUnoccupiedSetbackMax : public SubscribeAttribu if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeUnoccupiedSetbackMaxWithParams:params + [cluster subscribeAttributeNumberOfScheduleTransitionsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.UnoccupiedSetbackMax response %@", [value description]); + NSLog(@"Thermostat.NumberOfScheduleTransitions response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -102445,99 +104847,61 @@ class SubscribeAttributeThermostatUnoccupiedSetbackMax : public SubscribeAttribu } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute EmergencyHeatDelta + * Attribute NumberOfScheduleTransitionPerDay */ -class ReadThermostatEmergencyHeatDelta : public ReadAttribute { +class ReadThermostatNumberOfScheduleTransitionPerDay : public ReadAttribute { public: - ReadThermostatEmergencyHeatDelta() - : ReadAttribute("emergency-heat-delta") + ReadThermostatNumberOfScheduleTransitionPerDay() + : ReadAttribute("number-of-schedule-transition-per-day") { } - ~ReadThermostatEmergencyHeatDelta() + ~ReadThermostatNumberOfScheduleTransitionPerDay() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::EmergencyHeatDelta::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::NumberOfScheduleTransitionPerDay::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeEmergencyHeatDeltaWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.EmergencyHeatDelta response %@", [value description]); + [cluster readAttributeNumberOfScheduleTransitionPerDayWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.NumberOfScheduleTransitionPerDay response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat EmergencyHeatDelta read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatEmergencyHeatDelta : public WriteAttribute { -public: - WriteThermostatEmergencyHeatDelta() - : WriteAttribute("emergency-heat-delta") - { - AddArgument("attr-name", "emergency-heat-delta"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatEmergencyHeatDelta() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::EmergencyHeatDelta::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 = [[MTRBaseClusterThermostat 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 writeAttributeEmergencyHeatDeltaWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat EmergencyHeatDelta write Error", error); + LogNSError("Thermostat NumberOfScheduleTransitionPerDay read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeThermostatEmergencyHeatDelta : public SubscribeAttribute { +class SubscribeAttributeThermostatNumberOfScheduleTransitionPerDay : public SubscribeAttribute { public: - SubscribeAttributeThermostatEmergencyHeatDelta() - : SubscribeAttribute("emergency-heat-delta") + SubscribeAttributeThermostatNumberOfScheduleTransitionPerDay() + : SubscribeAttribute("number-of-schedule-transition-per-day") { } - ~SubscribeAttributeThermostatEmergencyHeatDelta() + ~SubscribeAttributeThermostatNumberOfScheduleTransitionPerDay() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::EmergencyHeatDelta::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::NumberOfScheduleTransitionPerDay::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -102552,10 +104916,10 @@ class SubscribeAttributeThermostatEmergencyHeatDelta : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeEmergencyHeatDeltaWithParams:params + [cluster subscribeAttributeNumberOfScheduleTransitionPerDayWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.EmergencyHeatDelta response %@", [value description]); + NSLog(@"Thermostat.NumberOfScheduleTransitionPerDay response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -102568,99 +104932,61 @@ class SubscribeAttributeThermostatEmergencyHeatDelta : public SubscribeAttribute } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ACType + * Attribute ActivePresetHandle */ -class ReadThermostatACType : public ReadAttribute { +class ReadThermostatActivePresetHandle : public ReadAttribute { public: - ReadThermostatACType() - : ReadAttribute("actype") + ReadThermostatActivePresetHandle() + : ReadAttribute("active-preset-handle") { } - ~ReadThermostatACType() + ~ReadThermostatActivePresetHandle() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACType::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ActivePresetHandle::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeACTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACType response %@", [value description]); + [cluster readAttributeActivePresetHandleWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ActivePresetHandle response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat ACType read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatACType : public WriteAttribute { -public: - WriteThermostatACType() - : WriteAttribute("actype") - { - AddArgument("attr-name", "actype"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatACType() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACType::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 = [[MTRBaseClusterThermostat 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 writeAttributeACTypeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat ACType write Error", error); + LogNSError("Thermostat ActivePresetHandle read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeThermostatACType : public SubscribeAttribute { +class SubscribeAttributeThermostatActivePresetHandle : public SubscribeAttribute { public: - SubscribeAttributeThermostatACType() - : SubscribeAttribute("actype") + SubscribeAttributeThermostatActivePresetHandle() + : SubscribeAttribute("active-preset-handle") { } - ~SubscribeAttributeThermostatACType() + ~SubscribeAttributeThermostatActivePresetHandle() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACType::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ActivePresetHandle::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -102675,10 +105001,10 @@ class SubscribeAttributeThermostatACType : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeACTypeWithParams:params + [cluster subscribeAttributeActivePresetHandleWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACType response %@", [value description]); + reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ActivePresetHandle response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -102691,99 +105017,61 @@ class SubscribeAttributeThermostatACType : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ACCapacity + * Attribute ActiveScheduleHandle */ -class ReadThermostatACCapacity : public ReadAttribute { +class ReadThermostatActiveScheduleHandle : public ReadAttribute { public: - ReadThermostatACCapacity() - : ReadAttribute("accapacity") + ReadThermostatActiveScheduleHandle() + : ReadAttribute("active-schedule-handle") { } - ~ReadThermostatACCapacity() + ~ReadThermostatActiveScheduleHandle() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCapacity::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ActiveScheduleHandle::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeACCapacityWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACCapacity response %@", [value description]); + [cluster readAttributeActiveScheduleHandleWithCompletion:^(NSData * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ActiveScheduleHandle response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat ACCapacity read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatACCapacity : public WriteAttribute { -public: - WriteThermostatACCapacity() - : WriteAttribute("accapacity") - { - AddArgument("attr-name", "accapacity"); - AddArgument("attr-value", 0, UINT16_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatACCapacity() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCapacity::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 = [[MTRBaseClusterThermostat 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 writeAttributeACCapacityWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat ACCapacity write Error", error); + LogNSError("Thermostat ActiveScheduleHandle read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint16_t mValue; }; -class SubscribeAttributeThermostatACCapacity : public SubscribeAttribute { +class SubscribeAttributeThermostatActiveScheduleHandle : public SubscribeAttribute { public: - SubscribeAttributeThermostatACCapacity() - : SubscribeAttribute("accapacity") + SubscribeAttributeThermostatActiveScheduleHandle() + : SubscribeAttribute("active-schedule-handle") { } - ~SubscribeAttributeThermostatACCapacity() + ~SubscribeAttributeThermostatActiveScheduleHandle() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCapacity::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ActiveScheduleHandle::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -102798,10 +105086,10 @@ class SubscribeAttributeThermostatACCapacity : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeACCapacityWithParams:params + [cluster subscribeAttributeActiveScheduleHandleWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACCapacity response %@", [value description]); + reportHandler:^(NSData * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.ActiveScheduleHandle response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -102814,35 +105102,38 @@ class SubscribeAttributeThermostatACCapacity : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ACRefrigerantType + * Attribute Presets */ -class ReadThermostatACRefrigerantType : public ReadAttribute { +class ReadThermostatPresets : public ReadAttribute { public: - ReadThermostatACRefrigerantType() - : ReadAttribute("acrefrigerant-type") + ReadThermostatPresets() + : ReadAttribute("presets") { } - ~ReadThermostatACRefrigerantType() + ~ReadThermostatPresets() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACRefrigerantType::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::Presets::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeACRefrigerantTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACRefrigerantType response %@", [value description]); + [cluster readAttributePresetsWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.Presets response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat ACRefrigerantType read Error", error); + LogNSError("Thermostat Presets read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -102851,24 +105142,25 @@ class ReadThermostatACRefrigerantType : public ReadAttribute { } }; -class WriteThermostatACRefrigerantType : public WriteAttribute { +class WriteThermostatPresets : public WriteAttribute { public: - WriteThermostatACRefrigerantType() - : WriteAttribute("acrefrigerant-type") + WriteThermostatPresets() + : WriteAttribute("presets") + , mComplex(&mValue) { - AddArgument("attr-name", "acrefrigerant-type"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); + AddArgument("attr-name", "presets"); + AddArgument("attr-value", &mComplex); WriteAttribute::AddArguments(); } - ~WriteThermostatACRefrigerantType() + ~WriteThermostatPresets() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACRefrigerantType::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::Presets::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); @@ -102876,11 +105168,50 @@ class WriteThermostatACRefrigerantType : public WriteAttribute { __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]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + for (auto & entry_0 : mValue) { + MTRThermostatClusterPresetStruct * newElement_0; + newElement_0 = [MTRThermostatClusterPresetStruct new]; + if (entry_0.presetHandle.IsNull()) { + newElement_0.presetHandle = nil; + } else { + newElement_0.presetHandle = [NSData dataWithBytes:entry_0.presetHandle.Value().data() length:entry_0.presetHandle.Value().size()]; + } + newElement_0.presetScenario = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.presetScenario)]; + if (entry_0.name.HasValue()) { + if (entry_0.name.Value().IsNull()) { + newElement_0.name = nil; + } else { + newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.Value().Value().data() length:entry_0.name.Value().Value().size() encoding:NSUTF8StringEncoding]; + } + } else { + newElement_0.name = nil; + } + if (entry_0.coolingSetpoint.HasValue()) { + newElement_0.coolingSetpoint = [NSNumber numberWithShort:entry_0.coolingSetpoint.Value()]; + } else { + newElement_0.coolingSetpoint = nil; + } + if (entry_0.heatingSetpoint.HasValue()) { + newElement_0.heatingSetpoint = [NSNumber numberWithShort:entry_0.heatingSetpoint.Value()]; + } else { + newElement_0.heatingSetpoint = nil; + } + if (entry_0.builtIn.IsNull()) { + newElement_0.builtIn = nil; + } else { + newElement_0.builtIn = [NSNumber numberWithBool:entry_0.builtIn.Value()]; + } + [array_0 addObject:newElement_0]; + } + value = array_0; + } - [cluster writeAttributeACRefrigerantTypeWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributePresetsWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("Thermostat ACRefrigerantType write Error", error); + LogNSError("Thermostat Presets write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -102889,24 +105220,25 @@ class WriteThermostatACRefrigerantType : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::List mValue; + TypedComplexArgument> mComplex; }; -class SubscribeAttributeThermostatACRefrigerantType : public SubscribeAttribute { +class SubscribeAttributeThermostatPresets : public SubscribeAttribute { public: - SubscribeAttributeThermostatACRefrigerantType() - : SubscribeAttribute("acrefrigerant-type") + SubscribeAttributeThermostatPresets() + : SubscribeAttribute("presets") { } - ~SubscribeAttributeThermostatACRefrigerantType() + ~SubscribeAttributeThermostatPresets() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACRefrigerantType::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::Presets::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -102921,10 +105253,10 @@ class SubscribeAttributeThermostatACRefrigerantType : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeACRefrigerantTypeWithParams:params + [cluster subscribeAttributePresetsWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACRefrigerantType response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.Presets response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -102937,35 +105269,38 @@ class SubscribeAttributeThermostatACRefrigerantType : public SubscribeAttribute } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ACCompressorType + * Attribute Schedules */ -class ReadThermostatACCompressorType : public ReadAttribute { +class ReadThermostatSchedules : public ReadAttribute { public: - ReadThermostatACCompressorType() - : ReadAttribute("accompressor-type") + ReadThermostatSchedules() + : ReadAttribute("schedules") { } - ~ReadThermostatACCompressorType() + ~ReadThermostatSchedules() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCompressorType::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::Schedules::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeACCompressorTypeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACCompressorType response %@", [value description]); + [cluster readAttributeSchedulesWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.Schedules response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat ACCompressorType read Error", error); + LogNSError("Thermostat Schedules read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -102974,24 +105309,25 @@ class ReadThermostatACCompressorType : public ReadAttribute { } }; -class WriteThermostatACCompressorType : public WriteAttribute { +class WriteThermostatSchedules : public WriteAttribute { public: - WriteThermostatACCompressorType() - : WriteAttribute("accompressor-type") + WriteThermostatSchedules() + : WriteAttribute("schedules") + , mComplex(&mValue) { - AddArgument("attr-name", "accompressor-type"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); + AddArgument("attr-name", "schedules"); + AddArgument("attr-value", &mComplex); WriteAttribute::AddArguments(); } - ~WriteThermostatACCompressorType() + ~WriteThermostatSchedules() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCompressorType::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::Schedules::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); @@ -102999,11 +105335,76 @@ class WriteThermostatACCompressorType : public WriteAttribute { __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]; + NSArray * _Nonnull value; + { // Scope for our temporary variables + auto * array_0 = [NSMutableArray new]; + for (auto & entry_0 : mValue) { + MTRThermostatClusterScheduleStruct * newElement_0; + newElement_0 = [MTRThermostatClusterScheduleStruct new]; + if (entry_0.scheduleHandle.IsNull()) { + newElement_0.scheduleHandle = nil; + } else { + newElement_0.scheduleHandle = [NSData dataWithBytes:entry_0.scheduleHandle.Value().data() length:entry_0.scheduleHandle.Value().size()]; + } + newElement_0.systemMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_0.systemMode)]; + if (entry_0.name.HasValue()) { + newElement_0.name = [[NSString alloc] initWithBytes:entry_0.name.Value().data() length:entry_0.name.Value().size() encoding:NSUTF8StringEncoding]; + } else { + newElement_0.name = nil; + } + if (entry_0.presetHandle.HasValue()) { + newElement_0.presetHandle = [NSData dataWithBytes:entry_0.presetHandle.Value().data() length:entry_0.presetHandle.Value().size()]; + } else { + newElement_0.presetHandle = nil; + } + { // Scope for our temporary variables + auto * array_2 = [NSMutableArray new]; + for (auto & entry_2 : entry_0.transitions) { + MTRThermostatClusterScheduleTransitionStruct * newElement_2; + newElement_2 = [MTRThermostatClusterScheduleTransitionStruct new]; + newElement_2.dayOfWeek = [NSNumber numberWithUnsignedChar:entry_2.dayOfWeek.Raw()]; + newElement_2.transitionTime = [NSNumber numberWithUnsignedShort:entry_2.transitionTime]; + if (entry_2.presetHandle.HasValue()) { + newElement_2.presetHandle = [NSData dataWithBytes:entry_2.presetHandle.Value().data() length:entry_2.presetHandle.Value().size()]; + } else { + newElement_2.presetHandle = nil; + } + if (entry_2.systemMode.HasValue()) { + newElement_2.systemMode = [NSNumber numberWithUnsignedChar:chip::to_underlying(entry_2.systemMode.Value())]; + } else { + newElement_2.systemMode = nil; + } + if (entry_2.coolingSetpoint.HasValue()) { + newElement_2.coolingSetpoint = [NSNumber numberWithShort:entry_2.coolingSetpoint.Value()]; + } else { + newElement_2.coolingSetpoint = nil; + } + if (entry_2.heatingSetpoint.HasValue()) { + newElement_2.heatingSetpoint = [NSNumber numberWithShort:entry_2.heatingSetpoint.Value()]; + } else { + newElement_2.heatingSetpoint = nil; + } + [array_2 addObject:newElement_2]; + } + newElement_0.transitions = array_2; + } + if (entry_0.builtIn.HasValue()) { + if (entry_0.builtIn.Value().IsNull()) { + newElement_0.builtIn = nil; + } else { + newElement_0.builtIn = [NSNumber numberWithBool:entry_0.builtIn.Value().Value()]; + } + } else { + newElement_0.builtIn = nil; + } + [array_0 addObject:newElement_0]; + } + value = array_0; + } - [cluster writeAttributeACCompressorTypeWithValue:value params:params completion:^(NSError * _Nullable error) { + [cluster writeAttributeSchedulesWithValue:value params:params completion:^(NSError * _Nullable error) { if (error != nil) { - LogNSError("Thermostat ACCompressorType write Error", error); + LogNSError("Thermostat Schedules write Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -103012,24 +105413,25 @@ class WriteThermostatACCompressorType : public WriteAttribute { } private: - uint8_t mValue; + chip::app::DataModel::List mValue; + TypedComplexArgument> mComplex; }; -class SubscribeAttributeThermostatACCompressorType : public SubscribeAttribute { +class SubscribeAttributeThermostatSchedules : public SubscribeAttribute { public: - SubscribeAttributeThermostatACCompressorType() - : SubscribeAttribute("accompressor-type") + SubscribeAttributeThermostatSchedules() + : SubscribeAttribute("schedules") { } - ~SubscribeAttributeThermostatACCompressorType() + ~SubscribeAttributeThermostatSchedules() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCompressorType::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::Schedules::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -103044,10 +105446,10 @@ class SubscribeAttributeThermostatACCompressorType : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeACCompressorTypeWithParams:params + [cluster subscribeAttributeSchedulesWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACCompressorType response %@", [value description]); + reportHandler:^(NSArray * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.Schedules response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -103060,99 +105462,61 @@ class SubscribeAttributeThermostatACCompressorType : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ACErrorCode + * Attribute PresetsSchedulesEditable */ -class ReadThermostatACErrorCode : public ReadAttribute { +class ReadThermostatPresetsSchedulesEditable : public ReadAttribute { public: - ReadThermostatACErrorCode() - : ReadAttribute("acerror-code") + ReadThermostatPresetsSchedulesEditable() + : ReadAttribute("presets-schedules-editable") { } - ~ReadThermostatACErrorCode() + ~ReadThermostatPresetsSchedulesEditable() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACErrorCode::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::PresetsSchedulesEditable::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeACErrorCodeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACErrorCode response %@", [value description]); + [cluster readAttributePresetsSchedulesEditableWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.PresetsSchedulesEditable response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat ACErrorCode read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatACErrorCode : public WriteAttribute { -public: - WriteThermostatACErrorCode() - : WriteAttribute("acerror-code") - { - AddArgument("attr-name", "acerror-code"); - AddArgument("attr-value", 0, UINT32_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatACErrorCode() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACErrorCode::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 = [[MTRBaseClusterThermostat 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 numberWithUnsignedInt:mValue]; - - [cluster writeAttributeACErrorCodeWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat ACErrorCode write Error", error); + LogNSError("Thermostat PresetsSchedulesEditable read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint32_t mValue; }; -class SubscribeAttributeThermostatACErrorCode : public SubscribeAttribute { +class SubscribeAttributeThermostatPresetsSchedulesEditable : public SubscribeAttribute { public: - SubscribeAttributeThermostatACErrorCode() - : SubscribeAttribute("acerror-code") + SubscribeAttributeThermostatPresetsSchedulesEditable() + : SubscribeAttribute("presets-schedules-editable") { } - ~SubscribeAttributeThermostatACErrorCode() + ~SubscribeAttributeThermostatPresetsSchedulesEditable() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACErrorCode::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::PresetsSchedulesEditable::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -103167,10 +105531,10 @@ class SubscribeAttributeThermostatACErrorCode : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeACErrorCodeWithParams:params + [cluster subscribeAttributePresetsSchedulesEditableWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACErrorCode response %@", [value description]); + NSLog(@"Thermostat.PresetsSchedulesEditable response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -103183,99 +105547,61 @@ class SubscribeAttributeThermostatACErrorCode : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ACLouverPosition + * Attribute TemperatureSetpointHoldPolicy */ -class ReadThermostatACLouverPosition : public ReadAttribute { +class ReadThermostatTemperatureSetpointHoldPolicy : public ReadAttribute { public: - ReadThermostatACLouverPosition() - : ReadAttribute("aclouver-position") + ReadThermostatTemperatureSetpointHoldPolicy() + : ReadAttribute("temperature-setpoint-hold-policy") { } - ~ReadThermostatACLouverPosition() + ~ReadThermostatTemperatureSetpointHoldPolicy() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACLouverPosition::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::TemperatureSetpointHoldPolicy::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeACLouverPositionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACLouverPosition response %@", [value description]); + [cluster readAttributeTemperatureSetpointHoldPolicyWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.TemperatureSetpointHoldPolicy response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat ACLouverPosition read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatACLouverPosition : public WriteAttribute { -public: - WriteThermostatACLouverPosition() - : WriteAttribute("aclouver-position") - { - AddArgument("attr-name", "aclouver-position"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatACLouverPosition() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACLouverPosition::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 = [[MTRBaseClusterThermostat 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 writeAttributeACLouverPositionWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat ACLouverPosition write Error", error); + LogNSError("Thermostat TemperatureSetpointHoldPolicy read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeThermostatACLouverPosition : public SubscribeAttribute { +class SubscribeAttributeThermostatTemperatureSetpointHoldPolicy : public SubscribeAttribute { public: - SubscribeAttributeThermostatACLouverPosition() - : SubscribeAttribute("aclouver-position") + SubscribeAttributeThermostatTemperatureSetpointHoldPolicy() + : SubscribeAttribute("temperature-setpoint-hold-policy") { } - ~SubscribeAttributeThermostatACLouverPosition() + ~SubscribeAttributeThermostatTemperatureSetpointHoldPolicy() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACLouverPosition::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::TemperatureSetpointHoldPolicy::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -103290,10 +105616,10 @@ class SubscribeAttributeThermostatACLouverPosition : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeACLouverPositionWithParams:params + [cluster subscribeAttributeTemperatureSetpointHoldPolicyWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACLouverPosition response %@", [value description]); + NSLog(@"Thermostat.TemperatureSetpointHoldPolicy response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -103306,35 +105632,38 @@ class SubscribeAttributeThermostatACLouverPosition : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ACCoilTemperature + * Attribute SetpointHoldExpiryTimestamp */ -class ReadThermostatACCoilTemperature : public ReadAttribute { +class ReadThermostatSetpointHoldExpiryTimestamp : public ReadAttribute { public: - ReadThermostatACCoilTemperature() - : ReadAttribute("accoil-temperature") + ReadThermostatSetpointHoldExpiryTimestamp() + : ReadAttribute("setpoint-hold-expiry-timestamp") { } - ~ReadThermostatACCoilTemperature() + ~ReadThermostatSetpointHoldExpiryTimestamp() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCoilTemperature::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::SetpointHoldExpiryTimestamp::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeACCoilTemperatureWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACCoilTemperature response %@", [value description]); + [cluster readAttributeSetpointHoldExpiryTimestampWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.SetpointHoldExpiryTimestamp response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat ACCoilTemperature read Error", error); + LogNSError("Thermostat SetpointHoldExpiryTimestamp read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); @@ -103343,21 +105672,21 @@ class ReadThermostatACCoilTemperature : public ReadAttribute { } }; -class SubscribeAttributeThermostatACCoilTemperature : public SubscribeAttribute { +class SubscribeAttributeThermostatSetpointHoldExpiryTimestamp : public SubscribeAttribute { public: - SubscribeAttributeThermostatACCoilTemperature() - : SubscribeAttribute("accoil-temperature") + SubscribeAttributeThermostatSetpointHoldExpiryTimestamp() + : SubscribeAttribute("setpoint-hold-expiry-timestamp") { } - ~SubscribeAttributeThermostatACCoilTemperature() + ~SubscribeAttributeThermostatSetpointHoldExpiryTimestamp() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCoilTemperature::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::SetpointHoldExpiryTimestamp::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -103372,10 +105701,10 @@ class SubscribeAttributeThermostatACCoilTemperature : public SubscribeAttribute if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeACCoilTemperatureWithParams:params + [cluster subscribeAttributeSetpointHoldExpiryTimestampWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACCoilTemperature response %@", [value description]); + NSLog(@"Thermostat.SetpointHoldExpiryTimestamp response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -103388,99 +105717,61 @@ class SubscribeAttributeThermostatACCoilTemperature : public SubscribeAttribute } }; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + /* - * Attribute ACCapacityformat + * Attribute QueuedPreset */ -class ReadThermostatACCapacityformat : public ReadAttribute { +class ReadThermostatQueuedPreset : public ReadAttribute { public: - ReadThermostatACCapacityformat() - : ReadAttribute("accapacityformat") + ReadThermostatQueuedPreset() + : ReadAttribute("queued-preset") { } - ~ReadThermostatACCapacityformat() + ~ReadThermostatQueuedPreset() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCapacityformat::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::QueuedPreset::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); __auto_type * cluster = [[MTRBaseClusterThermostat alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeACCapacityformatWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACCapacityformat response %@", [value description]); + [cluster readAttributeQueuedPresetWithCompletion:^(MTRThermostatClusterQueuedPresetStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.QueuedPreset response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { - LogNSError("Thermostat ACCapacityformat read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class WriteThermostatACCapacityformat : public WriteAttribute { -public: - WriteThermostatACCapacityformat() - : WriteAttribute("accapacityformat") - { - AddArgument("attr-name", "accapacityformat"); - AddArgument("attr-value", 0, UINT8_MAX, &mValue); - WriteAttribute::AddArguments(); - } - - ~WriteThermostatACCapacityformat() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCapacityformat::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 = [[MTRBaseClusterThermostat 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 writeAttributeACCapacityformatWithValue:value params:params completion:^(NSError * _Nullable error) { - if (error != nil) { - LogNSError("Thermostat ACCapacityformat write Error", error); + LogNSError("Thermostat QueuedPreset read Error", error); RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); } SetCommandExitStatus(error); }]; return CHIP_NO_ERROR; } - -private: - uint8_t mValue; }; -class SubscribeAttributeThermostatACCapacityformat : public SubscribeAttribute { +class SubscribeAttributeThermostatQueuedPreset : public SubscribeAttribute { public: - SubscribeAttributeThermostatACCapacityformat() - : SubscribeAttribute("accapacityformat") + SubscribeAttributeThermostatQueuedPreset() + : SubscribeAttribute("queued-preset") { } - ~SubscribeAttributeThermostatACCapacityformat() + ~SubscribeAttributeThermostatQueuedPreset() { } CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override { constexpr chip::ClusterId clusterId = chip::app::Clusters::Thermostat::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::ACCapacityformat::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::Thermostat::Attributes::QueuedPreset::Id; ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); @@ -103495,10 +105786,10 @@ class SubscribeAttributeThermostatACCapacityformat : public SubscribeAttribute { if (mAutoResubscribe.HasValue()) { params.resubscribeAutomatically = mAutoResubscribe.Value(); } - [cluster subscribeAttributeACCapacityformatWithParams:params + [cluster subscribeAttributeQueuedPresetWithParams:params subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"Thermostat.ACCapacityformat response %@", [value description]); + reportHandler:^(MTRThermostatClusterQueuedPresetStruct * _Nullable value, NSError * _Nullable error) { + NSLog(@"Thermostat.QueuedPreset response %@", [value description]); if (error == nil) { RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); } else { @@ -103511,6 +105802,8 @@ class SubscribeAttributeThermostatACCapacityformat : public SubscribeAttribute { } }; +#endif // MTR_ENABLE_PROVISIONAL + /* * Attribute GeneratedCommandList */ @@ -175552,65 +177845,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; @@ -178458,6 +180692,10 @@ void registerClusterMicrowaveOvenControl(Commands & commands) 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(), // @@ -178474,6 +180712,18 @@ void registerClusterMicrowaveOvenControl(Commands & commands) 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(), // @@ -178601,6 +180851,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 @@ -179808,6 +182161,27 @@ void registerClusterThermostat(Commands & commands) make_unique(), // make_unique(), // make_unique(), // +#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), // @@ -179936,6 +182310,64 @@ void registerClusterThermostat(Commands & commands) 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 +#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(), // + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + 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 make_unique(), // make_unique(), // make_unique(), // @@ -182704,7 +185136,6 @@ void registerClusters(Commands & commands) registerClusterAny(commands); registerClusterIdentify(commands); registerClusterGroups(commands); - registerClusterScenes(commands); registerClusterOnOff(commands); registerClusterOnOffSwitchConfiguration(commands); registerClusterLevelControl(commands); @@ -182760,6 +185191,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];