diff --git a/.github/workflows/examples-linux-arm.yaml b/.github/workflows/examples-linux-arm.yaml index 6b4fcfc8c2ec07..efe0e8191bc2fa 100644 --- a/.github/workflows/examples-linux-arm.yaml +++ b/.github/workflows/examples-linux-arm.yaml @@ -73,7 +73,7 @@ jobs: run: | ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py \ - --target linux-arm64-chip-cert \ + --target linux-arm64-chip-cert-clang \ --target linux-arm64-all-clusters-clang \ --target linux-arm64-chip-tool-ipv6only-clang \ --target linux-arm64-lock-clang \ diff --git a/config/esp32/components/chip/CMakeLists.txt b/config/esp32/components/chip/CMakeLists.txt index d7cb69a6a8fa34..fcd62b8757a36c 100644 --- a/config/esp32/components/chip/CMakeLists.txt +++ b/config/esp32/components/chip/CMakeLists.txt @@ -31,10 +31,10 @@ endif() include(${CMAKE_CURRENT_LIST_DIR}/ota-image.cmake) -set(CHIP_REQURIE_COMPONENTS freertos lwip bt mbedtls fatfs app_update console openthread nvs_flash) +set(CHIP_REQUIRE_COMPONENTS freertos lwip bt mbedtls fatfs app_update console openthread nvs_flash spi_flash) if((NOT "${IDF_TARGET}" STREQUAL "esp32h2") AND (NOT "${IDF_TARGET}" STREQUAL "esp32c2")) - list(APPEND CHIP_REQURIE_COMPONENTS mdns) + list(APPEND CHIP_REQUIRE_COMPONENTS mdns) endif() if (NOT CMAKE_BUILD_EARLY_EXPANSION) @@ -49,7 +49,7 @@ if (NOT CMAKE_BUILD_EARLY_EXPANSION) endif() idf_component_register(SRCS chip.c chip.cpp - PRIV_REQUIRES ${CHIP_REQURIE_COMPONENTS}) + PRIV_REQUIRES ${CHIP_REQUIRE_COMPONENTS}) # Prepare initial args file (lacking compile flags) # This will be saved as args.gn.in diff --git a/config/esp32/components/chip/Kconfig b/config/esp32/components/chip/Kconfig index dea6109649232f..34b2e0fb043345 100644 --- a/config/esp32/components/chip/Kconfig +++ b/config/esp32/components/chip/Kconfig @@ -673,7 +673,7 @@ menu "CHIP Device Layer" config ENABLE_ESP32_LOCATIONCAPABILITY depends on ENABLE_ESP32_FACTORY_DATA_PROVIDER - bool "Enable ESP32 Device LocationCapability " + bool "Enable ESP32 Device LocationCapability" default n help Enable ESP32 Device LocationCapability diff --git a/config/esp32/components/chip/idf_component.yml b/config/esp32/components/chip/idf_component.yml new file mode 100644 index 00000000000000..e47917975ce13d --- /dev/null +++ b/config/esp32/components/chip/idf_component.yml @@ -0,0 +1,6 @@ +## IDF Component Manager Manifest File +dependencies: + espressif/mdns: + version: "^1.0.3" + rules: + - if: "idf_version >=5.0" 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 630661d8f4cd85..6b121545e8db80 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 @@ -108,17 +108,21 @@ server cluster Groups = 4 { } server cluster Scenes = 5 { + bitmap SceneFeatures : BITMAP32 { + kSceneNames = 0x1; + } + bitmap ScenesCopyMode : BITMAP8 { kCopyAllScenes = 0x1; } struct ExtensionFieldSet { - cluster_id clusterId = 0; + cluster_id clusterID = 0; AttributeValuePair attributeValueList[] = 1; } struct AttributeValuePair { - optional attrib_id attributeId = 0; + optional attrib_id attributeID = 0; int8u attributeValue[] = 1; } @@ -131,52 +135,52 @@ server cluster Scenes = 5 { readonly attribute int16u clusterRevision = 65533; request struct AddSceneRequest { - group_id groupId = 0; - INT8U sceneId = 1; + group_id groupID = 0; + INT8U sceneID = 1; INT16U transitionTime = 2; CHAR_STRING sceneName = 3; ExtensionFieldSet extensionFieldSets[] = 4; } request struct ViewSceneRequest { - group_id groupId = 0; - INT8U sceneId = 1; + group_id groupID = 0; + INT8U sceneID = 1; } request struct RemoveSceneRequest { - group_id groupId = 0; - INT8U sceneId = 1; + group_id groupID = 0; + INT8U sceneID = 1; } request struct RemoveAllScenesRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct StoreSceneRequest { - group_id groupId = 0; - INT8U sceneId = 1; + group_id groupID = 0; + INT8U sceneID = 1; } request struct RecallSceneRequest { - group_id groupId = 0; - INT8U sceneId = 1; + group_id groupID = 0; + INT8U sceneID = 1; optional nullable INT16U transitionTime = 2; } request struct GetSceneMembershipRequest { - group_id groupId = 0; + group_id groupID = 0; } response struct AddSceneResponse = 0 { ENUM8 status = 0; - group_id groupId = 1; - INT8U sceneId = 2; + group_id groupID = 1; + INT8U sceneID = 2; } response struct ViewSceneResponse = 1 { ENUM8 status = 0; - group_id groupId = 1; - INT8U sceneId = 2; + group_id groupID = 1; + INT8U sceneID = 2; optional INT16U transitionTime = 3; optional CHAR_STRING sceneName = 4; optional ExtensionFieldSet extensionFieldSets[] = 5; @@ -184,25 +188,25 @@ server cluster Scenes = 5 { response struct RemoveSceneResponse = 2 { ENUM8 status = 0; - group_id groupId = 1; - INT8U sceneId = 2; + group_id groupID = 1; + INT8U sceneID = 2; } response struct RemoveAllScenesResponse = 3 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } response struct StoreSceneResponse = 4 { ENUM8 status = 0; - group_id groupId = 1; - INT8U sceneId = 2; + group_id groupID = 1; + INT8U sceneID = 2; } response struct GetSceneMembershipResponse = 6 { ENUM8 status = 0; nullable INT8U capacity = 1; - group_id groupId = 2; + group_id groupID = 2; optional INT8U sceneList[] = 3; } @@ -245,10 +249,6 @@ client cluster OnOff = 6 { kLighting = 0x1; } - bitmap SceneFeatures : BITMAP32 { - kSceneNames = 0x1; - } - readonly attribute boolean onOff = 0; readonly attribute boolean globalSceneControl = 16384; attribute int16u onTime = 16385; @@ -292,10 +292,6 @@ server cluster OnOff = 6 { kLighting = 0x1; } - bitmap SceneFeatures : BITMAP32 { - kSceneNames = 0x1; - } - readonly attribute boolean onOff = 0; readonly attribute boolean globalSceneControl = 16384; attribute int16u onTime = 16385; @@ -2665,9 +2661,9 @@ server cluster PumpConfigurationAndControl = 512 { server cluster Thermostat = 513 { enum SetpointAdjustMode : ENUM8 { - kHeatSetpoint = 0; - kCoolSetpoint = 1; - kHeatAndCoolSetpoints = 2; + kHeat = 0; + kCool = 1; + kBoth = 2; } enum ThermostatControlSequence : ENUM8 { @@ -2690,9 +2686,11 @@ server cluster Thermostat = 513 { kAuto = 1; kCool = 3; kHeat = 4; - kEmergencyHeating = 5; + kEmergencyHeat = 5; kPrecooling = 6; kFanOnly = 7; + kDry = 8; + kSleep = 9; } bitmap DayOfWeek : BITMAP8 { @@ -2703,21 +2701,21 @@ server cluster Thermostat = 513 { kThursday = 0x10; kFriday = 0x20; kSaturday = 0x40; - kAwayOrVacation = 0x80; + kAway = 0x80; } bitmap ModeForSequence : BITMAP8 { - kHeatSetpointFieldPresent = 0x1; - kCoolSetpointFieldPresent = 0x2; + kHeatSetpointPresent = 0x1; + kCoolSetpointPresent = 0x2; } bitmap ThermostatFeature : BITMAP32 { kHeating = 0x1; kCooling = 0x2; kOccupancy = 0x4; - kSchedule = 0x8; + kScheduleConfiguration = 0x8; kSetback = 0x10; - kAutomode = 0x20; + kAutoMode = 0x20; } struct ThermostatScheduleTransition { diff --git a/examples/all-clusters-app/ameba/main/include/ThermostatCommands.h b/examples/all-clusters-app/ameba/main/include/ThermostatCommands.h index c1444bf332c0ab..31ff5098869680 100644 --- a/examples/all-clusters-app/ameba/main/include/ThermostatCommands.h +++ b/examples/all-clusters-app/ameba/main/include/ThermostatCommands.h @@ -154,7 +154,7 @@ void ProcessThermostatUnicastBindingCommand(BindingCommandData * data, const Emb switch (data->commandId) { case Clusters::Thermostat::Commands::SetpointRaiseLower::Id: - setpointRaiseLowerCommand.mode = static_cast(data->args[0]); + setpointRaiseLowerCommand.mode = static_cast(data->args[0]); setpointRaiseLowerCommand.amount = static_cast(data->args[1]); Controller::InvokeCommandRequest(peer_device->GetExchangeManager(), peer_device->GetSecureSession().Value(), binding.remote, setpointRaiseLowerCommand, onSuccess, onFailure); @@ -171,7 +171,7 @@ void ProcessThermostatGroupBindingCommand(BindingCommandData * data, const Ember switch (data->commandId) { case Clusters::Thermostat::Commands::SetpointRaiseLower::Id: - setpointRaiseLowerCommand.mode = static_cast(data->args[0]); + setpointRaiseLowerCommand.mode = static_cast(data->args[0]); setpointRaiseLowerCommand.amount = static_cast(data->args[1]); Controller::InvokeGroupCommandRequest(&exchangeMgr, binding.fabricIndex, binding.groupId, setpointRaiseLowerCommand); break; 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 6f9667a26450e3..a600995b60cdfa 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 @@ -107,17 +107,21 @@ server cluster Groups = 4 { } server cluster Scenes = 5 { + bitmap SceneFeatures : BITMAP32 { + kSceneNames = 0x1; + } + bitmap ScenesCopyMode : BITMAP8 { kCopyAllScenes = 0x1; } struct ExtensionFieldSet { - cluster_id clusterId = 0; + cluster_id clusterID = 0; AttributeValuePair attributeValueList[] = 1; } struct AttributeValuePair { - optional attrib_id attributeId = 0; + optional attrib_id attributeID = 0; int8u attributeValue[] = 1; } @@ -130,52 +134,52 @@ server cluster Scenes = 5 { readonly attribute int16u clusterRevision = 65533; request struct AddSceneRequest { - group_id groupId = 0; - INT8U sceneId = 1; + group_id groupID = 0; + INT8U sceneID = 1; INT16U transitionTime = 2; CHAR_STRING sceneName = 3; ExtensionFieldSet extensionFieldSets[] = 4; } request struct ViewSceneRequest { - group_id groupId = 0; - INT8U sceneId = 1; + group_id groupID = 0; + INT8U sceneID = 1; } request struct RemoveSceneRequest { - group_id groupId = 0; - INT8U sceneId = 1; + group_id groupID = 0; + INT8U sceneID = 1; } request struct RemoveAllScenesRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct StoreSceneRequest { - group_id groupId = 0; - INT8U sceneId = 1; + group_id groupID = 0; + INT8U sceneID = 1; } request struct RecallSceneRequest { - group_id groupId = 0; - INT8U sceneId = 1; + group_id groupID = 0; + INT8U sceneID = 1; optional nullable INT16U transitionTime = 2; } request struct GetSceneMembershipRequest { - group_id groupId = 0; + group_id groupID = 0; } response struct AddSceneResponse = 0 { ENUM8 status = 0; - group_id groupId = 1; - INT8U sceneId = 2; + group_id groupID = 1; + INT8U sceneID = 2; } response struct ViewSceneResponse = 1 { ENUM8 status = 0; - group_id groupId = 1; - INT8U sceneId = 2; + group_id groupID = 1; + INT8U sceneID = 2; optional INT16U transitionTime = 3; optional CHAR_STRING sceneName = 4; optional ExtensionFieldSet extensionFieldSets[] = 5; @@ -183,25 +187,25 @@ server cluster Scenes = 5 { response struct RemoveSceneResponse = 2 { ENUM8 status = 0; - group_id groupId = 1; - INT8U sceneId = 2; + group_id groupID = 1; + INT8U sceneID = 2; } response struct RemoveAllScenesResponse = 3 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } response struct StoreSceneResponse = 4 { ENUM8 status = 0; - group_id groupId = 1; - INT8U sceneId = 2; + group_id groupID = 1; + INT8U sceneID = 2; } response struct GetSceneMembershipResponse = 6 { ENUM8 status = 0; nullable INT8U capacity = 1; - group_id groupId = 2; + group_id groupID = 2; optional INT8U sceneList[] = 3; } @@ -244,10 +248,6 @@ server cluster OnOff = 6 { kLighting = 0x1; } - bitmap SceneFeatures : BITMAP32 { - kSceneNames = 0x1; - } - readonly attribute boolean onOff = 0; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; @@ -2262,9 +2262,9 @@ server cluster PumpConfigurationAndControl = 512 { server cluster Thermostat = 513 { enum SetpointAdjustMode : ENUM8 { - kHeatSetpoint = 0; - kCoolSetpoint = 1; - kHeatAndCoolSetpoints = 2; + kHeat = 0; + kCool = 1; + kBoth = 2; } enum ThermostatControlSequence : ENUM8 { @@ -2287,9 +2287,11 @@ server cluster Thermostat = 513 { kAuto = 1; kCool = 3; kHeat = 4; - kEmergencyHeating = 5; + kEmergencyHeat = 5; kPrecooling = 6; kFanOnly = 7; + kDry = 8; + kSleep = 9; } bitmap DayOfWeek : BITMAP8 { @@ -2300,21 +2302,21 @@ server cluster Thermostat = 513 { kThursday = 0x10; kFriday = 0x20; kSaturday = 0x40; - kAwayOrVacation = 0x80; + kAway = 0x80; } bitmap ModeForSequence : BITMAP8 { - kHeatSetpointFieldPresent = 0x1; - kCoolSetpointFieldPresent = 0x2; + kHeatSetpointPresent = 0x1; + kCoolSetpointPresent = 0x2; } bitmap ThermostatFeature : BITMAP32 { kHeating = 0x1; kCooling = 0x2; kOccupancy = 0x4; - kSchedule = 0x8; + kScheduleConfiguration = 0x8; kSetback = 0x10; - kAutomode = 0x20; + kAutoMode = 0x20; } struct ThermostatScheduleTransition { diff --git a/examples/bridge-app/bridge-common/bridge-app.matter b/examples/bridge-app/bridge-common/bridge-app.matter index 9ad049a62dd53c..12d4bf0330abc9 100644 --- a/examples/bridge-app/bridge-common/bridge-app.matter +++ b/examples/bridge-app/bridge-common/bridge-app.matter @@ -75,10 +75,6 @@ server cluster OnOff = 6 { kLighting = 0x1; } - bitmap SceneFeatures : BITMAP32 { - kSceneNames = 0x1; - } - readonly attribute boolean onOff = 0; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter index 050a119036d258..074abc58c8897f 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter @@ -132,10 +132,6 @@ server cluster OnOff = 6 { kLighting = 0x1; } - bitmap SceneFeatures : BITMAP32 { - kSceneNames = 0x1; - } - readonly attribute boolean onOff = 0; readonly attribute boolean globalSceneControl = 16384; attribute int16u onTime = 16385; diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter index a73febd35b22ab..37ddc92e299bcd 100644 --- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter +++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter @@ -138,10 +138,6 @@ server cluster OnOff = 6 { kLighting = 0x1; } - bitmap SceneFeatures : BITMAP32 { - kSceneNames = 0x1; - } - readonly nosubscribe attribute boolean onOff = 0; readonly attribute boolean globalSceneControl = 16384; attribute int16u onTime = 16385; diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter index 5f2806abc28224..45473a2e4140b3 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter @@ -132,10 +132,6 @@ server cluster OnOff = 6 { kLighting = 0x1; } - bitmap SceneFeatures : BITMAP32 { - kSceneNames = 0x1; - } - readonly attribute boolean onOff = 0; readonly attribute boolean globalSceneControl = 16384; attribute int16u onTime = 16385; diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter index 29a4b8ca37a86c..a2520e905c4478 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter @@ -132,10 +132,6 @@ server cluster OnOff = 6 { kLighting = 0x1; } - bitmap SceneFeatures : BITMAP32 { - kSceneNames = 0x1; - } - readonly attribute boolean onOff = 0; readonly attribute boolean globalSceneControl = 16384; attribute int16u onTime = 16385; diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter index b97b9c5f6ba28a..f2d7633500a71d 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter @@ -132,10 +132,6 @@ server cluster OnOff = 6 { kLighting = 0x1; } - bitmap SceneFeatures : BITMAP32 { - kSceneNames = 0x1; - } - readonly attribute boolean onOff = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -1171,9 +1167,9 @@ server cluster FixedLabel = 64 { client cluster Thermostat = 513 { enum SetpointAdjustMode : ENUM8 { - kHeatSetpoint = 0; - kCoolSetpoint = 1; - kHeatAndCoolSetpoints = 2; + kHeat = 0; + kCool = 1; + kBoth = 2; } enum ThermostatControlSequence : ENUM8 { @@ -1196,9 +1192,11 @@ client cluster Thermostat = 513 { kAuto = 1; kCool = 3; kHeat = 4; - kEmergencyHeating = 5; + kEmergencyHeat = 5; kPrecooling = 6; kFanOnly = 7; + kDry = 8; + kSleep = 9; } bitmap DayOfWeek : BITMAP8 { @@ -1209,21 +1207,21 @@ client cluster Thermostat = 513 { kThursday = 0x10; kFriday = 0x20; kSaturday = 0x40; - kAwayOrVacation = 0x80; + kAway = 0x80; } bitmap ModeForSequence : BITMAP8 { - kHeatSetpointFieldPresent = 0x1; - kCoolSetpointFieldPresent = 0x2; + kHeatSetpointPresent = 0x1; + kCoolSetpointPresent = 0x2; } bitmap ThermostatFeature : BITMAP32 { kHeating = 0x1; kCooling = 0x2; kOccupancy = 0x4; - kSchedule = 0x8; + kScheduleConfiguration = 0x8; kSetback = 0x10; - kAutomode = 0x20; + kAutoMode = 0x20; } readonly attribute nullable int16s localTemperature = 0; diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter index 580ace00aef332..4a2bf2810685a4 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter @@ -132,10 +132,6 @@ server cluster OnOff = 6 { kLighting = 0x1; } - bitmap SceneFeatures : BITMAP32 { - kSceneNames = 0x1; - } - readonly attribute boolean onOff = 0; readonly attribute boolean globalSceneControl = 16384; attribute int16u onTime = 16385; diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter index 277af201cfc145..861c60deef8bef 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter @@ -132,10 +132,6 @@ client cluster OnOff = 6 { kLighting = 0x1; } - bitmap SceneFeatures : BITMAP32 { - kSceneNames = 0x1; - } - readonly attribute boolean onOff = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; @@ -178,10 +174,6 @@ server cluster OnOff = 6 { kLighting = 0x1; } - bitmap SceneFeatures : BITMAP32 { - kSceneNames = 0x1; - } - readonly attribute boolean onOff = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter index 22a24464488aa5..237b62a61af864 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter @@ -132,10 +132,6 @@ server cluster OnOff = 6 { kLighting = 0x1; } - bitmap SceneFeatures : BITMAP32 { - kSceneNames = 0x1; - } - readonly attribute boolean onOff = 0; readonly attribute boolean globalSceneControl = 16384; attribute int16u onTime = 16385; diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter index 23b37a6390cf72..71a51a8ad27c61 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter @@ -129,10 +129,6 @@ server cluster OnOff = 6 { kLighting = 0x1; } - bitmap SceneFeatures : BITMAP32 { - kSceneNames = 0x1; - } - readonly attribute boolean onOff = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter index 3ffcc2edca87a6..5c255f0f39dfff 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter @@ -1029,9 +1029,9 @@ server cluster FixedLabel = 64 { server cluster Thermostat = 513 { enum SetpointAdjustMode : ENUM8 { - kHeatSetpoint = 0; - kCoolSetpoint = 1; - kHeatAndCoolSetpoints = 2; + kHeat = 0; + kCool = 1; + kBoth = 2; } enum ThermostatControlSequence : ENUM8 { @@ -1054,9 +1054,11 @@ server cluster Thermostat = 513 { kAuto = 1; kCool = 3; kHeat = 4; - kEmergencyHeating = 5; + kEmergencyHeat = 5; kPrecooling = 6; kFanOnly = 7; + kDry = 8; + kSleep = 9; } bitmap DayOfWeek : BITMAP8 { @@ -1067,21 +1069,21 @@ server cluster Thermostat = 513 { kThursday = 0x10; kFriday = 0x20; kSaturday = 0x40; - kAwayOrVacation = 0x80; + kAway = 0x80; } bitmap ModeForSequence : BITMAP8 { - kHeatSetpointFieldPresent = 0x1; - kCoolSetpointFieldPresent = 0x2; + kHeatSetpointPresent = 0x1; + kCoolSetpointPresent = 0x2; } bitmap ThermostatFeature : BITMAP32 { kHeating = 0x1; kCooling = 0x2; kOccupancy = 0x4; - kSchedule = 0x8; + kScheduleConfiguration = 0x8; kSetback = 0x10; - kAutomode = 0x20; + kAutoMode = 0x20; } readonly attribute nullable int16s localTemperature = 0; diff --git a/examples/chip-tool/BUILD.gn b/examples/chip-tool/BUILD.gn index 76ec22f40c8223..97df8a48b5051d 100644 --- a/examples/chip-tool/BUILD.gn +++ b/examples/chip-tool/BUILD.gn @@ -28,6 +28,7 @@ assert(chip_build_tools) config("config") { include_dirs = [ ".", + "${chip_root}/examples/common", "${chip_root}/zzz_generated/app-common/app-common", "${chip_root}/zzz_generated/chip-tool", "${chip_root}/src/lib", @@ -87,13 +88,11 @@ static_library("chip-tool-utils") { deps = [] if (config_use_interactive_mode) { - sources += [ - "commands/interactive/InteractiveCommands.cpp", - "commands/interactive/WebSocketServer.cpp", - "commands/interactive/WebSocketServer.h", - "commands/interactive/WebSocketServerDelegate.h", + sources += [ "commands/interactive/InteractiveCommands.cpp" ] + deps += [ + "${chip_root}/examples/common/websocket-server", + "${editline_root}:editline", ] - deps += [ "${editline_root}:editline" ] } if (config_enable_yaml_tests) { @@ -116,7 +115,6 @@ static_library("chip-tool-utils") { "${chip_root}/src/platform", "${chip_root}/third_party/inipp", "${chip_root}/third_party/jsoncpp", - "${chip_root}/third_party/libwebsockets", ] public_configs = [ ":config" ] diff --git a/examples/chip-tool/commands/common/Commands.cpp b/examples/chip-tool/commands/common/Commands.cpp index 1b22c681deabda..fb675ee96acb4d 100644 --- a/examples/chip-tool/commands/common/Commands.cpp +++ b/examples/chip-tool/commands/common/Commands.cpp @@ -118,12 +118,16 @@ int Commands::RunInteractive(const char * command) char * argv[kInteractiveModeArgumentsMaxLength] = {}; argv[argc++] = kInteractiveModeName; + std::string commandStr; for (auto & arg : arguments) { argv[argc] = new char[arg.size() + 1]; strcpy(argv[argc++], arg.c_str()); + commandStr += arg; + commandStr += " "; } + ChipLogProgress(chipTool, "Command: %s", commandStr.c_str()); auto err = RunCommand(argc, argv, true); // Do not delete arg[0] diff --git a/examples/chip-tool/commands/interactive/InteractiveCommands.h b/examples/chip-tool/commands/interactive/InteractiveCommands.h index 5e611e6895d2b2..49e6432ccb7f01 100644 --- a/examples/chip-tool/commands/interactive/InteractiveCommands.h +++ b/examples/chip-tool/commands/interactive/InteractiveCommands.h @@ -22,7 +22,7 @@ #include "../common/CHIPCommand.h" #include "../common/Commands.h" -#include "WebSocketServer.h" +#include class Commands; diff --git a/examples/chip-tool/commands/pairing/PairingCommand.cpp b/examples/chip-tool/commands/pairing/PairingCommand.cpp index 9c185024ad2075..ec8deb76a6081f 100644 --- a/examples/chip-tool/commands/pairing/PairingCommand.cpp +++ b/examples/chip-tool/commands/pairing/PairingCommand.cpp @@ -72,6 +72,10 @@ CommissioningParameters PairingCommand::GetCommissioningParameters() { auto params = CommissioningParameters(); params.SetSkipCommissioningComplete(mSkipCommissioningComplete.ValueOr(false)); + if (mBypassAttestationVerifier.ValueOr(false)) + { + params.SetDeviceAttestationDelegate(this); + } switch (mNetworkType) { @@ -281,3 +285,19 @@ void PairingCommand::OnCurrentFabricRemove(void * context, NodeId nodeId, CHIP_E command->SetCommandExitStatus(err); } + +chip::Optional PairingCommand::FailSafeExpiryTimeoutSecs() const +{ + // We don't need to set additional failsafe timeout as we don't ask the final user if he wants to continue + return chip::Optional(); +} + +void PairingCommand::OnDeviceAttestationCompleted(chip::Controller::DeviceCommissioner * deviceCommissioner, + chip::DeviceProxy * device, + const chip::Credentials::DeviceAttestationVerifier::AttestationDeviceInfo & info, + chip::Credentials::AttestationVerificationResult attestationResult) +{ + // Bypass attestation verification, continue with success + deviceCommissioner->ContinueCommissioningAfterDeviceAttestation(device, + chip::Credentials::AttestationVerificationResult::kSuccess); +} diff --git a/examples/chip-tool/commands/pairing/PairingCommand.h b/examples/chip-tool/commands/pairing/PairingCommand.h index 4919ec89de8ad1..142a09013806af 100644 --- a/examples/chip-tool/commands/pairing/PairingCommand.h +++ b/examples/chip-tool/commands/pairing/PairingCommand.h @@ -48,7 +48,8 @@ enum class PairingNetworkType class PairingCommand : public CHIPCommand, public chip::Controller::DevicePairingDelegate, - public chip::Controller::DeviceDiscoveryDelegate + public chip::Controller::DeviceDiscoveryDelegate, + public chip::Credentials::DeviceAttestationDelegate { public: PairingCommand(const char * commandName, PairingMode mode, PairingNetworkType networkType, @@ -60,6 +61,9 @@ class PairingCommand : public CHIPCommand, mCurrentFabricRemoveCallback(OnCurrentFabricRemove, this) { AddArgument("node-id", 0, UINT64_MAX, &mNodeId); + AddArgument("bypass-attestation-verifier", 0, 1, &mBypassAttestationVerifier, + "Bypass the attestation verifier. If not provided or false, the attestation verifier is not bypassed." + " If true, the commissioning will continue in case of attestation verification failure."); switch (networkType) { @@ -158,6 +162,12 @@ class PairingCommand : public CHIPCommand, void OnDiscoveredDevice(const chip::Dnssd::DiscoveredNodeData & nodeData) override; bool IsDiscoverOnce() { return mDiscoverOnce.ValueOr(false); } + /////////// DeviceAttestationDelegate ///////// + chip::Optional FailSafeExpiryTimeoutSecs() const override; + void OnDeviceAttestationCompleted(chip::Controller::DeviceCommissioner * deviceCommissioner, chip::DeviceProxy * device, + const chip::Credentials::DeviceAttestationVerifier::AttestationDeviceInfo & info, + chip::Credentials::AttestationVerificationResult attestationResult) override; + private: CHIP_ERROR RunInternal(NodeId remoteId); CHIP_ERROR Pair(NodeId remoteId, PeerAddress address); @@ -177,6 +187,7 @@ class PairingCommand : public CHIPCommand, chip::Optional mUseOnlyOnNetworkDiscovery; chip::Optional mPaseOnly; chip::Optional mSkipCommissioningComplete; + chip::Optional mBypassAttestationVerifier; uint16_t mRemotePort; uint16_t mDiscriminator; uint32_t mSetupPINCode; diff --git a/examples/common/websocket-server/BUILD.gn b/examples/common/websocket-server/BUILD.gn new file mode 100644 index 00000000000000..fdd17300cecd06 --- /dev/null +++ b/examples/common/websocket-server/BUILD.gn @@ -0,0 +1,31 @@ +# 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. + +import("//build_overrides/build.gni") +import("//build_overrides/chip.gni") + +static_library("websocket-server") { + output_name = "libWebSocketServer" + + sources = [ + "WebSocketServer.cpp", + "WebSocketServer.h", + "WebSocketServerDelegate.h", + ] + + public_deps = [ + "${chip_root}/src/lib/support", + "${chip_root}/third_party/libwebsockets", + ] +} diff --git a/examples/chip-tool/commands/interactive/WebSocketServer.cpp b/examples/common/websocket-server/WebSocketServer.cpp similarity index 99% rename from examples/chip-tool/commands/interactive/WebSocketServer.cpp rename to examples/common/websocket-server/WebSocketServer.cpp index a41754716ae961..867180b976c012 100644 --- a/examples/chip-tool/commands/interactive/WebSocketServer.cpp +++ b/examples/common/websocket-server/WebSocketServer.cpp @@ -19,6 +19,7 @@ #include "WebSocketServer.h" #include +#include constexpr uint16_t kDefaultWebSocketServerPort = 9002; constexpr uint16_t kMaxMessageBufferLen = 8192; diff --git a/examples/chip-tool/commands/interactive/WebSocketServer.h b/examples/common/websocket-server/WebSocketServer.h similarity index 97% rename from examples/chip-tool/commands/interactive/WebSocketServer.h rename to examples/common/websocket-server/WebSocketServer.h index d18b68bee2b611..712cf185d8f4a0 100644 --- a/examples/chip-tool/commands/interactive/WebSocketServer.h +++ b/examples/common/websocket-server/WebSocketServer.h @@ -22,7 +22,6 @@ #include #include -#include class WebSocketServer { diff --git a/examples/chip-tool/commands/interactive/WebSocketServerDelegate.h b/examples/common/websocket-server/WebSocketServerDelegate.h similarity index 100% rename from examples/chip-tool/commands/interactive/WebSocketServerDelegate.h rename to examples/common/websocket-server/WebSocketServerDelegate.h diff --git a/examples/dynamic-bridge-app/bridge-common/bridge-app.matter b/examples/dynamic-bridge-app/bridge-common/bridge-app.matter index 9ad049a62dd53c..12d4bf0330abc9 100644 --- a/examples/dynamic-bridge-app/bridge-common/bridge-app.matter +++ b/examples/dynamic-bridge-app/bridge-common/bridge-app.matter @@ -75,10 +75,6 @@ server cluster OnOff = 6 { kLighting = 0x1; } - bitmap SceneFeatures : BITMAP32 { - kSceneNames = 0x1; - } - readonly attribute boolean onOff = 0; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; 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 5809b1a6b1ca41..80ce834e080870 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 @@ -143,17 +143,21 @@ server cluster Groups = 4 { } client cluster Scenes = 5 { + bitmap SceneFeatures : BITMAP32 { + kSceneNames = 0x1; + } + bitmap ScenesCopyMode : BITMAP8 { kCopyAllScenes = 0x1; } struct ExtensionFieldSet { - cluster_id clusterId = 0; + cluster_id clusterID = 0; AttributeValuePair attributeValueList[] = 1; } struct AttributeValuePair { - optional attrib_id attributeId = 0; + optional attrib_id attributeID = 0; int8u attributeValue[] = 1; } @@ -166,52 +170,52 @@ client cluster Scenes = 5 { readonly attribute int16u clusterRevision = 65533; request struct AddSceneRequest { - group_id groupId = 0; - INT8U sceneId = 1; + group_id groupID = 0; + INT8U sceneID = 1; INT16U transitionTime = 2; CHAR_STRING sceneName = 3; ExtensionFieldSet extensionFieldSets[] = 4; } request struct ViewSceneRequest { - group_id groupId = 0; - INT8U sceneId = 1; + group_id groupID = 0; + INT8U sceneID = 1; } request struct RemoveSceneRequest { - group_id groupId = 0; - INT8U sceneId = 1; + group_id groupID = 0; + INT8U sceneID = 1; } request struct RemoveAllScenesRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct StoreSceneRequest { - group_id groupId = 0; - INT8U sceneId = 1; + group_id groupID = 0; + INT8U sceneID = 1; } request struct RecallSceneRequest { - group_id groupId = 0; - INT8U sceneId = 1; + group_id groupID = 0; + INT8U sceneID = 1; optional nullable INT16U transitionTime = 2; } request struct GetSceneMembershipRequest { - group_id groupId = 0; + group_id groupID = 0; } response struct AddSceneResponse = 0 { ENUM8 status = 0; - group_id groupId = 1; - INT8U sceneId = 2; + group_id groupID = 1; + INT8U sceneID = 2; } response struct ViewSceneResponse = 1 { ENUM8 status = 0; - group_id groupId = 1; - INT8U sceneId = 2; + group_id groupID = 1; + INT8U sceneID = 2; optional INT16U transitionTime = 3; optional CHAR_STRING sceneName = 4; optional ExtensionFieldSet extensionFieldSets[] = 5; @@ -219,25 +223,25 @@ client cluster Scenes = 5 { response struct RemoveSceneResponse = 2 { ENUM8 status = 0; - group_id groupId = 1; - INT8U sceneId = 2; + group_id groupID = 1; + INT8U sceneID = 2; } response struct RemoveAllScenesResponse = 3 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } response struct StoreSceneResponse = 4 { ENUM8 status = 0; - group_id groupId = 1; - INT8U sceneId = 2; + group_id groupID = 1; + INT8U sceneID = 2; } response struct GetSceneMembershipResponse = 6 { ENUM8 status = 0; nullable INT8U capacity = 1; - group_id groupId = 2; + group_id groupID = 2; optional INT8U sceneList[] = 3; } @@ -280,10 +284,6 @@ client cluster OnOff = 6 { kLighting = 0x1; } - bitmap SceneFeatures : BITMAP32 { - kSceneNames = 0x1; - } - readonly attribute boolean onOff = 0; readonly attribute boolean globalSceneControl = 16384; attribute int16u onTime = 16385; diff --git a/examples/lighting-app/esp32/CMakeLists.txt b/examples/lighting-app/esp32/CMakeLists.txt index 746f70379ef1c1..92f2a10fec2f0b 100644 --- a/examples/lighting-app/esp32/CMakeLists.txt +++ b/examples/lighting-app/esp32/CMakeLists.txt @@ -27,7 +27,6 @@ include(${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/cm set(EXTRA_COMPONENT_DIRS "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/config/esp32/components" "${CMAKE_CURRENT_LIST_DIR}/third_party/connectedhomeip/examples/common/QRCode" - "${IDF_PATH}/examples/common_components/led_strip" ) project(chip-lighting-app) diff --git a/examples/lighting-app/esp32/main/CMakeLists.txt b/examples/lighting-app/esp32/main/CMakeLists.txt index e7ea6b0498bce4..8b7a6e916f38a5 100644 --- a/examples/lighting-app/esp32/main/CMakeLists.txt +++ b/examples/lighting-app/esp32/main/CMakeLists.txt @@ -67,7 +67,7 @@ set(SRC_DIRS_LIST "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/group-key-mgmt-server" ) -set(PRIV_REQUIRES_LIST chip QRCode bt led_strip app_update openthread driver nvs_flash) +set(PRIV_REQUIRES_LIST chip QRCode bt led_strip app_update openthread driver nvs_flash spi_flash) if (CONFIG_ENABLE_PW_RPC) # Append additional directories for RPC build diff --git a/examples/lighting-app/esp32/main/DeviceCallbacks.cpp b/examples/lighting-app/esp32/main/DeviceCallbacks.cpp index bc1174f4676358..c61c3d3d5054b5 100644 --- a/examples/lighting-app/esp32/main/DeviceCallbacks.cpp +++ b/examples/lighting-app/esp32/main/DeviceCallbacks.cpp @@ -47,8 +47,9 @@ using namespace chip::app::Clusters; void AppDeviceCallbacks::PostAttributeChangeCallback(EndpointId endpointId, ClusterId clusterId, AttributeId attributeId, uint8_t type, uint16_t size, uint8_t * value) { - ESP_LOGI(TAG, "PostAttributeChangeCallback - Cluster ID: '0x%04x', EndPoint ID: '0x%02x', Attribute ID: '0x%04x'", clusterId, - endpointId, attributeId); + ESP_LOGI(TAG, + "PostAttributeChangeCallback - Cluster ID: '0x%04" PRIx32 "', EndPoint ID: '0x%02x', Attribute ID: '0x%04" PRIx32 "'", + clusterId, endpointId, attributeId); switch (clusterId) { @@ -67,7 +68,7 @@ void AppDeviceCallbacks::PostAttributeChangeCallback(EndpointId endpointId, Clus #endif default: - ESP_LOGI(TAG, "Unhandled cluster ID: %d", clusterId); + ESP_LOGI(TAG, "Unhandled cluster ID: %" PRIu32, clusterId); break; } @@ -76,7 +77,8 @@ void AppDeviceCallbacks::PostAttributeChangeCallback(EndpointId endpointId, Clus void AppDeviceCallbacks::OnOnOffPostAttributeChangeCallback(EndpointId endpointId, AttributeId attributeId, uint8_t * value) { - VerifyOrExit(attributeId == OnOff::Attributes::OnOff::Id, ESP_LOGI(TAG, "Unhandled Attribute ID: '0x%04x", attributeId)); + VerifyOrExit(attributeId == OnOff::Attributes::OnOff::Id, + ESP_LOGI(TAG, "Unhandled Attribute ID: '0x%04" PRIx32 "'", attributeId)); VerifyOrExit(endpointId == 1, ESP_LOGE(TAG, "Unexpected EndPoint ID: `0x%02x'", endpointId)); AppLED.Set(*value); @@ -88,7 +90,7 @@ void AppDeviceCallbacks::OnOnOffPostAttributeChangeCallback(EndpointId endpointI void AppDeviceCallbacks::OnLevelControlAttributeChangeCallback(EndpointId endpointId, AttributeId attributeId, uint8_t * value) { VerifyOrExit(attributeId == LevelControl::Attributes::CurrentLevel::Id, - ESP_LOGI(TAG, "Unhandled Attribute ID: '0x%04x", attributeId)); + ESP_LOGI(TAG, "Unhandled Attribute ID: '0x%04" PRIx32 "'", attributeId)); VerifyOrExit(endpointId == 1, ESP_LOGE(TAG, "Unexpected EndPoint ID: `0x%02x'", endpointId)); AppLED.SetBrightness(*value); @@ -105,7 +107,7 @@ void AppDeviceCallbacks::OnColorControlAttributeChangeCallback(EndpointId endpoi VerifyOrExit(attributeId == ColorControl::Attributes::CurrentHue::Id || attributeId == ColorControl::Attributes::CurrentSaturation::Id, - ESP_LOGI(TAG, "Unhandled AttributeId ID: '0x%04x", attributeId)); + ESP_LOGI(TAG, "Unhandled AttributeId ID: '0x%04" PRIx32 "'", attributeId)); VerifyOrExit(endpointId == 1, ESP_LOGE(TAG, "Unexpected EndPoint ID: `0x%02x'", endpointId)); if (attributeId == ColorControl::Attributes::CurrentHue::Id) diff --git a/examples/lighting-app/esp32/main/Kconfig.projbuild b/examples/lighting-app/esp32/main/Kconfig.projbuild index 43d7d9f0e75381..b41b4ef0e4fb81 100644 --- a/examples/lighting-app/esp32/main/Kconfig.projbuild +++ b/examples/lighting-app/esp32/main/Kconfig.projbuild @@ -25,6 +25,7 @@ menu "Demo" default DEVICE_TYPE_ESP32_DEVKITC if IDF_TARGET_ESP32 default DEVICE_TYPE_ESP32_C3_DEVKITM if IDF_TARGET_ESP32C3 default DEVICE_TYPE_ESP32_S3_DEVKITM if IDF_TARGET_ESP32S3 + default DEVICE_TYPE_ESP32_C2_DEVKITM if IDF_TARGET_ESP32C2 help Specifies the type of ESP32 device. @@ -46,6 +47,9 @@ menu "Demo" config DEVICE_TYPE_ESP32H2_DEVKITC bool "ESP32H2-DevKitC" depends on IDF_TARGET_ESP32H2 + config DEVICE_TYPE_ESP32_C2_DEVKITM + bool "ESP32C2-DevKitM" + depends on IDF_TARGET_ESP32C2 endchoice choice LED_TYPE @@ -76,7 +80,7 @@ menu "Demo" int "LED GPIO number" range 0 48 default 26 if DEVICE_TYPE_ESP32_WROVER_KIT - default 8 if DEVICE_TYPE_ESP32_C3_DEVKITM || DEVICE_TYPE_ESP32H2_DEVKITC + default 8 if DEVICE_TYPE_ESP32_C3_DEVKITM || DEVICE_TYPE_ESP32H2_DEVKITC || DEVICE_TYPE_ESP32_C2_DEVKITM default 48 if DEVICE_TYPE_ESP32_S3_DEVKITM default 5 help diff --git a/examples/lighting-app/esp32/main/LEDWidget.cpp b/examples/lighting-app/esp32/main/LEDWidget.cpp index bf2221b26446c9..6e65bec7c0c1e5 100644 --- a/examples/lighting-app/esp32/main/LEDWidget.cpp +++ b/examples/lighting-app/esp32/main/LEDWidget.cpp @@ -27,14 +27,6 @@ void LEDWidget::Init(void) mBrightness = UINT8_MAX; #if CONFIG_LED_TYPE_RMT -#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0) - led_strip_config_t strip_config = { - .strip_gpio_num = CONFIG_LED_GPIO, - .max_leds = 1, - }; - - led_strip_new_rmt_device(&strip_config, &mStrip); -#else rmt_config_t config = RMT_DEFAULT_CONFIG_TX((gpio_num_t) CONFIG_LED_GPIO, (rmt_channel_t) CONFIG_LED_RMT_CHANNEL); led_strip_config_t strip_config = LED_STRIP_DEFAULT_CONFIG(1, (led_strip_dev_t) config.channel); @@ -42,8 +34,7 @@ void LEDWidget::Init(void) rmt_config(&config); rmt_driver_install(config.channel, 0, 0); - mStrip = led_strip_new_rmt_ws2812(&strip_config); -#endif + mStrip = led_strip_new_rmt_ws2812(&strip_config); mHue = 0; mSaturation = 0; #else @@ -131,13 +122,8 @@ void LEDWidget::DoSet(void) { HsvColor_t hsv = { mHue, mSaturation, brightness }; RgbColor_t rgb = HsvToRgb(hsv); -#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0) - led_strip_set_pixel(mStrip, 0, rgb.r, rgb.g, rgb.b); - led_strip_refresh(mStrip); -#else mStrip->set_pixel(mStrip, 0, rgb.r, rgb.g, rgb.b); mStrip->refresh(mStrip, 100); -#endif } #else ESP_LOGI(TAG, "DoSet to GPIO number %d", mGPIONum); diff --git a/examples/lighting-app/esp32/main/idf_component.yml b/examples/lighting-app/esp32/main/idf_component.yml new file mode 100644 index 00000000000000..1c539b8eb57668 --- /dev/null +++ b/examples/lighting-app/esp32/main/idf_component.yml @@ -0,0 +1,2 @@ +dependencies: + espressif/led_strip: "^1.0.0-alpha" diff --git a/examples/lighting-app/esp32/main/include/LEDWidget.h b/examples/lighting-app/esp32/main/include/LEDWidget.h index f9d00a2b6882a9..c390d63ac1024f 100644 --- a/examples/lighting-app/esp32/main/include/LEDWidget.h +++ b/examples/lighting-app/esp32/main/include/LEDWidget.h @@ -50,11 +50,7 @@ class LEDWidget #if CONFIG_LED_TYPE_RMT uint8_t mHue; uint8_t mSaturation; -#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0) - led_strip_handle_t mStrip; -#else led_strip_t * mStrip; -#endif #else gpio_num_t mGPIONum; #endif diff --git a/examples/lighting-app/esp32/sdkconfig.defaults b/examples/lighting-app/esp32/sdkconfig.defaults index 64623b292bfdd3..bb74fc99f423d7 100644 --- a/examples/lighting-app/esp32/sdkconfig.defaults +++ b/examples/lighting-app/esp32/sdkconfig.defaults @@ -52,3 +52,6 @@ CONFIG_ESPTOOLPY_FLASHSIZE="4MB" # Disable softap support by default CONFIG_ESP_WIFI_SOFTAP_SUPPORT=n +# This example uses the older version of RMT driver to work with both +# idf-v4.4.3 and idf-v5.0, so supressing the warnings by setting below option +CONFIG_RMT_SUPPRESS_DEPRECATE_WARN=y diff --git a/examples/lighting-app/esp32/sdkconfig.defaults.esp32c2 b/examples/lighting-app/esp32/sdkconfig.defaults.esp32c2 new file mode 100644 index 00000000000000..6cb90db4f55b9d --- /dev/null +++ b/examples/lighting-app/esp32/sdkconfig.defaults.esp32c2 @@ -0,0 +1,19 @@ +# Disable chip shell +CONFIG_ENABLE_CHIP_SHELL=n + +# CONFIG_ESP32_WIFI_IRAM_OPT is not set +# CONFIG_ESP32_WIFI_RX_IRAM_OPT is not set +CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y +CONFIG_FREERTOS_PLACE_SNAPSHOT_FUNS_INTO_FLASH=y + +CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE=y + +CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=16 +CONFIG_LWIP_TCP_RECVMBOX_SIZE=8 + +CONFIG_BT_NIMBLE_ROLE_CENTRAL=n +CONFIG_BT_NIMBLE_ROLE_OBSERVER=n + +CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=4 +CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=8 +CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=16 diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index 08d65c1210d1bd..55b96977afcc26 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.matter @@ -137,10 +137,6 @@ server cluster OnOff = 6 { kLighting = 0x1; } - bitmap SceneFeatures : BITMAP32 { - kSceneNames = 0x1; - } - readonly attribute boolean onOff = 0; readonly attribute boolean globalSceneControl = 16384; attribute int16u onTime = 16385; diff --git a/examples/lighting-app/nxp/zap/lighting-on-off.matter b/examples/lighting-app/nxp/zap/lighting-on-off.matter index 9cb8188a05df26..6114c82e64eaa2 100644 --- a/examples/lighting-app/nxp/zap/lighting-on-off.matter +++ b/examples/lighting-app/nxp/zap/lighting-on-off.matter @@ -138,10 +138,6 @@ server cluster OnOff = 6 { kLighting = 0x1; } - bitmap SceneFeatures : BITMAP32 { - kSceneNames = 0x1; - } - readonly nosubscribe attribute boolean onOff = 0; readonly attribute boolean globalSceneControl = 16384; attribute int16u onTime = 16385; diff --git a/examples/lighting-app/silabs/efr32/BUILD.gn b/examples/lighting-app/silabs/efr32/BUILD.gn index fdcadf1feb5732..dcda82dc8d9dea 100644 --- a/examples/lighting-app/silabs/efr32/BUILD.gn +++ b/examples/lighting-app/silabs/efr32/BUILD.gn @@ -91,7 +91,8 @@ if (chip_enable_wifi) { # ThunderBoards, Explorer Kit and MGM240L do not support LCD (No LCD) if (silabs_board == "BRD4166A" || silabs_board == "BRD2601B" || - silabs_board == "BRD2703A" || silabs_board == "BRD4319A") { + silabs_board == "BRD2703A" || silabs_board == "BRD4319A" || + silabs_board == "BRD2704A") { show_qr_code = false disable_lcd = true } @@ -208,6 +209,10 @@ efr32_executable("lighting_app") { include_dirs = [ "include" ] defines = [] + if (silabs_board == "BRD2704A") { + defines += [ "SL_STATUS_LED=0" ] + } + sources = [ "${examples_common_plat_dir}/heap_4_silabs.c", "${examples_plat_dir}/BaseApplication.cpp", diff --git a/examples/lighting-app/silabs/efr32/include/AppTask.h b/examples/lighting-app/silabs/efr32/include/AppTask.h index df80995592fd95..cc76b02e8b293d 100644 --- a/examples/lighting-app/silabs/efr32/include/AppTask.h +++ b/examples/lighting-app/silabs/efr32/include/AppTask.h @@ -30,7 +30,9 @@ #include "BaseApplication.h" #include "FreeRTOS.h" #include "LightingManager.h" +#ifdef SL_CATALOG_SIMPLE_BUTTON_PRESENT #include "sl_simple_button_instances.h" +#endif #include "timers.h" // provides FreeRTOS timer support #include #include @@ -69,7 +71,7 @@ class AppTask : public BaseApplication static void AppTaskMain(void * pvParameter); CHIP_ERROR StartAppTask(); - +#ifdef SL_CATALOG_SIMPLE_BUTTON_PRESENT /** * @brief Event handler when a button is pressed * Function posts an event for button processing @@ -79,7 +81,7 @@ class AppTask : public BaseApplication * SL_SIMPLE_BUTTON_RELEASED or SL_SIMPLE_BUTTON_DISABLED */ void ButtonEventHandler(const sl_button_t * buttonHandle, uint8_t btnAction) override; - +#endif /** * @brief Callback called by the identify-server when an identify command is received * diff --git a/examples/lighting-app/silabs/efr32/src/AppTask.cpp b/examples/lighting-app/silabs/efr32/src/AppTask.cpp index ccd77060e755d1..e061e40099cb38 100644 --- a/examples/lighting-app/silabs/efr32/src/AppTask.cpp +++ b/examples/lighting-app/silabs/efr32/src/AppTask.cpp @@ -44,12 +44,18 @@ #include #ifdef ENABLE_WSTK_LEDS -#define SYSTEM_STATE_LED &sl_led_led0 +#if SL_STATUS_LED #define LIGHT_LED &sl_led_led1 +#else +#define LIGHT_LED &sl_led_led0 +#endif #endif // ENABLE_WSTK_LEDS +#ifdef SL_CATALOG_SIMPLE_BUTTON_PRESENT + #define APP_FUNCTION_BUTTON &sl_button_btn0 #define APP_LIGHT_SWITCH &sl_button_btn1 +#endif using namespace chip; using namespace ::chip::DeviceLayer; @@ -225,11 +231,13 @@ void AppTask::LightActionEventHandler(AppEvent * aEvent) action = static_cast(aEvent->LightEvent.Action); actor = aEvent->LightEvent.Actor; } +#ifdef SL_CATALOG_SIMPLE_BUTTON_PRESENT else if (aEvent->Type == AppEvent::kEventType_Button) { action = (LightMgr().IsLightOn()) ? LightingManager::OFF_ACTION : LightingManager::ON_ACTION; actor = AppEvent::kEventType_Button; } +#endif else { err = APP_ERROR_UNHANDLED_EVENT; @@ -245,7 +253,7 @@ void AppTask::LightActionEventHandler(AppEvent * aEvent) } } } - +#ifdef SL_CATALOG_SIMPLE_BUTTON_PRESENT void AppTask::ButtonEventHandler(const sl_button_t * buttonHandle, uint8_t btnAction) { if (buttonHandle == NULL) @@ -269,6 +277,8 @@ void AppTask::ButtonEventHandler(const sl_button_t * buttonHandle, uint8_t btnAc } } +#endif + void AppTask::ActionInitiated(LightingManager::Action_t aAction, int32_t aActor) { // Action initiated, update the light led @@ -282,11 +292,12 @@ void AppTask::ActionInitiated(LightingManager::Action_t aAction, int32_t aActor) #ifdef DISPLAY_ENABLED sAppTask.GetLCD().WriteDemoUI(lightOn); #endif - +#ifdef SL_CATALOG_SIMPLE_BUTTON_PRESENT if (aActor == AppEvent::kEventType_Button) { sAppTask.mSyncClusterToButtonAction = true; } +#endif } void AppTask::ActionCompleted(LightingManager::Action_t aAction) @@ -300,12 +311,13 @@ void AppTask::ActionCompleted(LightingManager::Action_t aAction) { SILABS_LOG("Light OFF") } - +#ifdef SL_CATALOG_SIMPLE_BUTTON_PRESENT if (sAppTask.mSyncClusterToButtonAction) { chip::DeviceLayer::PlatformMgr().ScheduleWork(UpdateClusterState, reinterpret_cast(nullptr)); sAppTask.mSyncClusterToButtonAction = false; } +#endif } void AppTask::PostLightActionRequest(int32_t aActor, LightingManager::Action_t aAction) diff --git a/examples/lighting-app/silabs/efr32/src/main.cpp b/examples/lighting-app/silabs/efr32/src/main.cpp index 2594f6f9216e78..9f447b972678b6 100644 --- a/examples/lighting-app/silabs/efr32/src/main.cpp +++ b/examples/lighting-app/silabs/efr32/src/main.cpp @@ -21,7 +21,9 @@ #include "AppConfig.h" #include "init_efrPlatform.h" +#ifdef SL_CATALOG_SIMPLE_BUTTON_PRESENT #include "sl_simple_button_instances.h" +#endif #include "sl_system_kernel.h" #include #include @@ -78,7 +80,9 @@ int main(void) appError(CHIP_ERROR_INTERNAL); } +#ifdef SL_CATALOG_SIMPLE_BUTTON_PRESENT void sl_button_on_change(const sl_button_t * handle) { AppTask::GetAppTask().ButtonEventHandler(handle, sl_button_get_state(handle)); } +#endif diff --git a/examples/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index 236536d36f27ff..ee9b2f66387879 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-app.matter @@ -71,10 +71,6 @@ server cluster OnOff = 6 { kLighting = 0x1; } - bitmap SceneFeatures : BITMAP32 { - kSceneNames = 0x1; - } - readonly attribute boolean onOff = 0; readonly attribute boolean globalSceneControl = 16384; attribute int16u onTime = 16385; diff --git a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter index 03ad652e3d1638..5f60378d897bad 100644 --- a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter +++ b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter @@ -137,10 +137,6 @@ server cluster OnOff = 6 { kLighting = 0x1; } - bitmap SceneFeatures : BITMAP32 { - kSceneNames = 0x1; - } - readonly attribute boolean onOff = 0; readonly attribute boolean globalSceneControl = 16384; attribute int16u onTime = 16385; diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index 9beb7e35e56454..a450e3060fa3ba 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -102,17 +102,21 @@ server cluster Groups = 4 { } server cluster Scenes = 5 { + bitmap SceneFeatures : BITMAP32 { + kSceneNames = 0x1; + } + bitmap ScenesCopyMode : BITMAP8 { kCopyAllScenes = 0x1; } struct ExtensionFieldSet { - cluster_id clusterId = 0; + cluster_id clusterID = 0; AttributeValuePair attributeValueList[] = 1; } struct AttributeValuePair { - optional attrib_id attributeId = 0; + optional attrib_id attributeID = 0; int8u attributeValue[] = 1; } @@ -125,52 +129,52 @@ server cluster Scenes = 5 { readonly attribute int16u clusterRevision = 65533; request struct AddSceneRequest { - group_id groupId = 0; - INT8U sceneId = 1; + group_id groupID = 0; + INT8U sceneID = 1; INT16U transitionTime = 2; CHAR_STRING sceneName = 3; ExtensionFieldSet extensionFieldSets[] = 4; } request struct ViewSceneRequest { - group_id groupId = 0; - INT8U sceneId = 1; + group_id groupID = 0; + INT8U sceneID = 1; } request struct RemoveSceneRequest { - group_id groupId = 0; - INT8U sceneId = 1; + group_id groupID = 0; + INT8U sceneID = 1; } request struct RemoveAllScenesRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct StoreSceneRequest { - group_id groupId = 0; - INT8U sceneId = 1; + group_id groupID = 0; + INT8U sceneID = 1; } request struct RecallSceneRequest { - group_id groupId = 0; - INT8U sceneId = 1; + group_id groupID = 0; + INT8U sceneID = 1; optional nullable INT16U transitionTime = 2; } request struct GetSceneMembershipRequest { - group_id groupId = 0; + group_id groupID = 0; } response struct AddSceneResponse = 0 { ENUM8 status = 0; - group_id groupId = 1; - INT8U sceneId = 2; + group_id groupID = 1; + INT8U sceneID = 2; } response struct ViewSceneResponse = 1 { ENUM8 status = 0; - group_id groupId = 1; - INT8U sceneId = 2; + group_id groupID = 1; + INT8U sceneID = 2; optional INT16U transitionTime = 3; optional CHAR_STRING sceneName = 4; optional ExtensionFieldSet extensionFieldSets[] = 5; @@ -178,25 +182,25 @@ server cluster Scenes = 5 { response struct RemoveSceneResponse = 2 { ENUM8 status = 0; - group_id groupId = 1; - INT8U sceneId = 2; + group_id groupID = 1; + INT8U sceneID = 2; } response struct RemoveAllScenesResponse = 3 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } response struct StoreSceneResponse = 4 { ENUM8 status = 0; - group_id groupId = 1; - INT8U sceneId = 2; + group_id groupID = 1; + INT8U sceneID = 2; } response struct GetSceneMembershipResponse = 6 { ENUM8 status = 0; nullable INT8U capacity = 1; - group_id groupId = 2; + group_id groupID = 2; optional INT8U sceneList[] = 3; } @@ -239,10 +243,6 @@ client cluster OnOff = 6 { kLighting = 0x1; } - bitmap SceneFeatures : BITMAP32 { - kSceneNames = 0x1; - } - readonly attribute boolean onOff = 0; readonly attribute boolean globalSceneControl = 16384; attribute int16u onTime = 16385; @@ -300,10 +300,6 @@ server cluster OnOff = 6 { kLighting = 0x1; } - bitmap SceneFeatures : BITMAP32 { - kSceneNames = 0x1; - } - readonly attribute boolean onOff = 0; readonly attribute boolean globalSceneControl = 16384; attribute int16u onTime = 16385; @@ -1862,9 +1858,9 @@ server cluster PumpConfigurationAndControl = 512 { server cluster Thermostat = 513 { enum SetpointAdjustMode : ENUM8 { - kHeatSetpoint = 0; - kCoolSetpoint = 1; - kHeatAndCoolSetpoints = 2; + kHeat = 0; + kCool = 1; + kBoth = 2; } enum ThermostatControlSequence : ENUM8 { @@ -1887,9 +1883,11 @@ server cluster Thermostat = 513 { kAuto = 1; kCool = 3; kHeat = 4; - kEmergencyHeating = 5; + kEmergencyHeat = 5; kPrecooling = 6; kFanOnly = 7; + kDry = 8; + kSleep = 9; } bitmap DayOfWeek : BITMAP8 { @@ -1900,21 +1898,21 @@ server cluster Thermostat = 513 { kThursday = 0x10; kFriday = 0x20; kSaturday = 0x40; - kAwayOrVacation = 0x80; + kAway = 0x80; } bitmap ModeForSequence : BITMAP8 { - kHeatSetpointFieldPresent = 0x1; - kCoolSetpointFieldPresent = 0x2; + kHeatSetpointPresent = 0x1; + kCoolSetpointPresent = 0x2; } bitmap ThermostatFeature : BITMAP32 { kHeating = 0x1; kCooling = 0x2; kOccupancy = 0x4; - kSchedule = 0x8; + kScheduleConfiguration = 0x8; kSetback = 0x10; - kAutomode = 0x20; + kAutoMode = 0x20; } struct ThermostatScheduleTransition { diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index c74463df762bbd..28dd9286eddd09 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -102,17 +102,21 @@ server cluster Groups = 4 { } server cluster Scenes = 5 { + bitmap SceneFeatures : BITMAP32 { + kSceneNames = 0x1; + } + bitmap ScenesCopyMode : BITMAP8 { kCopyAllScenes = 0x1; } struct ExtensionFieldSet { - cluster_id clusterId = 0; + cluster_id clusterID = 0; AttributeValuePair attributeValueList[] = 1; } struct AttributeValuePair { - optional attrib_id attributeId = 0; + optional attrib_id attributeID = 0; int8u attributeValue[] = 1; } @@ -125,52 +129,52 @@ server cluster Scenes = 5 { readonly attribute int16u clusterRevision = 65533; request struct AddSceneRequest { - group_id groupId = 0; - INT8U sceneId = 1; + group_id groupID = 0; + INT8U sceneID = 1; INT16U transitionTime = 2; CHAR_STRING sceneName = 3; ExtensionFieldSet extensionFieldSets[] = 4; } request struct ViewSceneRequest { - group_id groupId = 0; - INT8U sceneId = 1; + group_id groupID = 0; + INT8U sceneID = 1; } request struct RemoveSceneRequest { - group_id groupId = 0; - INT8U sceneId = 1; + group_id groupID = 0; + INT8U sceneID = 1; } request struct RemoveAllScenesRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct StoreSceneRequest { - group_id groupId = 0; - INT8U sceneId = 1; + group_id groupID = 0; + INT8U sceneID = 1; } request struct RecallSceneRequest { - group_id groupId = 0; - INT8U sceneId = 1; + group_id groupID = 0; + INT8U sceneID = 1; optional nullable INT16U transitionTime = 2; } request struct GetSceneMembershipRequest { - group_id groupId = 0; + group_id groupID = 0; } response struct AddSceneResponse = 0 { ENUM8 status = 0; - group_id groupId = 1; - INT8U sceneId = 2; + group_id groupID = 1; + INT8U sceneID = 2; } response struct ViewSceneResponse = 1 { ENUM8 status = 0; - group_id groupId = 1; - INT8U sceneId = 2; + group_id groupID = 1; + INT8U sceneID = 2; optional INT16U transitionTime = 3; optional CHAR_STRING sceneName = 4; optional ExtensionFieldSet extensionFieldSets[] = 5; @@ -178,25 +182,25 @@ server cluster Scenes = 5 { response struct RemoveSceneResponse = 2 { ENUM8 status = 0; - group_id groupId = 1; - INT8U sceneId = 2; + group_id groupID = 1; + INT8U sceneID = 2; } response struct RemoveAllScenesResponse = 3 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } response struct StoreSceneResponse = 4 { ENUM8 status = 0; - group_id groupId = 1; - INT8U sceneId = 2; + group_id groupID = 1; + INT8U sceneID = 2; } response struct GetSceneMembershipResponse = 6 { ENUM8 status = 0; nullable INT8U capacity = 1; - group_id groupId = 2; + group_id groupID = 2; optional INT8U sceneList[] = 3; } @@ -239,10 +243,6 @@ client cluster OnOff = 6 { kLighting = 0x1; } - bitmap SceneFeatures : BITMAP32 { - kSceneNames = 0x1; - } - readonly attribute boolean onOff = 0; readonly attribute boolean globalSceneControl = 16384; attribute int16u onTime = 16385; @@ -300,10 +300,6 @@ server cluster OnOff = 6 { kLighting = 0x1; } - bitmap SceneFeatures : BITMAP32 { - kSceneNames = 0x1; - } - readonly attribute boolean onOff = 0; readonly attribute boolean globalSceneControl = 16384; attribute int16u onTime = 16385; @@ -1839,9 +1835,9 @@ server cluster PumpConfigurationAndControl = 512 { server cluster Thermostat = 513 { enum SetpointAdjustMode : ENUM8 { - kHeatSetpoint = 0; - kCoolSetpoint = 1; - kHeatAndCoolSetpoints = 2; + kHeat = 0; + kCool = 1; + kBoth = 2; } enum ThermostatControlSequence : ENUM8 { @@ -1864,9 +1860,11 @@ server cluster Thermostat = 513 { kAuto = 1; kCool = 3; kHeat = 4; - kEmergencyHeating = 5; + kEmergencyHeat = 5; kPrecooling = 6; kFanOnly = 7; + kDry = 8; + kSleep = 9; } bitmap DayOfWeek : BITMAP8 { @@ -1877,21 +1875,21 @@ server cluster Thermostat = 513 { kThursday = 0x10; kFriday = 0x20; kSaturday = 0x40; - kAwayOrVacation = 0x80; + kAway = 0x80; } bitmap ModeForSequence : BITMAP8 { - kHeatSetpointFieldPresent = 0x1; - kCoolSetpointFieldPresent = 0x2; + kHeatSetpointPresent = 0x1; + kCoolSetpointPresent = 0x2; } bitmap ThermostatFeature : BITMAP32 { kHeating = 0x1; kCooling = 0x2; kOccupancy = 0x4; - kSchedule = 0x8; + kScheduleConfiguration = 0x8; kSetback = 0x10; - kAutomode = 0x20; + kAutoMode = 0x20; } struct ThermostatScheduleTransition { diff --git a/examples/platform/esp32/lock/BoltLockManager.cpp b/examples/platform/esp32/lock/BoltLockManager.cpp index 6115c15b1bf75d..ad4e7ba2b96831 100644 --- a/examples/platform/esp32/lock/BoltLockManager.cpp +++ b/examples/platform/esp32/lock/BoltLockManager.cpp @@ -330,7 +330,7 @@ void BoltLockManager::ActuatorMovementTimerEventHandler(AppEvent * aEvent) lock->mAutoLockTimerArmed = true; - ESP_LOGI(TAG, "Auto Re-lock enabled. Will be triggered in %u seconds", lock->mAutoLockDuration); + ESP_LOGI(TAG, "Auto Re-lock enabled. Will be triggered in %" PRIu32 " seconds", lock->mAutoLockDuration); } } } diff --git a/examples/platform/silabs/efr32/BaseApplication.cpp b/examples/platform/silabs/efr32/BaseApplication.cpp index a9ecfc63bb0c60..6dc133e3330b3f 100644 --- a/examples/platform/silabs/efr32/BaseApplication.cpp +++ b/examples/platform/silabs/efr32/BaseApplication.cpp @@ -25,7 +25,7 @@ #include "AppEvent.h" #include "AppTask.h" -#ifdef ENABLE_WSTK_LEDS +#if defined(ENABLE_WSTK_LEDS) && SL_STATUS_LED #include "LEDWidget.h" #include "sl_simple_led_instances.h" #endif // ENABLE_WSTK_LEDS @@ -74,11 +74,12 @@ #define APP_EVENT_QUEUE_SIZE 10 #define EXAMPLE_VENDOR_ID 0xcafe -#ifdef ENABLE_WSTK_LEDS +#if defined(ENABLE_WSTK_LEDS) && SL_STATUS_LED #define SYSTEM_STATE_LED &sl_led_led0 #endif // ENABLE_WSTK_LEDS - +#ifdef SL_CATALOG_SIMPLE_BUTTON_PRESENT #define APP_FUNCTION_BUTTON &sl_button_btn0 +#endif using namespace chip; using namespace ::chip::DeviceLayer; @@ -95,7 +96,7 @@ TimerHandle_t sLightTimer; TaskHandle_t sAppTaskHandle; QueueHandle_t sAppEventQueue; -#ifdef ENABLE_WSTK_LEDS +#if defined(ENABLE_WSTK_LEDS) && SL_STATUS_LED LEDWidget sStatusLED; #endif // ENABLE_WSTK_LEDS @@ -211,7 +212,7 @@ CHIP_ERROR BaseApplication::Init(Identify * identifyObj) SILABS_LOG("Current Software Version: %s", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING); -#ifdef ENABLE_WSTK_LEDS +#if defined(ENABLE_WSTK_LEDS) && SL_STATUS_LED LEDWidget::InitGpio(); sStatusLED.Init(SYSTEM_STATE_LED); #endif // ENABLE_WSTK_LEDS @@ -272,7 +273,7 @@ void BaseApplication::FunctionEventHandler(AppEvent * aEvent) mFunction = kFunction_FactoryReset; -#ifdef ENABLE_WSTK_LEDS +#if defined(ENABLE_WSTK_LEDS) && SL_STATUS_LED // Turn off all LEDs before starting blink to make sure blink is // co-ordinated. sStatusLED.Set(false); @@ -333,7 +334,7 @@ void BaseApplication::LightEventHandler() { if ((gIdentifyptr != nullptr) && (gIdentifyptr->mActive)) { -#ifdef ENABLE_WSTK_LEDS +#if defined(ENABLE_WSTK_LEDS) && SL_STATUS_LED sStatusLED.Blink(250, 250); #endif // ENABLE_WSTK_LEDS } @@ -341,19 +342,19 @@ void BaseApplication::LightEventHandler() { if (sIdentifyEffect == EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BLINK) { -#ifdef ENABLE_WSTK_LEDS +#if defined(ENABLE_WSTK_LEDS) && SL_STATUS_LED sStatusLED.Blink(50, 50); #endif // ENABLE_WSTK_LEDS } if (sIdentifyEffect == EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_BREATHE) { -#ifdef ENABLE_WSTK_LEDS +#if defined(ENABLE_WSTK_LEDS) && SL_STATUS_LED sStatusLED.Blink(1000, 1000); #endif // ENABLE_WSTK_LEDS } if (sIdentifyEffect == EMBER_ZCL_IDENTIFY_EFFECT_IDENTIFIER_OKAY) { -#ifdef ENABLE_WSTK_LEDS +#if defined(ENABLE_WSTK_LEDS) && SL_STATUS_LED sStatusLED.Blink(300, 700); #endif // ENABLE_WSTK_LEDS } @@ -363,37 +364,37 @@ void BaseApplication::LightEventHandler() { if (sIsAttached) { -#ifdef ENABLE_WSTK_LEDS +#if defined(ENABLE_WSTK_LEDS) && SL_STATUS_LED sStatusLED.Set(true); #endif // ENABLE_WSTK_LEDS } else { -#ifdef ENABLE_WSTK_LEDS +#if defined(ENABLE_WSTK_LEDS) && SL_STATUS_LED sStatusLED.Blink(950, 50); #endif } } else if (sHaveBLEConnections) { -#ifdef ENABLE_WSTK_LEDS +#if defined(ENABLE_WSTK_LEDS) && SL_STATUS_LED sStatusLED.Blink(100, 100); #endif // ENABLE_WSTK_LEDS } else { -#ifdef ENABLE_WSTK_LEDS +#if defined(ENABLE_WSTK_LEDS) && SL_STATUS_LED sStatusLED.Blink(50, 950); #endif // ENABLE_WSTK_LEDS } #endif // CHIP_DEVICE_CONFIG_ENABLE_SED } -#ifdef ENABLE_WSTK_LEDS +#if defined(ENABLE_WSTK_LEDS) && SL_STATUS_LED sStatusLED.Animate(); #endif // ENABLE_WSTK_LEDS } - +#ifdef SL_CATALOG_SIMPLE_BUTTON_PRESENT void BaseApplication::ButtonHandler(AppEvent * aEvent) { // To trigger software update: press the APP_FUNCTION_BUTTON button briefly (< @@ -440,7 +441,10 @@ void BaseApplication::ButtonHandler(AppEvent * aEvent) SILABS_LOG("Failed to open the Basic Commissioning Window"); } } - else { SILABS_LOG("Network is already provisioned, Ble advertissement not enabled"); } + else + { + SILABS_LOG("Network is already provisioned, Ble advertissement not enabled"); + } } else if (mFunctionTimerActive && mFunction == kFunction_FactoryReset) { @@ -457,7 +461,7 @@ void BaseApplication::ButtonHandler(AppEvent * aEvent) } } } - +#endif void BaseApplication::CancelFunctionTimer() { if (xTimerStop(sFunctionTimer, 0) == pdFAIL) @@ -500,7 +504,7 @@ void BaseApplication::StartStatusLEDTimer() void BaseApplication::StopStatusLEDTimer() { -#ifdef ENABLE_WSTK_LEDS +#if defined(ENABLE_WSTK_LEDS) && SL_STATUS_LED sStatusLED.Set(false); #endif // ENABLE_WSTK_LEDS diff --git a/examples/platform/silabs/efr32/BaseApplication.h b/examples/platform/silabs/efr32/BaseApplication.h index febd7aa68591b2..f8372661bf4b14 100644 --- a/examples/platform/silabs/efr32/BaseApplication.h +++ b/examples/platform/silabs/efr32/BaseApplication.h @@ -28,7 +28,9 @@ #include "AppEvent.h" #include "FreeRTOS.h" +#ifdef SL_CATALOG_SIMPLE_BUTTON_PRESENT #include "sl_simple_button_instances.h" +#endif #include "timers.h" // provides FreeRTOS timer support #include #include @@ -43,6 +45,10 @@ #endif // QR_CODE_ENABLED #endif // DISPLAY_ENABLED +#ifndef SL_STATUS_LED +#define SL_STATUS_LED 1 +#endif + /********************************************************** * Defines *********************************************************/ @@ -87,7 +93,7 @@ class BaseApplication */ static SilabsLCD & GetLCD(void); #endif - +#ifdef SL_CATALOG_SIMPLE_BUTTON_PRESENT /** * @brief Event handler when a button is pressed * Function posts an event for button processing @@ -98,6 +104,8 @@ class BaseApplication */ virtual void ButtonEventHandler(const sl_button_t * buttonHandle, uint8_t btnAction) = 0; +#endif + /** * @brief Function called to start the LED light timer */ @@ -156,7 +164,7 @@ class BaseApplication * @param aEvent post event being processed */ static void FunctionEventHandler(AppEvent * aEvent); - +#ifdef SL_CATALOG_SIMPLE_BUTTON_PRESENT /** * @brief PB0 Button event processing function * Press and hold will trigger a factory reset timer start @@ -165,7 +173,7 @@ class BaseApplication * @param aEvent button event being processed */ static void ButtonHandler(AppEvent * aEvent); - +#endif /** * @brief Light Timer finished callback function * Calls LED processing function diff --git a/examples/platform/silabs/efr32/init_efrPlatform.cpp b/examples/platform/silabs/efr32/init_efrPlatform.cpp index 993b4fefe069f8..fcb7be1b1bc76e 100644 --- a/examples/platform/silabs/efr32/init_efrPlatform.cpp +++ b/examples/platform/silabs/efr32/init_efrPlatform.cpp @@ -45,6 +45,7 @@ extern "C" { #include #include "platform-efr32.h" +#include "sl_openthread.h" #if OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE #include "openthread/heap.h" @@ -65,7 +66,16 @@ void initAntenna(void); void init_efrPlatform(void) { sl_system_init(); - sl_mbedtls_init(); + +#if CHIP_ENABLE_OPENTHREAD +#ifdef MGM24 + sl_openthread_init(); +#endif + efr32RadioInit(); + efr32AlarmInit(); + efr32MiscInit(); +#endif // CHIP_ENABLE_OPENTHREAD + #if SL_SYSTEM_VIEW SEGGER_SYSVIEW_Conf(); SEGGER_SYSVIEW_Start(); @@ -74,11 +84,6 @@ void init_efrPlatform(void) #if SILABS_LOG_ENABLED silabsInitLog(); #endif - -#if CHIP_ENABLE_OPENTHREAD - efr32RadioInit(); - efr32AlarmInit(); -#endif // CHIP_ENABLE_OPENTHREAD } #ifdef __cplusplus diff --git a/examples/platform/silabs/efr32/uart.cpp b/examples/platform/silabs/efr32/uart.cpp index 8a99a7a457ce31..5481eab4c3e061 100644 --- a/examples/platform/silabs/efr32/uart.cpp +++ b/examples/platform/silabs/efr32/uart.cpp @@ -26,9 +26,10 @@ extern "C" { #include "em_usart.h" #include "sl_board_control.h" #include "sl_uartdrv_instances.h" -#if (defined(EFR32MG24) || defined(MGM24)) +#ifdef SL_CATALOG_UARTDRV_EUSART_PRESENT #include "sl_uartdrv_eusart_vcom_config.h" -#else +#endif +#ifdef SL_CATALOG_UARTDRV_USART_PRESENT #include "sl_uartdrv_usart_vcom_config.h" #endif // EFR32MG24 #include "uart.h" @@ -44,7 +45,7 @@ extern "C" { #define MIN(A, B) ((A) < (B) ? (A) : (B)) #endif -#if (defined(EFR32MG24) || defined(MGM24)) +#ifdef SL_CATALOG_UARTDRV_EUSART_PRESENT #define HELPER1(x) EUSART##x##_RX_IRQn #else #define HELPER1(x) USART##x##_RX_IRQn @@ -52,7 +53,7 @@ extern "C" { #define HELPER2(x) HELPER1(x) -#if (defined(EFR32MG24) || defined(MGM24)) +#ifdef SL_CATALOG_UARTDRV_EUSART_PRESENT #define HELPER3(x) EUSART##x##_RX_IRQHandler #else #define HELPER3(x) USART##x##_RX_IRQHandler @@ -61,7 +62,7 @@ extern "C" { #define HELPER4(x) HELPER3(x) // On MG24 boards VCOM runs on the EUSART device, MG12 uses the UART device -#if (defined(EFR32MG24) || defined(MGM24)) +#ifdef SL_CATALOG_UARTDRV_EUSART_PRESENT #define USART_IRQ HELPER2(SL_UARTDRV_EUSART_VCOM_PERIPHERAL_NO) #define USART_IRQHandler HELPER4(SL_UARTDRV_EUSART_VCOM_PERIPHERAL_NO) #define vcom_handle sl_uartdrv_eusart_vcom_handle @@ -221,7 +222,7 @@ void uartConsoleInit(void) NVIC_ClearPendingIRQ(USART_IRQ); NVIC_EnableIRQ(USART_IRQ); -#if (defined(EFR32MG24) || defined(MGM24)) +#ifdef SL_CATALOG_UARTDRV_EUSART_PRESENT // Clear previous RX interrupts EUSART_IntClear(SL_UARTDRV_EUSART_VCOM_PERIPHERAL, EUSART_IF_RXFL); @@ -246,7 +247,7 @@ void USART_IRQHandler(void) otSysEventSignalPending(); #endif -#if (defined(EFR32MG24) || defined(MGM24)) +#ifdef SL_CATALOG_UARTDRV_EUSART_PRESENT EUSART_IntClear(SL_UARTDRV_EUSART_VCOM_PERIPHERAL, EUSART_IF_RXFL); #endif } diff --git a/examples/pump-app/pump-common/pump-app.matter b/examples/pump-app/pump-common/pump-app.matter index a115a3f11bbabe..1e97e38e112bb2 100644 --- a/examples/pump-app/pump-common/pump-app.matter +++ b/examples/pump-app/pump-common/pump-app.matter @@ -69,10 +69,6 @@ server cluster OnOff = 6 { kLighting = 0x1; } - bitmap SceneFeatures : BITMAP32 { - kSceneNames = 0x1; - } - readonly attribute boolean onOff = 0; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; diff --git a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter index 3465b3d2f2531e..b407eddb02e656 100644 --- a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter +++ b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter @@ -69,10 +69,6 @@ client cluster OnOff = 6 { kLighting = 0x1; } - bitmap SceneFeatures : BITMAP32 { - kSceneNames = 0x1; - } - readonly attribute boolean onOff = 0; readonly attribute int16u clusterRevision = 65533; diff --git a/examples/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index 63e5edf61ce54e..95cc23327b23b0 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -137,17 +137,21 @@ server cluster Groups = 4 { } server cluster Scenes = 5 { + bitmap SceneFeatures : BITMAP32 { + kSceneNames = 0x1; + } + bitmap ScenesCopyMode : BITMAP8 { kCopyAllScenes = 0x1; } struct ExtensionFieldSet { - cluster_id clusterId = 0; + cluster_id clusterID = 0; AttributeValuePair attributeValueList[] = 1; } struct AttributeValuePair { - optional attrib_id attributeId = 0; + optional attrib_id attributeID = 0; int8u attributeValue[] = 1; } @@ -160,52 +164,52 @@ server cluster Scenes = 5 { readonly attribute int16u clusterRevision = 65533; request struct AddSceneRequest { - group_id groupId = 0; - INT8U sceneId = 1; + group_id groupID = 0; + INT8U sceneID = 1; INT16U transitionTime = 2; CHAR_STRING sceneName = 3; ExtensionFieldSet extensionFieldSets[] = 4; } request struct ViewSceneRequest { - group_id groupId = 0; - INT8U sceneId = 1; + group_id groupID = 0; + INT8U sceneID = 1; } request struct RemoveSceneRequest { - group_id groupId = 0; - INT8U sceneId = 1; + group_id groupID = 0; + INT8U sceneID = 1; } request struct RemoveAllScenesRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct StoreSceneRequest { - group_id groupId = 0; - INT8U sceneId = 1; + group_id groupID = 0; + INT8U sceneID = 1; } request struct RecallSceneRequest { - group_id groupId = 0; - INT8U sceneId = 1; + group_id groupID = 0; + INT8U sceneID = 1; optional nullable INT16U transitionTime = 2; } request struct GetSceneMembershipRequest { - group_id groupId = 0; + group_id groupID = 0; } response struct AddSceneResponse = 0 { ENUM8 status = 0; - group_id groupId = 1; - INT8U sceneId = 2; + group_id groupID = 1; + INT8U sceneID = 2; } response struct ViewSceneResponse = 1 { ENUM8 status = 0; - group_id groupId = 1; - INT8U sceneId = 2; + group_id groupID = 1; + INT8U sceneID = 2; optional INT16U transitionTime = 3; optional CHAR_STRING sceneName = 4; optional ExtensionFieldSet extensionFieldSets[] = 5; @@ -213,25 +217,25 @@ server cluster Scenes = 5 { response struct RemoveSceneResponse = 2 { ENUM8 status = 0; - group_id groupId = 1; - INT8U sceneId = 2; + group_id groupID = 1; + INT8U sceneID = 2; } response struct RemoveAllScenesResponse = 3 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } response struct StoreSceneResponse = 4 { ENUM8 status = 0; - group_id groupId = 1; - INT8U sceneId = 2; + group_id groupID = 1; + INT8U sceneID = 2; } response struct GetSceneMembershipResponse = 6 { ENUM8 status = 0; nullable INT8U capacity = 1; - group_id groupId = 2; + group_id groupID = 2; optional INT8U sceneList[] = 3; } @@ -1394,9 +1398,9 @@ server cluster UserLabel = 65 { server cluster Thermostat = 513 { enum SetpointAdjustMode : ENUM8 { - kHeatSetpoint = 0; - kCoolSetpoint = 1; - kHeatAndCoolSetpoints = 2; + kHeat = 0; + kCool = 1; + kBoth = 2; } enum ThermostatControlSequence : ENUM8 { @@ -1419,9 +1423,11 @@ server cluster Thermostat = 513 { kAuto = 1; kCool = 3; kHeat = 4; - kEmergencyHeating = 5; + kEmergencyHeat = 5; kPrecooling = 6; kFanOnly = 7; + kDry = 8; + kSleep = 9; } bitmap DayOfWeek : BITMAP8 { @@ -1432,21 +1438,21 @@ server cluster Thermostat = 513 { kThursday = 0x10; kFriday = 0x20; kSaturday = 0x40; - kAwayOrVacation = 0x80; + kAway = 0x80; } bitmap ModeForSequence : BITMAP8 { - kHeatSetpointFieldPresent = 0x1; - kCoolSetpointFieldPresent = 0x2; + kHeatSetpointPresent = 0x1; + kCoolSetpointPresent = 0x2; } bitmap ThermostatFeature : BITMAP32 { kHeating = 0x1; kCooling = 0x2; kOccupancy = 0x4; - kSchedule = 0x8; + kScheduleConfiguration = 0x8; kSetback = 0x10; - kAutomode = 0x20; + kAutoMode = 0x20; } struct ThermostatScheduleTransition { diff --git a/examples/tv-app/android/include/media-playback/AppMediaPlaybackManager.cpp b/examples/tv-app/android/include/media-playback/AppMediaPlaybackManager.cpp index ef9934090f1c16..402efef2e993c5 100644 --- a/examples/tv-app/android/include/media-playback/AppMediaPlaybackManager.cpp +++ b/examples/tv-app/android/include/media-playback/AppMediaPlaybackManager.cpp @@ -192,9 +192,9 @@ CHIP_ERROR AppMediaPlaybackManager::HandleGetSampledPosition(AttributeValueEncod if (!value[attrId].empty() && value[attrId].isObject()) { std::string updatedAt = to_string( - static_cast(chip::app::Clusters::MediaPlayback::Structs::PlaybackPosition::Fields::kUpdatedAt)); + static_cast(chip::app::Clusters::MediaPlayback::Structs::PlaybackPositionStruct::Fields::kUpdatedAt)); std::string position = to_string( - static_cast(chip::app::Clusters::MediaPlayback::Structs::PlaybackPosition::Fields::kPosition)); + static_cast(chip::app::Clusters::MediaPlayback::Structs::PlaybackPositionStruct::Fields::kPosition)); if (!value[attrId][updatedAt].empty() && !value[attrId][position].empty() && value[attrId][updatedAt].isUInt() && value[attrId][position].isUInt()) { diff --git a/examples/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index d8ec1ac03e2590..105bfb2a7f654b 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -41,10 +41,6 @@ server cluster OnOff = 6 { kLighting = 0x1; } - bitmap SceneFeatures : BITMAP32 { - kSceneNames = 0x1; - } - readonly attribute boolean onOff = 0; readonly attribute bitmap32 featureMap = 65532; readonly attribute int16u clusterRevision = 65533; diff --git a/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/app/MainActivity.java b/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/app/MainActivity.java index 03d18735edbf35..4aa983c283494a 100644 --- a/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/app/MainActivity.java +++ b/examples/tv-casting-app/android/App/app/src/main/java/com/chip/casting/app/MainActivity.java @@ -27,7 +27,11 @@ protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); - initJni(); + boolean ret = initJni(); + if (!ret) { + Log.e(TAG, "Failed to initialize Matter TV casting library"); + return; + } Fragment fragment = CommissionerDiscoveryFragment.newInstance(tvCastingApp); getSupportFragmentManager() @@ -71,7 +75,7 @@ public void handleDisconnect() { * AndroidChipPlatform to prepare platform, then start ChipAppServer, then call init on * TvCastingApp */ - private void initJni() { + private boolean initJni() { tvCastingApp = new TvCastingApp(); Context applicationContext = this.getApplicationContext(); @@ -84,7 +88,7 @@ private void initJni() { appParameters.setDacProvider(new DACProviderStub()); appParameters.setSetupPasscode(GlobalCastingConstants.SetupPasscode); appParameters.setDiscriminator(GlobalCastingConstants.Discriminator); - tvCastingApp.initApp(applicationContext, appParameters); + return tvCastingApp.initApp(applicationContext, appParameters); } private void showFragment(Fragment fragment, boolean showOnBack) { diff --git a/examples/tv-casting-app/android/App/app/src/main/jni/com/chip/casting/TvCastingApp.java b/examples/tv-casting-app/android/App/app/src/main/jni/com/chip/casting/TvCastingApp.java index c34bb129b2b64d..68b98fc72feb03 100644 --- a/examples/tv-casting-app/android/App/app/src/main/jni/com/chip/casting/TvCastingApp.java +++ b/examples/tv-casting-app/android/App/app/src/main/jni/com/chip/casting/TvCastingApp.java @@ -65,15 +65,32 @@ public boolean initApp(Context applicationContext, AppParameters appParameters) new ChipMdnsCallbackImpl(), new DiagnosticDataProviderImpl(applicationContext)); - chipPlatform.updateCommissionableDataProviderData( - appParameters.getSpake2pVerifierBase64(), - appParameters.getSpake2pSaltBase64(), - appParameters.getSpake2pIterationCount(), - appParameters.getSetupPasscode(), - appParameters.getDiscriminator()); + boolean ret = + chipPlatform.updateCommissionableDataProviderData( + appParameters.getSpake2pVerifierBase64(), + appParameters.getSpake2pSaltBase64(), + appParameters.getSpake2pIterationCount(), + appParameters.getSetupPasscode(), + appParameters.getDiscriminator()); + if (!ret) { + Log.e( + TAG, + "TvCastingApp.initApp failed to updateCommissionableDataProviderData on chipPlatform"); + return ret; + } + + ret = preInitJni(appParameters); + if (!ret) { + Log.e(TAG, "TvCastingApp.initApp failed in preInitJni"); + return ret; + } chipAppServer = new ChipAppServer(); - chipAppServer.startApp(); + ret = chipAppServer.startApp(); + if (!ret) { + Log.e(TAG, "TvCastingApp.initApp failed in start chipAppServer"); + return ret; + } setDACProvider(appParameters.getDacProvider()); return initJni(appParameters); @@ -81,6 +98,8 @@ public boolean initApp(Context applicationContext, AppParameters appParameters) private native void setDACProvider(DACProvider provider); + private native boolean preInitJni(AppParameters appParameters); + private native boolean initJni(AppParameters appParameters); public void discoverVideoPlayerCommissioners( diff --git a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/TvCastingApp-JNI.cpp b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/TvCastingApp-JNI.cpp index d702764c5cc7c1..bb502078b501a5 100644 --- a/examples/tv-casting-app/android/App/app/src/main/jni/cpp/TvCastingApp-JNI.cpp +++ b/examples/tv-casting-app/android/App/app/src/main/jni/cpp/TvCastingApp-JNI.cpp @@ -52,6 +52,32 @@ void JNI_OnUnload(JavaVM * jvm, void * reserved) return AndroidAppServerJNI_OnUnload(jvm, reserved); } +JNI_METHOD(jboolean, preInitJni)(JNIEnv *, jobject, jobject jAppParameters) +{ + chip::DeviceLayer::StackLock lock; + ChipLogProgress(AppServer, "JNI_METHOD preInitJni called"); + + CHIP_ERROR err = CHIP_NO_ERROR; + if (jAppParameters == nullptr) + { + err = CastingServer::GetInstance()->PreInit(); + } + else + { + AppParams appParams; + err = convertJAppParametersToCppAppParams(jAppParameters, appParams); + VerifyOrExit(err == CHIP_NO_ERROR, + ChipLogError(AppServer, "Conversion of AppParameters from jobject to Cpp type failed: %" CHIP_ERROR_FORMAT, + err.Format())); + err = CastingServer::GetInstance()->PreInit(&appParams); + } + VerifyOrExit( + err == CHIP_NO_ERROR, + ChipLogError(AppServer, "Call to CastingServer::GetInstance()->PreInit() failed: %" CHIP_ERROR_FORMAT, err.Format())); +exit: + return (err == CHIP_NO_ERROR); +} + JNI_METHOD(jboolean, initJni)(JNIEnv *, jobject, jobject jAppParameters) { chip::DeviceLayer::StackLock lock; @@ -74,12 +100,7 @@ JNI_METHOD(jboolean, initJni)(JNIEnv *, jobject, jobject jAppParameters) VerifyOrExit(err == CHIP_NO_ERROR, ChipLogError(AppServer, "Call to CastingServer::GetInstance()->Init() failed: %" CHIP_ERROR_FORMAT, err.Format())); exit: - if (err != CHIP_NO_ERROR) - { - return false; - } - - return true; + return (err == CHIP_NO_ERROR); } JNI_METHOD(void, setDACProvider)(JNIEnv *, jobject, jobject provider) @@ -123,12 +144,7 @@ JNI_METHOD(jboolean, openBasicCommissioningWindow) ChipLogError(AppServer, "CastingServer::OpenBasicCommissioningWindow failed: %" CHIP_ERROR_FORMAT, err.Format())); exit: - if (err != CHIP_NO_ERROR) - { - return false; - } - - return true; + return (err == CHIP_NO_ERROR); } JNI_METHOD(jobject, readCachedVideoPlayers)(JNIEnv * env, jobject) @@ -196,12 +212,7 @@ JNI_METHOD(jboolean, verifyOrEstablishConnection) ChipLogError(AppServer, "CastingServer::OpenBasicCommissioningWindow failed: %" CHIP_ERROR_FORMAT, err.Format())); exit: - if (err != CHIP_NO_ERROR) - { - return false; - } - - return true; + return (err == CHIP_NO_ERROR); } JNI_METHOD(void, shutdownAllSubscriptions)(JNIEnv * env, jobject) @@ -321,12 +332,7 @@ JNI_METHOD(jboolean, contentLauncherLaunchURL) env->ReleaseStringUTFChars(contentDisplayStr, nativeContentDisplayStr); exit: - if (err != CHIP_NO_ERROR) - { - return false; - } - - return true; + return (err == CHIP_NO_ERROR); } CHIP_ERROR CreateParameter(JNIEnv * env, jobject jParameter, @@ -429,12 +435,7 @@ JNI_METHOD(jboolean, contentLauncher_1launchContent) env->ReleaseStringUTFChars(jData, nativeData); exit: - if (err != CHIP_NO_ERROR) - { - return false; - } - - return true; + return (err == CHIP_NO_ERROR); } JNI_METHOD(jboolean, contentLauncher_1subscribeToSupportedStreamingProtocols) @@ -486,12 +487,7 @@ JNI_METHOD(jboolean, contentLauncher_1subscribeToSupportedStreamingProtocols) err.Format())); exit: - if (err != CHIP_NO_ERROR) - { - return false; - } - - return true; + return (err == CHIP_NO_ERROR); } JNI_METHOD(jboolean, levelControl_1step) @@ -520,12 +516,7 @@ JNI_METHOD(jboolean, levelControl_1step) ChipLogError(AppServer, "CastingServer.LevelControl_Step failed %" CHIP_ERROR_FORMAT, err.Format())); exit: - if (err != CHIP_NO_ERROR) - { - return false; - } - - return true; + return (err == CHIP_NO_ERROR); } JNI_METHOD(jboolean, levelControl_1moveToLevel) @@ -554,12 +545,7 @@ JNI_METHOD(jboolean, levelControl_1moveToLevel) ChipLogError(AppServer, "CastingServer.LevelControl_MoveToLevel failed %" CHIP_ERROR_FORMAT, err.Format())); exit: - if (err != CHIP_NO_ERROR) - { - return false; - } - - return true; + return (err == CHIP_NO_ERROR); } JNI_METHOD(jboolean, levelControl_1subscribeToCurrentLevel) @@ -605,12 +591,7 @@ JNI_METHOD(jboolean, levelControl_1subscribeToCurrentLevel) ChipLogError(AppServer, "CastingServer.LevelControl_SubscribeToCurrentLevel failed %" CHIP_ERROR_FORMAT, err.Format())); exit: - if (err != CHIP_NO_ERROR) - { - return false; - } - - return true; + return (err == CHIP_NO_ERROR); } JNI_METHOD(jboolean, levelControl_1subscribeToMinLevel) @@ -654,12 +635,7 @@ JNI_METHOD(jboolean, levelControl_1subscribeToMinLevel) ChipLogError(AppServer, "CastingServer.LevelControl_SubscribeToMinLevel failed %" CHIP_ERROR_FORMAT, err.Format())); exit: - if (err != CHIP_NO_ERROR) - { - return false; - } - - return true; + return (err == CHIP_NO_ERROR); } JNI_METHOD(jboolean, levelControl_1subscribeToMaxLevel) @@ -703,12 +679,7 @@ JNI_METHOD(jboolean, levelControl_1subscribeToMaxLevel) ChipLogError(AppServer, "CastingServer.LevelControl_SubscribeToMaxLevel failed %" CHIP_ERROR_FORMAT, err.Format())); exit: - if (err != CHIP_NO_ERROR) - { - return false; - } - - return true; + return (err == CHIP_NO_ERROR); } JNI_METHOD(jboolean, onOff_1on) @@ -733,12 +704,7 @@ JNI_METHOD(jboolean, onOff_1on) VerifyOrExit(CHIP_NO_ERROR == err, ChipLogError(AppServer, "CastingServer.OnOff_On failed %" CHIP_ERROR_FORMAT, err.Format())); exit: - if (err != CHIP_NO_ERROR) - { - return false; - } - - return true; + return (err == CHIP_NO_ERROR); } JNI_METHOD(jboolean, onOff_1off) @@ -763,12 +729,7 @@ JNI_METHOD(jboolean, onOff_1off) VerifyOrExit(CHIP_NO_ERROR == err, ChipLogError(AppServer, "CastingServer.OnOff_Off failed %" CHIP_ERROR_FORMAT, err.Format())); exit: - if (err != CHIP_NO_ERROR) - { - return false; - } - - return true; + return (err == CHIP_NO_ERROR); } JNI_METHOD(jboolean, onOff_1toggle) @@ -794,12 +755,7 @@ JNI_METHOD(jboolean, onOff_1toggle) ChipLogError(AppServer, "CastingServer.OnOff_Toggle failed %" CHIP_ERROR_FORMAT, err.Format())); exit: - if (err != CHIP_NO_ERROR) - { - return false; - } - - return true; + return (err == CHIP_NO_ERROR); } JNI_METHOD(jboolean, mediaPlayback_1play) @@ -825,12 +781,7 @@ JNI_METHOD(jboolean, mediaPlayback_1play) ChipLogError(AppServer, "CastingServer.MediaPlayback_Play failed %" CHIP_ERROR_FORMAT, err.Format())); exit: - if (err != CHIP_NO_ERROR) - { - return false; - } - - return true; + return (err == CHIP_NO_ERROR); } JNI_METHOD(jboolean, mediaPlayback_1pause) @@ -856,12 +807,7 @@ JNI_METHOD(jboolean, mediaPlayback_1pause) ChipLogError(AppServer, "CastingServer.MediaPlayback_Pause failed %" CHIP_ERROR_FORMAT, err.Format())); exit: - if (err != CHIP_NO_ERROR) - { - return false; - } - - return true; + return (err == CHIP_NO_ERROR); } JNI_METHOD(jboolean, mediaPlayback_1stopPlayback) @@ -888,12 +834,7 @@ JNI_METHOD(jboolean, mediaPlayback_1stopPlayback) ChipLogError(AppServer, "CastingServer.MediaPlayback_StopPlayback failed %" CHIP_ERROR_FORMAT, err.Format())); exit: - if (err != CHIP_NO_ERROR) - { - return false; - } - - return true; + return (err == CHIP_NO_ERROR); } JNI_METHOD(jboolean, mediaPlayback_1next) @@ -919,12 +860,7 @@ JNI_METHOD(jboolean, mediaPlayback_1next) ChipLogError(AppServer, "CastingServer.MediaPlayback_Next failed %" CHIP_ERROR_FORMAT, err.Format())); exit: - if (err != CHIP_NO_ERROR) - { - return false; - } - - return true; + return (err == CHIP_NO_ERROR); } JNI_METHOD(jboolean, mediaPlayback_1seek) @@ -951,12 +887,7 @@ JNI_METHOD(jboolean, mediaPlayback_1seek) ChipLogError(AppServer, "CastingServer.MediaPlayback_Seek failed %" CHIP_ERROR_FORMAT, err.Format())); exit: - if (err != CHIP_NO_ERROR) - { - return false; - } - - return true; + return (err == CHIP_NO_ERROR); } JNI_METHOD(jboolean, mediaPlayback_1skipForward) @@ -983,12 +914,7 @@ JNI_METHOD(jboolean, mediaPlayback_1skipForward) ChipLogError(AppServer, "CastingServer.MediaPlayback_SkipForward failed %" CHIP_ERROR_FORMAT, err.Format())); exit: - if (err != CHIP_NO_ERROR) - { - return false; - } - - return true; + return (err == CHIP_NO_ERROR); } JNI_METHOD(jboolean, mediaPlayback_1skipBackward) @@ -1015,12 +941,7 @@ JNI_METHOD(jboolean, mediaPlayback_1skipBackward) ChipLogError(AppServer, "CastingServer.MediaPlayback_SkipBackward failed %" CHIP_ERROR_FORMAT, err.Format())); exit: - if (err != CHIP_NO_ERROR) - { - return false; - } - - return true; + return (err == CHIP_NO_ERROR); } JNI_METHOD(jboolean, mediaPlayback_1subscribeToCurrentState) @@ -1066,12 +987,7 @@ JNI_METHOD(jboolean, mediaPlayback_1subscribeToCurrentState) ChipLogError(AppServer, "CastingServer.MediaPlayback_SubscribeToCurrentState failed %" CHIP_ERROR_FORMAT, err.Format())); exit: - if (err != CHIP_NO_ERROR) - { - return false; - } - - return true; + return (err == CHIP_NO_ERROR); } JNI_METHOD(jboolean, mediaPlayback_1subscribeToDuration) @@ -1116,12 +1032,7 @@ JNI_METHOD(jboolean, mediaPlayback_1subscribeToDuration) ChipLogError(AppServer, "CastingServer.mediaPlayback_subscribeToDuration failed %" CHIP_ERROR_FORMAT, err.Format())); exit: - if (err != CHIP_NO_ERROR) - { - return false; - } - - return true; + return (err == CHIP_NO_ERROR); } JNI_METHOD(jboolean, mediaPlayback_1subscribeToSampledPosition) @@ -1168,12 +1079,7 @@ JNI_METHOD(jboolean, mediaPlayback_1subscribeToSampledPosition) ChipLogError(AppServer, "CastingServer.mediaPlayback_subscribeToSampledPosition failed %" CHIP_ERROR_FORMAT, err.Format())); exit: - if (err != CHIP_NO_ERROR) - { - return false; - } - - return true; + return (err == CHIP_NO_ERROR); } JNI_METHOD(jboolean, mediaPlayback_1subscribeToPlaybackSpeed) @@ -1219,12 +1125,7 @@ JNI_METHOD(jboolean, mediaPlayback_1subscribeToPlaybackSpeed) ChipLogError(AppServer, "CastingServer.mediaPlayback_subscribeToPlaybackSpeed failed %" CHIP_ERROR_FORMAT, err.Format())); exit: - if (err != CHIP_NO_ERROR) - { - return false; - } - - return true; + return (err == CHIP_NO_ERROR); } JNI_METHOD(jboolean, mediaPlayback_1subscribeToSeekRangeEnd) @@ -1270,12 +1171,7 @@ JNI_METHOD(jboolean, mediaPlayback_1subscribeToSeekRangeEnd) ChipLogError(AppServer, "CastingServer.mediaPlayback_subscribeToSeekRangeEnd failed %" CHIP_ERROR_FORMAT, err.Format())); exit: - if (err != CHIP_NO_ERROR) - { - return false; - } - - return true; + return (err == CHIP_NO_ERROR); } JNI_METHOD(jboolean, mediaPlayback_1subscribeToSeekRangeStart) @@ -1322,12 +1218,7 @@ JNI_METHOD(jboolean, mediaPlayback_1subscribeToSeekRangeStart) ChipLogError(AppServer, "CastingServer.mediaPlayback_subscribeToSeekRangeStart failed %" CHIP_ERROR_FORMAT, err.Format())); exit: - if (err != CHIP_NO_ERROR) - { - return false; - } - - return true; + return (err == CHIP_NO_ERROR); } JNI_METHOD(jboolean, applicationLauncher_1launchApp) @@ -1362,12 +1253,7 @@ JNI_METHOD(jboolean, applicationLauncher_1launchApp) env->ReleaseStringUTFChars(applicationId, nativeApplicationId); exit: - if (err != CHIP_NO_ERROR) - { - return false; - } - - return true; + return (err == CHIP_NO_ERROR); } JNI_METHOD(jboolean, applicationLauncher_1stopApp) @@ -1400,12 +1286,7 @@ JNI_METHOD(jboolean, applicationLauncher_1stopApp) env->ReleaseStringUTFChars(applicationId, nativeApplicationId); exit: - if (err != CHIP_NO_ERROR) - { - return false; - } - - return true; + return (err == CHIP_NO_ERROR); } JNI_METHOD(jboolean, applicationLauncher_1hideApp) @@ -1438,12 +1319,7 @@ JNI_METHOD(jboolean, applicationLauncher_1hideApp) env->ReleaseStringUTFChars(applicationId, nativeApplicationId); exit: - if (err != CHIP_NO_ERROR) - { - return false; - } - - return true; + return (err == CHIP_NO_ERROR); } JNI_METHOD(jboolean, targetNavigator_1navigateTarget) @@ -1477,12 +1353,7 @@ JNI_METHOD(jboolean, targetNavigator_1navigateTarget) env->ReleaseStringUTFChars(data, nativeData); } exit: - if (err != CHIP_NO_ERROR) - { - return false; - } - - return true; + return (err == CHIP_NO_ERROR); } JNI_METHOD(jboolean, targetNavigator_1subscribeToCurrentTarget) @@ -1529,12 +1400,7 @@ JNI_METHOD(jboolean, targetNavigator_1subscribeToCurrentTarget) ChipLogError(AppServer, "CastingServer.targetNavigator_subscribeToCurrentTarget failed %" CHIP_ERROR_FORMAT, err.Format())); exit: - if (err != CHIP_NO_ERROR) - { - return false; - } - - return true; + return (err == CHIP_NO_ERROR); } JNI_METHOD(jboolean, targetNavigator_1subscribeToTargetList) @@ -1580,12 +1446,7 @@ JNI_METHOD(jboolean, targetNavigator_1subscribeToTargetList) ChipLogError(AppServer, "CastingServer.targetNavigator_subscribeToTargetList failed %" CHIP_ERROR_FORMAT, err.Format())); exit: - if (err != CHIP_NO_ERROR) - { - return false; - } - - return true; + return (err == CHIP_NO_ERROR); } JNI_METHOD(jboolean, keypadInput_1sendKey) @@ -1612,12 +1473,7 @@ JNI_METHOD(jboolean, keypadInput_1sendKey) ChipLogError(AppServer, "CastingServer.KeypadInput_SendKey failed %" CHIP_ERROR_FORMAT, err.Format())); exit: - if (err != CHIP_NO_ERROR) - { - return false; - } - - return true; + return (err == CHIP_NO_ERROR); } // APPLICATION BASIC @@ -1664,12 +1520,7 @@ JNI_METHOD(jboolean, applicationBasic_1subscribeToVendorName) ChipLogError(AppServer, "CastingServer.applicationBasic_subscribeToVendorName failed %" CHIP_ERROR_FORMAT, err.Format())); exit: - if (err != CHIP_NO_ERROR) - { - return false; - } - - return true; + return (err == CHIP_NO_ERROR); } JNI_METHOD(jboolean, applicationBasic_1subscribeToVendorID) @@ -1715,12 +1566,7 @@ JNI_METHOD(jboolean, applicationBasic_1subscribeToVendorID) ChipLogError(AppServer, "CastingServer.applicationBasic_subscribeToVendorID failed %" CHIP_ERROR_FORMAT, err.Format())); exit: - if (err != CHIP_NO_ERROR) - { - return false; - } - - return true; + return (err == CHIP_NO_ERROR); } JNI_METHOD(jboolean, applicationBasic_1subscribeToApplicationName) @@ -1767,12 +1613,7 @@ JNI_METHOD(jboolean, applicationBasic_1subscribeToApplicationName) err.Format())); exit: - if (err != CHIP_NO_ERROR) - { - return false; - } - - return true; + return (err == CHIP_NO_ERROR); } JNI_METHOD(jboolean, applicationBasic_1subscribeToProductID) @@ -1818,12 +1659,7 @@ JNI_METHOD(jboolean, applicationBasic_1subscribeToProductID) ChipLogError(AppServer, "CastingServer.applicationBasic_subscribeToProductID failed %" CHIP_ERROR_FORMAT, err.Format())); exit: - if (err != CHIP_NO_ERROR) - { - return false; - } - - return true; + return (err == CHIP_NO_ERROR); } JNI_METHOD(jboolean, applicationBasic_1subscribeToApplicationVersion) @@ -1873,12 +1709,7 @@ JNI_METHOD(jboolean, applicationBasic_1subscribeToApplicationVersion) err.Format())); exit: - if (err != CHIP_NO_ERROR) - { - return false; - } - - return true; + return (err == CHIP_NO_ERROR); } JNI_METHOD(jboolean, applicationBasic_1readVendorName) @@ -1915,12 +1746,7 @@ JNI_METHOD(jboolean, applicationBasic_1readVendorName) ChipLogError(AppServer, "CastingServer.applicationBasic_1readVendorName failed %" CHIP_ERROR_FORMAT, err.Format())); exit: - if (err != CHIP_NO_ERROR) - { - return false; - } - - return true; + return (err == CHIP_NO_ERROR); } JNI_METHOD(jboolean, applicationBasic_1readVendorID) @@ -1954,12 +1780,7 @@ JNI_METHOD(jboolean, applicationBasic_1readVendorID) ChipLogError(AppServer, "CastingServer.applicationBasic_ReadVendorID failed %" CHIP_ERROR_FORMAT, err.Format())); exit: - if (err != CHIP_NO_ERROR) - { - return false; - } - - return true; + return (err == CHIP_NO_ERROR); } JNI_METHOD(jboolean, applicationBasic_1readApplicationName) @@ -1997,12 +1818,7 @@ JNI_METHOD(jboolean, applicationBasic_1readApplicationName) ChipLogError(AppServer, "CastingServer.applicationBasic_ReadApplicationName failed %" CHIP_ERROR_FORMAT, err.Format())); exit: - if (err != CHIP_NO_ERROR) - { - return false; - } - - return true; + return (err == CHIP_NO_ERROR); } JNI_METHOD(jboolean, applicationBasic_1readProductID) @@ -2036,12 +1852,7 @@ JNI_METHOD(jboolean, applicationBasic_1readProductID) ChipLogError(AppServer, "CastingServer.applicationBasic_ReadProductID failed %" CHIP_ERROR_FORMAT, err.Format())); exit: - if (err != CHIP_NO_ERROR) - { - return false; - } - - return true; + return (err == CHIP_NO_ERROR); } JNI_METHOD(jboolean, applicationBasic_1readApplicationVersion) @@ -2079,10 +1890,5 @@ JNI_METHOD(jboolean, applicationBasic_1readApplicationVersion) ChipLogError(AppServer, "CastingServer.applicationBasic_ReadApplicationVersion failed %" CHIP_ERROR_FORMAT, err.Format())); exit: - if (err != CHIP_NO_ERROR) - { - return false; - } - - return true; + return (err == CHIP_NO_ERROR); } diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.h b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.h index 2e1b9801cc03c2..1dc7e3417b949c 100644 --- a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.h +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.h @@ -33,9 +33,9 @@ + (CastingServerBridge * _Nullable)getSharedInstance; -- (void)initApp:(AppParameters * _Nullable)appParameters - clientQueue:(dispatch_queue_t _Nonnull)clientQueue - initAppStatusHandler:(nullable void (^)(bool))initAppStatusHandler; +- (MatterError * _Nonnull)initializeApp:(AppParameters * _Nullable)appParameters + clientQueue:(dispatch_queue_t _Nonnull)clientQueue + initAppStatusHandler:(nullable void (^)(bool))initAppStatusHandler; /*! @brief Browse for on-network commissioner TVs diff --git a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.mm b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.mm index 6e64a999feaaf9..c8cfd5f2971681 100644 --- a/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.mm +++ b/examples/tv-casting-app/darwin/MatterTvCastingBridge/MatterTvCastingBridge/CastingServerBridge.mm @@ -108,9 +108,9 @@ - (instancetype)init return self; } -- (void)initApp:(AppParameters * _Nullable)appParameters - clientQueue:(dispatch_queue_t _Nonnull)clientQueue - initAppStatusHandler:(nullable void (^)(bool))initAppStatusHandler +- (MatterError *)initializeApp:(AppParameters * _Nullable)appParameters + clientQueue:(dispatch_queue_t _Nonnull)clientQueue + initAppStatusHandler:(nullable void (^)(bool))initAppStatusHandler { ChipLogProgress(AppServer, "CastingServerBridge().initApp() called"); @@ -128,7 +128,7 @@ - (void)initApp:(AppParameters * _Nullable)appParameters err = [ConversionUtils convertToCppAppParamsInfoFrom:_appParameters outAppParams:cppAppParams]; if (err != CHIP_NO_ERROR) { ChipLogError(AppServer, "AppParameters conversion failed: %s", ErrorStr(err)); - return; + return [[MatterError alloc] initWithCode:err.AsInteger() message:[NSString stringWithUTF8String:err.AsString()]]; } // set fields in commissionableDataProvider @@ -156,7 +156,7 @@ - (void)initApp:(AppParameters * _Nullable)appParameters setupDiscriminator); if (err != CHIP_NO_ERROR) { ChipLogError(AppServer, "Failed to initialize CommissionableDataProvider: %s", ErrorStr(err)); - return; + return [[MatterError alloc] initWithCode:err.AsInteger() message:[NSString stringWithUTF8String:err.AsString()]]; } if (_appParameters.deviceAttestationCredentials != nil) { @@ -219,13 +219,24 @@ - (void)initApp:(AppParameters * _Nullable)appParameters err = _serverInitParams->InitializeStaticResourcesBeforeServerInit(); if (err != CHIP_NO_ERROR) { ChipLogError(AppServer, "InitializeStaticResourcesBeforeServerInit failed: %s", ErrorStr(err)); - return; + return [[MatterError alloc] initWithCode:err.AsInteger() message:[NSString stringWithUTF8String:err.AsString()]]; + } + + AppParams appParam; + if (appParameters == nil) { + err = CastingServer::GetInstance()->PreInit(); + } else if ((err = [ConversionUtils convertToCppAppParamsInfoFrom:appParameters outAppParams:appParam]) == CHIP_NO_ERROR) { + err = CastingServer::GetInstance()->PreInit(&appParam); + } + if (err != CHIP_NO_ERROR) { + ChipLogError(AppServer, "CastingServer PreInit failed: %s", ErrorStr(err)); + return [[MatterError alloc] initWithCode:err.AsInteger() message:[NSString stringWithUTF8String:err.AsString()]]; } err = chip::Server::GetInstance().Init(*_serverInitParams); if (err != CHIP_NO_ERROR) { ChipLogError(AppServer, "chip::Server init failed: %s", ErrorStr(err)); - return; + return [[MatterError alloc] initWithCode:err.AsInteger() message:[NSString stringWithUTF8String:err.AsString()]]; } _chipWorkQueue = chip::DeviceLayer::PlatformMgrImpl().GetWorkQueue(); @@ -251,6 +262,9 @@ - (void)initApp:(AppParameters * _Nullable)appParameters initAppStatusHandler(initAppStatus); }); }); + + return [[MatterError alloc] initWithCode:CHIP_NO_ERROR.AsInteger() + message:[NSString stringWithUTF8String:CHIP_NO_ERROR.AsString()]]; } - (void)discoverCommissioners:(dispatch_queue_t _Nonnull)clientQueue @@ -527,6 +541,17 @@ - (void)startMatterServer:(dispatch_queue_t _Nonnull)clientQueue return; } + // Initialize binding handlers + err = CastingServer::GetInstance()->InitBindingHandlers(); + if (err != CHIP_NO_ERROR) { + ChipLogError(AppServer, "Binding init failed: %s", ErrorStr(err)); + dispatch_async(clientQueue, ^{ + startMatterServerCompletionCallback( + [[MatterError alloc] initWithCode:err.AsInteger() message:[NSString stringWithUTF8String:err.AsString()]]); + }); + return; + } + // Now reconnect to the VideoPlayer the casting app was previously connected to (if any) if (self->_previouslyConnectedVideoPlayer != nil) { ChipLogProgress( diff --git a/examples/tv-casting-app/darwin/TvCasting/TvCasting/TvCastingApp.swift b/examples/tv-casting-app/darwin/TvCasting/TvCasting/TvCastingApp.swift index 73c4eb17494b1a..f0d67cacee9cd5 100644 --- a/examples/tv-casting-app/darwin/TvCasting/TvCasting/TvCastingApp.swift +++ b/examples/tv-casting-app/darwin/TvCasting/TvCasting/TvCastingApp.swift @@ -46,9 +46,10 @@ struct TvCastingApp: App { appParameters.onboardingPayload = onboardingParameters - castingServerBridge.initApp(appParameters, clientQueue: DispatchQueue.main, initAppStatusHandler: { (result: Bool) -> () in - self.Log.info("initApp result \(result)") + let err = castingServerBridge.initializeApp(appParameters, clientQueue: DispatchQueue.main, initAppStatusHandler: { (result: Bool) -> () in + self.Log.info("initializeApp result \(result)") }) + self.Log.info("initializeApp return value \(err)") } }) .onReceive(NotificationCenter.default.publisher(for: UIApplication.willResignActiveNotification)) { _ in diff --git a/examples/tv-casting-app/linux/main.cpp b/examples/tv-casting-app/linux/main.cpp index d6d674ebb2a954..75584254a6002f 100644 --- a/examples/tv-casting-app/linux/main.cpp +++ b/examples/tv-casting-app/linux/main.cpp @@ -134,6 +134,8 @@ int main(int argc, char * argv[]) SetDeviceAttestationVerifier(GetDefaultDACVerifier(testingRootStore)); } + SuccessOrExit(err = CastingServer::GetInstance()->PreInit()); + // Enter commissioning mode, open commissioning window static chip::CommonCaseDeviceServerInitParams initParams; VerifyOrDie(CHIP_NO_ERROR == initParams.InitializeStaticResourcesBeforeServerInit()); diff --git a/examples/tv-casting-app/tv-casting-common/include/CastingServer.h b/examples/tv-casting-app/tv-casting-common/include/CastingServer.h index fc0c49556c6cd6..ad124676a8bcd1 100644 --- a/examples/tv-casting-app/tv-casting-common/include/CastingServer.h +++ b/examples/tv-casting-app/tv-casting-common/include/CastingServer.h @@ -53,7 +53,9 @@ class CastingServer void operator=(const CastingServer &) = delete; static CastingServer * GetInstance(); + CHIP_ERROR PreInit(AppParams * AppParams = nullptr); CHIP_ERROR Init(AppParams * AppParams = nullptr); + CHIP_ERROR InitBindingHandlers(); CHIP_ERROR DiscoverCommissioners(); const chip::Dnssd::DiscoveredNodeData * @@ -418,7 +420,8 @@ class CastingServer static CastingServer * castingServer_; CastingServer(); - CHIP_ERROR InitBindingHandlers(); + CHIP_ERROR SetRotatingDeviceIdUniqueId(chip::Optional rotatingDeviceIdUniqueId); + static void DeviceEventCallback(const chip::DeviceLayer::ChipDeviceEvent * event, intptr_t arg); void ReadServerClusters(chip::EndpointId endpointId); diff --git a/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp b/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp index 786a62b86df22c..adba7ff25454b9 100644 --- a/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp +++ b/examples/tv-casting-app/tv-casting-common/src/CastingServer.cpp @@ -36,6 +36,15 @@ CastingServer * CastingServer::GetInstance() return castingServer_; } +CHIP_ERROR CastingServer::PreInit(AppParams * appParams) +{ +#if CHIP_ENABLE_ROTATING_DEVICE_ID + return SetRotatingDeviceIdUniqueId(appParams != nullptr ? appParams->GetRotatingDeviceIdUniqueId() : chip::NullOptional); +#else + return CHIP_ERROR_NOT_IMPLEMENTED; +#endif // CHIP_ENABLE_ROTATING_DEVICE_ID +} + CHIP_ERROR CastingServer::Init(AppParams * AppParams) { if (mInited) @@ -43,36 +52,40 @@ CHIP_ERROR CastingServer::Init(AppParams * AppParams) return CHIP_NO_ERROR; } + // Initialize binding handlers + ReturnErrorOnFailure(InitBindingHandlers()); + + // Add callback to send Content casting commands after commissioning completes + ReturnErrorOnFailure(DeviceLayer::PlatformMgrImpl().AddEventHandler(DeviceEventCallback, 0)); + + mInited = true; + return CHIP_NO_ERROR; +} + +CHIP_ERROR CastingServer::SetRotatingDeviceIdUniqueId(chip::Optional rotatingDeviceIdUniqueIdOptional) +{ #if CHIP_ENABLE_ROTATING_DEVICE_ID // if this class's client provided a RotatingDeviceIdUniqueId, use that - if (AppParams != nullptr && AppParams->GetRotatingDeviceIdUniqueId().HasValue()) + if (rotatingDeviceIdUniqueIdOptional.HasValue()) { - ByteSpan rotatingDeviceIdUniqueId(AppParams->GetRotatingDeviceIdUniqueId().Value()); - chip::DeviceLayer::ConfigurationMgr().SetRotatingDeviceIdUniqueId(rotatingDeviceIdUniqueId); + ChipLogProgress(AppServer, "Setting rotatingDeviceIdUniqueId received from client app"); + return chip::DeviceLayer::ConfigurationMgr().SetRotatingDeviceIdUniqueId(rotatingDeviceIdUniqueIdOptional.Value()); } #ifdef CHIP_DEVICE_CONFIG_ROTATING_DEVICE_ID_UNIQUE_ID else { // otherwise, generate and set a random uniqueId for generating rotatingId + ChipLogProgress(AppServer, "Setting random rotatingDeviceIdUniqueId"); uint8_t rotatingDeviceIdUniqueId[chip::DeviceLayer::ConfigurationManager::kRotatingDeviceIDUniqueIDLength]; for (size_t i = 0; i < sizeof(rotatingDeviceIdUniqueId); i++) { rotatingDeviceIdUniqueId[i] = chip::Crypto::GetRandU8(); } - // ByteSpan rotatingDeviceIdUniqueIdSpan(rotatingDeviceIdUniqueId); - chip::DeviceLayer::ConfigurationMgr().SetRotatingDeviceIdUniqueId(ByteSpan(rotatingDeviceIdUniqueId)); + return chip::DeviceLayer::ConfigurationMgr().SetRotatingDeviceIdUniqueId(ByteSpan(rotatingDeviceIdUniqueId)); } #endif // CHIP_DEVICE_CONFIG_ROTATING_DEVICE_ID_UNIQUE_ID #endif // CHIP_ENABLE_ROTATING_DEVICE_ID - - // Initialize binding handlers - ReturnErrorOnFailure(InitBindingHandlers()); - - // Add callback to send Content casting commands after commissioning completes - ReturnErrorOnFailure(DeviceLayer::PlatformMgrImpl().AddEventHandler(DeviceEventCallback, 0)); - - mInited = true; return CHIP_NO_ERROR; } @@ -289,16 +302,17 @@ CHIP_ERROR CastingServer::VerifyOrEstablishConnection(TargetVideoPlayerInfo & ta mOnConnectionFailureClientCallback = onConnectionFailure; mOnNewOrUpdatedEndpoint = onNewOrUpdatedEndpoint; + chip::OperationalDeviceProxy * prevDeviceProxy = + CastingServer::GetInstance()->mActiveTargetVideoPlayerInfo.GetOperationalDeviceProxy(); + if (prevDeviceProxy != nullptr) + { + ChipLogProgress(AppServer, "CastingServer::VerifyOrEstablishConnection Disconnecting previous deviceProxy"); + prevDeviceProxy->Disconnect(); + } + return targetVideoPlayerInfo.FindOrEstablishCASESession( [](TargetVideoPlayerInfo * videoPlayer) { ChipLogProgress(AppServer, "CastingServer::OnConnectionSuccess lambda called"); - chip::OperationalDeviceProxy * prevDeviceProxy = - CastingServer::GetInstance()->mActiveTargetVideoPlayerInfo.GetOperationalDeviceProxy(); - if (prevDeviceProxy != nullptr) - { - ChipLogProgress(AppServer, "CastingServer::OnConnectionSuccess lambda Disconnecting deviceProxy"); - prevDeviceProxy->Disconnect(); - } CastingServer::GetInstance()->mActiveTargetVideoPlayerInfo = *videoPlayer; CastingServer::GetInstance()->mOnConnectionSuccessClientCallback(videoPlayer); }, diff --git a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter index 313ef0dece7880..30dd570ec0d003 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter @@ -102,17 +102,21 @@ server cluster Groups = 4 { } server cluster Scenes = 5 { + bitmap SceneFeatures : BITMAP32 { + kSceneNames = 0x1; + } + bitmap ScenesCopyMode : BITMAP8 { kCopyAllScenes = 0x1; } struct ExtensionFieldSet { - cluster_id clusterId = 0; + cluster_id clusterID = 0; AttributeValuePair attributeValueList[] = 1; } struct AttributeValuePair { - optional attrib_id attributeId = 0; + optional attrib_id attributeID = 0; int8u attributeValue[] = 1; } @@ -125,52 +129,52 @@ server cluster Scenes = 5 { readonly attribute int16u clusterRevision = 65533; request struct AddSceneRequest { - group_id groupId = 0; - INT8U sceneId = 1; + group_id groupID = 0; + INT8U sceneID = 1; INT16U transitionTime = 2; CHAR_STRING sceneName = 3; ExtensionFieldSet extensionFieldSets[] = 4; } request struct ViewSceneRequest { - group_id groupId = 0; - INT8U sceneId = 1; + group_id groupID = 0; + INT8U sceneID = 1; } request struct RemoveSceneRequest { - group_id groupId = 0; - INT8U sceneId = 1; + group_id groupID = 0; + INT8U sceneID = 1; } request struct RemoveAllScenesRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct StoreSceneRequest { - group_id groupId = 0; - INT8U sceneId = 1; + group_id groupID = 0; + INT8U sceneID = 1; } request struct RecallSceneRequest { - group_id groupId = 0; - INT8U sceneId = 1; + group_id groupID = 0; + INT8U sceneID = 1; optional nullable INT16U transitionTime = 2; } request struct GetSceneMembershipRequest { - group_id groupId = 0; + group_id groupID = 0; } response struct AddSceneResponse = 0 { ENUM8 status = 0; - group_id groupId = 1; - INT8U sceneId = 2; + group_id groupID = 1; + INT8U sceneID = 2; } response struct ViewSceneResponse = 1 { ENUM8 status = 0; - group_id groupId = 1; - INT8U sceneId = 2; + group_id groupID = 1; + INT8U sceneID = 2; optional INT16U transitionTime = 3; optional CHAR_STRING sceneName = 4; optional ExtensionFieldSet extensionFieldSets[] = 5; @@ -178,25 +182,25 @@ server cluster Scenes = 5 { response struct RemoveSceneResponse = 2 { ENUM8 status = 0; - group_id groupId = 1; - INT8U sceneId = 2; + group_id groupID = 1; + INT8U sceneID = 2; } response struct RemoveAllScenesResponse = 3 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } response struct StoreSceneResponse = 4 { ENUM8 status = 0; - group_id groupId = 1; - INT8U sceneId = 2; + group_id groupID = 1; + INT8U sceneID = 2; } response struct GetSceneMembershipResponse = 6 { ENUM8 status = 0; nullable INT8U capacity = 1; - group_id groupId = 2; + group_id groupID = 2; optional INT8U sceneList[] = 3; } @@ -239,10 +243,6 @@ client cluster OnOff = 6 { kLighting = 0x1; } - bitmap SceneFeatures : BITMAP32 { - kSceneNames = 0x1; - } - readonly attribute boolean onOff = 0; readonly attribute boolean globalSceneControl = 16384; attribute int16u onTime = 16385; @@ -286,10 +286,6 @@ server cluster OnOff = 6 { kLighting = 0x1; } - bitmap SceneFeatures : BITMAP32 { - kSceneNames = 0x1; - } - readonly attribute boolean onOff = 0; readonly attribute boolean globalSceneControl = 16384; attribute int16u onTime = 16385; diff --git a/examples/window-app/common/window-app.matter b/examples/window-app/common/window-app.matter index c3ec3827ddc565..47230a0e09dd18 100644 --- a/examples/window-app/common/window-app.matter +++ b/examples/window-app/common/window-app.matter @@ -114,17 +114,21 @@ server cluster Groups = 4 { } server cluster Scenes = 5 { + bitmap SceneFeatures : BITMAP32 { + kSceneNames = 0x1; + } + bitmap ScenesCopyMode : BITMAP8 { kCopyAllScenes = 0x1; } struct ExtensionFieldSet { - cluster_id clusterId = 0; + cluster_id clusterID = 0; AttributeValuePair attributeValueList[] = 1; } struct AttributeValuePair { - optional attrib_id attributeId = 0; + optional attrib_id attributeID = 0; int8u attributeValue[] = 1; } @@ -140,52 +144,52 @@ server cluster Scenes = 5 { readonly attribute int16u clusterRevision = 65533; request struct AddSceneRequest { - group_id groupId = 0; - INT8U sceneId = 1; + group_id groupID = 0; + INT8U sceneID = 1; INT16U transitionTime = 2; CHAR_STRING sceneName = 3; ExtensionFieldSet extensionFieldSets[] = 4; } request struct ViewSceneRequest { - group_id groupId = 0; - INT8U sceneId = 1; + group_id groupID = 0; + INT8U sceneID = 1; } request struct RemoveSceneRequest { - group_id groupId = 0; - INT8U sceneId = 1; + group_id groupID = 0; + INT8U sceneID = 1; } request struct RemoveAllScenesRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct StoreSceneRequest { - group_id groupId = 0; - INT8U sceneId = 1; + group_id groupID = 0; + INT8U sceneID = 1; } request struct RecallSceneRequest { - group_id groupId = 0; - INT8U sceneId = 1; + group_id groupID = 0; + INT8U sceneID = 1; optional nullable INT16U transitionTime = 2; } request struct GetSceneMembershipRequest { - group_id groupId = 0; + group_id groupID = 0; } response struct AddSceneResponse = 0 { ENUM8 status = 0; - group_id groupId = 1; - INT8U sceneId = 2; + group_id groupID = 1; + INT8U sceneID = 2; } response struct ViewSceneResponse = 1 { ENUM8 status = 0; - group_id groupId = 1; - INT8U sceneId = 2; + group_id groupID = 1; + INT8U sceneID = 2; optional INT16U transitionTime = 3; optional CHAR_STRING sceneName = 4; optional ExtensionFieldSet extensionFieldSets[] = 5; @@ -193,25 +197,25 @@ server cluster Scenes = 5 { response struct RemoveSceneResponse = 2 { ENUM8 status = 0; - group_id groupId = 1; - INT8U sceneId = 2; + group_id groupID = 1; + INT8U sceneID = 2; } response struct RemoveAllScenesResponse = 3 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } response struct StoreSceneResponse = 4 { ENUM8 status = 0; - group_id groupId = 1; - INT8U sceneId = 2; + group_id groupID = 1; + INT8U sceneID = 2; } response struct GetSceneMembershipResponse = 6 { ENUM8 status = 0; nullable INT8U capacity = 1; - group_id groupId = 2; + group_id groupID = 2; optional INT8U sceneList[] = 3; } diff --git a/integrations/docker/images/chip-build-telink/Dockerfile b/integrations/docker/images/chip-build-telink/Dockerfile index 00085e37db68f5..7352a2f0cf02be 100644 --- a/integrations/docker/images/chip-build-telink/Dockerfile +++ b/integrations/docker/images/chip-build-telink/Dockerfile @@ -23,7 +23,7 @@ RUN set -x \ && : # last line # Setup Zephyr -ARG ZEPHYR_REVISION=0074d643c84e985bf91177216b4557236952b4fa +ARG ZEPHYR_REVISION=3da02564e056033ef184081b0ca15e8e00e40bc9 WORKDIR /opt/telink/zephyrproject RUN set -x \ && python3 -m pip install -U --no-cache-dir \ diff --git a/integrations/docker/images/chip-build/version b/integrations/docker/images/chip-build/version index f77e6f8711dc81..d7177d3e99fc58 100644 --- a/integrations/docker/images/chip-build/version +++ b/integrations/docker/images/chip-build/version @@ -1 +1 @@ -0.6.34 Version bump reason: Updating ZAP to v2023.01.19-nightly +0.6.35 Version bump reason: [Telink] Update Telink Docker image (Zephyr update) diff --git a/scripts/py_matter_yamltests/BUILD.gn b/scripts/py_matter_yamltests/BUILD.gn index 8aa7ca8746e440..5c1a2c8bab7e7b 100644 --- a/scripts/py_matter_yamltests/BUILD.gn +++ b/scripts/py_matter_yamltests/BUILD.gn @@ -32,6 +32,12 @@ pw_python_package("matter_yamltests") { "matter_yamltests/fixes.py", "matter_yamltests/parser.py", "matter_yamltests/pics_checker.py", + "matter_yamltests/pseudo_clusters/__init__.py", + "matter_yamltests/pseudo_clusters/clusters/delay_commands.py", + "matter_yamltests/pseudo_clusters/clusters/log_commands.py", + "matter_yamltests/pseudo_clusters/clusters/system_commands.py", + "matter_yamltests/pseudo_clusters/pseudo_cluster.py", + "matter_yamltests/pseudo_clusters/pseudo_clusters.py", ] python_deps = [ "${chip_root}/scripts/py_matter_idl:matter_idl" ] @@ -39,6 +45,7 @@ pw_python_package("matter_yamltests") { tests = [ "test_spec_definitions.py", "test_pics_checker.py", + "test_pseudo_clusters.py", ] # TODO: at a future time consider enabling all (* or missing) here to get diff --git a/scripts/py_matter_yamltests/matter_yamltests/definitions.py b/scripts/py_matter_yamltests/matter_yamltests/definitions.py index 9f1960a1ae815a..35e546bb64af24 100644 --- a/scripts/py_matter_yamltests/matter_yamltests/definitions.py +++ b/scripts/py_matter_yamltests/matter_yamltests/definitions.py @@ -14,6 +14,8 @@ # limitations under the License. import enum +import functools +import glob from typing import List from matter_idl.matter_idl_types import * @@ -228,3 +230,22 @@ def __enforce_casing(self, target_name: str, targets: list): if name.lower() == target_name.lower(): raise KeyError( f'Unknown target {target_name}. Did you mean {name} ?') + + +def SpecDefinitionsFromPath(path: str): + def sort_with_global_attribute_first(a, b): + if a.endswith('global-attributes.xml'): + return -1 + elif b.endswith('global-attributes.xml'): + return 1 + elif a > b: + return 1 + elif a == b: + return 0 + elif a < b: + return -1 + + filenames = glob.glob(path, recursive=False) + filenames.sort(key=functools.cmp_to_key(sort_with_global_attribute_first)) + sources = [ParseSource(source=name) for name in filenames] + return SpecDefinitions(sources) diff --git a/scripts/py_matter_yamltests/matter_yamltests/pseudo_clusters/__init__.py b/scripts/py_matter_yamltests/matter_yamltests/pseudo_clusters/__init__.py new file mode 100644 index 00000000000000..e69de29bb2d1d6 diff --git a/scripts/py_matter_yamltests/matter_yamltests/pseudo_clusters/clusters/__init__.py b/scripts/py_matter_yamltests/matter_yamltests/pseudo_clusters/clusters/__init__.py new file mode 100644 index 00000000000000..e69de29bb2d1d6 diff --git a/scripts/py_matter_yamltests/matter_yamltests/pseudo_clusters/clusters/delay_commands.py b/scripts/py_matter_yamltests/matter_yamltests/pseudo_clusters/clusters/delay_commands.py new file mode 100644 index 00000000000000..285f3cd2163dfc --- /dev/null +++ b/scripts/py_matter_yamltests/matter_yamltests/pseudo_clusters/clusters/delay_commands.py @@ -0,0 +1,33 @@ +# +# 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. + +import sys +import time + +from ..pseudo_cluster import PseudoCluster + + +class DelayCommands(PseudoCluster): + name = 'DelayCommands' + + async def WaitForMs(self, request): + duration_in_ms = 0 + + for argument in request.arguments['values']: + if argument['name'] == 'ms': + duration_in_ms = argument['value'] + + sys.stdout.flush() + time.sleep(duration_in_ms / 1000) diff --git a/scripts/py_matter_yamltests/matter_yamltests/pseudo_clusters/clusters/log_commands.py b/scripts/py_matter_yamltests/matter_yamltests/pseudo_clusters/clusters/log_commands.py new file mode 100644 index 00000000000000..802553a8857e97 --- /dev/null +++ b/scripts/py_matter_yamltests/matter_yamltests/pseudo_clusters/clusters/log_commands.py @@ -0,0 +1,26 @@ +# +# 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. + +from ..pseudo_cluster import PseudoCluster + + +class LogCommands(PseudoCluster): + name = 'LogCommands' + + async def UserPrompt(self, request): + pass + + async def Log(self, request): + pass diff --git a/scripts/py_matter_yamltests/matter_yamltests/pseudo_clusters/clusters/system_commands.py b/scripts/py_matter_yamltests/matter_yamltests/pseudo_clusters/clusters/system_commands.py new file mode 100644 index 00000000000000..41ca73e098618a --- /dev/null +++ b/scripts/py_matter_yamltests/matter_yamltests/pseudo_clusters/clusters/system_commands.py @@ -0,0 +1,106 @@ +# +# 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. + +import sys +import xmlrpc.client + +from ..pseudo_cluster import PseudoCluster + +DEFAULT_KEY = 'default' +IP = '127.0.0.1' +PORT = 9000 + +if sys.platform == 'linux': + IP = '10.10.10.5' + + +def make_url(): + return 'http://' + IP + ':' + str(PORT) + '/' + + +def get_register_key(request): + if request.arguments: + values = request.arguments['values'] + for item in values: + name = item['name'] + value = item['value'] + if name == 'registerKey': + return value + + return DEFAULT_KEY + + +def get_options(request): + options = [] + + if request.arguments: + values = request.arguments['values'] + for item in values: + name = item['name'] + value = item['value'] + + if name == 'discriminator': + options.append('--discriminator') + options.append(str(value)) + elif name == 'port': + options.append('--secured-device-port') + options.append(str(value)) + elif name == 'kvs': + options.append('--KVS') + options.append(str(value)) + elif name == 'minCommissioningTimeout': + options.append('--min_commissioning_timeout') + options.append(str(value)) + elif name == 'filepath': + options.append('--filepath') + options.append(str(value)) + elif name == 'otaDownloadPath': + options.append('--otaDownloadPath') + options.append(str(value)) + elif name == 'registerKey': + pass + else: + raise KeyError(f'Unknown key: {name}') + + return options + + +class SystemCommands(PseudoCluster): + name = 'SystemCommands' + + async def Start(self, request): + register_key = get_register_key(request) + options = get_options(request) + + with xmlrpc.client.ServerProxy(make_url(), allow_none=True) as proxy: + proxy.start(register_key, options) + + async def Stop(self, request): + register_key = get_register_key(request) + + with xmlrpc.client.ServerProxy(make_url(), allow_none=True) as proxy: + proxy.stop(register_key) + + async def Reboot(self, request): + register_key = get_register_key(request) + + with xmlrpc.client.ServerProxy(make_url(), allow_none=True) as proxy: + proxy.reboot(register_key) + + async def FactoryReset(self, request): + register_key = get_register_key(request) + + with xmlrpc.client.ServerProxy(make_url(), allow_none=True) as proxy: + proxy.factoryReset(register_key) diff --git a/scripts/py_matter_yamltests/matter_yamltests/pseudo_clusters/pseudo_cluster.py b/scripts/py_matter_yamltests/matter_yamltests/pseudo_clusters/pseudo_cluster.py new file mode 100644 index 00000000000000..5e8aa53950a4ff --- /dev/null +++ b/scripts/py_matter_yamltests/matter_yamltests/pseudo_clusters/pseudo_cluster.py @@ -0,0 +1,53 @@ +# 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. + +from abc import ABC, abstractproperty + + +class PseudoCluster(ABC): + """ + PseudoCluster is an abstract interface that custom pseudo clusters + should inherit from. + + The interface expose a name property that is used while looking + where to dispatch the test step to. + + The implementation should then expose methods where the name match + the name used in the YAML test file. + + For example, the 'CustomCommands' pseudo cluster can be implemented as: + + class CustomCommand(PseudoCluster): + name = 'CustomCommands' + + async def MyCustomMethod(self, request): + pass + + async def MyCustomMethod(self, request): + pass + + It can then be called from any test step as: + + - label: "Call a custom method" + cluster: "CustomCommands" + command: "MyCustomMethod" + arguments: + values: + - name: "MyCustomParameter" + value: "this_is_a_custom_value" + """ + + @abstractproperty + def name(self): + pass diff --git a/scripts/py_matter_yamltests/matter_yamltests/pseudo_clusters/pseudo_clusters.py b/scripts/py_matter_yamltests/matter_yamltests/pseudo_clusters/pseudo_clusters.py new file mode 100644 index 00000000000000..18bd65f0612dc0 --- /dev/null +++ b/scripts/py_matter_yamltests/matter_yamltests/pseudo_clusters/pseudo_clusters.py @@ -0,0 +1,53 @@ +# 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. + +from .clusters.delay_commands import DelayCommands +from .clusters.log_commands import LogCommands +from .clusters.system_commands import SystemCommands +from .pseudo_cluster import PseudoCluster + + +class PseudoClusters: + def __init__(self, clusters: list[PseudoCluster]): + self.__clusters = clusters + + def supports(self, request) -> bool: + return False if self.__get_command(request) is None else True + + async def execute(self, request): + status = {'error': 'FAILURE'} + + command = self.__get_command(request) + if command: + status = await command(request) + # If the command does not returns an error, it is considered a success. + if status == None: + status = {} + + return status, [] + + def __get_command(self, request): + for cluster in self.__clusters: + if request.cluster == cluster.name and getattr(cluster, request.command, None): + return getattr(cluster, request.command) + return None + + +def get_default_pseudo_clusters() -> PseudoClusters: + clusters = [ + DelayCommands(), + LogCommands(), + SystemCommands() + ] + return PseudoClusters(clusters) diff --git a/scripts/py_matter_yamltests/test_pseudo_clusters.py b/scripts/py_matter_yamltests/test_pseudo_clusters.py new file mode 100644 index 00000000000000..8058994bd1b9b2 --- /dev/null +++ b/scripts/py_matter_yamltests/test_pseudo_clusters.py @@ -0,0 +1,66 @@ +#!/usr/bin/env -S python3 -B +# +# 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 unittest + +from matter_yamltests.pseudo_clusters.pseudo_clusters import PseudoCluster, PseudoClusters + + +class MockStep: + def __init__(self, cluster: str, command: str): + self.cluster = cluster + self.command = command + + +class MyCluster(PseudoCluster): + name = 'MyCluster' + + async def MyCommand(self, request): + pass + + async def MyCommandWithCustomSuccess(self, request): + return 'CustomSuccess' + + +unsupported_cluster_step = MockStep('UnsupportedCluster', 'MyCommand') +unsupported_command_step = MockStep('MyCluster', 'UnsupportedCommand') +supported_step = MockStep('MyCluster', 'MyCommand') +supported_step_with_custom_success = MockStep( + 'MyCluster', 'MyCommandWithCustomSuccess') + +default_failure = ({'error': 'FAILURE'}, []) +default_success = ({}, []) +custom_success = ('CustomSuccess', []) + +clusters = PseudoClusters([MyCluster()]) + + +class TestPseudoClusters(unittest.IsolatedAsyncioTestCase): + def test_supports(self): + self.assertFalse(clusters.supports(unsupported_cluster_step)) + self.assertFalse(clusters.supports(unsupported_command_step)) + self.assertTrue(clusters.supports(supported_step)) + self.assertTrue(clusters.supports(supported_step_with_custom_success)) + + async def test_execute_return_value(self): + self.assertEqual(await clusters.execute(unsupported_cluster_step), default_failure) + self.assertEqual(await clusters.execute(unsupported_command_step), default_failure) + self.assertEqual(await clusters.execute(supported_step), default_success) + self.assertEqual(await clusters.execute(supported_step_with_custom_success), custom_success) + + +if __name__ == '__main__': + unittest.main() diff --git a/scripts/tests/chiptest/__init__.py b/scripts/tests/chiptest/__init__.py index 878cfa9ac3a6de..6e9f67719e6d44 100644 --- a/scripts/tests/chiptest/__init__.py +++ b/scripts/tests/chiptest/__init__.py @@ -31,7 +31,8 @@ def _AllYamlTests(): yaml_test_suite_path = Path(_YAML_TEST_SUITE_PATH) if not yaml_test_suite_path.exists(): - raise FileNotFoundError(f"Expected directory {_YAML_TEST_SUITE_PATH} to exist") + raise FileNotFoundError( + f"Expected directory {_YAML_TEST_SUITE_PATH} to exist") for path in yaml_test_suite_path.rglob("*.yaml"): if not path.is_file(): @@ -197,7 +198,8 @@ def _hardcoded_python_yaml_tests(): ) if found_supported_tests != currently_supported_yaml_tests: - raise Exception("Did not find YAMLs for all supported tests: %r" % (currently_supported_yaml_tests - found_supported_tests)) + raise Exception("Did not find YAMLs for all supported tests: %r" % ( + currently_supported_yaml_tests - found_supported_tests)) def AllTests(chip_tool: str, run_yamltests_with_chip_repl: bool): diff --git a/scripts/tests/chiptest/test_definition.py b/scripts/tests/chiptest/test_definition.py index e0d956ef2620bf..6cbfe2abc0c0e2 100644 --- a/scripts/tests/chiptest/test_definition.py +++ b/scripts/tests/chiptest/test_definition.py @@ -283,7 +283,7 @@ def Run(self, runner, apps_register, paths: ApplicationPaths, pics_file: str, ti elif self.use_chip_repl_yaml_tester: chip_repl_yaml_tester_cmd = paths.chip_repl_yaml_tester_cmd python_cmd = chip_repl_yaml_tester_cmd + \ - ['--setup-code', app.setupCode] + ['--yaml-path', self.run_name] + ['--setup-code', app.setupCode] + ['--yaml-path', self.run_name] + ["--pics-file", pics_file] runner.RunSubprocess(python_cmd, name='CHIP_REPL_YAML_TESTER', dependencies=[apps_register], timeout_seconds=timeout_seconds) else: diff --git a/scripts/tests/chiptest/yamltest_with_chip_repl_tester.py b/scripts/tests/chiptest/yamltest_with_chip_repl_tester.py index 2cf03caf9a858b..cac0db02d6983c 100644 --- a/scripts/tests/chiptest/yamltest_with_chip_repl_tester.py +++ b/scripts/tests/chiptest/yamltest_with_chip_repl_tester.py @@ -14,8 +14,6 @@ # See the License for the specific language governing permissions and # limitations under the License. -import functools -import glob import os import tempfile import traceback @@ -32,7 +30,7 @@ import click from chip.ChipStack import * from chip.yaml.runner import ReplTestRunner -from matter_yamltests.definitions import ParseSource, SpecDefinitions +from matter_yamltests.definitions import SpecDefinitionsFromPath from matter_yamltests.parser import TestParser _DEFAULT_CHIP_ROOT = os.path.abspath( @@ -41,19 +39,6 @@ os.path.join(_DEFAULT_CHIP_ROOT, "src/app/zap-templates/zcl/data-model/")) -def _sort_with_global_attribute_first(a, b): - if a.endswith('global-attributes.xml'): - return -1 - elif b.endswith('global-attributes.xml'): - return 1 - elif a > b: - return 1 - elif a == b: - return 0 - elif a < b: - return -1 - - @click.command() @click.option( '--setup-code', @@ -67,7 +52,11 @@ def _sort_with_global_attribute_first(a, b): '--node-id', default=0x12344321, help='Node ID to use when commissioning device') -def main(setup_code, yaml_path, node_id): +@click.option( + '--pics-file', + default=None, + help='Optional PICS file') +def main(setup_code, yaml_path, node_id, pics_file): # Setting up python environment for running YAML CI tests using python parser. with tempfile.NamedTemporaryFile() as chip_stack_storage: chip.native.Init() @@ -91,27 +80,26 @@ def main(setup_code, yaml_path, node_id): try: # Creating Cluster definition. - cluster_xml_filenames = glob.glob(_CLUSTER_XML_DIRECTORY_PATH + '/*/*.xml', recursive=False) - cluster_xml_filenames.sort(key=functools.cmp_to_key(_sort_with_global_attribute_first)) - sources = [ParseSource(source=name) for name in cluster_xml_filenames] - clusters_definitions = SpecDefinitions(sources) + clusters_definitions = SpecDefinitionsFromPath(_CLUSTER_XML_DIRECTORY_PATH + '/*/*.xml') # Parsing YAML test and setting up chip-repl yamltests runner. - yaml = TestParser(yaml_path, None, clusters_definitions) + yaml = TestParser(yaml_path, pics_file, clusters_definitions) runner = ReplTestRunner(clusters_definitions, certificate_authority_manager, dev_ctrl) # Executing and validating test for test_step in yaml.tests: test_action = runner.encode(test_step) # TODO if test_action is None we should see if it is a pseudo cluster. - if test_action is not None: - response = runner.execute(test_action) - decoded_response = runner.decode(response) - post_processing_result = test_step.post_process_response(decoded_response) - if not post_processing_result.is_success(): - raise Exception(f'Test step failed {test_step.label}') - else: + if test_action is None: raise Exception(f'Failed to encode test step {test_step.label}') + if not test_action.pics_enabled: + continue + + response = runner.execute(test_action) + decoded_response = runner.decode(response) + post_processing_result = test_step.post_process_response(decoded_response) + if not post_processing_result.is_success(): + raise Exception(f'Test step failed {test_step.label}') except Exception: print(traceback.format_exc()) exit(-2) diff --git a/scripts/tools/zap/generate.py b/scripts/tools/zap/generate.py index e2aa324f65c7bb..d3c4283aca0f94 100755 --- a/scripts/tools/zap/generate.py +++ b/scripts/tools/zap/generate.py @@ -66,8 +66,11 @@ def checkDirExists(path): exit(1) -def getFilePath(name): - fullpath = os.path.join(CHIP_ROOT_DIR, name) +def getFilePath(name, prefix_chip_root_dir=True): + if prefix_chip_root_dir: + fullpath = os.path.join(CHIP_ROOT_DIR, name) + else: + fullpath = name checkFileExists(fullpath) return fullpath @@ -81,6 +84,7 @@ def getDirPath(name): def detectZclFile(zapFile): print(f"Searching for zcl file from {zapFile}") + prefix_chip_root_dir = True path = 'src/app/zap-templates/zcl/zcl.json' data = json.load(open(zapFile)) @@ -88,14 +92,17 @@ def detectZclFile(zapFile): if package["type"] != "zcl-properties": continue + prefix_chip_root_dir = (package["pathRelativity"] != "resolveEnvVars") # found the right path, try to figure out the actual path if package["pathRelativity"] == "relativeToZap": path = os.path.abspath(os.path.join( os.path.dirname(zapFile), package["path"])) + elif package["pathRelativity"] == "resolveEnvVars": + path = os.path.expandvars(package["path"]) else: path = package["path"] - return getFilePath(path) + return getFilePath(path, prefix_chip_root_dir) def runArgumentsParser() -> CmdLineArgs: diff --git a/src/app/clusters/fault-injection-server/fault-injection-server.cpp b/src/app/clusters/fault-injection-server/fault-injection-server.cpp index 925640c8ce8d00..0b37ca757f20b2 100644 --- a/src/app/clusters/fault-injection-server/fault-injection-server.cpp +++ b/src/app/clusters/fault-injection-server/fault-injection-server.cpp @@ -80,7 +80,7 @@ bool emberAfFaultInjectionClusterFailAtFaultCallback(CommandHandler * commandObj if (faultInjectionMgr != nullptr) { - ChipLogProgress(Zcl, "FaultInjection: Configure a fault of type: %d and Id: %d to be triggered deterministically", + ChipLogProgress(Zcl, "FaultInjection: Configure a fault of type: %u and Id: %" PRIu32 " to be triggered deterministically", static_cast(commandData.type), commandData.id); int32_t err = faultInjectionMgr->FailAtFault(commandData.id, commandData.numCallsToSkip, commandData.numCallsToFail, commandData.takeMutex); @@ -126,7 +126,7 @@ bool emberAfFaultInjectionClusterFailRandomlyAtFaultCallback(CommandHandler * co if (faultInjectionMgr != nullptr) { - ChipLogProgress(Zcl, "FaultInjection: Configure a fault of type: %d and Id: %d to be triggered randomly", + ChipLogProgress(Zcl, "FaultInjection: Configure a fault of type: %u and Id: %" PRIu32 " to be triggered randomly", static_cast(commandData.type), commandData.id); int32_t err = faultInjectionMgr->FailRandomlyAtFault(commandData.id, commandData.percentage); diff --git a/src/app/clusters/scenes/scenes.cpp b/src/app/clusters/scenes/scenes.cpp index b17e12c8fbc92d..580f6234c388ac 100644 --- a/src/app/clusters/scenes/scenes.cpp +++ b/src/app/clusters/scenes/scenes.cpp @@ -202,8 +202,8 @@ void emAfPluginScenesServerPrintInfo() bool emberAfScenesClusterAddSceneCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::AddScene::DecodableType & commandData) { - auto & groupId = commandData.groupId; - auto & sceneId = commandData.sceneId; + auto & groupId = commandData.groupID; + auto & sceneId = commandData.sceneID; auto & transitionTime = commandData.transitionTime; auto & sceneName = commandData.sceneName; auto & extensionFieldSets = commandData.extensionFieldSets; @@ -215,8 +215,8 @@ bool emberAfScenesClusterAddSceneCallback(app::CommandHandler * commandObj, cons bool emberAfScenesClusterViewSceneCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::ViewScene::DecodableType & commandData) { - auto & groupId = commandData.groupId; - auto & sceneId = commandData.sceneId; + auto & groupId = commandData.groupID; + auto & sceneId = commandData.sceneID; return emberAfPluginScenesServerParseViewScene(commandObj, emberAfCurrentCommand(), groupId, sceneId); } @@ -225,8 +225,8 @@ bool emberAfScenesClusterRemoveSceneCallback(app::CommandHandler * commandObj, c const Commands::RemoveScene::DecodableType & commandData) { auto fabricIndex = commandObj->GetAccessingFabricIndex(); - auto & groupId = commandData.groupId; - auto & sceneId = commandData.sceneId; + auto & groupId = commandData.groupID; + auto & sceneId = commandData.sceneID; EmberAfStatus status = EMBER_ZCL_STATUS_NOT_FOUND; CHIP_ERROR err = CHIP_NO_ERROR; @@ -283,7 +283,7 @@ bool emberAfScenesClusterRemoveAllScenesCallback(app::CommandHandler * commandOb const Commands::RemoveAllScenes::DecodableType & commandData) { auto fabricIndex = commandObj->GetAccessingFabricIndex(); - auto & groupId = commandData.groupId; + auto & groupId = commandData.groupID; EmberAfStatus status = EMBER_ZCL_STATUS_INVALID_COMMAND; CHIP_ERROR err = CHIP_NO_ERROR; @@ -334,8 +334,8 @@ bool emberAfScenesClusterStoreSceneCallback(app::CommandHandler * commandObj, co const Commands::StoreScene::DecodableType & commandData) { auto fabricIndex = commandObj->GetAccessingFabricIndex(); - auto & groupId = commandData.groupId; - auto & sceneId = commandData.sceneId; + auto & groupId = commandData.groupID; + auto & sceneId = commandData.sceneID; EmberAfStatus status; CHIP_ERROR err = CHIP_NO_ERROR; @@ -369,8 +369,8 @@ bool emberAfScenesClusterRecallSceneCallback(app::CommandHandler * commandObj, c const Commands::RecallScene::DecodableType & commandData) { auto fabricIndex = commandObj->GetAccessingFabricIndex(); - auto & groupId = commandData.groupId; - auto & sceneId = commandData.sceneId; + auto & groupId = commandData.groupID; + auto & sceneId = commandData.sceneID; // NOTE: TransitionTime field in the RecallScene command is currently // ignored. Per Zigbee Alliance ZCL 7 (07-5123-07): @@ -407,7 +407,7 @@ bool emberAfScenesClusterGetSceneMembershipCallback(app::CommandHandler * comman const Commands::GetSceneMembership::DecodableType & commandData) { auto fabricIndex = commandObj->GetAccessingFabricIndex(); - auto & groupId = commandData.groupId; + auto & groupId = commandData.groupID; CHIP_ERROR err = CHIP_NO_ERROR; EmberAfStatus status = EMBER_ZCL_STATUS_SUCCESS; @@ -822,7 +822,7 @@ bool emberAfPluginScenesServerParseAddScene( { auto & fieldSet = fieldSetIter.GetValue(); - ClusterId clusterId = fieldSet.clusterId; + ClusterId clusterId = fieldSet.clusterID; // TODO: We need to encode scene field sets in TLV. // https://github.com/project-chip/connectedhomeip/issues/10334 diff --git a/src/app/clusters/thermostat-server/thermostat-server.cpp b/src/app/clusters/thermostat-server/thermostat-server.cpp index 96da514d59b1c2..199632e128655e 100644 --- a/src/app/clusters/thermostat-server/thermostat-server.cpp +++ b/src/app/clusters/thermostat-server/thermostat-server.cpp @@ -336,8 +336,7 @@ MatterThermostatClusterServerPreAttributeChangedCallback(const app::ConcreteAttr { case ThermostatControlSequence::kCoolingOnly: case ThermostatControlSequence::kCoolingWithReheat: - if (RequestedSystemMode == ThermostatSystemMode::kHeat || - RequestedSystemMode == ThermostatSystemMode::kEmergencyHeating) + if (RequestedSystemMode == ThermostatSystemMode::kHeat || RequestedSystemMode == ThermostatSystemMode::kEmergencyHeat) return imcode::InvalidValue; else return imcode::Success; @@ -381,8 +380,6 @@ bool emberAfThermostatClusterSetWeeklyScheduleCallback(app::CommandHandler * com return false; } -using namespace chip::app::Clusters::Thermostat::Attributes; - int16_t EnforceHeatingSetpointLimits(int16_t HeatingSetpoint, EndpointId endpoint) { // Optional Mfg supplied limits @@ -565,7 +562,7 @@ bool emberAfThermostatClusterSetpointRaiseLowerCallback(app::CommandHandler * co switch (mode) { - case EMBER_ZCL_SETPOINT_ADJUST_MODE_HEAT_AND_COOL_SETPOINTS: + case SetpointAdjustMode::kBoth: if (HeatSupported && CoolSupported) { int16_t DesiredCoolingSetpoint, CoolLimit, DesiredHeatingSetpoint, HeatLimit; @@ -645,7 +642,7 @@ bool emberAfThermostatClusterSetpointRaiseLowerCallback(app::CommandHandler * co status = EMBER_ZCL_STATUS_SUCCESS; break; - case EMBER_ZCL_SETPOINT_ADJUST_MODE_COOL_SETPOINT: + case SetpointAdjustMode::kCool: if (CoolSupported) { if (OccupiedCoolingSetpoint::Get(aEndpointId, &CoolingSetpoint) == EMBER_ZCL_STATUS_SUCCESS) @@ -698,7 +695,7 @@ bool emberAfThermostatClusterSetpointRaiseLowerCallback(app::CommandHandler * co status = EMBER_ZCL_STATUS_INVALID_COMMAND; break; - case EMBER_ZCL_SETPOINT_ADJUST_MODE_HEAT_SETPOINT: + case SetpointAdjustMode::kHeat: if (HeatSupported) { if (OccupiedHeatingSetpoint::Get(aEndpointId, &HeatingSetpoint) == EMBER_ZCL_STATUS_SUCCESS) diff --git a/src/app/common/templates/weak-enum-list.yaml b/src/app/common/templates/weak-enum-list.yaml index d9b4dc74e9517b..6f847783db7340 100644 --- a/src/app/common/templates/weak-enum-list.yaml +++ b/src/app/common/templates/weak-enum-list.yaml @@ -31,7 +31,6 @@ - SaturationMoveMode - SaturationStepMode - SecurityType -- SetpointAdjustMode - StartUpOnOffValue - StatusCode - StepMode diff --git a/src/app/tests/suites/certification/Test_TC_ALOGIN_12_1.yaml b/src/app/tests/suites/certification/Test_TC_ALOGIN_12_1.yaml index 0f1efeedc26ee4..2e15f2c8b83448 100644 --- a/src/app/tests/suites/certification/Test_TC_ALOGIN_12_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ALOGIN_12_1.yaml @@ -47,7 +47,7 @@ tests: command: "LaunchApp" arguments: values: - - name: "data" + - name: "Data" value: "Hello World" - name: "Application" value: diff --git a/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_7.yaml b/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_7.yaml index 9dc638ce8568ef..811b6519bdaffc 100644 --- a/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_7.yaml +++ b/src/app/tests/suites/certification/Test_TC_APPLAUNCHER_3_7.yaml @@ -42,7 +42,7 @@ tests: command: "LaunchApp" arguments: values: - - name: "data" + - name: "Data" value: "Hello World" - name: "Application" value: diff --git a/src/app/tests/suites/certification/Test_TC_SC_5_1.yaml b/src/app/tests/suites/certification/Test_TC_SC_5_1.yaml index 82643582fade9c..9220ee7158dc51 100644 --- a/src/app/tests/suites/certification/Test_TC_SC_5_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_SC_5_1.yaml @@ -13,544 +13,229 @@ # 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: - 19.1.1. [TC-SC-5.1] Adding member to a group - TH as Admin and DUT as Group - Member +name: 19.1.1. [TC-SC-5.1] Adding member to a group PICS: - PICS_MCORE_ROLE_COMMISSIONEE config: nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 + cluster: "Groups" + # Users should set endpoint value on the command line to PIXIT.G.ENDPOINT + endpoint: 1 tests: - - label: "Precondition" - verification: | - DUT is commissioned by TH - disabled: true - - - label: - "TH writes The ACL attribute in the Access Control cluster to add - Operate privileges for group 0x0103 and maintain the current - administrative privileges for the TH. The following access control - list shall be used: List item 1 (TH admin): Fabric index: 1,Privilege: - Administer (5),AuthMode: CASE (2),Subjects: TH node id ([N1]),Targets: - all (null) List item 2 (group operate access):Fabric index: - 1,Privilege: Operate (3),AuthMode: Group (3),Subjects: group 0x0103 - ([0x0103]),Targets: all (null)" - verification: | - ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [1], "targets": null },{"fabricIndex": 1, "privilege": 3, "authMode": 3, "subjects": ["0x0103"], "targets": null }]' 1 0 - - - [1674109884.293472][29548:29550] CHIP:DMG: WriteResponseMessage = - [1674109884.293477][29548:29550] CHIP:DMG: { - [1674109884.293479][29548:29550] CHIP:DMG: AttributeStatusIBs = - [1674109884.293486][29548:29550] CHIP:DMG: [ - [1674109884.293489][29548:29550] CHIP:DMG: AttributeStatusIB = - [1674109884.293494][29548:29550] CHIP:DMG: { - [1674109884.293497][29548:29550] CHIP:DMG: AttributePathIB = - [1674109884.293502][29548:29550] CHIP:DMG: { - [1674109884.293506][29548:29550] CHIP:DMG: Endpoint = 0x0, - [1674109884.293510][29548:29550] CHIP:DMG: Cluster = 0x1f, - [1674109884.293514][29548:29550] CHIP:DMG: Attribute = 0x0000_0000, - [1674109884.293518][29548:29550] CHIP:DMG: } - [1674109884.293523][29548:29550] CHIP:DMG: - [1674109884.293527][29548:29550] CHIP:DMG: StatusIB = - [1674109884.293531][29548:29550] CHIP:DMG: { - [1674109884.293536][29548:29550] CHIP:DMG: status = 0x00 (SUCCESS), - [1674109884.293539][29548:29550] CHIP:DMG: }, - [1674109884.293543][29548:29550] CHIP:DMG: - [1674109884.293547][29548:29550] CHIP:DMG: }, - [1674109884.293572][29548:29550] CHIP:DMG: - [1674109884.293575][29548:29550] CHIP:DMG: AttributeStatusIB = - [1674109884.293579][29548:29550] CHIP:DMG: { - [1674109884.293582][29548:29550] CHIP:DMG: AttributePathIB = - [1674109884.293586][29548:29550] CHIP:DMG: { - [1674109884.293590][29548:29550] CHIP:DMG: Endpoint = 0x0, - [1674109884.293594][29548:29550] CHIP:DMG: Cluster = 0x1f, - [1674109884.293598][29548:29550] CHIP:DMG: Attribute = 0x0000_0000, - [1674109884.293602][29548:29550] CHIP:DMG: ListIndex = Null, - [1674109884.293605][29548:29550] CHIP:DMG: } - [1674109884.293611][29548:29550] CHIP:DMG: - [1674109884.293614][29548:29550] CHIP:DMG: StatusIB = - [1674109884.293618][29548:29550] CHIP:DMG: { - [1674109884.293621][29548:29550] CHIP:DMG: status = 0x00 (SUCCESS), - [1674109884.293625][29548:29550] CHIP:DMG: }, - [1674109884.293629][29548:29550] CHIP:DMG: - [1674109884.293632][29548:29550] CHIP:DMG: }, - [1674109884.293640][29548:29550] CHIP:DMG: - [1674109884.293643][29548:29550] CHIP:DMG: AttributeStatusIB = - [1674109884.293647][29548:29550] CHIP:DMG: { - [1674109884.293650][29548:29550] CHIP:DMG: AttributePathIB = - [1674109884.293654][29548:29550] CHIP:DMG: { - [1674109884.293657][29548:29550] CHIP:DMG: Endpoint = 0x0, - [1674109884.293661][29548:29550] CHIP:DMG: Cluster = 0x1f, - [1674109884.293665][29548:29550] CHIP:DMG: Attribute = 0x0000_0000, - [1674109884.293669][29548:29550] CHIP:DMG: ListIndex = Null, - [1674109884.293672][29548:29550] CHIP:DMG: } - [1674109884.293678][29548:29550] CHIP:DMG: - [1674109884.293681][29548:29550] CHIP:DMG: StatusIB = - [1674109884.293685][29548:29550] CHIP:DMG: { - [1674109884.293689][29548:29550] CHIP:DMG: status = 0x00 (SUCCESS), - [1674109884.293692][29548:29550] CHIP:DMG: }, - [1674109884.293696][29548:29550] CHIP:DMG: - [1674109884.293699][29548:29550] CHIP:DMG: }, - [1674109884.293704][29548:29550] CHIP:DMG: - [1674109884.293707][29548:29550] CHIP:DMG: ], - [1674109884.293717][29548:29550] CHIP:DMG: - [1674109884.293721][29548:29550] CHIP:DMG: InteractionModelRevision = 1 - [1674109884.293724][29548:29550] CHIP:DMG: } - disabled: true - - - label: - "TH sends KeySetWrite command in the GroupKeyManagement cluster to DUT - using a key that is NOT installed on the TH. This is intended to test - that the key set is correctly updated in the next step. GroupKeySet - fields are as follows: GroupKeySetID: 0x01a3,GroupKeySecurityPolicy: - TrustFirst (0),EpochKey0: - 0x00000000000000000000000000000001,EpochStartTime0: 111,EpochKey1: - 0x00000000000000000000000000000002,EpochStartTime1: 222,EpochKey2: - 0x00000000000000000000000000000003,EpochStartTime2: 333" - verification: | - ./chip-tool groupkeymanagement key-set-write '{"groupKeySetID": "0x01a3","groupKeySecurityPolicy": 0, "epochKey0":"00000000000000000000000000000001", "epochStartTime0": 111,"epochKey1":"00000000000000000000000000000002", "epochStartTime1": 222,"epochKey2":"00000000000000000000000000000003", "epochStartTime2": 333 }' 1 0 - - - [1674109957.007856][29570:29572] CHIP:DMG: InvokeResponseMessage = - [1674109957.007859][29570:29572] CHIP:DMG: { - [1674109957.007862][29570:29572] CHIP:DMG: suppressResponse = false, - [1674109957.007865][29570:29572] CHIP:DMG: InvokeResponseIBs = - [1674109957.007872][29570:29572] CHIP:DMG: [ - [1674109957.007875][29570:29572] CHIP:DMG: InvokeResponseIB = - [1674109957.007880][29570:29572] CHIP:DMG: { - [1674109957.007883][29570:29572] CHIP:DMG: CommandStatusIB = - [1674109957.007887][29570:29572] CHIP:DMG: { - [1674109957.007890][29570:29572] CHIP:DMG: CommandPathIB = - [1674109957.007894][29570:29572] CHIP:DMG: { - [1674109957.007898][29570:29572] CHIP:DMG: EndpointId = 0x0, - [1674109957.007901][29570:29572] CHIP:DMG: ClusterId = 0x3f, - [1674109957.007905][29570:29572] CHIP:DMG: CommandId = 0x0, - [1674109957.007909][29570:29572] CHIP:DMG: }, - [1674109957.007913][29570:29572] CHIP:DMG: - [1674109957.007917][29570:29572] CHIP:DMG: StatusIB = - [1674109957.007921][29570:29572] CHIP:DMG: { - [1674109957.007924][29570:29572] CHIP:DMG: status = 0x00 (SUCCESS), - [1674109957.007927][29570:29572] CHIP:DMG: }, - [1674109957.007931][29570:29572] CHIP:DMG: - [1674109957.007933][29570:29572] CHIP:DMG: }, - [1674109957.007938][29570:29572] CHIP:DMG: - [1674109957.007941][29570:29572] CHIP:DMG: }, - [1674109957.007946][29570:29572] CHIP:DMG: - [1674109957.007948][29570:29572] CHIP:DMG: ], - [1674109957.007953][29570:29572] CHIP:DMG: - [1674109957.007956][29570:29572] CHIP:DMG: InteractionModelRevision = 1 - [1674109957.007958][29570:29572] CHIP:DMG: }, - disabled: true - - - label: - "TH sends KeySetWrite command in the GroupKeyManagement cluster to DUT - using a key that is pre-installed on the TH. GroupKeySet fields are as - follows: GroupKeySetID: 0x01a3,GroupKeySecurityPolicy: TrustFirst - (0),EpochKey0: 0xd0d1d2d3d4d5d6d7d8d9dadbdcdddedf,EpochStartTime0: - 2220000,EpochKey1: 0xd1d1d2d3d4d5d6d7d8d9dadbdcdddedf,EpochStartTime1: - 2220001,EpochKey2: 0xd2d1d2d3d4d5d6d7d8d9dadbdcdddedf,EpochStartTime2: - 2220002" - verification: | - ./chip-tool groupkeymanagement key-set-write '{"groupKeySetID": "0x01a3","groupKeySecurityPolicy": 0, "epochKey0":"d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 2220000,"epochKey1":"d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime1": 2220001,"epochKey2":"d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 2220002 }' 1 0 - - - [1674110035.037849][29578:29580] CHIP:DMG: InvokeResponseMessage = - [1674110035.037852][29578:29580] CHIP:DMG: { - [1674110035.037856][29578:29580] CHIP:DMG: suppressResponse = false, - [1674110035.037859][29578:29580] CHIP:DMG: InvokeResponseIBs = - [1674110035.037864][29578:29580] CHIP:DMG: [ - [1674110035.037867][29578:29580] CHIP:DMG: InvokeResponseIB = - [1674110035.037872][29578:29580] CHIP:DMG: { - [1674110035.037875][29578:29580] CHIP:DMG: CommandStatusIB = - [1674110035.037879][29578:29580] CHIP:DMG: { - [1674110035.037882][29578:29580] CHIP:DMG: CommandPathIB = - [1674110035.037886][29578:29580] CHIP:DMG: { - [1674110035.037890][29578:29580] CHIP:DMG: EndpointId = 0x0, - [1674110035.037893][29578:29580] CHIP:DMG: ClusterId = 0x3f, - [1674110035.037897][29578:29580] CHIP:DMG: CommandId = 0x0, - [1674110035.037900][29578:29580] CHIP:DMG: }, - [1674110035.037905][29578:29580] CHIP:DMG: - [1674110035.037908][29578:29580] CHIP:DMG: StatusIB = - [1674110035.037912][29578:29580] CHIP:DMG: { - [1674110035.037916][29578:29580] CHIP:DMG: status = 0x00 (SUCCESS), - [1674110035.037920][29578:29580] CHIP:DMG: }, - [1674110035.037925][29578:29580] CHIP:DMG: - [1674110035.037929][29578:29580] CHIP:DMG: }, - [1674110035.037934][29578:29580] CHIP:DMG: - [1674110035.037938][29578:29580] CHIP:DMG: }, - [1674110035.037944][29578:29580] CHIP:DMG: - [1674110035.037948][29578:29580] CHIP:DMG: ], - [1674110035.037954][29578:29580] CHIP:DMG: - [1674110035.037957][29578:29580] CHIP:DMG: InteractionModelRevision = 1 - [1674110035.037960][29578:29580] CHIP:DMG: }, - disabled: true - - - label: - "TH binds GroupId 0x0103 with GroupKeySetID 0x01a3 in the GroupKeyMap - attribute list on GroupKeyManagement cluster by writing the - GroupKeyMap attribute with one entry as follows: List item 1: - FabricIndex: 1,GroupId: 0x0103,GroupKeySetId: 0x01a3" - verification: | - ./chip-tool groupkeymanagement write group-key-map '[{"groupId": "0x0103", "groupKeySetID": "0x01a3", "fabricIndex": 1}]' 1 0 - - [1674110101.932149][29586:29588] CHIP:DMG: WriteResponseMessage = - [1674110101.932152][29586:29588] CHIP:DMG: { - [1674110101.932155][29586:29588] CHIP:DMG: AttributeStatusIBs = - [1674110101.932161][29586:29588] CHIP:DMG: [ - [1674110101.932164][29586:29588] CHIP:DMG: AttributeStatusIB = - [1674110101.932169][29586:29588] CHIP:DMG: { - [1674110101.932173][29586:29588] CHIP:DMG: AttributePathIB = - [1674110101.932177][29586:29588] CHIP:DMG: { - [1674110101.932181][29586:29588] CHIP:DMG: Endpoint = 0x0, - [1674110101.932185][29586:29588] CHIP:DMG: Cluster = 0x3f, - [1674110101.932189][29586:29588] CHIP:DMG: Attribute = 0x0000_0000, - [1674110101.932193][29586:29588] CHIP:DMG: } - [1674110101.932198][29586:29588] CHIP:DMG: - [1674110101.932201][29586:29588] CHIP:DMG: StatusIB = - [1674110101.932206][29586:29588] CHIP:DMG: { - [1674110101.932210][29586:29588] CHIP:DMG: status = 0x00 (SUCCESS), - [1674110101.932213][29586:29588] CHIP:DMG: }, - [1674110101.932217][29586:29588] CHIP:DMG: - [1674110101.932220][29586:29588] CHIP:DMG: }, - [1674110101.932227][29586:29588] CHIP:DMG: - [1674110101.932230][29586:29588] CHIP:DMG: AttributeStatusIB = - [1674110101.932234][29586:29588] CHIP:DMG: { - [1674110101.932237][29586:29588] CHIP:DMG: AttributePathIB = - [1674110101.932240][29586:29588] CHIP:DMG: { - [1674110101.932244][29586:29588] CHIP:DMG: Endpoint = 0x0, - [1674110101.932248][29586:29588] CHIP:DMG: Cluster = 0x3f, - [1674110101.932252][29586:29588] CHIP:DMG: Attribute = 0x0000_0000, - [1674110101.932256][29586:29588] CHIP:DMG: ListIndex = Null, - [1674110101.932259][29586:29588] CHIP:DMG: } - [1674110101.932264][29586:29588] CHIP:DMG: - [1674110101.932267][29586:29588] CHIP:DMG: StatusIB = - [1674110101.932270][29586:29588] CHIP:DMG: { - [1674110101.932273][29586:29588] CHIP:DMG: status = 0x00 (SUCCESS), - [1674110101.932276][29586:29588] CHIP:DMG: }, - [1674110101.932280][29586:29588] CHIP:DMG: - [1674110101.932283][29586:29588] CHIP:DMG: }, - [1674110101.932288][29586:29588] CHIP:DMG: - [1674110101.932291][29586:29588] CHIP:DMG: ], - [1674110101.932298][29586:29588] CHIP:DMG: - [1674110101.932301][29586:29588] CHIP:DMG: InteractionModelRevision = 1 - [1674110101.932305][29586:29588] CHIP:DMG: } - disabled: true - - - label: "TH sends RemoveAllGroups command to the DUT on PIXIT.G.ENDPOINT" - verification: | - ./chip-tool groups remove-all-groups 1 1 - - - [1674110158.295305][29600:29602] CHIP:DMG: InvokeResponseMessage = - [1674110158.295310][29600:29602] CHIP:DMG: { - [1674110158.295314][29600:29602] CHIP:DMG: suppressResponse = false, - [1674110158.295318][29600:29602] CHIP:DMG: InvokeResponseIBs = - [1674110158.295327][29600:29602] CHIP:DMG: [ - [1674110158.295331][29600:29602] CHIP:DMG: InvokeResponseIB = - [1674110158.295339][29600:29602] CHIP:DMG: { - [1674110158.295344][29600:29602] CHIP:DMG: CommandStatusIB = - [1674110158.295349][29600:29602] CHIP:DMG: { - [1674110158.295354][29600:29602] CHIP:DMG: CommandPathIB = - [1674110158.295361][29600:29602] CHIP:DMG: { - [1674110158.295366][29600:29602] CHIP:DMG: EndpointId = 0x1, - [1674110158.295372][29600:29602] CHIP:DMG: ClusterId = 0x4, - [1674110158.295377][29600:29602] CHIP:DMG: CommandId = 0x4, - [1674110158.295382][29600:29602] CHIP:DMG: }, - [1674110158.295390][29600:29602] CHIP:DMG: - [1674110158.295394][29600:29602] CHIP:DMG: StatusIB = - [1674110158.295401][29600:29602] CHIP:DMG: { - [1674110158.295407][29600:29602] CHIP:DMG: status = 0x00 (SUCCESS), - [1674110158.295412][29600:29602] CHIP:DMG: }, - [1674110158.295418][29600:29602] CHIP:DMG: - [1674110158.295422][29600:29602] CHIP:DMG: }, - [1674110158.295429][29600:29602] CHIP:DMG: - [1674110158.295433][29600:29602] CHIP:DMG: }, - [1674110158.295440][29600:29602] CHIP:DMG: - [1674110158.295445][29600:29602] CHIP:DMG: ], - [1674110158.295452][29600:29602] CHIP:DMG: - [1674110158.295457][29600:29602] CHIP:DMG: InteractionModelRevision = 1 - [1674110158.295461][29600:29602] CHIP:DMG: }, - disabled: true - - - label: - "TH sends AddGroup Command to DUT on PIXIT.G.ENDPOINT with the the - following settings GroupID: 0x0103,GroupName: Test Group" - verification: | - ./chip-tool groups add-group "0x0103" "Test Group" 1 1 - - [1674110214.486414][29605:29607] CHIP:DMG: }, - [1674110214.486440][29605:29607] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0004 Command=0x0000_0000 - [1674110214.486856][29605:29607] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0004 Command 0x0000_0000 - [1674110214.487108][29605:29607] CHIP:TOO: AddGroupResponse: { - [1674110214.487116][29605:29607] CHIP:TOO: status: 0 - [1674110214.487119][29605:29607] CHIP:TOO: groupID: 259 - [1674110214.487123][29605:29607] CHIP:TOO: } - disabled: true - - - label: - "TH sends ViewGroup command with the GroupID to the Group cluster on - the DUT on PIXIT.G.ENDPOINT" + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "TH adds ACL Operate privileges for Group 0x0103" + cluster: "Access Control" + endpoint: 0 + command: "writeAttribute" + attribute: "ACL" + arguments: + value: + [ + { + FabricIndex: 1, + Privilege: 5, + AuthMode: 2, + Subjects: [commissionerNodeId], + Targets: null, + }, + { + FabricIndex: 1, + Privilege: 3, + AuthMode: 3, + Subjects: [0x0103], + Targets: null, + }, + ] + + - label: "TH sends KeySetWrite command with incorrect key" + cluster: "Group Key Management" + endpoint: 0 + command: "KeySetWrite" + arguments: + values: + - name: GroupKeySet + value: + { + GroupKeySetID: 0x01a3, + GroupKeySecurityPolicy: 0, + EpochKey0: "0x00000000000000000000000000000001", + EpochStartTime0: 111, + EpochKey1: "0x00000000000000000000000000000002", + EpochStartTime1: 222, + EpochKey2: "0x00000000000000000000000000000003", + EpochStartTime2: 333, + } + + - label: "TH sends KeySetWrite command with TH key" + cluster: "Group Key Management" + endpoint: 0 + command: "KeySetWrite" + arguments: + values: + - name: GroupKeySet + value: + { + GroupKeySetID: 0x01a3, + GroupKeySecurityPolicy: 0, + EpochKey0: "0xd0d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime0: 2220000, + EpochKey1: "0xd1d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime1: 2220001, + EpochKey2: "0xd2d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime2: 2220002, + } + + - label: "TH binds GroupId to GroupKeySet" + cluster: "Group Key Management" + endpoint: 0 + command: "writeAttribute" + attribute: "GroupKeyMap" + arguments: + value: [{ FabricIndex: 1, GroupId: 0x0103, GroupKeySetID: 0x01a3 }] + + - label: "TH sends RemoveAllGroups command" + command: "RemoveAllGroups" + + - label: "TH sends AddGroup command" + command: "AddGroup" + arguments: + values: + - name: GroupID + value: 0x0103 + - name: GroupName + value: "Test Group" + + - label: "TH sends ViewGroup command" PICS: G.S.F00 - verification: | - ./chip-tool groups view-group "0x0103" 1 1 - - - [1674110306.198950][29621:29623] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0004 Command=0x0000_0001 - [1674110306.198979][29621:29623] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0004 Command 0x0000_0001 - [1674110306.199016][29621:29623] CHIP:TOO: ViewGroupResponse: { - [1674110306.199030][29621:29623] CHIP:TOO: status: 0 - [1674110306.199041][29621:29623] CHIP:TOO: groupID: 259 - [1674110306.199051][29621:29623] CHIP:TOO: groupName: Test Group - [1674110306.199061][29621:29623] CHIP:TOO: } - disabled: true - - - label: - "TH sends ViewGroup command with the GroupID to the Group cluster on - the DUT on PIXIT.G.ENDPOINT" - PICS: " !G.S.F00 " - verification: | - Verify DUT sends a ViewGroupResponse command with - - Status: SUCCESS - - GroupID: 0x0103 - - GroupName: "" - disabled: true - - - label: - "TH sends KeySetRead command to GroupKeyManagement cluster with - GroupKeySetID as 0x01a3" - verification: | - ./chip-tool groupkeymanagement key-set-read "0x01a3" 1 0 - - [1674110375.913702][29626:29628] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003F Command=0x0000_0002 - [1674110375.913742][29626:29628] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Command 0x0000_0002 - [1674110375.914256][29626:29628] CHIP:TOO: KeySetReadResponse: { - [1674110375.914277][29626:29628] CHIP:TOO: groupKeySet: { - [1674110375.914293][29626:29628] CHIP:TOO: GroupKeySetID: 419 - [1674110375.914306][29626:29628] CHIP:TOO: GroupKeySecurityPolicy: 0 - [1674110375.914317][29626:29628] CHIP:TOO: EpochKey0: null - [1674110375.914329][29626:29628] CHIP:TOO: EpochStartTime0: 2220000 - [1674110375.914339][29626:29628] CHIP:TOO: EpochKey1: null - [1674110375.914350][29626:29628] CHIP:TOO: EpochStartTime1: 2220001 - [1674110375.914359][29626:29628] CHIP:TOO: EpochKey2: null - [1674110375.914369][29626:29628] CHIP:TOO: EpochStartTime2: 2220002 - [1674110375.914379][29626:29628] CHIP:TOO: } - [1674110375.914390][29626:29628] CHIP:TOO: } - disabled: true - - - label: - "TH reads GroupKeyMap Attribute from the GroupKeyManagement cluster - from DUT" - verification: | - ./chip-tool groupkeymanagement read group-key-map 1 0 - - [1674110435.952959][29634:29636] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_0000 DataVersion: 624171954 - [1674110435.953367][29634:29636] CHIP:TOO: GroupKeyMap: 1 entries - [1674110435.953401][29634:29636] CHIP:TOO: [1]: { - [1674110435.953407][29634:29636] CHIP:TOO: GroupId: 259 - [1674110435.953411][29634:29636] CHIP:TOO: GroupKeySetID: 419 - [1674110435.953414][29634:29636] CHIP:TOO: FabricIndex: 1 - [1674110435.953417][29634:29636] CHIP:TOO: } - disabled: true - - - label: - "TH reads GroupTable attribute from GroupKeyManagement cluster on DUT - using a fabric-filtered read." + command: "ViewGroup" + arguments: + values: + - name: GroupID + value: 0x0103 + response: + values: + - name: Status + value: 0 + - name: GroupID + value: 0x0103 + - name: GroupName + value: "Test Group" + + - label: "TH sends ViewGroup command" + PICS: "!(G.S.F00)" + command: "ViewGroup" + arguments: + values: + - name: GroupID + value: 0x0103 + response: + values: + - name: Status + value: 0 + - name: GroupID + value: 0x0103 + - name: GroupName + value: "" + + - label: "TH sends KeySetRead" + cluster: "Group Key Management" + endpoint: 0 + command: "KeySetRead" + arguments: + values: + - name: GroupKeySetID + value: 0x01a3 + response: + values: + - name: GroupKeySet + value: + { + GroupKeySetID: 0x01a3, + GroupKeySecurityPolicy: 0, + EpochKey0: null, + EpochStartTime0: 2220000, + EpochKey1: null, + EpochStartTime1: 2220001, + EpochKey2: null, + EpochStartTime2: 2220002, + } + + - label: "TH reads GroupTable attribute" + cluster: "Group Key Management" + endpoint: 0 PICS: G.S.F00 - verification: | - ./chip-tool groupkeymanagement read group-table 1 0 - - [1674110549.621751][29686:29688] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_0001 DataVersion: 624171954 - [1674110549.621779][29686:29688] CHIP:TOO: GroupTable: 1 entries - [1674110549.621810][29686:29688] CHIP:TOO: [1]: { - [1674110549.621819][29686:29688] CHIP:TOO: GroupId: 259 - [1674110549.621826][29686:29688] CHIP:TOO: Endpoints: 1 entries - [1674110549.621833][29686:29688] CHIP:TOO: [1]: 1 - [1674110549.621839][29686:29688] CHIP:TOO: GroupName: Test Group - [1674110549.621845][29686:29688] CHIP:TOO: FabricIndex: 1 - [1674110549.621849][29686:29688] CHIP:TOO: } - disabled: true - - - label: - "TH reads GroupTable attribute from GroupKeyManagement cluster on DUT - using a fabric-filtered read." - PICS: " !G.S.F00 " - verification: | - F00(GN) feature is supporting for GroupTable attribute - disabled: true - - - label: - "TH removes the Group key set that was added by sending a KeySetRemove - command to the GroupKeyManagement cluster with the GroupKeySetID field - set to 0x01a3" - verification: | - ./chip-tool groupkeymanagement key-set-remove "0x01a3" 1 0 - - - [1674110684.044225][29696:29698] CHIP:DMG: InvokeResponseMessage = - [1674110684.044235][29696:29698] CHIP:DMG: { - [1674110684.044246][29696:29698] CHIP:DMG: suppressResponse = false, - [1674110684.044256][29696:29698] CHIP:DMG: InvokeResponseIBs = - [1674110684.044277][29696:29698] CHIP:DMG: [ - [1674110684.044288][29696:29698] CHIP:DMG: InvokeResponseIB = - [1674110684.044310][29696:29698] CHIP:DMG: { - [1674110684.044320][29696:29698] CHIP:DMG: CommandStatusIB = - [1674110684.044334][29696:29698] CHIP:DMG: { - [1674110684.044345][29696:29698] CHIP:DMG: CommandPathIB = - [1674110684.044358][29696:29698] CHIP:DMG: { - [1674110684.044372][29696:29698] CHIP:DMG: EndpointId = 0x0, - [1674110684.044385][29696:29698] CHIP:DMG: ClusterId = 0x3f, - [1674110684.044397][29696:29698] CHIP:DMG: CommandId = 0x3, - [1674110684.044408][29696:29698] CHIP:DMG: }, - [1674110684.044426][29696:29698] CHIP:DMG: - [1674110684.044438][29696:29698] CHIP:DMG: StatusIB = - [1674110684.044452][29696:29698] CHIP:DMG: { - [1674110684.044465][29696:29698] CHIP:DMG: status = 0x00 (SUCCESS), - [1674110684.044476][29696:29698] CHIP:DMG: }, - [1674110684.044490][29696:29698] CHIP:DMG: - [1674110684.044499][29696:29698] CHIP:DMG: }, - [1674110684.044517][29696:29698] CHIP:DMG: - [1674110684.044527][29696:29698] CHIP:DMG: }, - [1674110684.044543][29696:29698] CHIP:DMG: - [1674110684.044553][29696:29698] CHIP:DMG: ], - [1674110684.044572][29696:29698] CHIP:DMG: - [1674110684.044583][29696:29698] CHIP:DMG: InteractionModelRevision = 1 - [1674110684.044592][29696:29698] CHIP:DMG: }, - disabled: true - - - label: - "TH verifies that the key set removal in step 10 also removed the - corresponding entries in the GroupKeyMap by Reading the GroupKeyMap - attribute from the GroupKeyManagement cluster using a fabric-filtered - read." - verification: | - " ./chip-tool groupkeymanagement read group-key-map 1 0 - - - [1674110744.294550][29707:29709] CHIP:DMG: ReportDataMessage = - [1674110744.294570][29707:29709] CHIP:DMG: { - [1674110744.294583][29707:29709] CHIP:DMG: AttributeReportIBs = - [1674110744.294611][29707:29709] CHIP:DMG: [ - [1674110744.294626][29707:29709] CHIP:DMG: AttributeReportIB = - [1674110744.294654][29707:29709] CHIP:DMG: { - [1674110744.294667][29707:29709] CHIP:DMG: AttributeDataIB = - [1674110744.294686][29707:29709] CHIP:DMG: { - [1674110744.294703][29707:29709] CHIP:DMG: DataVersion = 0x25341bb2, - [1674110744.294719][29707:29709] CHIP:DMG: AttributePathIB = - [1674110744.294739][29707:29709] CHIP:DMG: { - [1674110744.294756][29707:29709] CHIP:DMG: Endpoint = 0x0, - [1674110744.294773][29707:29709] CHIP:DMG: Cluster = 0x3f, - [1674110744.294847][29707:29709] CHIP:DMG: Attribute = 0x0000_0000, - [1674110744.294864][29707:29709] CHIP:DMG: } - [1674110744.294885][29707:29709] CHIP:DMG: - [1674110744.294900][29707:29709] CHIP:DMG: Data = [ - [1674110744.294917][29707:29709] CHIP:DMG: - [1674110744.294935][29707:29709] CHIP:DMG: ], - [1674110744.294950][29707:29709] CHIP:DMG: }, - [1674110744.294974][29707:29709] CHIP:DMG: - [1674110744.294986][29707:29709] CHIP:DMG: }, - [1674110744.295012][29707:29709] CHIP:DMG: - [1674110744.295023][29707:29709] CHIP:DMG: ], - [1674110744.295050][29707:29709] CHIP:DMG: - [1674110744.295063][29707:29709] CHIP:DMG: SuppressResponse = true, - [1674110744.295079][29707:29709] CHIP:DMG: InteractionModelRevision = 1 - [1674110744.295093][29707:29709] CHIP:DMG: } - [1674110744.295288][29707:29709] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_0000 DataVersion: 624171954 - [1674110744.295368][29707:29709] CHIP:TOO: GroupKeyMap: 0 entries" - disabled: true - - - label: - "TH cleans up the groups by sending the RemoveAllGroups command to the - DUT on PIXIT.G.ENDPOINT" - verification: | - "./chip-tool groups remove-all-groups 1 1 - - [1674110831.412092][29723:29725] CHIP:DMG: InvokeResponseMessage = - [1674110831.412097][29723:29725] CHIP:DMG: { - [1674110831.412101][29723:29725] CHIP:DMG: suppressResponse = false, - [1674110831.412104][29723:29725] CHIP:DMG: InvokeResponseIBs = - [1674110831.412111][29723:29725] CHIP:DMG: [ - [1674110831.412114][29723:29725] CHIP:DMG: InvokeResponseIB = - [1674110831.412121][29723:29725] CHIP:DMG: { - [1674110831.412125][29723:29725] CHIP:DMG: CommandStatusIB = - [1674110831.412130][29723:29725] CHIP:DMG: { - [1674110831.412134][29723:29725] CHIP:DMG: CommandPathIB = - [1674110831.412138][29723:29725] CHIP:DMG: { - [1674110831.412141][29723:29725] CHIP:DMG: EndpointId = 0x1, - [1674110831.412145][29723:29725] CHIP:DMG: ClusterId = 0x4, - [1674110831.412149][29723:29725] CHIP:DMG: CommandId = 0x4, - [1674110831.412153][29723:29725] CHIP:DMG: }, - [1674110831.412158][29723:29725] CHIP:DMG: - [1674110831.412162][29723:29725] CHIP:DMG: StatusIB = - [1674110831.412168][29723:29725] CHIP:DMG: { - [1674110831.412172][29723:29725] CHIP:DMG: status = 0x00 (SUCCESS), - [1674110831.412175][29723:29725] CHIP:DMG: }, - [1674110831.412180][29723:29725] CHIP:DMG: - [1674110831.412182][29723:29725] CHIP:DMG: }, - [1674110831.412188][29723:29725] CHIP:DMG: - [1674110831.412191][29723:29725] CHIP:DMG: }, - [1674110831.412195][29723:29725] CHIP:DMG: - [1674110831.412198][29723:29725] CHIP:DMG: ], - [1674110831.412204][29723:29725] CHIP:DMG: - [1674110831.412207][29723:29725] CHIP:DMG: InteractionModelRevision = 1 - [1674110831.412209][29723:29725] CHIP:DMG: }," - disabled: true - - - label: - "TH reads verifies the group has been removed by reading the - GroupTable attribute from GroupKeyManagement cluster on DUT using a - fabric-filtered read." - verification: | - ./chip-tool groupkeymanagement read group-table 1 0 - - - [1674110892.787761][29730:29732] CHIP:DMG: ReportDataMessage = - [1674110892.787768][29730:29732] CHIP:DMG: { - [1674110892.787772][29730:29732] CHIP:DMG: AttributeReportIBs = - [1674110892.787780][29730:29732] CHIP:DMG: [ - [1674110892.787783][29730:29732] CHIP:DMG: AttributeReportIB = - [1674110892.787789][29730:29732] CHIP:DMG: { - [1674110892.787792][29730:29732] CHIP:DMG: AttributeDataIB = - [1674110892.787797][29730:29732] CHIP:DMG: { - [1674110892.787803][29730:29732] CHIP:DMG: DataVersion = 0x25341bb2, - [1674110892.787806][29730:29732] CHIP:DMG: AttributePathIB = - [1674110892.787811][29730:29732] CHIP:DMG: { - [1674110892.787815][29730:29732] CHIP:DMG: Endpoint = 0x0, - [1674110892.787819][29730:29732] CHIP:DMG: Cluster = 0x3f, - [1674110892.787825][29730:29732] CHIP:DMG: Attribute = 0x0000_0001, - [1674110892.787828][29730:29732] CHIP:DMG: } - [1674110892.787834][29730:29732] CHIP:DMG: - [1674110892.787840][29730:29732] CHIP:DMG: Data = [ - [1674110892.787843][29730:29732] CHIP:DMG: - [1674110892.787847][29730:29732] CHIP:DMG: ], - [1674110892.787850][29730:29732] CHIP:DMG: }, - [1674110892.787855][29730:29732] CHIP:DMG: - [1674110892.787858][29730:29732] CHIP:DMG: }, - [1674110892.787863][29730:29732] CHIP:DMG: - [1674110892.787865][29730:29732] CHIP:DMG: ], - [1674110892.787871][29730:29732] CHIP:DMG: - [1674110892.787875][29730:29732] CHIP:DMG: SuppressResponse = true, - [1674110892.787878][29730:29732] CHIP:DMG: InteractionModelRevision = 1 - [1674110892.787881][29730:29732] CHIP:DMG: } - [1674110892.787953][29730:29732] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_0001 DataVersion: 624171954 - [1674110892.787973][29730:29732] CHIP:TOO: GroupTable: 0 entries - disabled: true - - - label: - "TH writes The ACL attribute in the Access Control cluster to remove - Operate privileges for group 0x0103 and maintain the current - administrative privileges for the TH. The following access control - list shall be used: List item 1 (TH admin): Fabric index: 1,Privilege: - Administer (5),AuthMode: CASE (2),Subjects: TH node id ([N1]), - Targets: all (null)" - verification: | - Verify that the DUT sends SUCCESS response. - disabled: true + command: "readAttribute" + attribute: "GroupTable" + response: + value: + [ + { + GroupId: 0x0103, + Endpoints: [endpoint], + GroupName: "Test Group", + }, + ] + + - label: "TH reads GroupTable attribute" + cluster: "Group Key Management" + endpoint: 0 + PICS: "!(G.S.F00)" + command: "readAttribute" + attribute: "GroupTable" + response: + value: [{ GroupId: 0x0103, Endpoints: [endpoint], GroupName: "" }] + + - label: "TH removes the GroupKeySet" + cluster: "Group Key Management" + endpoint: 0 + command: "KeySetRemove" + arguments: + values: + - name: GroupKeySetID + value: 0x01a3 + + - label: "TH verifies the corresponding GroupKeyMap entry has been removed" + cluster: "Group Key Management" + endpoint: 0 + command: "readAttribute" + attribute: "GroupKeyMap" + response: + value: [] + + - label: "TH cleans up groups using RemoveAllGroups command" + command: "RemoveAllGroups" + + - label: "TH verifies the group has been removed in the GroupTable" + cluster: "Group Key Management" + endpoint: 0 + command: "readAttribute" + attribute: "GroupTable" + response: + value: [] + + - label: "TH removes ACL Operate privileges for Group 0x0103" + cluster: "Access Control" + endpoint: 0 + command: "writeAttribute" + attribute: "ACL" + arguments: + value: + [ + { + FabricIndex: 1, + Privilege: 5, + AuthMode: 2, + Subjects: [commissionerNodeId], + Targets: null, + }, + ] diff --git a/src/app/tests/suites/certification/Test_TC_SC_5_2.yaml b/src/app/tests/suites/certification/Test_TC_SC_5_2.yaml index 152752b33f0a8c..fea8bac4965bae 100644 --- a/src/app/tests/suites/certification/Test_TC_SC_5_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_SC_5_2.yaml @@ -20,47 +20,141 @@ PICS: config: nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 + cluster: "Groups" + # Users should set endpoint value on the command line to PIXIT.G.ENDPOINT + endpoint: 1 tests: - - label: "Precondition" - verification: | - DUT and TH are commissioned. + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId - DUT and TH are part of a common group.- Run TC-SC-5.1 to establish this precondition + - label: "TH adds ACL Operate privileges for Group 0x0103" + cluster: "Access Control" + endpoint: 0 + command: "writeAttribute" + attribute: "ACL" + arguments: + value: + [ + { + FabricIndex: 1, + Privilege: 5, + AuthMode: 2, + Subjects: [commissionerNodeId], + Targets: null, + }, + { + FabricIndex: 1, + Privilege: 3, + AuthMode: 3, + Subjects: [0x0103], + Targets: null, + }, + ] - DUT supports the Identify cluster - disabled: true + - label: "TH sends KeySetWrite command with TH key" + cluster: "Group Key Management" + endpoint: 0 + command: "KeySetWrite" + arguments: + values: + - name: GroupKeySet + value: + { + GroupKeySetID: 0x01a3, + GroupKeySecurityPolicy: 0, + EpochKey0: "0xd0d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime0: 2220000, + EpochKey1: "0xd1d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime1: 2220001, + EpochKey2: "0xd2d1d2d3d4d5d6d7d8d9dadbdcdddedf", + EpochStartTime2: 2220002, + } - - label: "TH writes ACL entry by setting AuthMode as Group to DUT" - verification: | - As this step is executed in the TC-SC-5.1, we can skip this step during execution. - disabled: true + - label: "TH binds GroupId to GroupKeySet" + cluster: "Group Key Management" + endpoint: 0 + command: "writeAttribute" + attribute: "GroupKeyMap" + arguments: + value: [{ FabricIndex: 1, GroupId: 0x0103, GroupKeySetID: 0x01a3 }] - - label: - "TH sends a multicast Identify command with the IdentifyTime set to - 0x0078 (120s) to DUT with GroupID and PIXIT.G.ENDPOINT" - PICS: I.S.C00.Rsp - verification: | - ./chip-tool identify identify 0x0078 0xffffffffffff0001 1 + - label: "TH sends RemoveAllGroups command" + command: "RemoveAllGroups" - Verify Identify command on the TH(chip-tool) Log and below is the sample log provided for the raspi platform: + - label: "TH sends AddGroup command" + command: "AddGroup" + arguments: + values: + - name: GroupID + value: 0x0103 + - name: GroupName + value: "Test Group" + - label: "TH sends ViewGroup command using group messaging" + PICS: G.S.F00 + command: "ViewGroup" + groupId: 0x0103 + arguments: + values: + - name: GroupID + value: 0x0103 + response: + values: + - name: Status + value: 0 + - name: GroupID + value: 0x0103 + - name: GroupName + value: "Test Group" - [1657785273.973231][1618:1623] CHIP:DL: HandlePlatformSpecificBLEEvent 32784[1657785273.973291][1618:1623] CHIP:TOO: Sending command to group 0x1 - [1657785273.973316][1618:1623] CHIP:TOO: Sending cluster (0x00000003) command (0x00000000) on Group 1 - disabled: true + - label: "TH sends ViewGroup command using group messaging" + PICS: "!(G.S.F00)" + command: "ViewGroup" + groupId: 0x0103 + arguments: + values: + - name: GroupID + value: 0x0103 + response: + values: + - name: Status + value: 0 + - name: GroupID + value: 0x0103 + - name: GroupName + value: "" - - label: - "TH reads immediately IdentifyTime attribute from DUT on the - PIXIT.G.ENDPOINT set by DUT" - PICS: I.S.A0000 - verification: | - ./chip-tool identify read identify-time 1 1 + - label: "TH removes the GroupKeySet" + cluster: "Group Key Management" + endpoint: 0 + command: "KeySetRemove" + arguments: + values: + - name: GroupKeySetID + value: 0x01a3 - Verify Identify time is approximately equal to 0x0078 (120s),on the TH(chip-tool) Log and below is the sample log provided for the raspi platform: + - label: "TH cleans up groups using RemoveAllGroups command" + command: "RemoveAllGroups" - [1657785288.647504][1624:1629] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0003 Attribute 0x0000_0000 DataVersion: 1130139861 - [1657785288.647621][1624:1629] CHIP:TOO: identify time: 120 - disabled: true + - label: "TH removes ACL Operate privileges for Group 0x0103" + cluster: "Access Control" + endpoint: 0 + command: "writeAttribute" + attribute: "ACL" + arguments: + value: + [ + { + FabricIndex: 1, + Privilege: 5, + AuthMode: 2, + Subjects: [commissionerNodeId], + Targets: null, + }, + ] diff --git a/src/app/tests/suites/ciTests.json b/src/app/tests/suites/ciTests.json index b216318b9dc1ee..857e538f59e75f 100644 --- a/src/app/tests/suites/ciTests.json +++ b/src/app/tests/suites/ciTests.json @@ -154,7 +154,7 @@ ], "PowerSourceConfiguration": ["Test_TC_PSCFG_1_1", "Test_TC_PSCFG_2_1"], "RelativeHumidityMeasurement": ["Test_TC_RH_1_1", "Test_TC_RH_2_1"], - "SecureChannel": [], + "SecureChannel": ["Test_TC_SC_5_1", "Test_TC_SC_5_2"], "Switch": ["Test_TC_SWTCH_1_1", "Test_TC_SWTCH_2_1"], "TemperatureMeasurement": ["Test_TC_TMP_1_1", "Test_TC_TMP_2_1"], "Thermostat": [ diff --git a/src/app/tests/suites/manualTests.json b/src/app/tests/suites/manualTests.json index 9f3d106abe2137..f821ed9049e9fe 100644 --- a/src/app/tests/suites/manualTests.json +++ b/src/app/tests/suites/manualTests.json @@ -227,8 +227,6 @@ "Test_TC_SC_4_8", "Test_TC_SC_4_9", "Test_TC_SC_4_10", - "Test_TC_SC_5_1", - "Test_TC_SC_5_2", "Test_TC_SC_5_3", "Test_TC_SC_6_1" ], diff --git a/src/app/util/mock/attribute-storage.cpp b/src/app/util/mock/attribute-storage.cpp index 47a3afb296c0d9..d03f7b51161902 100644 --- a/src/app/util/mock/attribute-storage.cpp +++ b/src/app/util/mock/attribute-storage.cpp @@ -278,7 +278,7 @@ CHIP_ERROR ReadSingleMockClusterData(FabricIndex aAccessingFabricIndex, const Co bool dataExists = (emberAfGetServerAttributeIndexByAttributeId(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId) != UINT16_MAX); - ChipLogDetail(DataManagement, "Reading Mock Endpoint %" PRIx32 "Mock Cluster %" PRIx32 ", Field %" PRIx32 " is dirty", + ChipLogDetail(DataManagement, "Reading Mock Endpoint %x Mock Cluster %" PRIx32 ", Field %" PRIx32 " is dirty", aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); if (!dataExists) 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 3653e5c1db6530..e8e899b1bd54d7 100644 --- a/src/app/zap-templates/zcl/data-model/chip/scene.xml +++ b/src/app/zap-templates/zcl/data-model/chip/scene.xml @@ -22,7 +22,7 @@ limitations under the License. - + @@ -30,7 +30,7 @@ limitations under the License. - + @@ -56,8 +56,8 @@ limitations under the License. Add a scene to the scene table. Extension field sets are supported, and are inputed as '{"ClusterID": VALUE, "AttributeValueList":[{"AttributeId": VALUE, "AttributeValue": VALUE}]}' - - + + @@ -68,16 +68,16 @@ limitations under the License. Retrieves the requested scene entry from its Scene table. - - + + Removes the requested scene entry, corresponding to the value of the GroupID field, from its Scene Table - - + + @@ -85,7 +85,7 @@ limitations under the License. Remove all scenes, corresponding to the value of the GroupID field, from its Scene Table - + @@ -93,8 +93,8 @@ limitations under the License. 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 - - + + @@ -102,8 +102,8 @@ limitations under the License. Set the attributes and corresponding state for each other cluster implemented on the endpoint accordingly to the resquested scene entry in the Scene Table - - + + @@ -111,15 +111,15 @@ limitations under the License. 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 - + Allows a scene to be added using a finer scene transition time than the AddScene command. - - + + @@ -128,18 +128,18 @@ limitations under the License. Allows a scene to be retrieved using a finer scene transition time than the ViewScene command - - + + Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. - - - - + + + + @@ -147,8 +147,8 @@ limitations under the License. The command is generated in response to a received unicast AddScene command, - - + + @@ -156,8 +156,8 @@ limitations under the License. The command is generated in response to a received unicast ViewScene command - - + + @@ -168,8 +168,8 @@ limitations under the License. The command is generated in response to a received unicast RemoveScene command - - + + @@ -177,7 +177,7 @@ limitations under the License. The command is generated in response to a received unicast RemoveAllScenes command - + @@ -185,8 +185,8 @@ limitations under the License. The command is generated in response to a received unicast StoreScene command - - + + @@ -195,7 +195,7 @@ limitations under the License. - + @@ -204,8 +204,8 @@ limitations under the License. The command is generated in response to a received unicast EnhancedAddScene command - - + + @@ -213,8 +213,8 @@ limitations under the License. The command is generated in response to a received unicast EnhancedViewScene command - - + + @@ -225,13 +225,13 @@ limitations under the License. The command is generated in response to a received unicast CopyScene command - - + + - + 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 b1f0608e9f0be5..56d85f75687cbd 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 @@ -213,15 +213,15 @@ limitations under the License. - + - + - + diff --git a/src/app/zap-templates/zcl/data-model/silabs/types.xml b/src/app/zap-templates/zcl/data-model/silabs/types.xml index 4293b31d489dd1..f2fa2acd06b1d4 100644 --- a/src/app/zap-templates/zcl/data-model/silabs/types.xml +++ b/src/app/zap-templates/zcl/data-model/silabs/types.xml @@ -144,28 +144,30 @@ limitations under the License. - - - - - - + + + + + + - - - - - - - + + + + + + + + + - - - + + + @@ -582,12 +584,12 @@ limitations under the License. - + - - + + diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index a5ea74f9a50c3f..dd5be7df89a34c 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -119,17 +119,21 @@ client cluster Groups = 4 { } client cluster Scenes = 5 { + bitmap SceneFeatures : BITMAP32 { + kSceneNames = 0x1; + } + bitmap ScenesCopyMode : BITMAP8 { kCopyAllScenes = 0x1; } struct ExtensionFieldSet { - cluster_id clusterId = 0; + cluster_id clusterID = 0; AttributeValuePair attributeValueList[] = 1; } struct AttributeValuePair { - optional attrib_id attributeId = 0; + optional attrib_id attributeID = 0; int8u attributeValue[] = 1; } @@ -145,52 +149,52 @@ client cluster Scenes = 5 { readonly attribute int16u clusterRevision = 65533; request struct AddSceneRequest { - group_id groupId = 0; - INT8U sceneId = 1; + group_id groupID = 0; + INT8U sceneID = 1; INT16U transitionTime = 2; CHAR_STRING sceneName = 3; ExtensionFieldSet extensionFieldSets[] = 4; } request struct ViewSceneRequest { - group_id groupId = 0; - INT8U sceneId = 1; + group_id groupID = 0; + INT8U sceneID = 1; } request struct RemoveSceneRequest { - group_id groupId = 0; - INT8U sceneId = 1; + group_id groupID = 0; + INT8U sceneID = 1; } request struct RemoveAllScenesRequest { - group_id groupId = 0; + group_id groupID = 0; } request struct StoreSceneRequest { - group_id groupId = 0; - INT8U sceneId = 1; + group_id groupID = 0; + INT8U sceneID = 1; } request struct RecallSceneRequest { - group_id groupId = 0; - INT8U sceneId = 1; + group_id groupID = 0; + INT8U sceneID = 1; optional nullable INT16U transitionTime = 2; } request struct GetSceneMembershipRequest { - group_id groupId = 0; + group_id groupID = 0; } response struct AddSceneResponse = 0 { ENUM8 status = 0; - group_id groupId = 1; - INT8U sceneId = 2; + group_id groupID = 1; + INT8U sceneID = 2; } response struct ViewSceneResponse = 1 { ENUM8 status = 0; - group_id groupId = 1; - INT8U sceneId = 2; + group_id groupID = 1; + INT8U sceneID = 2; optional INT16U transitionTime = 3; optional CHAR_STRING sceneName = 4; optional ExtensionFieldSet extensionFieldSets[] = 5; @@ -198,25 +202,25 @@ client cluster Scenes = 5 { response struct RemoveSceneResponse = 2 { ENUM8 status = 0; - group_id groupId = 1; - INT8U sceneId = 2; + group_id groupID = 1; + INT8U sceneID = 2; } response struct RemoveAllScenesResponse = 3 { ENUM8 status = 0; - group_id groupId = 1; + group_id groupID = 1; } response struct StoreSceneResponse = 4 { ENUM8 status = 0; - group_id groupId = 1; - INT8U sceneId = 2; + group_id groupID = 1; + INT8U sceneID = 2; } response struct GetSceneMembershipResponse = 6 { ENUM8 status = 0; nullable INT8U capacity = 1; - group_id groupId = 2; + group_id groupID = 2; optional INT8U sceneList[] = 3; } @@ -259,10 +263,6 @@ client cluster OnOff = 6 { kLighting = 0x1; } - bitmap SceneFeatures : BITMAP32 { - kSceneNames = 0x1; - } - readonly attribute boolean onOff = 0; readonly attribute boolean globalSceneControl = 16384; attribute int16u onTime = 16385; @@ -2921,9 +2921,9 @@ client cluster PumpConfigurationAndControl = 512 { client cluster Thermostat = 513 { enum SetpointAdjustMode : ENUM8 { - kHeatSetpoint = 0; - kCoolSetpoint = 1; - kHeatAndCoolSetpoints = 2; + kHeat = 0; + kCool = 1; + kBoth = 2; } enum ThermostatControlSequence : ENUM8 { @@ -2946,9 +2946,11 @@ client cluster Thermostat = 513 { kAuto = 1; kCool = 3; kHeat = 4; - kEmergencyHeating = 5; + kEmergencyHeat = 5; kPrecooling = 6; kFanOnly = 7; + kDry = 8; + kSleep = 9; } bitmap DayOfWeek : BITMAP8 { @@ -2959,21 +2961,21 @@ client cluster Thermostat = 513 { kThursday = 0x10; kFriday = 0x20; kSaturday = 0x40; - kAwayOrVacation = 0x80; + kAway = 0x80; } bitmap ModeForSequence : BITMAP8 { - kHeatSetpointFieldPresent = 0x1; - kCoolSetpointFieldPresent = 0x2; + kHeatSetpointPresent = 0x1; + kCoolSetpointPresent = 0x2; } bitmap ThermostatFeature : BITMAP32 { kHeating = 0x1; kCooling = 0x2; kOccupancy = 0x4; - kSchedule = 0x8; + kScheduleConfiguration = 0x8; kSetback = 0x10; - kAutomode = 0x20; + kAutoMode = 0x20; } struct ThermostatScheduleTransition { diff --git a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp index c008c2928d6635..3625bafd95a607 100644 --- a/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp +++ b/src/controller/java/zap-generated/CHIPInvokeCallbacks.cpp @@ -365,18 +365,18 @@ void CHIPScenesClusterAddSceneResponseCallback::CallbackFn( std::string StatusCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), dataResponse.status, Status); - jobject GroupId; - std::string GroupIdClassName = "java/lang/Integer"; - std::string GroupIdCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(GroupIdClassName.c_str(), GroupIdCtorSignature.c_str(), - dataResponse.groupId, GroupId); - jobject SceneId; - std::string SceneIdClassName = "java/lang/Integer"; - std::string SceneIdCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(SceneIdClassName.c_str(), SceneIdCtorSignature.c_str(), - dataResponse.sceneId, SceneId); - - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, GroupId, SceneId); + jobject GroupID; + std::string GroupIDClassName = "java/lang/Integer"; + std::string GroupIDCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), + dataResponse.groupID, GroupID); + jobject SceneID; + std::string SceneIDClassName = "java/lang/Integer"; + std::string SceneIDCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(SceneIDClassName.c_str(), SceneIDCtorSignature.c_str(), + dataResponse.sceneID, SceneID); + + env->CallVoidMethod(javaCallbackRef, javaMethod, Status, GroupID, SceneID); } CHIPScenesClusterViewSceneResponseCallback::CHIPScenesClusterViewSceneResponseCallback(jobject javaCallback) : Callback::Callback(CallbackFn, this) @@ -437,16 +437,16 @@ void CHIPScenesClusterViewSceneResponseCallback::CallbackFn( std::string StatusCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), dataResponse.status, Status); - jobject GroupId; - std::string GroupIdClassName = "java/lang/Integer"; - std::string GroupIdCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(GroupIdClassName.c_str(), GroupIdCtorSignature.c_str(), - dataResponse.groupId, GroupId); - jobject SceneId; - std::string SceneIdClassName = "java/lang/Integer"; - std::string SceneIdCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(SceneIdClassName.c_str(), SceneIdCtorSignature.c_str(), - dataResponse.sceneId, SceneId); + jobject GroupID; + std::string GroupIDClassName = "java/lang/Integer"; + std::string GroupIDCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), + dataResponse.groupID, GroupID); + jobject SceneID; + std::string SceneIDClassName = "java/lang/Integer"; + std::string SceneIDCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(SceneIDClassName.c_str(), SceneIDCtorSignature.c_str(), + dataResponse.sceneID, SceneID); jobject TransitionTime; if (!dataResponse.transitionTime.HasValue()) { @@ -489,12 +489,12 @@ void CHIPScenesClusterViewSceneResponseCallback::CallbackFn( { 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"; - chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_clusterIdClassName.c_str(), - newElement_1_clusterIdCtorSignature.c_str(), - entry_1.clusterId, newElement_1_clusterId); + jobject newElement_1_clusterID; + std::string newElement_1_clusterIDClassName = "java/lang/Long"; + std::string newElement_1_clusterIDCtorSignature = "(J)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(newElement_1_clusterIDClassName.c_str(), + newElement_1_clusterIDCtorSignature.c_str(), + entry_1.clusterID, newElement_1_clusterID); jobject newElement_1_attributeValueList; chip::JniReferences::GetInstance().CreateArrayList(newElement_1_attributeValueList); @@ -503,22 +503,22 @@ void CHIPScenesClusterViewSceneResponseCallback::CallbackFn( { auto & entry_3 = iter_newElement_1_attributeValueList_3.GetValue(); jobject newElement_3; - jobject newElement_3_attributeId; - if (!entry_3.attributeId.HasValue()) + jobject newElement_3_attributeID; + if (!entry_3.attributeID.HasValue()) { - chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_3_attributeId); + chip::JniReferences::GetInstance().CreateOptional(nullptr, newElement_3_attributeID); } else { - jobject newElement_3_attributeIdInsideOptional; - std::string newElement_3_attributeIdInsideOptionalClassName = "java/lang/Long"; - std::string newElement_3_attributeIdInsideOptionalCtorSignature = "(J)V"; + jobject newElement_3_attributeIDInsideOptional; + std::string newElement_3_attributeIDInsideOptionalClassName = "java/lang/Long"; + std::string newElement_3_attributeIDInsideOptionalCtorSignature = "(J)V"; chip::JniReferences::GetInstance().CreateBoxedObject( - newElement_3_attributeIdInsideOptionalClassName.c_str(), - newElement_3_attributeIdInsideOptionalCtorSignature.c_str(), entry_3.attributeId.Value(), - newElement_3_attributeIdInsideOptional); - chip::JniReferences::GetInstance().CreateOptional(newElement_3_attributeIdInsideOptional, - newElement_3_attributeId); + newElement_3_attributeIDInsideOptionalClassName.c_str(), + newElement_3_attributeIDInsideOptionalCtorSignature.c_str(), entry_3.attributeID.Value(), + newElement_3_attributeIDInsideOptional); + chip::JniReferences::GetInstance().CreateOptional(newElement_3_attributeIDInsideOptional, + newElement_3_attributeID); } jobject newElement_3_attributeValue; chip::JniReferences::GetInstance().CreateArrayList(newElement_3_attributeValue); @@ -552,7 +552,7 @@ void CHIPScenesClusterViewSceneResponseCallback::CallbackFn( } newElement_3 = env->NewObject(attributeValuePairStructClass_4, attributeValuePairStructCtor_4, - newElement_3_attributeId, newElement_3_attributeValue); + newElement_3_attributeID, newElement_3_attributeValue); chip::JniReferences::GetInstance().AddToList(newElement_1_attributeValueList, newElement_3); } @@ -572,14 +572,14 @@ void CHIPScenesClusterViewSceneResponseCallback::CallbackFn( return; } - newElement_1 = env->NewObject(extensionFieldSetStructClass_2, extensionFieldSetStructCtor_2, newElement_1_clusterId, + 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); + env->CallVoidMethod(javaCallbackRef, javaMethod, Status, GroupID, SceneID, TransitionTime, SceneName, ExtensionFieldSets); } CHIPScenesClusterRemoveSceneResponseCallback::CHIPScenesClusterRemoveSceneResponseCallback(jobject javaCallback) : Callback::Callback(CallbackFn, this) @@ -638,18 +638,18 @@ void CHIPScenesClusterRemoveSceneResponseCallback::CallbackFn( std::string StatusCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), dataResponse.status, Status); - jobject GroupId; - std::string GroupIdClassName = "java/lang/Integer"; - std::string GroupIdCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(GroupIdClassName.c_str(), GroupIdCtorSignature.c_str(), - dataResponse.groupId, GroupId); - jobject SceneId; - std::string SceneIdClassName = "java/lang/Integer"; - std::string SceneIdCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(SceneIdClassName.c_str(), SceneIdCtorSignature.c_str(), - dataResponse.sceneId, SceneId); - - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, GroupId, SceneId); + jobject GroupID; + std::string GroupIDClassName = "java/lang/Integer"; + std::string GroupIDCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), + dataResponse.groupID, GroupID); + jobject SceneID; + std::string SceneIDClassName = "java/lang/Integer"; + std::string SceneIDCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(SceneIDClassName.c_str(), SceneIDCtorSignature.c_str(), + dataResponse.sceneID, SceneID); + + env->CallVoidMethod(javaCallbackRef, javaMethod, Status, GroupID, SceneID); } CHIPScenesClusterRemoveAllScenesResponseCallback::CHIPScenesClusterRemoveAllScenesResponseCallback(jobject javaCallback) : Callback::Callback(CallbackFn, this) @@ -708,13 +708,13 @@ void CHIPScenesClusterRemoveAllScenesResponseCallback::CallbackFn( std::string StatusCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), dataResponse.status, Status); - jobject GroupId; - std::string GroupIdClassName = "java/lang/Integer"; - std::string GroupIdCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(GroupIdClassName.c_str(), GroupIdCtorSignature.c_str(), - dataResponse.groupId, GroupId); + jobject GroupID; + std::string GroupIDClassName = "java/lang/Integer"; + std::string GroupIDCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), + dataResponse.groupID, GroupID); - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, GroupId); + env->CallVoidMethod(javaCallbackRef, javaMethod, Status, GroupID); } CHIPScenesClusterStoreSceneResponseCallback::CHIPScenesClusterStoreSceneResponseCallback(jobject javaCallback) : Callback::Callback(CallbackFn, this) @@ -773,18 +773,18 @@ void CHIPScenesClusterStoreSceneResponseCallback::CallbackFn( std::string StatusCtorSignature = "(I)V"; chip::JniReferences::GetInstance().CreateBoxedObject(StatusClassName.c_str(), StatusCtorSignature.c_str(), dataResponse.status, Status); - jobject GroupId; - std::string GroupIdClassName = "java/lang/Integer"; - std::string GroupIdCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(GroupIdClassName.c_str(), GroupIdCtorSignature.c_str(), - dataResponse.groupId, GroupId); - jobject SceneId; - std::string SceneIdClassName = "java/lang/Integer"; - std::string SceneIdCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(SceneIdClassName.c_str(), SceneIdCtorSignature.c_str(), - dataResponse.sceneId, SceneId); - - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, GroupId, SceneId); + jobject GroupID; + std::string GroupIDClassName = "java/lang/Integer"; + std::string GroupIDCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), + dataResponse.groupID, GroupID); + jobject SceneID; + std::string SceneIDClassName = "java/lang/Integer"; + std::string SceneIDCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(SceneIDClassName.c_str(), SceneIDCtorSignature.c_str(), + dataResponse.sceneID, SceneID); + + env->CallVoidMethod(javaCallbackRef, javaMethod, Status, GroupID, SceneID); } CHIPScenesClusterGetSceneMembershipResponseCallback::CHIPScenesClusterGetSceneMembershipResponseCallback(jobject javaCallback) : Callback::Callback(CallbackFn, this) @@ -857,11 +857,11 @@ void CHIPScenesClusterGetSceneMembershipResponseCallback::CallbackFn( chip::JniReferences::GetInstance().CreateBoxedObject(CapacityClassName.c_str(), CapacityCtorSignature.c_str(), dataResponse.capacity.Value(), Capacity); } - jobject GroupId; - std::string GroupIdClassName = "java/lang/Integer"; - std::string GroupIdCtorSignature = "(I)V"; - chip::JniReferences::GetInstance().CreateBoxedObject(GroupIdClassName.c_str(), GroupIdCtorSignature.c_str(), - dataResponse.groupId, GroupId); + jobject GroupID; + std::string GroupIDClassName = "java/lang/Integer"; + std::string GroupIDCtorSignature = "(I)V"; + chip::JniReferences::GetInstance().CreateBoxedObject(GroupIDClassName.c_str(), GroupIDCtorSignature.c_str(), + dataResponse.groupID, GroupID); jobject SceneList; if (!dataResponse.sceneList.HasValue()) { @@ -886,7 +886,7 @@ void CHIPScenesClusterGetSceneMembershipResponseCallback::CallbackFn( chip::JniReferences::GetInstance().CreateOptional(SceneListInsideOptional, SceneList); } - env->CallVoidMethod(javaCallbackRef, javaMethod, Status, Capacity, GroupId, SceneList); + env->CallVoidMethod(javaCallbackRef, javaMethod, Status, Capacity, GroupID, SceneList); } CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallback::CHIPOtaSoftwareUpdateProviderClusterQueryImageResponseCallback( jobject javaCallback) : diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java index 3d091494df2d02..6a6058623a10f3 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipClusters.java @@ -602,16 +602,16 @@ public ScenesCluster(long devicePtr, int endpointId) { public void addScene( AddSceneResponseCallback callback, - Integer groupId, - Integer sceneId, + Integer groupID, + Integer sceneID, Integer transitionTime, String sceneName, ArrayList extensionFieldSets) { addScene( chipClusterPtr, callback, - groupId, - sceneId, + groupID, + sceneID, transitionTime, sceneName, extensionFieldSets, @@ -620,8 +620,8 @@ public void addScene( public void addScene( AddSceneResponseCallback callback, - Integer groupId, - Integer sceneId, + Integer groupID, + Integer sceneID, Integer transitionTime, String sceneName, ArrayList extensionFieldSets, @@ -629,91 +629,91 @@ public void addScene( addScene( chipClusterPtr, callback, - groupId, - sceneId, + groupID, + sceneID, transitionTime, sceneName, extensionFieldSets, timedInvokeTimeoutMs); } - public void viewScene(ViewSceneResponseCallback callback, Integer groupId, Integer sceneId) { - viewScene(chipClusterPtr, callback, groupId, sceneId, null); + public void viewScene(ViewSceneResponseCallback callback, Integer groupID, Integer sceneID) { + viewScene(chipClusterPtr, callback, groupID, sceneID, null); } public void viewScene( ViewSceneResponseCallback callback, - Integer groupId, - Integer sceneId, + Integer groupID, + Integer sceneID, int timedInvokeTimeoutMs) { - viewScene(chipClusterPtr, callback, groupId, sceneId, timedInvokeTimeoutMs); + viewScene(chipClusterPtr, callback, groupID, sceneID, timedInvokeTimeoutMs); } public void removeScene( - RemoveSceneResponseCallback callback, Integer groupId, Integer sceneId) { - removeScene(chipClusterPtr, callback, groupId, sceneId, null); + RemoveSceneResponseCallback callback, Integer groupID, Integer sceneID) { + removeScene(chipClusterPtr, callback, groupID, sceneID, null); } public void removeScene( RemoveSceneResponseCallback callback, - Integer groupId, - Integer sceneId, + Integer groupID, + Integer sceneID, int timedInvokeTimeoutMs) { - removeScene(chipClusterPtr, callback, groupId, sceneId, timedInvokeTimeoutMs); + removeScene(chipClusterPtr, callback, groupID, sceneID, timedInvokeTimeoutMs); } - public void removeAllScenes(RemoveAllScenesResponseCallback callback, Integer groupId) { - removeAllScenes(chipClusterPtr, callback, groupId, null); + public void removeAllScenes(RemoveAllScenesResponseCallback callback, Integer groupID) { + removeAllScenes(chipClusterPtr, callback, groupID, null); } public void removeAllScenes( - RemoveAllScenesResponseCallback callback, Integer groupId, int timedInvokeTimeoutMs) { - removeAllScenes(chipClusterPtr, callback, groupId, timedInvokeTimeoutMs); + RemoveAllScenesResponseCallback callback, Integer groupID, int timedInvokeTimeoutMs) { + removeAllScenes(chipClusterPtr, callback, groupID, timedInvokeTimeoutMs); } - public void storeScene(StoreSceneResponseCallback callback, Integer groupId, Integer sceneId) { - storeScene(chipClusterPtr, callback, groupId, sceneId, null); + public void storeScene(StoreSceneResponseCallback callback, Integer groupID, Integer sceneID) { + storeScene(chipClusterPtr, callback, groupID, sceneID, null); } public void storeScene( StoreSceneResponseCallback callback, - Integer groupId, - Integer sceneId, + Integer groupID, + Integer sceneID, int timedInvokeTimeoutMs) { - storeScene(chipClusterPtr, callback, groupId, sceneId, timedInvokeTimeoutMs); + storeScene(chipClusterPtr, callback, groupID, sceneID, timedInvokeTimeoutMs); } public void recallScene( DefaultClusterCallback callback, - Integer groupId, - Integer sceneId, + Integer groupID, + Integer sceneID, @Nullable Optional transitionTime) { - recallScene(chipClusterPtr, callback, groupId, sceneId, transitionTime, null); + recallScene(chipClusterPtr, callback, groupID, sceneID, transitionTime, null); } public void recallScene( DefaultClusterCallback callback, - Integer groupId, - Integer sceneId, + Integer groupID, + Integer sceneID, @Nullable Optional transitionTime, int timedInvokeTimeoutMs) { - recallScene(chipClusterPtr, callback, groupId, sceneId, transitionTime, timedInvokeTimeoutMs); + recallScene(chipClusterPtr, callback, groupID, sceneID, transitionTime, timedInvokeTimeoutMs); } - public void getSceneMembership(GetSceneMembershipResponseCallback callback, Integer groupId) { - getSceneMembership(chipClusterPtr, callback, groupId, null); + public void getSceneMembership(GetSceneMembershipResponseCallback callback, Integer groupID) { + getSceneMembership(chipClusterPtr, callback, groupID, null); } public void getSceneMembership( - GetSceneMembershipResponseCallback callback, Integer groupId, int timedInvokeTimeoutMs) { - getSceneMembership(chipClusterPtr, callback, groupId, timedInvokeTimeoutMs); + GetSceneMembershipResponseCallback callback, Integer groupID, int timedInvokeTimeoutMs) { + getSceneMembership(chipClusterPtr, callback, groupID, timedInvokeTimeoutMs); } private native void addScene( long chipClusterPtr, AddSceneResponseCallback Callback, - Integer groupId, - Integer sceneId, + Integer groupID, + Integer sceneID, Integer transitionTime, String sceneName, ArrayList extensionFieldSets, @@ -722,46 +722,46 @@ private native void addScene( private native void viewScene( long chipClusterPtr, ViewSceneResponseCallback Callback, - Integer groupId, - Integer sceneId, + Integer groupID, + Integer sceneID, @Nullable Integer timedInvokeTimeoutMs); private native void removeScene( long chipClusterPtr, RemoveSceneResponseCallback Callback, - Integer groupId, - Integer sceneId, + Integer groupID, + Integer sceneID, @Nullable Integer timedInvokeTimeoutMs); private native void removeAllScenes( long chipClusterPtr, RemoveAllScenesResponseCallback Callback, - Integer groupId, + Integer groupID, @Nullable Integer timedInvokeTimeoutMs); private native void storeScene( long chipClusterPtr, StoreSceneResponseCallback Callback, - Integer groupId, - Integer sceneId, + Integer groupID, + Integer sceneID, @Nullable Integer timedInvokeTimeoutMs); private native void recallScene( long chipClusterPtr, DefaultClusterCallback Callback, - Integer groupId, - Integer sceneId, + Integer groupID, + Integer sceneID, @Nullable Optional transitionTime, @Nullable Integer timedInvokeTimeoutMs); private native void getSceneMembership( long chipClusterPtr, GetSceneMembershipResponseCallback Callback, - Integer groupId, + Integer groupID, @Nullable Integer timedInvokeTimeoutMs); public interface AddSceneResponseCallback { - void onSuccess(Integer status, Integer groupId, Integer sceneId); + void onSuccess(Integer status, Integer groupID, Integer sceneID); void onError(Exception error); } @@ -769,8 +769,8 @@ public interface AddSceneResponseCallback { public interface ViewSceneResponseCallback { void onSuccess( Integer status, - Integer groupId, - Integer sceneId, + Integer groupID, + Integer sceneID, Optional transitionTime, Optional sceneName, Optional> extensionFieldSets); @@ -779,19 +779,19 @@ void onSuccess( } public interface RemoveSceneResponseCallback { - void onSuccess(Integer status, Integer groupId, Integer sceneId); + void onSuccess(Integer status, Integer groupID, Integer sceneID); void onError(Exception error); } public interface RemoveAllScenesResponseCallback { - void onSuccess(Integer status, Integer groupId); + void onSuccess(Integer status, Integer groupID); void onError(Exception error); } public interface StoreSceneResponseCallback { - void onSuccess(Integer status, Integer groupId, Integer sceneId); + void onSuccess(Integer status, Integer groupID, Integer sceneID); void onError(Exception error); } @@ -800,7 +800,7 @@ public interface GetSceneMembershipResponseCallback { void onSuccess( Integer status, @Nullable Integer capacity, - Integer groupId, + Integer groupID, Optional> sceneList); void onError(Exception error); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java b/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java index c5ada81ecbf732..56810ab1fb2871 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ChipStructs.java @@ -25,12 +25,12 @@ public class ChipStructs { public static class ScenesClusterAttributeValuePair { - public Optional attributeId; + public Optional attributeID; public ArrayList attributeValue; public ScenesClusterAttributeValuePair( - Optional attributeId, ArrayList attributeValue) { - this.attributeId = attributeId; + Optional attributeID, ArrayList attributeValue) { + this.attributeID = attributeID; this.attributeValue = attributeValue; } @@ -38,8 +38,8 @@ public ScenesClusterAttributeValuePair( public String toString() { StringBuilder output = new StringBuilder(); output.append("ScenesClusterAttributeValuePair {\n"); - output.append("\tattributeId: "); - output.append(attributeId); + output.append("\tattributeID: "); + output.append(attributeID); output.append("\n"); output.append("\tattributeValue: "); output.append(attributeValue); @@ -50,12 +50,12 @@ public String toString() { } public static class ScenesClusterExtensionFieldSet { - public Long clusterId; + public Long clusterID; public ArrayList attributeValueList; public ScenesClusterExtensionFieldSet( - Long clusterId, ArrayList attributeValueList) { - this.clusterId = clusterId; + Long clusterID, ArrayList attributeValueList) { + this.clusterID = clusterID; this.attributeValueList = attributeValueList; } @@ -63,8 +63,8 @@ public ScenesClusterExtensionFieldSet( public String toString() { StringBuilder output = new StringBuilder(); output.append("ScenesClusterExtensionFieldSet {\n"); - output.append("\tclusterId: "); - output.append(clusterId); + output.append("\tclusterID: "); + output.append(clusterID); output.append("\n"); output.append("\tattributeValueList: "); output.append(attributeValueList); diff --git a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java index 2a2b85e1ccca50..6d1316f170da2f 100644 --- a/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/zap-generated/chip/devicecontroller/ClusterInfoMapping.java @@ -479,14 +479,14 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer Status, Integer GroupId, Integer SceneId) { + 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); + CommandResponseInfo GroupIDResponseValue = new CommandResponseInfo("GroupID", "Integer"); + responseValues.put(GroupIDResponseValue, GroupID); + CommandResponseInfo SceneIDResponseValue = new CommandResponseInfo("SceneID", "Integer"); + responseValues.put(SceneIDResponseValue, SceneID); callback.onSuccess(responseValues); } @@ -508,18 +508,18 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { @Override public void onSuccess( Integer Status, - Integer GroupId, - Integer SceneId, + 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 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); @@ -547,14 +547,14 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer Status, Integer GroupId, Integer SceneId) { + 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); + CommandResponseInfo GroupIDResponseValue = new CommandResponseInfo("GroupID", "Integer"); + responseValues.put(GroupIDResponseValue, GroupID); + CommandResponseInfo SceneIDResponseValue = new CommandResponseInfo("SceneID", "Integer"); + responseValues.put(SceneIDResponseValue, SceneID); callback.onSuccess(responseValues); } @@ -575,12 +575,12 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer Status, Integer GroupId) { + 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); + CommandResponseInfo GroupIDResponseValue = new CommandResponseInfo("GroupID", "Integer"); + responseValues.put(GroupIDResponseValue, GroupID); callback.onSuccess(responseValues); } @@ -600,14 +600,14 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { } @Override - public void onSuccess(Integer Status, Integer GroupId, Integer SceneId) { + 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); + CommandResponseInfo GroupIDResponseValue = new CommandResponseInfo("GroupID", "Integer"); + responseValues.put(GroupIDResponseValue, GroupID); + CommandResponseInfo SceneIDResponseValue = new CommandResponseInfo("SceneID", "Integer"); + responseValues.put(SceneIDResponseValue, SceneID); callback.onSuccess(responseValues); } @@ -631,15 +631,15 @@ public void setCallbackDelegate(ClusterCommandCallback callback) { public void onSuccess( Integer Status, @Nullable Integer Capacity, - Integer GroupId, + 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); + CommandResponseInfo GroupIDResponseValue = new CommandResponseInfo("GroupID", "Integer"); + responseValues.put(GroupIDResponseValue, GroupID); // SceneList: /* TYPE WARNING: array array defaults to */ uint8_t * // Conversion from this type to Java is not properly implemented yet callback.onSuccess(responseValues); @@ -7848,13 +7848,13 @@ public Map> getCommandMap() { Map scenesClusterInteractionInfoMap = new LinkedHashMap<>(); Map scenesaddSceneCommandParams = new LinkedHashMap(); - CommandParameterInfo scenesaddScenegroupIdCommandParameterInfo = - new CommandParameterInfo("groupId", Integer.class, Integer.class); - scenesaddSceneCommandParams.put("groupId", scenesaddScenegroupIdCommandParameterInfo); + 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 scenesaddScenesceneIDCommandParameterInfo = + new CommandParameterInfo("sceneID", Integer.class, Integer.class); + scenesaddSceneCommandParams.put("sceneID", scenesaddScenesceneIDCommandParameterInfo); CommandParameterInfo scenesaddScenetransitionTimeCommandParameterInfo = new CommandParameterInfo("transitionTime", Integer.class, Integer.class); @@ -7871,8 +7871,8 @@ public Map> getCommandMap() { ((ChipClusters.ScenesCluster) cluster) .addScene( (ChipClusters.ScenesCluster.AddSceneResponseCallback) callback, - (Integer) commandArguments.get("groupId"), - (Integer) commandArguments.get("sceneId"), + (Integer) commandArguments.get("groupID"), + (Integer) commandArguments.get("sceneID"), (Integer) commandArguments.get("transitionTime"), (String) commandArguments.get("sceneName"), (ArrayList) @@ -7883,13 +7883,13 @@ public Map> getCommandMap() { scenesClusterInteractionInfoMap.put("addScene", scenesaddSceneInteractionInfo); Map scenesviewSceneCommandParams = new LinkedHashMap(); - CommandParameterInfo scenesviewScenegroupIdCommandParameterInfo = - new CommandParameterInfo("groupId", Integer.class, Integer.class); - scenesviewSceneCommandParams.put("groupId", scenesviewScenegroupIdCommandParameterInfo); + 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); + CommandParameterInfo scenesviewScenesceneIDCommandParameterInfo = + new CommandParameterInfo("sceneID", Integer.class, Integer.class); + scenesviewSceneCommandParams.put("sceneID", scenesviewScenesceneIDCommandParameterInfo); InteractionInfo scenesviewSceneInteractionInfo = new InteractionInfo( @@ -7897,21 +7897,21 @@ public Map> getCommandMap() { ((ChipClusters.ScenesCluster) cluster) .viewScene( (ChipClusters.ScenesCluster.ViewSceneResponseCallback) callback, - (Integer) commandArguments.get("groupId"), - (Integer) commandArguments.get("sceneId")); + (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 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); + CommandParameterInfo scenesremoveScenesceneIDCommandParameterInfo = + new CommandParameterInfo("sceneID", Integer.class, Integer.class); + scenesremoveSceneCommandParams.put("sceneID", scenesremoveScenesceneIDCommandParameterInfo); InteractionInfo scenesremoveSceneInteractionInfo = new InteractionInfo( @@ -7919,18 +7919,18 @@ public Map> getCommandMap() { ((ChipClusters.ScenesCluster) cluster) .removeScene( (ChipClusters.ScenesCluster.RemoveSceneResponseCallback) callback, - (Integer) commandArguments.get("groupId"), - (Integer) commandArguments.get("sceneId")); + (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); + CommandParameterInfo scenesremoveAllScenesgroupIDCommandParameterInfo = + new CommandParameterInfo("groupID", Integer.class, Integer.class); scenesremoveAllScenesCommandParams.put( - "groupId", scenesremoveAllScenesgroupIdCommandParameterInfo); + "groupID", scenesremoveAllScenesgroupIDCommandParameterInfo); InteractionInfo scenesremoveAllScenesInteractionInfo = new InteractionInfo( @@ -7938,20 +7938,20 @@ public Map> getCommandMap() { ((ChipClusters.ScenesCluster) cluster) .removeAllScenes( (ChipClusters.ScenesCluster.RemoveAllScenesResponseCallback) callback, - (Integer) commandArguments.get("groupId")); + (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 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); + CommandParameterInfo scenesstoreScenesceneIDCommandParameterInfo = + new CommandParameterInfo("sceneID", Integer.class, Integer.class); + scenesstoreSceneCommandParams.put("sceneID", scenesstoreScenesceneIDCommandParameterInfo); InteractionInfo scenesstoreSceneInteractionInfo = new InteractionInfo( @@ -7959,21 +7959,21 @@ public Map> getCommandMap() { ((ChipClusters.ScenesCluster) cluster) .storeScene( (ChipClusters.ScenesCluster.StoreSceneResponseCallback) callback, - (Integer) commandArguments.get("groupId"), - (Integer) commandArguments.get("sceneId")); + (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 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 scenesrecallScenesceneIDCommandParameterInfo = + new CommandParameterInfo("sceneID", Integer.class, Integer.class); + scenesrecallSceneCommandParams.put("sceneID", scenesrecallScenesceneIDCommandParameterInfo); CommandParameterInfo scenesrecallScenetransitionTimeCommandParameterInfo = new CommandParameterInfo("transitionTime", Optional.class, Integer.class); @@ -7986,8 +7986,8 @@ public Map> getCommandMap() { ((ChipClusters.ScenesCluster) cluster) .recallScene( (DefaultClusterCallback) callback, - (Integer) commandArguments.get("groupId"), - (Integer) commandArguments.get("sceneId"), + (Integer) commandArguments.get("groupID"), + (Integer) commandArguments.get("sceneID"), (Optional) commandArguments.get("transitionTime")); }, () -> new DelegatedDefaultClusterCallback(), @@ -7995,10 +7995,10 @@ public Map> getCommandMap() { scenesClusterInteractionInfoMap.put("recallScene", scenesrecallSceneInteractionInfo); Map scenesgetSceneMembershipCommandParams = new LinkedHashMap(); - CommandParameterInfo scenesgetSceneMembershipgroupIdCommandParameterInfo = - new CommandParameterInfo("groupId", Integer.class, Integer.class); + CommandParameterInfo scenesgetSceneMembershipgroupIDCommandParameterInfo = + new CommandParameterInfo("groupID", Integer.class, Integer.class); scenesgetSceneMembershipCommandParams.put( - "groupId", scenesgetSceneMembershipgroupIdCommandParameterInfo); + "groupID", scenesgetSceneMembershipgroupIDCommandParameterInfo); InteractionInfo scenesgetSceneMembershipInteractionInfo = new InteractionInfo( @@ -8006,7 +8006,7 @@ public Map> getCommandMap() { ((ChipClusters.ScenesCluster) cluster) .getSceneMembership( (ChipClusters.ScenesCluster.GetSceneMembershipResponseCallback) callback, - (Integer) commandArguments.get("groupId")); + (Integer) commandArguments.get("groupID")); }, () -> new DelegatedScenesClusterGetSceneMembershipResponseCallback(), scenesgetSceneMembershipCommandParams); diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 08278978018e50..cc69cb02ec9887 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -188,11 +188,11 @@ class ChipClusters: "commandId": 0x00000000, "commandName": "AddScene", "args": { - "groupId": "int", - "sceneId": "int", + "groupID": "int", + "sceneID": "int", "transitionTime": "int", "sceneName": "str", - "clusterId": "int", + "clusterID": "int", "attributeValueList": "", }, }, @@ -200,39 +200,39 @@ class ChipClusters: "commandId": 0x00000001, "commandName": "ViewScene", "args": { - "groupId": "int", - "sceneId": "int", + "groupID": "int", + "sceneID": "int", }, }, 0x00000002: { "commandId": 0x00000002, "commandName": "RemoveScene", "args": { - "groupId": "int", - "sceneId": "int", + "groupID": "int", + "sceneID": "int", }, }, 0x00000003: { "commandId": 0x00000003, "commandName": "RemoveAllScenes", "args": { - "groupId": "int", + "groupID": "int", }, }, 0x00000004: { "commandId": 0x00000004, "commandName": "StoreScene", "args": { - "groupId": "int", - "sceneId": "int", + "groupID": "int", + "sceneID": "int", }, }, 0x00000005: { "commandId": 0x00000005, "commandName": "RecallScene", "args": { - "groupId": "int", - "sceneId": "int", + "groupID": "int", + "sceneID": "int", "transitionTime": "int", }, }, @@ -240,7 +240,7 @@ class ChipClusters: "commandId": 0x00000006, "commandName": "GetSceneMembership", "args": { - "groupId": "int", + "groupID": "int", }, }, }, diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 43cd0c91eb995b..9a282b92480b6d 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -589,6 +589,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Bitmaps: + class SceneFeatures(IntFlag): + kSceneNames = 0x1 + class ScenesCopyMode(IntFlag): kCopyAllScenes = 0x1 @@ -600,11 +603,11 @@ class AttributeValuePair(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="attributeId", Tag=0, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="attributeID", Tag=0, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="attributeValue", Tag=1, Type=typing.List[uint]), ]) - attributeId: 'typing.Optional[uint]' = None + attributeID: 'typing.Optional[uint]' = None attributeValue: 'typing.List[uint]' = field(default_factory=lambda: []) @dataclass @@ -613,11 +616,11 @@ class ExtensionFieldSet(ClusterObject): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="clusterId", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="clusterID", Tag=0, Type=uint), ClusterObjectFieldDescriptor(Label="attributeValueList", Tag=1, Type=typing.List[Scenes.Structs.AttributeValuePair]), ]) - clusterId: 'uint' = 0 + clusterID: 'uint' = 0 attributeValueList: 'typing.List[Scenes.Structs.AttributeValuePair]' = field(default_factory=lambda: []) @@ -634,15 +637,15 @@ class AddScene(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="groupId", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="sceneId", Tag=1, Type=uint), + 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 + groupID: 'uint' = 0 + sceneID: 'uint' = 0 transitionTime: 'uint' = 0 sceneName: 'str' = "" extensionFieldSets: 'typing.List[Scenes.Structs.ExtensionFieldSet]' = field(default_factory=lambda: []) @@ -659,13 +662,13 @@ 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="groupID", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="sceneID", Tag=2, Type=uint), ]) status: 'uint' = 0 - groupId: 'uint' = 0 - sceneId: 'uint' = 0 + groupID: 'uint' = 0 + sceneID: 'uint' = 0 @dataclass class ViewScene(ClusterCommand): @@ -678,12 +681,12 @@ class ViewScene(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="groupId", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="sceneId", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="groupID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="sceneID", Tag=1, Type=uint), ]) - groupId: 'uint' = 0 - sceneId: 'uint' = 0 + groupID: 'uint' = 0 + sceneID: 'uint' = 0 @dataclass class ViewSceneResponse(ClusterCommand): @@ -697,16 +700,16 @@ 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="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 + 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 @@ -722,12 +725,12 @@ class RemoveScene(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="groupId", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="sceneId", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="groupID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="sceneID", Tag=1, Type=uint), ]) - groupId: 'uint' = 0 - sceneId: 'uint' = 0 + groupID: 'uint' = 0 + sceneID: 'uint' = 0 @dataclass class RemoveSceneResponse(ClusterCommand): @@ -741,13 +744,13 @@ 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="groupID", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="sceneID", Tag=2, Type=uint), ]) status: 'uint' = 0 - groupId: 'uint' = 0 - sceneId: 'uint' = 0 + groupID: 'uint' = 0 + sceneID: 'uint' = 0 @dataclass class RemoveAllScenes(ClusterCommand): @@ -760,10 +763,10 @@ class RemoveAllScenes(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="groupId", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="groupID", Tag=0, Type=uint), ]) - groupId: 'uint' = 0 + groupID: 'uint' = 0 @dataclass class RemoveAllScenesResponse(ClusterCommand): @@ -777,11 +780,11 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="groupId", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="groupID", Tag=1, Type=uint), ]) status: 'uint' = 0 - groupId: 'uint' = 0 + groupID: 'uint' = 0 @dataclass class StoreScene(ClusterCommand): @@ -794,12 +797,12 @@ class StoreScene(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="groupId", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="sceneId", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="groupID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="sceneID", Tag=1, Type=uint), ]) - groupId: 'uint' = 0 - sceneId: 'uint' = 0 + groupID: 'uint' = 0 + sceneID: 'uint' = 0 @dataclass class StoreSceneResponse(ClusterCommand): @@ -813,13 +816,13 @@ 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="groupID", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="sceneID", Tag=2, Type=uint), ]) status: 'uint' = 0 - groupId: 'uint' = 0 - sceneId: 'uint' = 0 + groupID: 'uint' = 0 + sceneID: 'uint' = 0 @dataclass class RecallScene(ClusterCommand): @@ -832,13 +835,13 @@ class RecallScene(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="groupId", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="sceneId", Tag=1, Type=uint), + 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 + groupID: 'uint' = 0 + sceneID: 'uint' = 0 transitionTime: 'typing.Union[None, Nullable, uint]' = None @dataclass @@ -852,10 +855,10 @@ class GetSceneMembership(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="groupId", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="groupID", Tag=0, Type=uint), ]) - groupId: 'uint' = 0 + groupID: 'uint' = 0 @dataclass class GetSceneMembershipResponse(ClusterCommand): @@ -870,13 +873,13 @@ def descriptor(cls) -> 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="groupID", Tag=2, Type=uint), ClusterObjectFieldDescriptor(Label="sceneList", Tag=3, Type=typing.Optional[typing.List[uint]]), ]) status: 'uint' = 0 capacity: 'typing.Union[Nullable, uint]' = NullValue - groupId: 'uint' = 0 + groupID: 'uint' = 0 sceneList: 'typing.Optional[typing.List[uint]]' = None @dataclass @@ -890,15 +893,15 @@ class EnhancedAddScene(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="groupId", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="sceneId", Tag=1, Type=uint), + 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 + groupID: 'uint' = 0 + sceneID: 'uint' = 0 transitionTime: 'uint' = 0 sceneName: 'str' = "" extensionFieldSets: 'typing.List[Scenes.Structs.ExtensionFieldSet]' = field(default_factory=lambda: []) @@ -915,13 +918,13 @@ 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="groupID", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="sceneID", Tag=2, Type=uint), ]) status: 'uint' = 0 - groupId: 'uint' = 0 - sceneId: 'uint' = 0 + groupID: 'uint' = 0 + sceneID: 'uint' = 0 @dataclass class EnhancedViewScene(ClusterCommand): @@ -934,12 +937,12 @@ class EnhancedViewScene(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ - ClusterObjectFieldDescriptor(Label="groupId", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="sceneId", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="groupID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="sceneID", Tag=1, Type=uint), ]) - groupId: 'uint' = 0 - sceneId: 'uint' = 0 + groupID: 'uint' = 0 + sceneID: 'uint' = 0 @dataclass class EnhancedViewSceneResponse(ClusterCommand): @@ -953,16 +956,16 @@ 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="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 + 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 @@ -979,17 +982,17 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ ClusterObjectFieldDescriptor(Label="mode", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="groupIdFrom", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="sceneIdFrom", Tag=2, Type=uint), - ClusterObjectFieldDescriptor(Label="groupIdTo", Tag=3, Type=uint), - ClusterObjectFieldDescriptor(Label="sceneIdTo", Tag=4, 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 - groupIdFrom: 'uint' = 0 - sceneIdFrom: 'uint' = 0 - groupIdTo: 'uint' = 0 - sceneIdTo: 'uint' = 0 + groupIdentifierFrom: 'uint' = 0 + sceneIdentifierFrom: 'uint' = 0 + groupIdentifierTo: 'uint' = 0 + sceneIdentifierTo: 'uint' = 0 @dataclass class CopySceneResponse(ClusterCommand): @@ -1003,13 +1006,13 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields = [ ClusterObjectFieldDescriptor(Label="status", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="groupIdFrom", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="sceneIdFrom", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="groupIdentifierFrom", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="sceneIdentifierFrom", Tag=2, Type=uint), ]) status: 'uint' = 0 - groupIdFrom: 'uint' = 0 - sceneIdFrom: 'uint' = 0 + groupIdentifierFrom: 'uint' = 0 + sceneIdentifierFrom: 'uint' = 0 class Attributes: @@ -1268,9 +1271,6 @@ class OnOffControl(IntFlag): class OnOffFeature(IntFlag): kLighting = 0x1 - class SceneFeatures(IntFlag): - kSceneNames = 0x1 - class Commands: @@ -17548,9 +17548,9 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Enums: class SetpointAdjustMode(MatterIntEnum): - kHeatSetpoint = 0x00 - kCoolSetpoint = 0x01 - kHeatAndCoolSetpoints = 0x02 + kHeat = 0x00 + kCool = 0x01 + kBoth = 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 @@ -17585,9 +17585,11 @@ class ThermostatSystemMode(MatterIntEnum): kAuto = 0x01 kCool = 0x03 kHeat = 0x04 - kEmergencyHeating = 0x05 + kEmergencyHeat = 0x05 kPrecooling = 0x06 kFanOnly = 0x07 + kDry = 0x08 + kSleep = 0x09 # 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 @@ -17604,19 +17606,19 @@ class DayOfWeek(IntFlag): kThursday = 0x10 kFriday = 0x20 kSaturday = 0x40 - kAwayOrVacation = 0x80 + kAway = 0x80 class ModeForSequence(IntFlag): - kHeatSetpointFieldPresent = 0x1 - kCoolSetpointFieldPresent = 0x2 + kHeatSetpointPresent = 0x1 + kCoolSetpointPresent = 0x2 class ThermostatFeature(IntFlag): kHeating = 0x1 kCooling = 0x2 kOccupancy = 0x4 - kSchedule = 0x8 + kScheduleConfiguration = 0x8 kSetback = 0x10 - kAutomode = 0x20 + kAutoMode = 0x20 class Structs: diff --git a/src/controller/python/chip/yaml/runner.py b/src/controller/python/chip/yaml/runner.py index b011b8817d692c..9dcd1fc212693b 100644 --- a/src/controller/python/chip/yaml/runner.py +++ b/src/controller/python/chip/yaml/runner.py @@ -74,9 +74,10 @@ class _ExecutionContext: class BaseAction(ABC): '''Interface for a single YAML action that is to be executed.''' - def __init__(self, label, identity): - self._label = label - self._identity = identity + def __init__(self, test_step): + self._label = test_step.label + self._identity = test_step.identity + self._pics_enabled = test_step.is_pics_enabled @property def label(self): @@ -86,6 +87,10 @@ def label(self): def identity(self): return self._identity + @property + def pics_enabled(self): + return self._pics_enabled + @abstractmethod def run_action(self, dev_ctrl: ChipDeviceCtrl) -> _ActionResult: pass @@ -106,7 +111,7 @@ def __init__(self, test_step, cluster: str, context: _ExecutionContext): action to perform for this write attribute. UnexpectedParsingError: Raised if there is an unexpected parsing error. ''' - super().__init__(test_step.label, test_step.identity) + super().__init__(test_step) self._busy_wait_ms = test_step.busy_wait_ms self._command_name = stringcase.pascalcase(test_step.command) self._cluster = cluster @@ -167,7 +172,7 @@ def __init__(self, test_step, cluster: str, context: _ExecutionContext): action to perform for this read attribute. UnexpectedParsingError: Raised if there is an unexpected parsing error. ''' - super().__init__(test_step.label, test_step.identity) + super().__init__(test_step) self._attribute_name = stringcase.pascalcase(test_step.attribute) self._cluster = cluster self._endpoint = test_step.endpoint @@ -235,7 +240,7 @@ class WaitForCommissioneeAction(BaseAction): ''' Wait for commissionee action to be executed.''' def __init__(self, test_step): - super().__init__(test_step.label, test_step.identity) + super().__init__(test_step) self._node_id = test_step.node_id self._expire_existing_session = False # This is the default when no timeout is provided. @@ -357,7 +362,7 @@ def __init__(self, test_step, cluster: str, context: _ExecutionContext): action to perform for this write attribute. UnexpectedParsingError: Raised if there is an unexpected parsing error. ''' - super().__init__(test_step.label, test_step.identity) + super().__init__(test_step) self._attribute_name = stringcase.pascalcase(test_step.attribute) self._busy_wait_ms = test_step.busy_wait_ms self._cluster = cluster @@ -421,7 +426,7 @@ def __init__(self, test_step, context: _ExecutionContext): Raises: UnexpectedParsingError: Raised if the expected queue does not exist. ''' - super().__init__(test_step.label, test_step.identity) + super().__init__(test_step) self._attribute_name = stringcase.pascalcase(test_step.attribute) self._output_queue = context.subscription_callback_result_queue.get(self._attribute_name, None) @@ -451,7 +456,7 @@ def __init__(self, test_step): Raises: UnexpectedParsingError: Raised if the expected queue does not exist. ''' - super().__init__(test_step.label, test_step.identity) + super().__init__(test_step) if test_step.command != 'PairWithCode': raise UnexpectedParsingError(f'Unexpected CommisionerCommand {test_step.command}') diff --git a/src/darwin/Framework/CHIP/MTRCertificateInfo.h b/src/darwin/Framework/CHIP/MTRCertificateInfo.h new file mode 100644 index 00000000000000..94ff81313d8f95 --- /dev/null +++ b/src/darwin/Framework/CHIP/MTRCertificateInfo.h @@ -0,0 +1,86 @@ +/** + * 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. + */ + +#import +#import + +NS_ASSUME_NONNULL_BEGIN + +@class MTRDistinguishedNameInfo; + +/** + * Exposes Matter-specific information from an operational X.509 certificate. + * + * Note: This class does not support parsing certificates related to Device Attestation. + */ +NS_SWIFT_SENDABLE +MTR_NEWLY_AVAILABLE +@interface MTRCertificateInfo : NSObject + ++ (instancetype)new NS_UNAVAILABLE; +- (instancetype)init NS_UNAVAILABLE; + +/** + * Initializes the receiver with an operational certificate in Matter TLV format. + */ +- (nullable instancetype)initWithTLVBytes:(MTRCertificateTLVBytes)bytes; + +@property (readonly) MTRDistinguishedNameInfo * issuer; +@property (readonly) MTRDistinguishedNameInfo * subject; + +@property (readonly) NSDate * notBefore; +@property (readonly) NSDate * notAfter; + +@end + +/** + * Represents the Matter-specific components of an X.509 Distinguished Name. + */ +NS_SWIFT_SENDABLE +MTR_NEWLY_AVAILABLE +@interface MTRDistinguishedNameInfo : NSObject + ++ (instancetype)new NS_UNAVAILABLE; +- (instancetype)init NS_UNAVAILABLE; + +/** + * The Node ID contained in the DN, if any. + */ +@property (readonly, nullable) NSNumber * nodeID; + +/** + * The Fabric ID contained in the DN, if any. + */ +@property (readonly, nullable) NSNumber * fabricID; + +/** + * The `RCAC` ID contained in the DN, if any. + */ +@property (readonly, nullable) NSNumber * rootCACertificateID; + +/** + * The `ICAC` ID contained in the DN, if any. + */ +@property (readonly, nullable) NSNumber * intermediateCACertificateID; + +/** + * The set of CASE Authenticated Tags contained in the DN. + */ +@property (readonly) NSSet * tags; + +@end + +NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRCertificateInfo.mm b/src/darwin/Framework/CHIP/MTRCertificateInfo.mm new file mode 100644 index 00000000000000..abd1f4b849c97d --- /dev/null +++ b/src/darwin/Framework/CHIP/MTRCertificateInfo.mm @@ -0,0 +1,185 @@ +/** + * 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 "MTRCertificateInfo.h" + +#import "MTRConversion.h" +#import "MTRDefines_Internal.h" + +#include + +NS_ASSUME_NONNULL_BEGIN + +using namespace chip; +using namespace chip::Credentials; +using namespace chip::ASN1; + +@interface MTRCertificateInfo () +- (nullable instancetype)initWithTLVBytes:(MTRCertificateTLVBytes)bytes NS_DESIGNATED_INITIALIZER; +@end + +@interface MTRDistinguishedNameInfo () +- (instancetype)initWithDN:(const ChipDN &)dn; +@end + +MTR_DIRECT_MEMBERS +@implementation MTRCertificateInfo { + NSData * _bytes; // needs to be kept around, _data may contain pointers into the backing buffer + struct ChipCertificateData _data; +} + +- (nullable instancetype)initWithTLVBytes:(MTRCertificateTLVBytes)bytes +{ + if (self = [super init]) { + VerifyOrReturnValue(_bytes = [bytes copy], nil); + VerifyOrReturnValue(DecodeChipCert(AsByteSpan(_bytes), _data) == CHIP_NO_ERROR, nil); + } + return self; +} + +- (MTRDistinguishedNameInfo *)issuer +{ + return [[MTRDistinguishedNameInfo alloc] initWithDN:_data.mIssuerDN]; +} + +- (MTRDistinguishedNameInfo *)subject +{ + return [[MTRDistinguishedNameInfo alloc] initWithDN:_data.mSubjectDN]; +} + +- (NSDate *)notBefore +{ + return ChipEpochSecondsAsDate(_data.mNotBeforeTime); +} + +- (NSDate *)notAfter +{ + // "no expiry" is encoded as kNullCertTime (see ChipEpochToASN1Time) + return (_data.mNotAfterTime != kNullCertTime) ? ChipEpochSecondsAsDate(_data.mNotAfterTime) : NSDate.distantFuture; +} + +- (id)copyWithZone:(nullable NSZone *)zone +{ + return self; // immutable, no need to copy +} + +- (BOOL)isEqual:(id)object +{ + if (self == object) { + return YES; + } + if ([object class] != MTRCertificateInfo.class) { + return NO; + } + auto other = (MTRCertificateInfo *) object; + return [_bytes isEqual:other->_bytes]; +} + +- (NSUInteger)hash +{ + return _bytes.hash; +} + +@end + +MTR_DIRECT_MEMBERS +@implementation MTRDistinguishedNameInfo { + ChipDN _dn; +} + +- (instancetype)initWithDN:(const ChipDN &)dn +{ + if (self = [super init]) { + _dn = dn; + } + return self; +} + +- (nullable NSNumber *)nodeID +{ + return [self identifierWithUniqueOID:kOID_AttributeType_MatterNodeId]; +} + +- (nullable NSNumber *)fabricID +{ + return [self identifierWithUniqueOID:kOID_AttributeType_MatterFabricId]; +} + +- (nullable NSNumber *)rootCACertificateID +{ + return [self identifierWithUniqueOID:kOID_AttributeType_MatterRCACId]; +} + +- (nullable NSNumber *)intermediateCACertificateID +{ + return [self identifierWithUniqueOID:kOID_AttributeType_MatterICACId]; +} + +- (nullable NSNumber *)identifierWithUniqueOID:(OID)oid +{ + NSAssert(IsChipDNAttr(oid), @"Invalid OID"); + + ChipRDN const * match = nullptr; + for (auto const & rdn : _dn.rdn) { + if (rdn.IsEmpty()) { + break; + } else if (rdn.mAttrOID == oid) { + VerifyOrReturnValue(!match, nil); // invalid, there should be only one matching RDN + match = &rdn; + } + } + + return (match) ? @(match->mChipVal) : nil; +} + +- (NSSet *)tags +{ + NSMutableSet * result; + for (auto const & rdn : _dn.rdn) { + if (rdn.IsEmpty()) { + break; + } else if (rdn.mAttrOID == kOID_AttributeType_MatterCASEAuthTag) { + NSNumber * tag = @(rdn.mChipVal); + if (!result) { + result = [NSMutableSet setWithObject:tag]; + } else { + [result addObject:tag]; + } + } + } + return (result) ? [result copy] : [NSSet set]; +} + +- (id)copyWithZone:(nullable NSZone *)zone +{ + return self; // immutable, no need to copy +} + +- (BOOL)isEqual:(id)object +{ + if (self == object) { + return YES; + } + if ([object class] != MTRDistinguishedNameInfo.class) { + return NO; + } + auto other = (MTRDistinguishedNameInfo *) object; + return _dn.IsEqual(other->_dn); +} + +@end + +NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRCertificates.h b/src/darwin/Framework/CHIP/MTRCertificates.h index c236f2ea3ed21a..1035eea3783b63 100644 --- a/src/darwin/Framework/CHIP/MTRCertificates.h +++ b/src/darwin/Framework/CHIP/MTRCertificates.h @@ -28,6 +28,9 @@ NS_ASSUME_NONNULL_BEGIN @interface MTRCertificates : NSObject +- (instancetype)init NS_UNAVAILABLE; ++ (instancetype)new NS_UNAVAILABLE; + /** * Create a root (self-signed) X.509 DER encoded certificate that has the * right fields to be a valid Matter root certificate. diff --git a/src/darwin/Framework/CHIP/MTRConversion.h b/src/darwin/Framework/CHIP/MTRConversion.h index 83392d08c68264..53225a690e2070 100644 --- a/src/darwin/Framework/CHIP/MTRConversion.h +++ b/src/darwin/Framework/CHIP/MTRConversion.h @@ -20,6 +20,7 @@ #import #include +#include #include NS_ASSUME_NONNULL_BEGIN @@ -32,4 +33,9 @@ AsNumber(chip::Optional optional) return (optional.HasValue()) ? @(optional.Value()) : nil; } +inline NSDate * ChipEpochSecondsAsDate(uint32_t chipEpochSeconds) +{ + return [NSDate dateWithTimeIntervalSince1970:(chip::kChipEpochSecondsSinceUnixEpoch + (NSTimeInterval) chipEpochSeconds)]; +} + NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRDefines_Internal.h b/src/darwin/Framework/CHIP/MTRDefines_Internal.h new file mode 100644 index 00000000000000..f8a6a9329a5cc9 --- /dev/null +++ b/src/darwin/Framework/CHIP/MTRDefines_Internal.h @@ -0,0 +1,29 @@ +/** + * 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. + */ + +#import + +#if __has_attribute(objc_direct) +#define MTR_DIRECT __attribute__((objc_direct)) +#else +#define MTR_DIRECT +#endif + +#if __has_attribute(objc_direct_members) +#define MTR_DIRECT_MEMBERS __attribute__((objc_direct_members)) +#else +#define MTR_DIRECT_MEMBERS +#endif diff --git a/src/darwin/Framework/CHIP/MTRStorage.h b/src/darwin/Framework/CHIP/MTRStorage.h index 97813fdbb957e9..81b619f0e0e45c 100644 --- a/src/darwin/Framework/CHIP/MTRStorage.h +++ b/src/darwin/Framework/CHIP/MTRStorage.h @@ -48,7 +48,7 @@ MTR_NEWLY_AVAILABLE * Delete the key and corresponding data. Returns YES if the key was present, * NO if the key was not present. */ -- (BOOL)removeStorageDataForKey:(NSString *)key; +- (BOOL)removeStorageDataForKey:(NSString *)key NS_SWIFT_NAME(removeStorageData(forKey:)); @end diff --git a/src/darwin/Framework/CHIP/Matter.h b/src/darwin/Framework/CHIP/Matter.h index b5c699e20c695f..85842fb564c637 100644 --- a/src/darwin/Framework/CHIP/Matter.h +++ b/src/darwin/Framework/CHIP/Matter.h @@ -30,6 +30,7 @@ #import #import #import +#import #import #import #import diff --git a/src/darwin/Framework/CHIP/templates/availability.yaml b/src/darwin/Framework/CHIP/templates/availability.yaml index cdbb55f85fd97a..4a50ef1d40b8ed 100644 --- a/src/darwin/Framework/CHIP/templates/availability.yaml +++ b/src/darwin/Framework/CHIP/templates/availability.yaml @@ -4054,7 +4054,6 @@ OnOff: - OnOffControl - OnOffFeature - - SceneFeatures LevelControl: - LevelControlFeature Actions: @@ -4142,8 +4141,6 @@ - AcceptOnlyWhenOn OnOffFeature: - Lighting - SceneFeatures: - - SceneNames LevelControl: LevelControlFeature: - OnOff @@ -5040,6 +5037,62 @@ LauncherResponse: - status - data + Scenes: + AddScene: + - groupID + - sceneID + ViewScene: + - groupID + - sceneID + RemoveScene: + - groupID + - sceneID + RemoveAllScenes: + - groupID + StoreScene: + - groupID + - sceneID + RecallScene: + - groupID + - sceneID + GetSceneMembership: + - groupID + EnhancedAddScene: + - groupID + - sceneID + EnhancedViewScene: + - groupID + - sceneID + CopyScene: + - groupIdentifierFrom + - sceneIdentifierFrom + - groupIdentifierTo + - sceneIdentifierTo + AddSceneResponse: + - groupID + - sceneID + ViewSceneResponse: + - groupID + - sceneID + RemoveSceneResponse: + - groupID + - sceneID + RemoveAllScenesResponse: + - groupID + StoreSceneResponse: + - groupID + - sceneID + GetSceneMembershipResponse: + - groupID + EnhancedAddSceneResponse: + - groupID + - sceneID + EnhancedViewSceneResponse: + - groupID + - sceneID + CopySceneResponse: + - groupIdentifierFrom + - sceneIdentifierFrom structs: OTASoftwareUpdateRequestor: - ProviderLocation @@ -5284,6 +5337,11 @@ # introduced them in this release. - catalogVendorId - applicationId + Scenes: + AttributeValuePair: + - attributeID + ExtensionFieldSet: + - clusterID events: OTASoftwareUpdateRequestor: - StateTransition @@ -5622,6 +5680,15 @@ - Percentage ParameterEnum: - Video + Thermostat: + ThermostatSystemMode: + - EmergencyHeat + - Dry + - Sleep + SetpointAdjustMode: + - Heat + - Cool + - Both bitmaps: UnitTesting: - Bitmap8MaskMap @@ -5635,6 +5702,8 @@ - DaysMaskMap PumpConfigurationAndControl: - PumpFeature + Scenes: + - SceneFeatures bitmap values: UnitTesting: Bitmap8MaskMap: @@ -5700,6 +5769,18 @@ - ConstantTemperature - Automatic - Local + Thermostat: + ThermostatFeature: + - ScheduleConfiguration + - AutoMode + DayOfWeek: + - Away + ModeForSequence: + - HeatSetpointPresent + - CoolSetpointPresent + Scenes: + SceneFeatures: + - SceneNames deprecated: clusters: - OtaSoftwareUpdateProvider @@ -5778,6 +5859,62 @@ AnnounceOTAProvider: - providerNodeId - vendorId + Scenes: + AddScene: + - groupId + - sceneId + ViewScene: + - groupId + - sceneId + RemoveScene: + - groupId + - sceneId + RemoveAllScenes: + - groupId + StoreScene: + - groupId + - sceneId + RecallScene: + - groupId + - sceneId + GetSceneMembership: + - groupId + EnhancedAddScene: + - groupId + - sceneId + EnhancedViewScene: + - groupId + - sceneId + CopyScene: + - groupIdFrom + - sceneIdFrom + - groupIdTo + - sceneIdTo + AddSceneResponse: + - groupId + - sceneId + ViewSceneResponse: + - groupId + - sceneId + RemoveSceneResponse: + - groupId + - sceneId + RemoveAllScenesResponse: + - groupId + StoreSceneResponse: + - groupId + - sceneId + GetSceneMembershipResponse: + - groupId + EnhancedAddSceneResponse: + - groupId + - sceneId + EnhancedViewSceneResponse: + - groupId + - sceneId + CopySceneResponse: + - groupIdFrom + - sceneIdFrom structs: Descriptor: - DeviceType @@ -5841,6 +5978,11 @@ ApplicationStruct: - catalogVendorId - applicationId + Scenes: + AttributeValuePair: + - attributeId + ExtensionFieldSet: + - clusterId event fields: Switch: MultiPressComplete: @@ -5925,6 +6067,13 @@ MetricTypeEnum: - PIXELS - PERCENTAGE + Thermostat: + ThermostatSystemMode: + - EmergencyHeating + SetpointAdjustMode: + - HeatSetpoint + - CoolSetpoint + - HeatAndCoolSetpoints bitmaps: DoorLock: - DlDaysMaskMap @@ -5947,6 +6096,15 @@ - UsersManagement - Notifications - YearDaySchedules + Thermostat: + ThermostatFeature: + - Schedule + - Automode + DayOfWeek: + - AwayOrVacation + ModeForSequence: + - HeatSetpointFieldPresent + - CoolSetpointFieldPresent apis: - Timed Invoke for server to client commands - Deprecated global attribute names @@ -6090,6 +6248,62 @@ ColorControl: MoveToColorTemperature: colorTemperatureMireds: colorTemperature + Scenes: + AddScene: + groupID: groupId + sceneID: sceneId + ViewScene: + groupID: groupId + sceneID: sceneId + RemoveScene: + groupID: groupId + sceneID: sceneId + RemoveAllScenes: + groupID: groupId + StoreScene: + groupID: groupId + sceneID: sceneId + RecallScene: + groupID: groupId + sceneID: sceneId + GetSceneMembership: + groupID: groupId + EnhancedAddScene: + groupID: groupId + sceneID: sceneId + EnhancedViewScene: + groupID: groupId + sceneID: sceneId + CopyScene: + groupIdentifierFrom: groupIdFrom + sceneIdentifierFrom: sceneIdFrom + groupIdentifierTo: groupIdTo + sceneIdentifierTo: sceneIdTo + AddSceneResponse: + groupID: groupId + sceneID: sceneId + ViewSceneResponse: + groupID: groupId + sceneID: sceneId + RemoveSceneResponse: + groupID: groupId + sceneID: sceneId + RemoveAllScenesResponse: + groupID: groupId + StoreSceneResponse: + groupID: groupId + sceneID: sceneId + GetSceneMembershipResponse: + groupID: groupId + EnhancedAddSceneResponse: + groupID: groupId + sceneID: sceneId + EnhancedViewSceneResponse: + groupID: groupId + sceneID: sceneId + CopySceneResponse: + groupIdentifierFrom: groupIdFrom + sceneIdentifierFrom: sceneIdFrom structs: AccessControl: AccessControlEntryStruct: AccessControlEntry @@ -6147,6 +6361,11 @@ ApplicationStruct: catalogVendorID: catalogVendorId applicationID: applicationId + Scenes: + AttributeValuePair: + attributeID: attributeId + ExtensionFieldSet: + clusterID: clusterId event fields: Switch: MultiPressComplete: @@ -6244,6 +6463,13 @@ MetricTypeEnum: Pixels: PIXELS Percentage: PERCENTAGE + Thermostat: + ThermostatSystemMode: + EmergencyHeat: EmergencyHeating + SetpointAdjustMode: + Heat: HeatSetpoint + Cool: CoolSetpoint + Both: HeatAndCoolSetpoints bitmaps: DoorLock: DaysMaskMap: DlDaysMaskMap @@ -6266,3 +6492,12 @@ User: UsersManagement Notification: Notifications YearDayAccessSchedules: YearDaySchedules + Thermostat: + ThermostatFeature: + ScheduleConfiguration: Schedule + AutoMode: Automode + DayOfWeek: + Away: AwayOrVacation + ModeForSequence: + HeatSetpointPresent: HeatSetpointFieldPresent + CoolSetpointPresent: CoolSetpointFieldPresent diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index 1318ae27d76b17..b4fda6eb1bc9a4 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -17065,6 +17065,10 @@ typedef NS_OPTIONS(uint32_t, MTRGroupsGroupClusterFeature) { MTRGroupsGroupClusterFeatureGroupNames API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, } API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +typedef NS_OPTIONS(uint32_t, MTRScenesSceneFeatures) { + MTRScenesSceneFeaturesSceneNames MTR_NEWLY_AVAILABLE = 0x1, +} MTR_NEWLY_AVAILABLE; + typedef NS_OPTIONS(uint8_t, MTRScenesCopyMode) { MTRScenesCopyModeCopyAllScenes API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, } API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -17102,10 +17106,6 @@ typedef NS_OPTIONS(uint32_t, MTROnOffFeature) { MTROnOffFeatureLighting API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, } API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -typedef NS_OPTIONS(uint32_t, MTROnOffSceneFeatures) { - MTROnOffSceneFeaturesSceneNames API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, -} API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); - typedef NS_ENUM(uint8_t, MTRLevelControlMoveMode) { MTRLevelControlMoveModeUp API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, MTRLevelControlMoveModeDown API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, @@ -18798,9 +18798,18 @@ typedef NS_OPTIONS(uint16_t, MTRPumpConfigurationAndControlPumpStatus) { } API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); typedef NS_ENUM(uint8_t, MTRThermostatSetpointAdjustMode) { - MTRThermostatSetpointAdjustModeHeatSetpoint API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x00, - MTRThermostatSetpointAdjustModeCoolSetpoint API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, - MTRThermostatSetpointAdjustModeHeatAndCoolSetpoints API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x02, + MTRThermostatSetpointAdjustModeHeat MTR_NEWLY_AVAILABLE = 0x00, + MTRThermostatSetpointAdjustModeHeatSetpoint API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatSetpointAdjustModeHeat") + = 0x00, + MTRThermostatSetpointAdjustModeCool MTR_NEWLY_AVAILABLE = 0x01, + MTRThermostatSetpointAdjustModeCoolSetpoint API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatSetpointAdjustModeCool") + = 0x01, + MTRThermostatSetpointAdjustModeBoth MTR_NEWLY_AVAILABLE = 0x02, + MTRThermostatSetpointAdjustModeHeatAndCoolSetpoints API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatSetpointAdjustModeBoth") + = 0x02, } API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); typedef NS_ENUM(uint8_t, MTRThermostatControlSequence) { @@ -18823,9 +18832,14 @@ typedef NS_ENUM(uint8_t, MTRThermostatSystemMode) { MTRThermostatSystemModeAuto API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x01, MTRThermostatSystemModeCool API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x03, MTRThermostatSystemModeHeat API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x04, - MTRThermostatSystemModeEmergencyHeating API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x05, + MTRThermostatSystemModeEmergencyHeat MTR_NEWLY_AVAILABLE = 0x05, + MTRThermostatSystemModeEmergencyHeating API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatSystemModeEmergencyHeat") + = 0x05, MTRThermostatSystemModePrecooling API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x06, MTRThermostatSystemModeFanOnly API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x07, + MTRThermostatSystemModeDry MTR_NEWLY_AVAILABLE = 0x08, + MTRThermostatSystemModeSleep MTR_NEWLY_AVAILABLE = 0x09, } API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); typedef NS_OPTIONS(uint8_t, MTRThermostatDayOfWeek) { @@ -18836,21 +18850,36 @@ typedef NS_OPTIONS(uint8_t, MTRThermostatDayOfWeek) { MTRThermostatDayOfWeekThursday API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x10, MTRThermostatDayOfWeekFriday API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x20, MTRThermostatDayOfWeekSaturday API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x40, - MTRThermostatDayOfWeekAwayOrVacation API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x80, + MTRThermostatDayOfWeekAway MTR_NEWLY_AVAILABLE = 0x80, + MTRThermostatDayOfWeekAwayOrVacation API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatDayOfWeekAway") + = 0x80, } API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); typedef NS_OPTIONS(uint8_t, MTRThermostatModeForSequence) { - MTRThermostatModeForSequenceHeatSetpointFieldPresent API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, - MTRThermostatModeForSequenceCoolSetpointFieldPresent API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, + MTRThermostatModeForSequenceHeatSetpointPresent MTR_NEWLY_AVAILABLE = 0x1, + MTRThermostatModeForSequenceHeatSetpointFieldPresent API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatModeForSequenceHeatSetpointPresent") + = 0x1, + MTRThermostatModeForSequenceCoolSetpointPresent MTR_NEWLY_AVAILABLE = 0x2, + MTRThermostatModeForSequenceCoolSetpointFieldPresent API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatModeForSequenceCoolSetpointPresent") + = 0x2, } API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); typedef NS_OPTIONS(uint32_t, MTRThermostatFeature) { MTRThermostatFeatureHeating API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x1, MTRThermostatFeatureCooling API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x2, MTRThermostatFeatureOccupancy API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x4, - MTRThermostatFeatureSchedule API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x8, + MTRThermostatFeatureScheduleConfiguration MTR_NEWLY_AVAILABLE = 0x8, + MTRThermostatFeatureSchedule API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatFeatureScheduleConfiguration") + = 0x8, MTRThermostatFeatureSetback API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x10, - MTRThermostatFeatureAutomode API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) = 0x20, + MTRThermostatFeatureAutoMode MTR_NEWLY_AVAILABLE = 0x20, + MTRThermostatFeatureAutomode API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use MTRThermostatFeatureAutoMode") + = 0x20, } API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); typedef NS_ENUM(uint8_t, MTRFanControlFanModeSequenceType) { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 4f3e7c997a6012..b9ff0ac45ee50c 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -1693,8 +1693,8 @@ - (void)addSceneWithParams:(MTRScenesClusterAddSceneParams *)params invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } } - request.groupId = params.groupId.unsignedShortValue; - request.sceneId = params.sceneId.unsignedCharValue; + request.groupID = params.groupID.unsignedShortValue; + request.sceneID = params.sceneID.unsignedCharValue; request.transitionTime = params.transitionTime.unsignedShortValue; request.sceneName = [self asCharSpan:params.sceneName]; { @@ -1712,7 +1712,7 @@ - (void)addSceneWithParams:(MTRScenesClusterAddSceneParams *)params return CHIP_ERROR_INVALID_ARGUMENT; } auto element_0 = (MTRScenesClusterExtensionFieldSet *) params.extensionFieldSets[i_0]; - listHolder_0->mList[i_0].clusterId = element_0.clusterId.unsignedIntValue; + 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; @@ -1729,9 +1729,9 @@ - (void)addSceneWithParams:(MTRScenesClusterAddSceneParams *)params return CHIP_ERROR_INVALID_ARGUMENT; } auto element_2 = (MTRScenesClusterAttributeValuePair *) element_0.attributeValueList[i_2]; - if (element_2.attributeId != nil) { - auto & definedValue_4 = listHolder_2->mList[i_2].attributeId.Emplace(); - definedValue_4 = element_2.attributeId.unsignedIntValue; + if (element_2.attributeID != nil) { + auto & definedValue_4 = listHolder_2->mList[i_2].attributeID.Emplace(); + definedValue_4 = element_2.attributeID.unsignedIntValue; } { using ListType_4 @@ -1803,8 +1803,8 @@ - (void)viewSceneWithParams:(MTRScenesClusterViewSceneParams *)params invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } } - request.groupId = params.groupId.unsignedShortValue; - request.sceneId = params.sceneId.unsignedCharValue; + request.groupID = params.groupID.unsignedShortValue; + request.sceneID = params.sceneID.unsignedCharValue; return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); @@ -1838,8 +1838,8 @@ - (void)removeSceneWithParams:(MTRScenesClusterRemoveSceneParams *)params invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } } - request.groupId = params.groupId.unsignedShortValue; - request.sceneId = params.sceneId.unsignedCharValue; + request.groupID = params.groupID.unsignedShortValue; + request.sceneID = params.sceneID.unsignedCharValue; return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); @@ -1874,7 +1874,7 @@ - (void)removeAllScenesWithParams:(MTRScenesClusterRemoveAllScenesParams *)param invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } } - request.groupId = params.groupId.unsignedShortValue; + request.groupID = params.groupID.unsignedShortValue; return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); @@ -1908,8 +1908,8 @@ - (void)storeSceneWithParams:(MTRScenesClusterStoreSceneParams *)params invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } } - request.groupId = params.groupId.unsignedShortValue; - request.sceneId = params.sceneId.unsignedCharValue; + request.groupID = params.groupID.unsignedShortValue; + request.sceneID = params.sceneID.unsignedCharValue; return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); @@ -1945,8 +1945,8 @@ - (void)recallSceneWithParams:(MTRScenesClusterRecallSceneParams *)params comple invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } } - request.groupId = params.groupId.unsignedShortValue; - request.sceneId = params.sceneId.unsignedCharValue; + request.groupID = params.groupID.unsignedShortValue; + request.sceneID = params.sceneID.unsignedCharValue; if (params.transitionTime != nil) { auto & definedValue_0 = request.transitionTime.Emplace(); if (params.transitionTime == nil) { @@ -1990,7 +1990,7 @@ - (void)getSceneMembershipWithParams:(MTRScenesClusterGetSceneMembershipParams * invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } } - request.groupId = params.groupId.unsignedShortValue; + request.groupID = params.groupID.unsignedShortValue; return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); @@ -2025,8 +2025,8 @@ - (void)enhancedAddSceneWithParams:(MTRScenesClusterEnhancedAddSceneParams *)par invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } } - request.groupId = params.groupId.unsignedShortValue; - request.sceneId = params.sceneId.unsignedCharValue; + request.groupID = params.groupID.unsignedShortValue; + request.sceneID = params.sceneID.unsignedCharValue; request.transitionTime = params.transitionTime.unsignedShortValue; request.sceneName = [self asCharSpan:params.sceneName]; { @@ -2044,7 +2044,7 @@ - (void)enhancedAddSceneWithParams:(MTRScenesClusterEnhancedAddSceneParams *)par return CHIP_ERROR_INVALID_ARGUMENT; } auto element_0 = (MTRScenesClusterExtensionFieldSet *) params.extensionFieldSets[i_0]; - listHolder_0->mList[i_0].clusterId = element_0.clusterId.unsignedIntValue; + 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; @@ -2061,9 +2061,9 @@ - (void)enhancedAddSceneWithParams:(MTRScenesClusterEnhancedAddSceneParams *)par return CHIP_ERROR_INVALID_ARGUMENT; } auto element_2 = (MTRScenesClusterAttributeValuePair *) element_0.attributeValueList[i_2]; - if (element_2.attributeId != nil) { - auto & definedValue_4 = listHolder_2->mList[i_2].attributeId.Emplace(); - definedValue_4 = element_2.attributeId.unsignedIntValue; + if (element_2.attributeID != nil) { + auto & definedValue_4 = listHolder_2->mList[i_2].attributeID.Emplace(); + definedValue_4 = element_2.attributeID.unsignedIntValue; } { using ListType_4 @@ -2136,8 +2136,8 @@ - (void)enhancedViewSceneWithParams:(MTRScenesClusterEnhancedViewSceneParams *)p invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } } - request.groupId = params.groupId.unsignedShortValue; - request.sceneId = params.sceneId.unsignedCharValue; + request.groupID = params.groupID.unsignedShortValue; + request.sceneID = params.sceneID.unsignedCharValue; return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); @@ -2172,10 +2172,10 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params } } request.mode = static_cast>(params.mode.unsignedCharValue); - request.groupIdFrom = params.groupIdFrom.unsignedShortValue; - request.sceneIdFrom = params.sceneIdFrom.unsignedCharValue; - request.groupIdTo = params.groupIdTo.unsignedShortValue; - request.sceneIdTo = params.sceneIdTo.unsignedCharValue; + request.groupIdentifierFrom = params.groupIdentifierFrom.unsignedShortValue; + request.sceneIdentifierFrom = params.sceneIdentifierFrom.unsignedCharValue; + request.groupIdentifierTo = params.groupIdentifierTo.unsignedShortValue; + request.sceneIdentifierTo = params.sceneIdentifierTo.unsignedCharValue; return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm index e0ad62db1c9967..bc1d0e3e7544e2 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCallbackBridge.mm @@ -11342,10 +11342,10 @@ response.status = [NSNumber numberWithUnsignedChar:data.status]; } { - response.groupId = [NSNumber numberWithUnsignedShort:data.groupId]; + response.groupID = [NSNumber numberWithUnsignedShort:data.groupID]; } { - response.sceneId = [NSNumber numberWithUnsignedChar:data.sceneId]; + response.sceneID = [NSNumber numberWithUnsignedChar:data.sceneID]; } DispatchSuccess(context, response); }; @@ -11358,10 +11358,10 @@ response.status = [NSNumber numberWithUnsignedChar:data.status]; } { - response.groupId = [NSNumber numberWithUnsignedShort:data.groupId]; + response.groupID = [NSNumber numberWithUnsignedShort:data.groupID]; } { - response.sceneId = [NSNumber numberWithUnsignedChar:data.sceneId]; + response.sceneID = [NSNumber numberWithUnsignedChar:data.sceneID]; } { if (data.transitionTime.HasValue()) { @@ -11388,7 +11388,7 @@ auto & entry_1 = iter_1.GetValue(); MTRScenesClusterExtensionFieldSet * newElement_1; newElement_1 = [MTRScenesClusterExtensionFieldSet new]; - newElement_1.clusterId = [NSNumber numberWithUnsignedInt:entry_1.clusterId]; + 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(); @@ -11396,10 +11396,10 @@ auto & entry_3 = iter_3.GetValue(); MTRScenesClusterAttributeValuePair * newElement_3; newElement_3 = [MTRScenesClusterAttributeValuePair new]; - if (entry_3.attributeId.HasValue()) { - newElement_3.attributeId = [NSNumber numberWithUnsignedInt:entry_3.attributeId.Value()]; + if (entry_3.attributeID.HasValue()) { + newElement_3.attributeID = [NSNumber numberWithUnsignedInt:entry_3.attributeID.Value()]; } else { - newElement_3.attributeId = nil; + newElement_3.attributeID = nil; } { // Scope for our temporary variables auto * array_5 = [NSMutableArray new]; @@ -11450,10 +11450,10 @@ response.status = [NSNumber numberWithUnsignedChar:data.status]; } { - response.groupId = [NSNumber numberWithUnsignedShort:data.groupId]; + response.groupID = [NSNumber numberWithUnsignedShort:data.groupID]; } { - response.sceneId = [NSNumber numberWithUnsignedChar:data.sceneId]; + response.sceneID = [NSNumber numberWithUnsignedChar:data.sceneID]; } DispatchSuccess(context, response); }; @@ -11466,7 +11466,7 @@ response.status = [NSNumber numberWithUnsignedChar:data.status]; } { - response.groupId = [NSNumber numberWithUnsignedShort:data.groupId]; + response.groupID = [NSNumber numberWithUnsignedShort:data.groupID]; } DispatchSuccess(context, response); }; @@ -11479,10 +11479,10 @@ response.status = [NSNumber numberWithUnsignedChar:data.status]; } { - response.groupId = [NSNumber numberWithUnsignedShort:data.groupId]; + response.groupID = [NSNumber numberWithUnsignedShort:data.groupID]; } { - response.sceneId = [NSNumber numberWithUnsignedChar:data.sceneId]; + response.sceneID = [NSNumber numberWithUnsignedChar:data.sceneID]; } DispatchSuccess(context, response); }; @@ -11502,7 +11502,7 @@ } } { - response.groupId = [NSNumber numberWithUnsignedShort:data.groupId]; + response.groupID = [NSNumber numberWithUnsignedShort:data.groupID]; } { if (data.sceneList.HasValue()) { @@ -11537,10 +11537,10 @@ response.status = [NSNumber numberWithUnsignedChar:data.status]; } { - response.groupId = [NSNumber numberWithUnsignedShort:data.groupId]; + response.groupID = [NSNumber numberWithUnsignedShort:data.groupID]; } { - response.sceneId = [NSNumber numberWithUnsignedChar:data.sceneId]; + response.sceneID = [NSNumber numberWithUnsignedChar:data.sceneID]; } DispatchSuccess(context, response); }; @@ -11553,10 +11553,10 @@ response.status = [NSNumber numberWithUnsignedChar:data.status]; } { - response.groupId = [NSNumber numberWithUnsignedShort:data.groupId]; + response.groupID = [NSNumber numberWithUnsignedShort:data.groupID]; } { - response.sceneId = [NSNumber numberWithUnsignedChar:data.sceneId]; + response.sceneID = [NSNumber numberWithUnsignedChar:data.sceneID]; } { if (data.transitionTime.HasValue()) { @@ -11583,7 +11583,7 @@ auto & entry_1 = iter_1.GetValue(); MTRScenesClusterExtensionFieldSet * newElement_1; newElement_1 = [MTRScenesClusterExtensionFieldSet new]; - newElement_1.clusterId = [NSNumber numberWithUnsignedInt:entry_1.clusterId]; + 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(); @@ -11591,10 +11591,10 @@ auto & entry_3 = iter_3.GetValue(); MTRScenesClusterAttributeValuePair * newElement_3; newElement_3 = [MTRScenesClusterAttributeValuePair new]; - if (entry_3.attributeId.HasValue()) { - newElement_3.attributeId = [NSNumber numberWithUnsignedInt:entry_3.attributeId.Value()]; + if (entry_3.attributeID.HasValue()) { + newElement_3.attributeID = [NSNumber numberWithUnsignedInt:entry_3.attributeID.Value()]; } else { - newElement_3.attributeId = nil; + newElement_3.attributeID = nil; } { // Scope for our temporary variables auto * array_5 = [NSMutableArray new]; @@ -11645,10 +11645,10 @@ response.status = [NSNumber numberWithUnsignedChar:data.status]; } { - response.groupIdFrom = [NSNumber numberWithUnsignedShort:data.groupIdFrom]; + response.groupIdentifierFrom = [NSNumber numberWithUnsignedShort:data.groupIdentifierFrom]; } { - response.sceneIdFrom = [NSNumber numberWithUnsignedChar:data.sceneIdFrom]; + response.sceneIdentifierFrom = [NSNumber numberWithUnsignedChar:data.sceneIdentifierFrom]; } DispatchSuccess(context, response); }; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index 06c3f450b4c15c..0247bc118dc256 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -984,8 +984,8 @@ - (void)addSceneWithParams:(MTRScenesClusterAddSceneParams *)params invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } } - request.groupId = params.groupId.unsignedShortValue; - request.sceneId = params.sceneId.unsignedCharValue; + request.groupID = params.groupID.unsignedShortValue; + request.sceneID = params.sceneID.unsignedCharValue; request.transitionTime = params.transitionTime.unsignedShortValue; request.sceneName = [self asCharSpan:params.sceneName]; { @@ -1003,7 +1003,7 @@ - (void)addSceneWithParams:(MTRScenesClusterAddSceneParams *)params return CHIP_ERROR_INVALID_ARGUMENT; } auto element_0 = (MTRScenesClusterExtensionFieldSet *) params.extensionFieldSets[i_0]; - listHolder_0->mList[i_0].clusterId = element_0.clusterId.unsignedIntValue; + 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; @@ -1020,9 +1020,9 @@ - (void)addSceneWithParams:(MTRScenesClusterAddSceneParams *)params return CHIP_ERROR_INVALID_ARGUMENT; } auto element_2 = (MTRScenesClusterAttributeValuePair *) element_0.attributeValueList[i_2]; - if (element_2.attributeId != nil) { - auto & definedValue_4 = listHolder_2->mList[i_2].attributeId.Emplace(); - definedValue_4 = element_2.attributeId.unsignedIntValue; + if (element_2.attributeID != nil) { + auto & definedValue_4 = listHolder_2->mList[i_2].attributeID.Emplace(); + definedValue_4 = element_2.attributeID.unsignedIntValue; } { using ListType_4 @@ -1130,8 +1130,8 @@ - (void)viewSceneWithParams:(MTRScenesClusterViewSceneParams *)params invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } } - request.groupId = params.groupId.unsignedShortValue; - request.sceneId = params.sceneId.unsignedCharValue; + request.groupID = params.groupID.unsignedShortValue; + request.sceneID = params.sceneID.unsignedCharValue; return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); @@ -1201,8 +1201,8 @@ - (void)removeSceneWithParams:(MTRScenesClusterRemoveSceneParams *)params invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } } - request.groupId = params.groupId.unsignedShortValue; - request.sceneId = params.sceneId.unsignedCharValue; + request.groupID = params.groupID.unsignedShortValue; + request.sceneID = params.sceneID.unsignedCharValue; return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); @@ -1272,7 +1272,7 @@ - (void)removeAllScenesWithParams:(MTRScenesClusterRemoveAllScenesParams *)param invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } } - request.groupId = params.groupId.unsignedShortValue; + request.groupID = params.groupID.unsignedShortValue; return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); @@ -1341,8 +1341,8 @@ - (void)storeSceneWithParams:(MTRScenesClusterStoreSceneParams *)params invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } } - request.groupId = params.groupId.unsignedShortValue; - request.sceneId = params.sceneId.unsignedCharValue; + request.groupID = params.groupID.unsignedShortValue; + request.sceneID = params.sceneID.unsignedCharValue; return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); @@ -1410,8 +1410,8 @@ - (void)recallSceneWithParams:(MTRScenesClusterRecallSceneParams *)params invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } } - request.groupId = params.groupId.unsignedShortValue; - request.sceneId = params.sceneId.unsignedCharValue; + request.groupID = params.groupID.unsignedShortValue; + request.sceneID = params.sceneID.unsignedCharValue; if (params.transitionTime != nil) { auto & definedValue_0 = request.transitionTime.Emplace(); if (params.transitionTime == nil) { @@ -1490,7 +1490,7 @@ - (void)getSceneMembershipWithParams:(MTRScenesClusterGetSceneMembershipParams * invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } } - request.groupId = params.groupId.unsignedShortValue; + request.groupID = params.groupID.unsignedShortValue; return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); @@ -1560,8 +1560,8 @@ - (void)enhancedAddSceneWithParams:(MTRScenesClusterEnhancedAddSceneParams *)par invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } } - request.groupId = params.groupId.unsignedShortValue; - request.sceneId = params.sceneId.unsignedCharValue; + request.groupID = params.groupID.unsignedShortValue; + request.sceneID = params.sceneID.unsignedCharValue; request.transitionTime = params.transitionTime.unsignedShortValue; request.sceneName = [self asCharSpan:params.sceneName]; { @@ -1579,7 +1579,7 @@ - (void)enhancedAddSceneWithParams:(MTRScenesClusterEnhancedAddSceneParams *)par return CHIP_ERROR_INVALID_ARGUMENT; } auto element_0 = (MTRScenesClusterExtensionFieldSet *) params.extensionFieldSets[i_0]; - listHolder_0->mList[i_0].clusterId = element_0.clusterId.unsignedIntValue; + 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; @@ -1596,9 +1596,9 @@ - (void)enhancedAddSceneWithParams:(MTRScenesClusterEnhancedAddSceneParams *)par return CHIP_ERROR_INVALID_ARGUMENT; } auto element_2 = (MTRScenesClusterAttributeValuePair *) element_0.attributeValueList[i_2]; - if (element_2.attributeId != nil) { - auto & definedValue_4 = listHolder_2->mList[i_2].attributeId.Emplace(); - definedValue_4 = element_2.attributeId.unsignedIntValue; + if (element_2.attributeID != nil) { + auto & definedValue_4 = listHolder_2->mList[i_2].attributeID.Emplace(); + definedValue_4 = element_2.attributeID.unsignedIntValue; } { using ListType_4 @@ -1707,8 +1707,8 @@ - (void)enhancedViewSceneWithParams:(MTRScenesClusterEnhancedViewSceneParams *)p invokeTimeout.SetValue(Seconds16(serverSideProcessingTimeout.unsignedShortValue)); } } - request.groupId = params.groupId.unsignedShortValue; - request.sceneId = params.sceneId.unsignedCharValue; + request.groupID = params.groupID.unsignedShortValue; + request.sceneID = params.sceneID.unsignedCharValue; return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); @@ -1778,10 +1778,10 @@ - (void)copySceneWithParams:(MTRScenesClusterCopySceneParams *)params } } request.mode = static_cast>(params.mode.unsignedCharValue); - request.groupIdFrom = params.groupIdFrom.unsignedShortValue; - request.sceneIdFrom = params.sceneIdFrom.unsignedCharValue; - request.groupIdTo = params.groupIdTo.unsignedShortValue; - request.sceneIdTo = params.sceneIdTo.unsignedCharValue; + request.groupIdentifierFrom = params.groupIdentifierFrom.unsignedShortValue; + request.sceneIdentifierFrom = params.sceneIdentifierFrom.unsignedCharValue; + request.groupIdentifierTo = params.groupIdentifierTo.unsignedShortValue; + request.sceneIdentifierTo = params.sceneIdentifierTo.unsignedCharValue; return MTRStartInvokeInteraction(typedBridge, request, exchangeManager, session, successCb, failureCb, self->_endpoint, timedInvokeTimeoutMs, invokeTimeout); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h index d01abc49e50d15..f424065352ee77 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h @@ -407,9 +407,9 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRScenesClusterAddSceneParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull groupId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull sceneId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull sceneID MTR_NEWLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nonnull transitionTime API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -442,14 +442,23 @@ API_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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use groupID"); + +@property (nonatomic, copy) NSNumber * _Nonnull sceneId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use sceneID"); +@end + API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRScenesClusterAddSceneResponseParams : NSObject @property (nonatomic, copy) NSNumber * _Nonnull status API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull groupId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull sceneId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull sceneID MTR_NEWLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -468,12 +477,21 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) tvos(16.1)) MTR_NEWLY_DEPRECATED("Timed invoke does not make sense for server to client commands"); @end +@interface MTRScenesClusterAddSceneResponseParams (Deprecated) + +@property (nonatomic, copy) NSNumber * _Nonnull groupId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use groupID"); + +@property (nonatomic, copy) NSNumber * _Nonnull sceneId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use sceneID"); +@end + API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRScenesClusterViewSceneParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull groupId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull sceneId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull sceneID MTR_NEWLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -500,14 +518,23 @@ API_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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use groupID"); + +@property (nonatomic, copy) NSNumber * _Nonnull sceneId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use sceneID"); +@end + API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRScenesClusterViewSceneResponseParams : NSObject @property (nonatomic, copy) NSNumber * _Nonnull status API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull groupId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull sceneId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull sceneID MTR_NEWLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nullable transitionTime API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -532,12 +559,21 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) tvos(16.1)) MTR_NEWLY_DEPRECATED("Timed invoke does not make sense for server to client commands"); @end +@interface MTRScenesClusterViewSceneResponseParams (Deprecated) + +@property (nonatomic, copy) NSNumber * _Nonnull groupId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use groupID"); + +@property (nonatomic, copy) NSNumber * _Nonnull sceneId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use sceneID"); +@end + API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRScenesClusterRemoveSceneParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull groupId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull sceneId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull sceneID MTR_NEWLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -564,14 +600,23 @@ API_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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use groupID"); + +@property (nonatomic, copy) NSNumber * _Nonnull sceneId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use sceneID"); +@end + API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRScenesClusterRemoveSceneResponseParams : NSObject @property (nonatomic, copy) NSNumber * _Nonnull status API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull groupId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull sceneId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull sceneID MTR_NEWLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -590,10 +635,19 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) tvos(16.1)) MTR_NEWLY_DEPRECATED("Timed invoke does not make sense for server to client commands"); @end +@interface MTRScenesClusterRemoveSceneResponseParams (Deprecated) + +@property (nonatomic, copy) NSNumber * _Nonnull groupId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use groupID"); + +@property (nonatomic, copy) NSNumber * _Nonnull sceneId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use sceneID"); +@end + API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRScenesClusterRemoveAllScenesParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull groupId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_NEWLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -620,12 +674,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end +@interface MTRScenesClusterRemoveAllScenesParams (Deprecated) + +@property (nonatomic, copy) NSNumber * _Nonnull groupId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use groupID"); +@end + API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRScenesClusterRemoveAllScenesResponseParams : NSObject @property (nonatomic, copy) NSNumber * _Nonnull status API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull groupId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_NEWLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -644,12 +704,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) tvos(16.1)) MTR_NEWLY_DEPRECATED("Timed invoke does not make sense for server to client commands"); @end +@interface MTRScenesClusterRemoveAllScenesResponseParams (Deprecated) + +@property (nonatomic, copy) NSNumber * _Nonnull groupId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use groupID"); +@end + API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRScenesClusterStoreSceneParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull groupId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull sceneId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull sceneID MTR_NEWLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -676,14 +742,23 @@ API_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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use groupID"); + +@property (nonatomic, copy) NSNumber * _Nonnull sceneId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use sceneID"); +@end + API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRScenesClusterStoreSceneResponseParams : NSObject @property (nonatomic, copy) NSNumber * _Nonnull status API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull groupId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull sceneId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull sceneID MTR_NEWLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -702,12 +777,21 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) tvos(16.1)) MTR_NEWLY_DEPRECATED("Timed invoke does not make sense for server to client commands"); @end +@interface MTRScenesClusterStoreSceneResponseParams (Deprecated) + +@property (nonatomic, copy) NSNumber * _Nonnull groupId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use groupID"); + +@property (nonatomic, copy) NSNumber * _Nonnull sceneId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use sceneID"); +@end + API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRScenesClusterRecallSceneParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull groupId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull sceneId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull sceneID MTR_NEWLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nullable transitionTime API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** @@ -736,10 +820,19 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy, nullable) NSNumber * serverSideProcessingTimeout; @end +@interface MTRScenesClusterRecallSceneParams (Deprecated) + +@property (nonatomic, copy) NSNumber * _Nonnull groupId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use groupID"); + +@property (nonatomic, copy) NSNumber * _Nonnull sceneId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use sceneID"); +@end + API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRScenesClusterGetSceneMembershipParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull groupId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_NEWLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -766,6 +859,12 @@ API_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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use groupID"); +@end + API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRScenesClusterGetSceneMembershipResponseParams : NSObject @@ -773,7 +872,7 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy) NSNumber * _Nullable capacity API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull groupId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_NEWLY_AVAILABLE; @property (nonatomic, copy) NSArray * _Nullable sceneList API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); /** @@ -794,12 +893,18 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) tvos(16.1)) MTR_NEWLY_DEPRECATED("Timed invoke does not make sense for server to client commands"); @end +@interface MTRScenesClusterGetSceneMembershipResponseParams (Deprecated) + +@property (nonatomic, copy) NSNumber * _Nonnull groupId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use groupID"); +@end + API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRScenesClusterEnhancedAddSceneParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull groupId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull sceneId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull sceneID MTR_NEWLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nonnull transitionTime API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -832,14 +937,23 @@ API_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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use groupID"); + +@property (nonatomic, copy) NSNumber * _Nonnull sceneId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use sceneID"); +@end + API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRScenesClusterEnhancedAddSceneResponseParams : NSObject @property (nonatomic, copy) NSNumber * _Nonnull status API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull groupId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull sceneId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull sceneID MTR_NEWLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -858,12 +972,21 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) tvos(16.1)) MTR_NEWLY_DEPRECATED("Timed invoke does not make sense for server to client commands"); @end +@interface MTRScenesClusterEnhancedAddSceneResponseParams (Deprecated) + +@property (nonatomic, copy) NSNumber * _Nonnull groupId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use groupID"); + +@property (nonatomic, copy) NSNumber * _Nonnull sceneId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use sceneID"); +@end + API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRScenesClusterEnhancedViewSceneParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull groupId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull sceneId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull sceneID MTR_NEWLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -890,14 +1013,23 @@ API_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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use groupID"); + +@property (nonatomic, copy) NSNumber * _Nonnull sceneId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use sceneID"); +@end + API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRScenesClusterEnhancedViewSceneResponseParams : NSObject @property (nonatomic, copy) NSNumber * _Nonnull status API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull groupId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull groupID MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull sceneId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull sceneID MTR_NEWLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nullable transitionTime API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @@ -922,18 +1054,27 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) tvos(16.1)) MTR_NEWLY_DEPRECATED("Timed invoke does not make sense for server to client commands"); @end +@interface MTRScenesClusterEnhancedViewSceneResponseParams (Deprecated) + +@property (nonatomic, copy) NSNumber * _Nonnull groupId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use groupID"); + +@property (nonatomic, copy) NSNumber * _Nonnull sceneId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use sceneID"); +@end + API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRScenesClusterCopySceneParams : NSObject @property (nonatomic, copy) NSNumber * _Nonnull mode API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull groupIdFrom API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull groupIdentifierFrom MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull sceneIdFrom API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull sceneIdentifierFrom MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull groupIdTo API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull groupIdentifierTo MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull sceneIdTo API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull sceneIdentifierTo MTR_NEWLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -960,14 +1101,29 @@ API_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 API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use groupIdentifierFrom"); + +@property (nonatomic, copy) NSNumber * _Nonnull sceneIdFrom API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use sceneIdentifierFrom"); + +@property (nonatomic, copy) NSNumber * _Nonnull groupIdTo API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use groupIdentifierTo"); + +@property (nonatomic, copy) NSNumber * _Nonnull sceneIdTo API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use sceneIdentifierTo"); +@end + API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRScenesClusterCopySceneResponseParams : NSObject @property (nonatomic, copy) NSNumber * _Nonnull status API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); -@property (nonatomic, copy) NSNumber * _Nonnull groupIdFrom API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull groupIdentifierFrom MTR_NEWLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull sceneIdFrom API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull sceneIdentifierFrom MTR_NEWLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -986,6 +1142,15 @@ API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) tvos(16.1)) MTR_NEWLY_DEPRECATED("Timed invoke does not make sense for server to client commands"); @end +@interface MTRScenesClusterCopySceneResponseParams (Deprecated) + +@property (nonatomic, copy) NSNumber * _Nonnull groupIdFrom API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use groupIdentifierFrom"); + +@property (nonatomic, copy) NSNumber * _Nonnull sceneIdFrom API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use sceneIdentifierFrom"); +@end + API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTROnOffClusterOffParams : NSObject /** diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm index 3426f9172a390f..afc4fd9d807ac7 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -496,9 +496,9 @@ - (instancetype)init { if (self = [super init]) { - _groupId = @(0); + _groupID = @(0); - _sceneId = @(0); + _sceneID = @(0); _transitionTime = @(0); @@ -515,8 +515,8 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRScenesClusterAddSceneParams alloc] init]; - other.groupId = self.groupId; - other.sceneId = self.sceneId; + other.groupID = self.groupID; + other.sceneID = self.sceneID; other.transitionTime = self.transitionTime; other.sceneName = self.sceneName; other.extensionFieldSets = self.extensionFieldSets; @@ -529,11 +529,34 @@ - (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 stringWithFormat:@"<%@: groupID:%@; sceneID:%@; transitionTime:%@; sceneName:%@; extensionFieldSets:%@; >", + NSStringFromClass([self class]), _groupID, _sceneID, _transitionTime, _sceneName, _extensionFieldSets]; return descriptionString; } +@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 - (instancetype)init @@ -542,9 +565,9 @@ - (instancetype)init _status = @(0); - _groupId = @(0); + _groupID = @(0); - _sceneId = @(0); + _sceneID = @(0); _timedInvokeTimeoutMs = nil; } return self; @@ -555,8 +578,8 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRScenesClusterAddSceneResponseParams alloc] init]; other.status = self.status; - other.groupId = self.groupId; - other.sceneId = self.sceneId; + other.groupID = self.groupID; + other.sceneID = self.sceneID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; return other; @@ -564,20 +587,43 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; groupId:%@; sceneId:%@; >", - NSStringFromClass([self class]), _status, _groupId, _sceneId]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; groupID:%@; sceneID:%@; >", + NSStringFromClass([self class]), _status, _groupID, _sceneID]; return descriptionString; } +@end + +@implementation MTRScenesClusterAddSceneResponseParams (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 MTRScenesClusterViewSceneParams - (instancetype)init { if (self = [super init]) { - _groupId = @(0); + _groupID = @(0); - _sceneId = @(0); + _sceneID = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -588,8 +634,8 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRScenesClusterViewSceneParams alloc] init]; - other.groupId = self.groupId; - other.sceneId = self.sceneId; + other.groupID = self.groupID; + other.sceneID = self.sceneID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -599,10 +645,33 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { NSString * descriptionString = - [NSString stringWithFormat:@"<%@: groupId:%@; sceneId:%@; >", NSStringFromClass([self class]), _groupId, _sceneId]; + [NSString stringWithFormat:@"<%@: groupID:%@; sceneID:%@; >", NSStringFromClass([self class]), _groupID, _sceneID]; return descriptionString; } +@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 - (instancetype)init @@ -611,9 +680,9 @@ - (instancetype)init _status = @(0); - _groupId = @(0); + _groupID = @(0); - _sceneId = @(0); + _sceneID = @(0); _transitionTime = nil; @@ -630,8 +699,8 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRScenesClusterViewSceneResponseParams alloc] init]; other.status = self.status; - other.groupId = self.groupId; - other.sceneId = self.sceneId; + other.groupID = self.groupID; + other.sceneID = self.sceneID; other.transitionTime = self.transitionTime; other.sceneName = self.sceneName; other.extensionFieldSets = self.extensionFieldSets; @@ -643,20 +712,43 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { NSString * descriptionString = [NSString - stringWithFormat:@"<%@: status:%@; groupId:%@; sceneId:%@; transitionTime:%@; sceneName:%@; extensionFieldSets:%@; >", - NSStringFromClass([self class]), _status, _groupId, _sceneId, _transitionTime, _sceneName, _extensionFieldSets]; + stringWithFormat:@"<%@: status:%@; groupID:%@; sceneID:%@; transitionTime:%@; sceneName:%@; extensionFieldSets:%@; >", + NSStringFromClass([self class]), _status, _groupID, _sceneID, _transitionTime, _sceneName, _extensionFieldSets]; return descriptionString; } +@end + +@implementation MTRScenesClusterViewSceneResponseParams (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 MTRScenesClusterRemoveSceneParams - (instancetype)init { if (self = [super init]) { - _groupId = @(0); + _groupID = @(0); - _sceneId = @(0); + _sceneID = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -667,8 +759,8 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRScenesClusterRemoveSceneParams alloc] init]; - other.groupId = self.groupId; - other.sceneId = self.sceneId; + other.groupID = self.groupID; + other.sceneID = self.sceneID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -678,10 +770,33 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { NSString * descriptionString = - [NSString stringWithFormat:@"<%@: groupId:%@; sceneId:%@; >", NSStringFromClass([self class]), _groupId, _sceneId]; + [NSString stringWithFormat:@"<%@: groupID:%@; sceneID:%@; >", NSStringFromClass([self class]), _groupID, _sceneID]; return descriptionString; } +@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 - (instancetype)init @@ -690,9 +805,9 @@ - (instancetype)init _status = @(0); - _groupId = @(0); + _groupID = @(0); - _sceneId = @(0); + _sceneID = @(0); _timedInvokeTimeoutMs = nil; } return self; @@ -703,8 +818,8 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRScenesClusterRemoveSceneResponseParams alloc] init]; other.status = self.status; - other.groupId = self.groupId; - other.sceneId = self.sceneId; + other.groupID = self.groupID; + other.sceneID = self.sceneID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; return other; @@ -712,18 +827,41 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; groupId:%@; sceneId:%@; >", - NSStringFromClass([self class]), _status, _groupId, _sceneId]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; groupID:%@; sceneID:%@; >", + NSStringFromClass([self class]), _status, _groupID, _sceneID]; return descriptionString; } +@end + +@implementation MTRScenesClusterRemoveSceneResponseParams (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 MTRScenesClusterRemoveAllScenesParams - (instancetype)init { if (self = [super init]) { - _groupId = @(0); + _groupID = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -734,7 +872,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRScenesClusterRemoveAllScenesParams alloc] init]; - other.groupId = self.groupId; + other.groupID = self.groupID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -743,10 +881,23 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupId:%@; >", NSStringFromClass([self class]), _groupId]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupID:%@; >", NSStringFromClass([self class]), _groupID]; return descriptionString; } +@end + +@implementation MTRScenesClusterRemoveAllScenesParams (Deprecated) + +- (void)setGroupId:(NSNumber * _Nonnull)groupId +{ + self.groupID = groupId; +} + +- (NSNumber * _Nonnull)groupId +{ + return self.groupID; +} @end @implementation MTRScenesClusterRemoveAllScenesResponseParams - (instancetype)init @@ -755,7 +906,7 @@ - (instancetype)init _status = @(0); - _groupId = @(0); + _groupID = @(0); _timedInvokeTimeoutMs = nil; } return self; @@ -766,7 +917,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRScenesClusterRemoveAllScenesResponseParams alloc] init]; other.status = self.status; - other.groupId = self.groupId; + other.groupID = self.groupID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; return other; @@ -775,19 +926,32 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { NSString * descriptionString = - [NSString stringWithFormat:@"<%@: status:%@; groupId:%@; >", NSStringFromClass([self class]), _status, _groupId]; + [NSString stringWithFormat:@"<%@: status:%@; groupID:%@; >", NSStringFromClass([self class]), _status, _groupID]; return descriptionString; } +@end + +@implementation MTRScenesClusterRemoveAllScenesResponseParams (Deprecated) + +- (void)setGroupId:(NSNumber * _Nonnull)groupId +{ + self.groupID = groupId; +} + +- (NSNumber * _Nonnull)groupId +{ + return self.groupID; +} @end @implementation MTRScenesClusterStoreSceneParams - (instancetype)init { if (self = [super init]) { - _groupId = @(0); + _groupID = @(0); - _sceneId = @(0); + _sceneID = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -798,8 +962,8 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRScenesClusterStoreSceneParams alloc] init]; - other.groupId = self.groupId; - other.sceneId = self.sceneId; + other.groupID = self.groupID; + other.sceneID = self.sceneID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -809,10 +973,33 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { NSString * descriptionString = - [NSString stringWithFormat:@"<%@: groupId:%@; sceneId:%@; >", NSStringFromClass([self class]), _groupId, _sceneId]; + [NSString stringWithFormat:@"<%@: groupID:%@; sceneID:%@; >", NSStringFromClass([self class]), _groupID, _sceneID]; return descriptionString; } +@end + +@implementation MTRScenesClusterStoreSceneParams (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 MTRScenesClusterStoreSceneResponseParams - (instancetype)init @@ -821,9 +1008,9 @@ - (instancetype)init _status = @(0); - _groupId = @(0); + _groupID = @(0); - _sceneId = @(0); + _sceneID = @(0); _timedInvokeTimeoutMs = nil; } return self; @@ -834,8 +1021,8 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRScenesClusterStoreSceneResponseParams alloc] init]; other.status = self.status; - other.groupId = self.groupId; - other.sceneId = self.sceneId; + other.groupID = self.groupID; + other.sceneID = self.sceneID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; return other; @@ -843,20 +1030,43 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; groupId:%@; sceneId:%@; >", - NSStringFromClass([self class]), _status, _groupId, _sceneId]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; groupID:%@; sceneID:%@; >", + NSStringFromClass([self class]), _status, _groupID, _sceneID]; return descriptionString; } +@end + +@implementation MTRScenesClusterStoreSceneResponseParams (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 MTRScenesClusterRecallSceneParams - (instancetype)init { if (self = [super init]) { - _groupId = @(0); + _groupID = @(0); - _sceneId = @(0); + _sceneID = @(0); _transitionTime = nil; _timedInvokeTimeoutMs = nil; @@ -869,8 +1079,8 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRScenesClusterRecallSceneParams alloc] init]; - other.groupId = self.groupId; - other.sceneId = self.sceneId; + other.groupID = self.groupID; + other.sceneID = self.sceneID; other.transitionTime = self.transitionTime; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -880,18 +1090,41 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupId:%@; sceneId:%@; transitionTime:%@; >", - NSStringFromClass([self class]), _groupId, _sceneId, _transitionTime]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupID:%@; sceneID:%@; transitionTime:%@; >", + NSStringFromClass([self class]), _groupID, _sceneID, _transitionTime]; return descriptionString; } +@end + +@implementation MTRScenesClusterRecallSceneParams (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 MTRScenesClusterGetSceneMembershipParams - (instancetype)init { if (self = [super init]) { - _groupId = @(0); + _groupID = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -902,7 +1135,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRScenesClusterGetSceneMembershipParams alloc] init]; - other.groupId = self.groupId; + other.groupID = self.groupID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -911,10 +1144,23 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupId:%@; >", NSStringFromClass([self class]), _groupId]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: groupID:%@; >", NSStringFromClass([self class]), _groupID]; return descriptionString; } +@end + +@implementation MTRScenesClusterGetSceneMembershipParams (Deprecated) + +- (void)setGroupId:(NSNumber * _Nonnull)groupId +{ + self.groupID = groupId; +} + +- (NSNumber * _Nonnull)groupId +{ + return self.groupID; +} @end @implementation MTRScenesClusterGetSceneMembershipResponseParams - (instancetype)init @@ -925,7 +1171,7 @@ - (instancetype)init _capacity = nil; - _groupId = @(0); + _groupID = @(0); _sceneList = nil; _timedInvokeTimeoutMs = nil; @@ -939,7 +1185,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; other.status = self.status; other.capacity = self.capacity; - other.groupId = self.groupId; + other.groupID = self.groupID; other.sceneList = self.sceneList; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; @@ -948,20 +1194,33 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; capacity:%@; groupId:%@; sceneList:%@; >", - NSStringFromClass([self class]), _status, _capacity, _groupId, _sceneList]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; capacity:%@; groupID:%@; sceneList:%@; >", + NSStringFromClass([self class]), _status, _capacity, _groupID, _sceneList]; return descriptionString; } +@end + +@implementation MTRScenesClusterGetSceneMembershipResponseParams (Deprecated) + +- (void)setGroupId:(NSNumber * _Nonnull)groupId +{ + self.groupID = groupId; +} + +- (NSNumber * _Nonnull)groupId +{ + return self.groupID; +} @end @implementation MTRScenesClusterEnhancedAddSceneParams - (instancetype)init { if (self = [super init]) { - _groupId = @(0); + _groupID = @(0); - _sceneId = @(0); + _sceneID = @(0); _transitionTime = @(0); @@ -978,8 +1237,8 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRScenesClusterEnhancedAddSceneParams alloc] init]; - other.groupId = self.groupId; - other.sceneId = self.sceneId; + other.groupID = self.groupID; + other.sceneID = self.sceneID; other.transitionTime = self.transitionTime; other.sceneName = self.sceneName; other.extensionFieldSets = self.extensionFieldSets; @@ -992,11 +1251,34 @@ - (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 stringWithFormat:@"<%@: groupID:%@; sceneID:%@; transitionTime:%@; sceneName:%@; extensionFieldSets:%@; >", + NSStringFromClass([self class]), _groupID, _sceneID, _transitionTime, _sceneName, _extensionFieldSets]; return descriptionString; } +@end + +@implementation MTRScenesClusterEnhancedAddSceneParams (Deprecated) + +- (void)setGroupId:(NSNumber * _Nonnull)groupId +{ + self.groupID = groupId; +} + +- (NSNumber * _Nonnull)groupId +{ + return self.groupID; +} + +- (void)setSceneId:(NSNumber * _Nonnull)sceneId +{ + self.sceneID = sceneId; +} + +- (NSNumber * _Nonnull)sceneId +{ + return self.sceneID; +} @end @implementation MTRScenesClusterEnhancedAddSceneResponseParams - (instancetype)init @@ -1005,9 +1287,9 @@ - (instancetype)init _status = @(0); - _groupId = @(0); + _groupID = @(0); - _sceneId = @(0); + _sceneID = @(0); _timedInvokeTimeoutMs = nil; } return self; @@ -1018,8 +1300,8 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRScenesClusterEnhancedAddSceneResponseParams alloc] init]; other.status = self.status; - other.groupId = self.groupId; - other.sceneId = self.sceneId; + other.groupID = self.groupID; + other.sceneID = self.sceneID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; return other; @@ -1027,20 +1309,43 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; groupId:%@; sceneId:%@; >", - NSStringFromClass([self class]), _status, _groupId, _sceneId]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; groupID:%@; sceneID:%@; >", + NSStringFromClass([self class]), _status, _groupID, _sceneID]; return descriptionString; } +@end + +@implementation MTRScenesClusterEnhancedAddSceneResponseParams (Deprecated) + +- (void)setGroupId:(NSNumber * _Nonnull)groupId +{ + self.groupID = groupId; +} + +- (NSNumber * _Nonnull)groupId +{ + return self.groupID; +} + +- (void)setSceneId:(NSNumber * _Nonnull)sceneId +{ + self.sceneID = sceneId; +} + +- (NSNumber * _Nonnull)sceneId +{ + return self.sceneID; +} @end @implementation MTRScenesClusterEnhancedViewSceneParams - (instancetype)init { if (self = [super init]) { - _groupId = @(0); + _groupID = @(0); - _sceneId = @(0); + _sceneID = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -1051,8 +1356,8 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRScenesClusterEnhancedViewSceneParams alloc] init]; - other.groupId = self.groupId; - other.sceneId = self.sceneId; + other.groupID = self.groupID; + other.sceneID = self.sceneID; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -1062,10 +1367,33 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { NSString * descriptionString = - [NSString stringWithFormat:@"<%@: groupId:%@; sceneId:%@; >", NSStringFromClass([self class]), _groupId, _sceneId]; + [NSString stringWithFormat:@"<%@: groupID:%@; sceneID:%@; >", NSStringFromClass([self class]), _groupID, _sceneID]; return descriptionString; } +@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 - (instancetype)init @@ -1074,9 +1402,9 @@ - (instancetype)init _status = @(0); - _groupId = @(0); + _groupID = @(0); - _sceneId = @(0); + _sceneID = @(0); _transitionTime = nil; @@ -1093,8 +1421,8 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRScenesClusterEnhancedViewSceneResponseParams alloc] init]; other.status = self.status; - other.groupId = self.groupId; - other.sceneId = self.sceneId; + other.groupID = self.groupID; + other.sceneID = self.sceneID; other.transitionTime = self.transitionTime; other.sceneName = self.sceneName; other.extensionFieldSets = self.extensionFieldSets; @@ -1106,11 +1434,34 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { NSString * descriptionString = [NSString - stringWithFormat:@"<%@: status:%@; groupId:%@; sceneId:%@; transitionTime:%@; sceneName:%@; extensionFieldSets:%@; >", - NSStringFromClass([self class]), _status, _groupId, _sceneId, _transitionTime, _sceneName, _extensionFieldSets]; + stringWithFormat:@"<%@: status:%@; groupID:%@; sceneID:%@; transitionTime:%@; sceneName:%@; extensionFieldSets:%@; >", + NSStringFromClass([self class]), _status, _groupID, _sceneID, _transitionTime, _sceneName, _extensionFieldSets]; return descriptionString; } +@end + +@implementation MTRScenesClusterEnhancedViewSceneResponseParams (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 MTRScenesClusterCopySceneParams - (instancetype)init @@ -1119,13 +1470,13 @@ - (instancetype)init _mode = @(0); - _groupIdFrom = @(0); + _groupIdentifierFrom = @(0); - _sceneIdFrom = @(0); + _sceneIdentifierFrom = @(0); - _groupIdTo = @(0); + _groupIdentifierTo = @(0); - _sceneIdTo = @(0); + _sceneIdentifierTo = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -1137,10 +1488,10 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRScenesClusterCopySceneParams alloc] init]; other.mode = self.mode; - other.groupIdFrom = self.groupIdFrom; - other.sceneIdFrom = self.sceneIdFrom; - other.groupIdTo = self.groupIdTo; - other.sceneIdTo = self.sceneIdTo; + other.groupIdentifierFrom = self.groupIdentifierFrom; + other.sceneIdentifierFrom = self.sceneIdentifierFrom; + other.groupIdentifierTo = self.groupIdentifierTo; + other.sceneIdentifierTo = self.sceneIdentifierTo; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -1149,12 +1500,56 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = - [NSString stringWithFormat:@"<%@: mode:%@; groupIdFrom:%@; sceneIdFrom:%@; groupIdTo:%@; sceneIdTo:%@; >", - NSStringFromClass([self class]), _mode, _groupIdFrom, _sceneIdFrom, _groupIdTo, _sceneIdTo]; + NSString * descriptionString = [NSString + stringWithFormat: + @"<%@: mode:%@; groupIdentifierFrom:%@; sceneIdentifierFrom:%@; groupIdentifierTo:%@; sceneIdentifierTo:%@; >", + NSStringFromClass([self class]), _mode, _groupIdentifierFrom, _sceneIdentifierFrom, _groupIdentifierTo, _sceneIdentifierTo]; return descriptionString; } +@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 - (instancetype)init @@ -1163,9 +1558,9 @@ - (instancetype)init _status = @(0); - _groupIdFrom = @(0); + _groupIdentifierFrom = @(0); - _sceneIdFrom = @(0); + _sceneIdentifierFrom = @(0); _timedInvokeTimeoutMs = nil; } return self; @@ -1176,8 +1571,8 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRScenesClusterCopySceneResponseParams alloc] init]; other.status = self.status; - other.groupIdFrom = self.groupIdFrom; - other.sceneIdFrom = self.sceneIdFrom; + other.groupIdentifierFrom = self.groupIdentifierFrom; + other.sceneIdentifierFrom = self.sceneIdentifierFrom; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; return other; @@ -1185,11 +1580,34 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; groupIdFrom:%@; sceneIdFrom:%@; >", - NSStringFromClass([self class]), _status, _groupIdFrom, _sceneIdFrom]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: status:%@; groupIdentifierFrom:%@; sceneIdentifierFrom:%@; >", + NSStringFromClass([self class]), _status, _groupIdentifierFrom, _sceneIdentifierFrom]; return descriptionString; } +@end + +@implementation MTRScenesClusterCopySceneResponseParams (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; +} @end @implementation MTROnOffClusterOffParams - (instancetype)init diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h index ded81da62c0444..ceb991b57649cd 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -21,13 +21,17 @@ NS_ASSUME_NONNULL_BEGIN API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRScenesClusterAttributeValuePair : NSObject -@property (nonatomic, copy) NSNumber * _Nullable attributeId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nullable attributeID MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nullable attributeId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use attributeID"); @property (nonatomic, copy) NSArray * _Nonnull attributeValue API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @end API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRScenesClusterExtensionFieldSet : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull clusterId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); +@property (nonatomic, copy) NSNumber * _Nonnull clusterID MTR_NEWLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull clusterId API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + MTR_NEWLY_DEPRECATED("Please use clusterID"); @property (nonatomic, copy) NSArray * _Nonnull attributeValueList API_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @end diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm index 21c96d9e460ed1..975e505e51ec9f 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm @@ -24,7 +24,7 @@ - (instancetype)init { if (self = [super init]) { - _attributeId = nil; + _attributeID = nil; _attributeValue = [NSArray array]; } @@ -35,7 +35,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRScenesClusterAttributeValuePair alloc] init]; - other.attributeId = self.attributeId; + other.attributeID = self.attributeID; other.attributeValue = self.attributeValue; return other; @@ -43,11 +43,21 @@ - (id)copyWithZone:(NSZone * _Nullable)zone - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: attributeId:%@; attributeValue:%@; >", - NSStringFromClass([self class]), _attributeId, _attributeValue]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: attributeID:%@; attributeValue:%@; >", + NSStringFromClass([self class]), _attributeID, _attributeValue]; return descriptionString; } +- (void)setAttributeId:(NSNumber * _Nullable)attributeId +{ + self.attributeID = attributeId; +} + +- (NSNumber * _Nullable)attributeId +{ + return self.attributeID; +} + @end @implementation MTRScenesClusterExtensionFieldSet @@ -55,7 +65,7 @@ - (instancetype)init { if (self = [super init]) { - _clusterId = @(0); + _clusterID = @(0); _attributeValueList = [NSArray array]; } @@ -66,7 +76,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRScenesClusterExtensionFieldSet alloc] init]; - other.clusterId = self.clusterId; + other.clusterID = self.clusterID; other.attributeValueList = self.attributeValueList; return other; @@ -74,11 +84,21 @@ - (id)copyWithZone:(NSZone * _Nullable)zone - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: clusterId:%@; attributeValueList:%@; >", - NSStringFromClass([self class]), _clusterId, _attributeValueList]; + 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 MTRDescriptorClusterDeviceTypeStruct diff --git a/src/darwin/Framework/CHIPTests/MTRCertificateInfoTests.m b/src/darwin/Framework/CHIPTests/MTRCertificateInfoTests.m new file mode 100644 index 00000000000000..c56f931b88fba0 --- /dev/null +++ b/src/darwin/Framework/CHIPTests/MTRCertificateInfoTests.m @@ -0,0 +1,144 @@ +// +/** + * 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. + */ + +#import +#import + +@interface MTRCertificateInfoTests : XCTestCase + +@end + +@implementation MTRCertificateInfoTests + +// CHIP Certificate: +// Signature Algo : ECDSAWithSHA256 +// Issuer : [[ MatterRCACId = 0000000000000001 ]] +// Not Before : 0x27812280 ( 2021/01/01 00:00:00 ) +// Not After : 0x3A4D2580 ( 2030/12/30 00:00:00 ) +// Subject : [[ MatterRCACId = 0000000000000001 ]] +// Public Key Algo : ECPublicKey +// Curve Id : prime256v1 +// Public Key : 04 61 E7 5C FE 03 EC 90 5E F4 53 77 E5 F4 B5 1D +// E4 3D 55 F4 D4 E7 EA 7B 22 76 5E 59 CA 0A 9B DB +// 59 8F 69 DB 12 8B FB 35 BF 03 1F E9 51 ED 53 37 +// 5D 35 B0 53 22 F4 DF 7E BA EC 02 AC 52 F3 1B 9A +// D7 +// Extensions: +// Is CA : true +// Key Usage : KeyCertSign CRLSign +// Subject Key Id : F4 78 BD A6 C4 1B 24 4C 8A 3B 79 48 2B 1A 1C 7B AE 2E A6 0F +// Authority Key Id : F4 78 BD A6 C4 1B 24 4C 8A 3B 79 48 2B 1A 1C 7B AE 2E A6 0F +// Signature : 21 B8 CF A1 6D 3B 4B 71 6B 51 91 1A 46 80 D1 92 +// 1E 6D 3F 65 F2 A5 A4 27 67 7E 04 0A 50 99 96 2B +// 20 A4 11 10 7D 18 88 51 DD 30 84 52 A2 AA 40 3D +// EB 72 53 80 B0 6C 97 95 FF 38 66 38 F7 A9 65 F1 + +- (MTRCertificateTLVBytes)exampleRCACertTLV +{ + return [[NSData alloc] + initWithBase64EncodedString: + @"FTABAQEkAgE3AyQUARgmBIAigScmBYAlTTo3BiQUARgkBwEkCAEwCUEEYedc/gPskF70U3fl9" + "LUd5D1V9NTn6nsidl5Zygqb21mPadsSi/s1vwMf6VHtUzddNbBTIvTffrrsAqxS8xua1zcKNQEpARgkAmAwBBT0eL2mxBskTIo7eUgrGhx7ri6mDzAFFP" + "R4vabEGyRMijt5SCsaHHuuLqYPGDALQCG4z6FtO0txa1GRGkaA0ZIebT9l8qWkJ2d+BApQmZYrIKQREH0YiFHdMIRSoqpAPetyU4CwbJeV/zhmOPepZfE" + "Y" + options:0]; +} + +- (void)testParseRootCertificateTLV +{ + MTRCertificateInfo * info = [[MTRCertificateInfo alloc] initWithTLVBytes:self.exampleRCACertTLV]; + XCTAssertNotNil(info); + XCTAssertEqual([NSDate.now compare:info.notBefore], NSOrderedDescending); + XCTAssertEqual([NSDate.now compare:info.notAfter], NSOrderedAscending); + + MTRDistinguishedNameInfo * subject = info.subject; + XCTAssertNotNil(subject); + XCTAssertEqualObjects(subject.rootCACertificateID, @1); + XCTAssertNil(subject.fabricID); + XCTAssertNil(subject.nodeID); + XCTAssertEqualObjects(subject.tags, [NSSet set]); + + XCTAssertEqualObjects(info.issuer, subject); +} + +// CHIP Certificate: +// Signature Algo : ECDSAWithSHA256 +// Issuer : [[ MatterRCACId = 0000000000000001 ]] +// Not Before : 0x2B61DC00 ( 2023/01/24 00:00:00 ) +// Not After : 0x3E2DDEFF ( 2033/01/20 23:59:59 ) +// Subject : [[ MatterFabricId = 0000000000000001, +// MatterNodeId = 000000000001B669, +// MatterCASEAuthTag = 00010001, +// MatterCASEAuthTag = 00080001 ]] +// Public Key Algo : ECPublicKey +// Curve Id : prime256v1 +// Public Key : 04 FD 7F 7A 19 37 E0 6D A4 C2 C9 95 C5 5F 01 10 +// D2 B0 FC 93 50 4C 4A 2A D5 65 90 8B 42 7C AF 60 +// 4A 1C 24 F9 C1 75 61 4C 45 DC 87 34 0F B4 1C 24 +// D2 40 11 3F 82 6D 8B 2A 24 0E E4 A5 9B 30 C6 A9 +// 51 +// Extensions: +// Is CA : false +// Key Usage : DigitalSignature +// Key Purpose : ServerAuth ClientAuth +// Subject Key Id : 03 FC 90 70 10 72 B7 55 09 30 59 B1 B9 4F 1C AE 44 3F DD 1C +// Authority Key Id : 16 49 0D 1A 14 45 78 D1 B8 38 F2 8D 81 0E 3F 5E 66 83 2F DD +// Signature : 77 2B 56 33 8B 86 AC AC 39 45 C4 0D 70 05 09 CD +// 46 E2 B7 17 A2 62 94 04 88 50 92 1C 65 53 5A 34 +// 01 98 EB 07 07 5E DC BF A1 BE 15 08 95 2B 7A 07 +// 03 21 59 7C E4 DD 0E F7 05 14 A5 78 B1 98 91 73 + +- (MTRCertificateTLVBytes)exampleNOCertTLV +{ + return [[NSData alloc] + initWithBase64EncodedString: + @"FTABCAvuIv83A5WWJAIBNwMkFAEYJgQA3GErJgX/3i0+NwYkFQEmEWm2AQAmFgEAAQAmFgEAC" + "AAYJAcBJAgBMAlBBP1/ehk34G2kwsmVxV8BENKw/JNQTEoq1WWQi0J8r2BKHCT5wXVhTEXchzQPtBwk0kARP4JtiyokDuSlmzDGqVE3CjUBKAEYJAIBNg" + "MEAgQBGDAEFAP8kHAQcrdVCTBZsblPHK5EP90cMAUUFkkNGhRFeNG4OPKNgQ4/XmaDL90YMAtAdytWM4uGrKw5RcQNcAUJzUbitxeiYpQEiFCSHGVTWjQ" + "BmOsHB17cv6G+FQiVK3oHAyFZfOTdDvcFFKV4sZiRcxg=" + options:0]; +} + +- (void)testParseOperationalCertificateTLV +{ + MTRCertificateInfo * info = [[MTRCertificateInfo alloc] initWithTLVBytes:self.exampleNOCertTLV]; + XCTAssertNotNil(info); + XCTAssertEqual([NSDate.now compare:info.notBefore], NSOrderedDescending); + XCTAssertEqual([NSDate.now compare:info.notAfter], NSOrderedAscending); + + MTRDistinguishedNameInfo * subject = info.subject; + XCTAssertNotNil(subject); + XCTAssertEqualObjects(subject.fabricID, @0x0000000000000001); + XCTAssertEqualObjects(subject.nodeID, @0x000000000001B669); + XCTAssertEqualObjects(subject.tags, ([NSSet setWithObjects:@0x00010001, @0x00080001, nil])); + XCTAssertNil(subject.rootCACertificateID); + + XCTAssertNotEqualObjects(info.issuer, subject); +} + +- (void)testCertificateInfoEquality +{ + MTRCertificateInfo * infoA1 = [[MTRCertificateInfo alloc] initWithTLVBytes:self.exampleRCACertTLV]; + MTRCertificateInfo * infoA2 = [[MTRCertificateInfo alloc] initWithTLVBytes:self.exampleRCACertTLV]; + MTRCertificateInfo * infoB = [[MTRCertificateInfo alloc] initWithTLVBytes:self.exampleNOCertTLV]; + XCTAssertNotIdentical(infoA1, infoA2); + XCTAssertEqualObjects(infoA1, infoA2); + XCTAssertEqualObjects(infoA1, infoA1); + XCTAssertNotEqualObjects(infoA1, infoB); +} + +@end diff --git a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj index 2637440c2273a4..31e40593414da7 100644 --- a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj +++ b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj @@ -44,10 +44,13 @@ 3D843716294979230070D20A /* MTRCallbackBridge.h in Headers */ = {isa = PBXBuildFile; fileRef = 3D843714294979230070D20A /* MTRCallbackBridge.h */; }; 3D843717294979230070D20A /* MTRClusters_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 3D843715294979230070D20A /* MTRClusters_Internal.h */; }; 3D84374B29498BAE0070D20A /* privilege-storage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3D84374A29498BAE0070D20A /* privilege-storage.cpp */; }; + 3D843756294AD25A0070D20A /* MTRCertificateInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 3D843754294AD25A0070D20A /* MTRCertificateInfo.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 3D843757294AD25A0070D20A /* MTRCertificateInfo.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3D843755294AD25A0070D20A /* MTRCertificateInfo.mm */; }; 3DECCB6E29347D2D00585AEC /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3DECCB6D29347D2C00585AEC /* Security.framework */; }; 3DECCB702934AECD00585AEC /* MTRLogging.h in Headers */ = {isa = PBXBuildFile; fileRef = 3DECCB6F2934AC1C00585AEC /* MTRLogging.h */; settings = {ATTRIBUTES = (Public, ); }; }; 3DECCB722934AFE200585AEC /* MTRLogging.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3DECCB712934AFE200585AEC /* MTRLogging.mm */; }; 3DECCB742934C21B00585AEC /* MTRDefines.h in Headers */ = {isa = PBXBuildFile; fileRef = 3DECCB732934C21B00585AEC /* MTRDefines.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 3DFCB3292966684500332B35 /* MTRCertificateInfoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 3DFCB3282966684500332B35 /* MTRCertificateInfoTests.m */; }; 3DFCB32C29678C9500332B35 /* MTRConversion.h in Headers */ = {isa = PBXBuildFile; fileRef = 3DFCB32B29678C9500332B35 /* MTRConversion.h */; }; 51029DF6293AA6100087AFB0 /* MTROperationalCertificateIssuer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51029DF5293AA6100087AFB0 /* MTROperationalCertificateIssuer.mm */; }; 510CECA8297F72970064E0B3 /* MTROperationalCertificateIssuerTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 510CECA6297F72470064E0B3 /* MTROperationalCertificateIssuerTests.m */; }; @@ -234,10 +237,14 @@ 3D84372E294984AF0070D20A /* MTRCallbackBridge.zapt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = MTRCallbackBridge.zapt; sourceTree = ""; }; 3D84372F294984AF0070D20A /* command_completion_type.zapt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = command_completion_type.zapt; sourceTree = ""; }; 3D84374A29498BAE0070D20A /* privilege-storage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "privilege-storage.cpp"; path = "util/privilege-storage.cpp"; sourceTree = ""; }; + 3D843754294AD25A0070D20A /* MTRCertificateInfo.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRCertificateInfo.h; sourceTree = ""; }; + 3D843755294AD25A0070D20A /* MTRCertificateInfo.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRCertificateInfo.mm; sourceTree = ""; }; 3DECCB6D29347D2C00585AEC /* Security.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Security.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk/System/Library/Frameworks/Security.framework; sourceTree = DEVELOPER_DIR; }; 3DECCB6F2934AC1C00585AEC /* MTRLogging.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRLogging.h; sourceTree = ""; }; 3DECCB712934AFE200585AEC /* MTRLogging.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRLogging.mm; sourceTree = ""; }; 3DECCB732934C21B00585AEC /* MTRDefines.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRDefines.h; sourceTree = ""; }; + 3DFCB3282966684500332B35 /* MTRCertificateInfoTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MTRCertificateInfoTests.m; sourceTree = ""; }; + 3DFCB32A2966827F00332B35 /* MTRDefines_Internal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRDefines_Internal.h; sourceTree = ""; }; 3DFCB32B29678C9500332B35 /* MTRConversion.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRConversion.h; sourceTree = ""; }; 51029DF5293AA6100087AFB0 /* MTROperationalCertificateIssuer.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTROperationalCertificateIssuer.mm; sourceTree = ""; }; 510CECA6297F72470064E0B3 /* MTROperationalCertificateIssuerTests.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MTROperationalCertificateIssuerTests.m; sourceTree = ""; }; @@ -498,6 +505,8 @@ 511913FA28C100EF009235E9 /* MTRBaseSubscriptionCallback.h */, 511913F928C100EF009235E9 /* MTRBaseSubscriptionCallback.mm */, 3D84370F294977000070D20A /* MTRCallbackBridgeBase.h */, + 3D843754294AD25A0070D20A /* MTRCertificateInfo.h */, + 3D843755294AD25A0070D20A /* MTRCertificateInfo.mm */, 517BF3EE282B62B800A8B7DB /* MTRCertificates.h */, 517BF3EF282B62B800A8B7DB /* MTRCertificates.mm */, 1ED276E326C5832500547A89 /* MTRCluster.h */, @@ -515,6 +524,7 @@ 3CF134A6289D8AD90017A19E /* MTRCSRInfo.h */, 3CF134A8289D8D800017A19E /* MTRCSRInfo.mm */, 3DECCB732934C21B00585AEC /* MTRDefines.h */, + 3DFCB32A2966827F00332B35 /* MTRDefines_Internal.h */, 7596A84A287636C1004DAE0E /* MTRDevice_Internal.h */, 7596A84228762729004DAE0E /* MTRDevice.h */, 7596A84328762729004DAE0E /* MTRDevice.mm */, @@ -600,6 +610,7 @@ 51E24E72274E0DAC007CCF6E /* MTRErrorTestUtils.mm */, 51C8E3F72825CDB600D47D00 /* MTRTestKeys.m */, 51D10D2D2808E2CA00E8CA3D /* MTRTestStorage.m */, + 3DFCB3282966684500332B35 /* MTRCertificateInfoTests.m */, 99C65E0F267282F1003402F6 /* MTRControllerTests.m */, 5AE6D4E327A99041001F2493 /* MTRDeviceTests.m */, 5A6FEC9C27B5E48800F25F42 /* MTRXPCProtocolTests.m */, @@ -667,6 +678,7 @@ 7596A84428762729004DAE0E /* MTRDevice.h in Headers */, B2E0D7B8245B0B5C003C5B48 /* MTRSetupPayload.h in Headers */, 7596A84D287782EF004DAE0E /* MTRAsyncCallbackWorkQueue_Internal.h in Headers */, + 3D843756294AD25A0070D20A /* MTRCertificateInfo.h in Headers */, 7596A83E28751220004DAE0E /* MTRBaseClusters_Internal.h in Headers */, 997DED182695344800975E97 /* MTRThreadOperationalDataset.h in Headers */, 9956064426420367000C28DE /* MTRSetupPayload_Internal.h in Headers */, @@ -862,6 +874,7 @@ 5ACDDD7D27CD16D200EFD68A /* MTRClusterStateCacheContainer.mm in Sources */, 513DDB8A2761F6F900DAA01A /* MTRAttributeTLVValueDecoder.mm in Sources */, 2FD775552695557E00FF4B12 /* error-mapping.cpp in Sources */, + 3D843757294AD25A0070D20A /* MTRCertificateInfo.mm in Sources */, 5A7947E427C0129600434CF2 /* MTRDeviceController+XPC.mm in Sources */, 5A6FEC9027B563D900F25F42 /* MTRDeviceControllerOverXPC.mm in Sources */, B289D4222639C0D300D4E314 /* MTROnboardingPayloadParser.mm in Sources */, @@ -897,6 +910,7 @@ 510CECA8297F72970064E0B3 /* MTROperationalCertificateIssuerTests.m in Sources */, 5A7947DE27BEC3F500434CF2 /* MTRXPCListenerSampleTests.m in Sources */, B2F53AF2245B0DCF0010745E /* MTRSetupPayloadParserTests.m in Sources */, + 3DFCB3292966684500332B35 /* MTRCertificateInfoTests.m in Sources */, 517BF3F3282B62CB00A8B7DB /* MTRCertificateTests.m in Sources */, 51E24E73274E0DAC007CCF6E /* MTRErrorTestUtils.mm in Sources */, ); diff --git a/src/lib/support/TestGroupData.h b/src/lib/support/TestGroupData.h index 13c49ee9c62678..4cadb3affa3a50 100644 --- a/src/lib/support/TestGroupData.h +++ b/src/lib/support/TestGroupData.h @@ -44,8 +44,10 @@ inline CHIP_ERROR InitData(chip::Credentials::GroupDataProvider * provider, chip { static const chip::GroupId kGroup1 = 0x0101; static const chip::GroupId kGroup2 = 0x0102; + static const chip::GroupId kGroup3 = 0x0103; static const chip::KeysetId kKeySet1 = 0x01a1; static const chip::KeysetId kKeySet2 = 0x01a2; + static const chip::KeysetId kKeySet3 = 0x01a3; // Groups @@ -57,6 +59,10 @@ inline CHIP_ERROR InitData(chip::Credentials::GroupDataProvider * provider, chip ReturnErrorOnFailure(provider->SetGroupInfo(fabric_index, group2)); ReturnErrorOnFailure(provider->AddEndpoint(fabric_index, group2.group_id, 0)); + const chip::Credentials::GroupDataProvider::GroupInfo group3(kGroup3, "Group #3"); + ReturnErrorOnFailure(provider->SetGroupInfo(fabric_index, group3)); + ReturnErrorOnFailure(provider->AddEndpoint(fabric_index, group3.group_id, 0)); + // Key Sets chip::Credentials::GroupDataProvider::KeySet keyset1(kKeySet1, @@ -81,8 +87,20 @@ inline CHIP_ERROR InitData(chip::Credentials::GroupDataProvider * provider, chip err = provider->SetKeySet(fabric_index, compressed_fabric_id, keyset2); ReturnErrorOnFailure(err); + chip::Credentials::GroupDataProvider::KeySet keyset3(kKeySet3, + chip::Credentials::GroupDataProvider::SecurityPolicy::kTrustFirst, 3); + const chip::Credentials::GroupDataProvider::EpochKey epoch_keys3[] = { + { 2220000, { 0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf } }, + { 2220001, { 0xd1, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf } }, + { 2220002, { 0xd2, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf } }, + }; + memcpy(keyset3.epoch_keys, epoch_keys3, sizeof(epoch_keys3)); + err = provider->SetKeySet(fabric_index, compressed_fabric_id, keyset3); + ReturnErrorOnFailure(err); + provider->SetGroupKeyAt(fabric_index, 0, chip::Credentials::GroupDataProvider::GroupKey(kGroup1, kKeySet1)); provider->SetGroupKeyAt(fabric_index, 1, chip::Credentials::GroupDataProvider::GroupKey(kGroup2, kKeySet2)); + provider->SetGroupKeyAt(fabric_index, 2, chip::Credentials::GroupDataProvider::GroupKey(kGroup3, kKeySet3)); return CHIP_NO_ERROR; } diff --git a/src/messaging/tests/TestReliableMessageProtocol.cpp b/src/messaging/tests/TestReliableMessageProtocol.cpp index eb8661550376df..d6fe53c17d572f 100644 --- a/src/messaging/tests/TestReliableMessageProtocol.cpp +++ b/src/messaging/tests/TestReliableMessageProtocol.cpp @@ -366,7 +366,7 @@ void CheckResendApplicationMessage(nlTestSuite * inSuite, void * inContext) ctx.GetIOContext().DriveIOUntil(1000_ms32, [&] { return loopback.mSentMessageCount >= 2; }); now = System::SystemClock().GetMonotonicTimestamp(); timeoutTime = now - startTime; - ChipLogProgress(Test, "Attempt #1 Timeout : %d ms", timeoutTime.count()); + ChipLogProgress(Test, "Attempt #1 Timeout : %" PRIu32 "ms", timeoutTime.count()); expectedBackoff = &theBackoffComplianceTestVector[0]; NL_TEST_ASSERT(inSuite, timeoutTime >= expectedBackoff->backoffMin - margin); @@ -383,7 +383,7 @@ void CheckResendApplicationMessage(nlTestSuite * inSuite, void * inContext) ctx.GetIOContext().DriveIOUntil(1000_ms32, [&] { return loopback.mSentMessageCount >= 3; }); now = System::SystemClock().GetMonotonicTimestamp(); timeoutTime = now - startTime; - ChipLogProgress(Test, "Attempt #2 Timeout : %d ms", timeoutTime.count()); + ChipLogProgress(Test, "Attempt #2 Timeout : %" PRIu32 "ms", timeoutTime.count()); expectedBackoff = &theBackoffComplianceTestVector[1]; NL_TEST_ASSERT(inSuite, timeoutTime >= expectedBackoff->backoffMin - margin); @@ -400,7 +400,7 @@ void CheckResendApplicationMessage(nlTestSuite * inSuite, void * inContext) ctx.GetIOContext().DriveIOUntil(1000_ms32, [&] { return loopback.mSentMessageCount >= 4; }); now = System::SystemClock().GetMonotonicTimestamp(); timeoutTime = now - startTime; - ChipLogProgress(Test, "Attempt #3 Timeout : %d ms", timeoutTime.count()); + ChipLogProgress(Test, "Attempt #3 Timeout : %" PRIu32 "ms", timeoutTime.count()); expectedBackoff = &theBackoffComplianceTestVector[2]; NL_TEST_ASSERT(inSuite, timeoutTime >= expectedBackoff->backoffMin - margin); @@ -417,7 +417,7 @@ void CheckResendApplicationMessage(nlTestSuite * inSuite, void * inContext) ctx.GetIOContext().DriveIOUntil(1500_ms32, [&] { return loopback.mSentMessageCount >= 5; }); now = System::SystemClock().GetMonotonicTimestamp(); timeoutTime = now - startTime; - ChipLogProgress(Test, "Attempt #4 Timeout : %d ms", timeoutTime.count()); + ChipLogProgress(Test, "Attempt #4 Timeout : %" PRIu32 "ms", timeoutTime.count()); expectedBackoff = &theBackoffComplianceTestVector[3]; NL_TEST_ASSERT(inSuite, timeoutTime >= expectedBackoff->backoffMin - margin); diff --git a/src/platform/Ameba/AmebaUtils.cpp b/src/platform/Ameba/AmebaUtils.cpp index b5f3b95f13454b..4ec66872133429 100644 --- a/src/platform/Ameba/AmebaUtils.cpp +++ b/src/platform/Ameba/AmebaUtils.cpp @@ -42,7 +42,7 @@ CHIP_ERROR AmebaUtils::StartWiFi(void) { CHIP_ERROR err = CHIP_NO_ERROR; // Ensure that the WiFi layer is started. - wifi_on(RTW_MODE_STA); + matter_wifi_on(RTW_MODE_STA); return err; } @@ -61,7 +61,7 @@ bool AmebaUtils::IsStationProvisioned(void) CHIP_ERROR AmebaUtils::IsStationConnected(bool & connected) { CHIP_ERROR err = CHIP_NO_ERROR; - connected = (wifi_is_connected_to_ap() == RTW_SUCCESS) ? 1 : 0; + connected = (matter_wifi_is_connected_to_ap() == RTW_SUCCESS) ? 1 : 0; return err; } @@ -69,7 +69,7 @@ CHIP_ERROR AmebaUtils::EnableStationMode(void) { CHIP_ERROR err = CHIP_NO_ERROR; // Ensure that station mode is enabled in the WiFi layer. - wifi_set_mode(RTW_MODE_STA); + matter_wifi_set_mode(RTW_MODE_STA); return err; } @@ -121,8 +121,8 @@ CHIP_ERROR AmebaUtils::ClearWiFiConfig() CHIP_ERROR AmebaUtils::WiFiDisconnect(void) { CHIP_ERROR err = CHIP_NO_ERROR; - ChipLogProgress(DeviceLayer, "wifi_disconnect"); - err = (wifi_disconnect() == RTW_SUCCESS) ? CHIP_NO_ERROR : CHIP_ERROR_INTERNAL; + ChipLogProgress(DeviceLayer, "matter_wifi_disconnect"); + err = (matter_wifi_disconnect() == RTW_SUCCESS) ? CHIP_NO_ERROR : CHIP_ERROR_INTERNAL; return err; } @@ -133,8 +133,8 @@ CHIP_ERROR AmebaUtils::WiFiConnect(void) memset(config, 0, sizeof(rtw_wifi_config_t)); GetWiFiConfig(config); ChipLogProgress(DeviceLayer, "Connecting to AP : [%s]", (char *) config->ssid); - int ameba_err = wifi_connect((char *) config->ssid, RTW_SECURITY_WPA_WPA2_MIXED, (char *) config->password, - strlen((const char *) config->ssid), strlen((const char *) config->password), 0, NULL); + int ameba_err = matter_wifi_connect((char *) config->ssid, RTW_SECURITY_WPA_WPA2_MIXED, (char *) config->password, + strlen((const char *) config->ssid), strlen((const char *) config->password), 0, NULL); vPortFree(config); err = (ameba_err == RTW_SUCCESS) ? CHIP_NO_ERROR : CHIP_ERROR_INTERNAL; diff --git a/src/platform/Ameba/ConnectivityManagerImpl.cpp b/src/platform/Ameba/ConnectivityManagerImpl.cpp index 040471e7745f2a..789bb5f6711ef8 100644 --- a/src/platform/Ameba/ConnectivityManagerImpl.cpp +++ b/src/platform/Ameba/ConnectivityManagerImpl.cpp @@ -152,7 +152,10 @@ void ConnectivityManagerImpl::_OnPlatformEvent(const ChipDeviceEvent * event) { ChangeWiFiStationState(kWiFiStationState_Connecting_Succeeded); } - DHCPProcess(); + if (rtw_join_status & JOIN_HANDSHAKE_DONE) + { + DHCPProcess(); + } DriveStationState(); } if (event->Type == DeviceEventType::kRtkWiFiStationDisconnectedEvent) @@ -849,13 +852,13 @@ void ConnectivityManagerImpl::RtkWiFiScanCompletedHandler(void) void ConnectivityManagerImpl::DHCPProcessThread(void * param) { - LwIP_DHCP(0, DHCP_START); + matter_lwip_dhcp(0, DHCP_START); PlatformMgr().LockChipStack(); sInstance.OnStationIPv4AddressAvailable(); PlatformMgr().UnlockChipStack(); #if LWIP_VERSION_MAJOR > 2 || LWIP_VERSION_MINOR > 0 #if LWIP_IPV6 - LwIP_DHCP6(0, DHCP6_START); + matter_lwip_dhcp(0, DHCP6_START); PlatformMgr().LockChipStack(); sInstance.OnIPv6AddressAvailable(); PlatformMgr().UnlockChipStack(); diff --git a/src/platform/ESP32/ConfigurationManagerImpl.cpp b/src/platform/ESP32/ConfigurationManagerImpl.cpp index 88005bda31a6d4..20dc895b36d047 100644 --- a/src/platform/ESP32/ConfigurationManagerImpl.cpp +++ b/src/platform/ESP32/ConfigurationManagerImpl.cpp @@ -71,19 +71,22 @@ CHIP_ERROR ConfigurationManagerImpl::Init() { ChipLogError(DeviceLayer, "CONFIG_NVS_ENCRYPTION is enabled, but no partition with subtype nvs_keys found in the partition table."); - SuccessOrExit(MapConfigError(esp_err)); + err = MapConfigError(esp_err); + SuccessOrExit(err); } esp_err = nvs_flash_read_security_cfg(key_part, &cfg); if (esp_err == ESP_ERR_NVS_KEYS_NOT_INITIALIZED) { ChipLogError(DeviceLayer, "NVS key partition empty"); - SuccessOrExit(MapConfigError(esp_err)); + err = MapConfigError(esp_err); + SuccessOrExit(err); } else if (esp_err != ESP_OK) { ChipLogError(DeviceLayer, "Failed to read NVS security cfg, err:0x%02x", esp_err); - SuccessOrExit(MapConfigError(esp_err)); + err = MapConfigError(esp_err); + SuccessOrExit(err); } // Securely initialize the nvs partitions, @@ -93,7 +96,8 @@ CHIP_ERROR ConfigurationManagerImpl::Init() { ChipLogError(DeviceLayer, "Failed to initialize NVS partition %s err:0x%02x", CHIP_DEVICE_CONFIG_CHIP_FACTORY_NAMESPACE_PARTITION, esp_err); - SuccessOrExit(MapConfigError(esp_err)); + err = MapConfigError(esp_err); + SuccessOrExit(err); } esp_err = nvs_flash_secure_init_partition(CHIP_DEVICE_CONFIG_CHIP_CONFIG_NAMESPACE_PARTITION, &cfg); @@ -101,7 +105,8 @@ CHIP_ERROR ConfigurationManagerImpl::Init() { ChipLogError(DeviceLayer, "Failed to initialize NVS partition %s err:0x%02x", CHIP_DEVICE_CONFIG_CHIP_CONFIG_NAMESPACE_PARTITION, esp_err); - SuccessOrExit(MapConfigError(esp_err)); + err = MapConfigError(esp_err); + SuccessOrExit(err); } esp_err = nvs_flash_secure_init_partition(CHIP_DEVICE_CONFIG_CHIP_COUNTERS_NAMESPACE_PARTITION, &cfg); @@ -109,19 +114,23 @@ CHIP_ERROR ConfigurationManagerImpl::Init() { ChipLogError(DeviceLayer, "Failed to initialize NVS partition %s err:0x%02x", CHIP_DEVICE_CONFIG_CHIP_COUNTERS_NAMESPACE_PARTITION, esp_err); - SuccessOrExit(MapConfigError(esp_err)); + err = MapConfigError(esp_err); + SuccessOrExit(err); } #else // Initialize the nvs partitions, // nvs_flash_init_partition() will initialize the partition only if it is not already initialized. - esp_err_t esp_err = nvs_flash_init_partition(CHIP_DEVICE_CONFIG_CHIP_FACTORY_NAMESPACE_PARTITION); - SuccessOrExit(MapConfigError(esp_err)); - esp_err = nvs_flash_init_partition(CHIP_DEVICE_CONFIG_CHIP_CONFIG_NAMESPACE_PARTITION); - SuccessOrExit(MapConfigError(esp_err)); - esp_err = nvs_flash_init_partition(CHIP_DEVICE_CONFIG_CHIP_COUNTERS_NAMESPACE_PARTITION); - SuccessOrExit(MapConfigError(esp_err)); - esp_err = nvs_flash_init_partition(CHIP_DEVICE_CONFIG_CHIP_KVS_NAMESPACE_PARTITION); - SuccessOrExit(MapConfigError(esp_err)); + err = MapConfigError(nvs_flash_init_partition(CHIP_DEVICE_CONFIG_CHIP_FACTORY_NAMESPACE_PARTITION)); + SuccessOrExit(err); + + err = MapConfigError(nvs_flash_init_partition(CHIP_DEVICE_CONFIG_CHIP_CONFIG_NAMESPACE_PARTITION)); + SuccessOrExit(err); + + err = MapConfigError(nvs_flash_init_partition(CHIP_DEVICE_CONFIG_CHIP_COUNTERS_NAMESPACE_PARTITION)); + SuccessOrExit(err); + + err = MapConfigError(nvs_flash_init_partition(CHIP_DEVICE_CONFIG_CHIP_KVS_NAMESPACE_PARTITION)); + SuccessOrExit(err); #endif // Force initialization of NVS namespaces if they doesn't already exist. @@ -188,7 +197,14 @@ CHIP_ERROR ConfigurationManagerImpl::StoreTotalOperationalHours(uint32_t totalOp CHIP_ERROR ConfigurationManagerImpl::GetSoftwareVersionString(char * buf, size_t bufSize) { memset(buf, 0, bufSize); - const esp_app_desc_t * appDescription = esp_ota_get_app_description(); + const esp_app_desc_t * appDescription = NULL; + +#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(5, 0, 0) + appDescription = esp_app_get_description(); +#else + appDescription = esp_ota_get_app_description(); +#endif + ReturnErrorCodeIf(bufSize < sizeof(appDescription->version), CHIP_ERROR_BUFFER_TOO_SMALL); ReturnErrorCodeIf(sizeof(appDescription->version) > ConfigurationManager::kMaxSoftwareVersionStringLength, CHIP_ERROR_INTERNAL); strcpy(buf, appDescription->version); @@ -215,7 +231,7 @@ CHIP_ERROR ConfigurationManagerImpl::GetLocationCapability(uint8_t & location) return err; #else - location = static_cast(chip::app::Clusters::GeneralCommissioning::RegulatoryLocationType::kIndoor); + location = static_cast(chip::app::Clusters::GeneralCommissioning::RegulatoryLocationType::kIndoor); return CHIP_NO_ERROR; #endif } diff --git a/src/platform/ESP32/ESP32Config.cpp b/src/platform/ESP32/ESP32Config.cpp index d47af60778e155..a536d46ef722c3 100644 --- a/src/platform/ESP32/ESP32Config.cpp +++ b/src/platform/ESP32/ESP32Config.cpp @@ -339,7 +339,7 @@ CHIP_ERROR ESP32Config::WriteConfigValueBin(Key key, const uint8_t * data, size_ // Commit the value to the persistent store. ReturnMappedErrorOnFailure(nvs_commit(handle)); - ChipLogProgress(DeviceLayer, "NVS set: %s/%s = (blob length %" PRId32 ")", StringOrNullMarker(key.Namespace), + ChipLogProgress(DeviceLayer, "NVS set: %s/%s = (blob length %u)", StringOrNullMarker(key.Namespace), StringOrNullMarker(key.Name), dataLen); return CHIP_NO_ERROR; } diff --git a/src/platform/ESP32/OTAImageProcessorImpl.cpp b/src/platform/ESP32/OTAImageProcessorImpl.cpp index ccf8c0498663bd..a1bd313e75f378 100644 --- a/src/platform/ESP32/OTAImageProcessorImpl.cpp +++ b/src/platform/ESP32/OTAImageProcessorImpl.cpp @@ -173,7 +173,7 @@ void OTAImageProcessorImpl::HandleFinalize(intptr_t context) return; } imageProcessor->ReleaseBlock(); - ChipLogProgress(SoftwareUpdate, "OTA image downloaded to offset 0x%x", imageProcessor->mOTAUpdatePartition->address); + ChipLogProgress(SoftwareUpdate, "OTA image downloaded to offset 0x%" PRIx32, imageProcessor->mOTAUpdatePartition->address); PostOTAStateChangeEvent(DeviceLayer::kOtaDownloadComplete); } @@ -241,7 +241,7 @@ void OTAImageProcessorImpl::HandleApply(intptr_t context) PostOTAStateChangeEvent(DeviceLayer::kOtaApplyFailed); return; } - ESP_LOGI(TAG, "Applying, Boot partition set offset:0x%x", imageProcessor->mOTAUpdatePartition->address); + ESP_LOGI(TAG, "Applying, Boot partition set offset:0x%" PRIx32, imageProcessor->mOTAUpdatePartition->address); PostOTAStateChangeEvent(DeviceLayer::kOtaApplyComplete); diff --git a/src/platform/ESP32/SystemTimeSupport.cpp b/src/platform/ESP32/SystemTimeSupport.cpp index 33bec43435bc35..2dc288145ce497 100644 --- a/src/platform/ESP32/SystemTimeSupport.cpp +++ b/src/platform/ESP32/SystemTimeSupport.cpp @@ -95,8 +95,9 @@ CHIP_ERROR ClockImpl::SetClock_RealTime(Microseconds64 aNewCurTime) const time_t timep = tv.tv_sec; struct tm calendar; localtime_r(&timep, &calendar); - ChipLogProgress(DeviceLayer, "Real time clock set to %ld (%04d/%02d/%02d %02d:%02d:%02d UTC)", tv.tv_sec, calendar.tm_year, - calendar.tm_mon, calendar.tm_mday, calendar.tm_hour, calendar.tm_min, calendar.tm_sec); + ChipLogProgress(DeviceLayer, "Real time clock set to %lld (%04d/%02d/%02d %02d:%02d:%02d UTC)", + static_cast(tv.tv_sec), calendar.tm_year, calendar.tm_mon, calendar.tm_mday, calendar.tm_hour, + calendar.tm_min, calendar.tm_sec); } #endif // CHIP_PROGRESS_LOGGING return CHIP_NO_ERROR; diff --git a/src/platform/ESP32/route_hook/ESP32RouteHook.c b/src/platform/ESP32/route_hook/ESP32RouteHook.c index b6acadeda48eac..01f58bfdb3db7b 100644 --- a/src/platform/ESP32/route_hook/ESP32RouteHook.c +++ b/src/platform/ESP32/route_hook/ESP32RouteHook.c @@ -105,10 +105,10 @@ static void ra_recv_handler(struct netif * netif, const uint8_t * icmp_payload, route.prefix = prefix; route.preference = preference; route.lifetime_seconds = lwip_ntohl(rio_header.route_lifetime); - ESP_LOGI(TAG, "prefix %s lifetime %u\n", ip6addr_ntoa(&prefix), route.lifetime_seconds); + ESP_LOGI(TAG, "prefix %s lifetime %" PRIu32, ip6addr_ntoa(&prefix), route.lifetime_seconds); if (esp_route_table_add_route_entry(&route) == NULL) { - ESP_LOGI(TAG, "Failed to add route table entry\n"); + ESP_LOGI(TAG, "Failed to add route table entry"); } } } diff --git a/src/platform/silabs/EFR32/ThreadStackManagerImpl.cpp b/src/platform/silabs/EFR32/ThreadStackManagerImpl.cpp index 16d792276644e4..1e757361962911 100644 --- a/src/platform/silabs/EFR32/ThreadStackManagerImpl.cpp +++ b/src/platform/silabs/EFR32/ThreadStackManagerImpl.cpp @@ -99,11 +99,13 @@ extern "C" void otPlatFree(void * aPtr) { CHIPPlatformMemoryFree(aPtr); } - +#ifndef SL_COMPONENT_CATALOG_PRESENT extern "C" __WEAK void sl_openthread_init(void) { +#error "This shouldn't compile" // Place holder for enabling Silabs specific features available only through Simplicity Studio } +#endif /** * @brief Openthread UART implementation for the CLI is conflicting diff --git a/src/platform/silabs/Logging.cpp b/src/platform/silabs/Logging.cpp index fbc9f2a25762c7..c6b0013f566a73 100644 --- a/src/platform/silabs/Logging.cpp +++ b/src/platform/silabs/Logging.cpp @@ -19,6 +19,12 @@ #include #include +#include "rail_types.h" + +#ifdef RAIL_ASSERT_DEBUG_STRING +#include "rail_assert_error_codes.h" +#endif + #ifdef BRD4325A // For SiWx917 Platform only #include "core_cm4.h" #endif @@ -507,4 +513,25 @@ extern "C" void vApplicationGetTimerTaskMemory(StaticTask_t ** ppxTimerTaskTCBBu configMINIMAL_STACK_SIZE is specified in words, not bytes. */ *pulTimerTaskStackSize = configTIMER_TASK_STACK_DEPTH; } + +extern "C" void RAILCb_AssertFailed(RAIL_Handle_t railHandle, uint32_t errorCode) +{ +#ifdef RAIL_ASSERT_DEBUG_STRING + static const char * railErrorMessages[] = RAIL_ASSERT_ERROR_MESSAGES; + const char * errorMessage = "Unknown"; + + If this error code is within the range of known error messages then use the appropriate error + message.if (errorCode < (sizeof(railErrorMessages) / sizeof(char *))) + { + errorMessage = railErrorMessages[errorCode]; + } + SILABS_LOG("RAIL Assert : %s", errorMessage); +#else + SILABS_LOG("RAIL Assert : %ld", errorCode); +#endif + + while (1) + ; +} + #endif // HARD_FAULT_LOG_ENABLE && SILABS_LOG_ENABLED diff --git a/third_party/libwebsockets/lws_config.h b/third_party/libwebsockets/lws_config.h index cbf0383352b2b0..4cb03e73fdab39 100644 --- a/third_party/libwebsockets/lws_config.h +++ b/third_party/libwebsockets/lws_config.h @@ -50,6 +50,7 @@ // // Implied Options // +#define LWS_HAS_INTPTR_T #define LWS_WITH_POLL #define LWS_MAX_SMP 1 diff --git a/third_party/silabs/efr32_sdk.gni b/third_party/silabs/efr32_sdk.gni index 1583b7eee1e248..76a2377835e66d 100644 --- a/third_party/silabs/efr32_sdk.gni +++ b/third_party/silabs/efr32_sdk.gni @@ -39,23 +39,33 @@ declare_args() { # Enable Segger System View use_system_view = false + # Enable Buttons by default + use_wstk_buttons = true + + # Enable LEDs by default + use_wstk_leds = true + sleep_time_ms = 3300000 # 55 mins sleep } # Explorer Kit and MGM240L do not have external flash -if (silabs_board == "BRD2703A" || silabs_board == "BRD4319A") { +if (silabs_board == "BRD2703A" || silabs_board == "BRD4318A" || + silabs_board == "BRD4319A") { use_external_flash = false } -# Enable LEDs by default -use_wstk_leds = true - # Board does not support LEDs and Buttons at the same time if (silabs_board == "BRD4317A" || silabs_board == "BRD4316A" || - silabs_board == "BRD4319A") { + silabs_board == "BRD4319A" || silabs_board == "BRD4318A") { use_wstk_leds = false } +# Board does not support buttons +if (silabs_board == "BRD2704A") { + use_wstk_buttons = false + use_external_flash = false +} + assert(efr32_sdk_root != "", "efr32_sdk_root must be specified") # Defines an efr32 SDK build target. @@ -195,7 +205,7 @@ template("efr32_sdk") { "MBEDTLS_THREADING_C=1", "MBEDTLS_THREADING_ALT=1", "SL_THREADING_ALT=1", - "SL_COMPONENT_CATALOG_PRESENT", + "SL_COMPONENT_CATALOG_PRESENT=1", "PLATFORM_HEADER=\"platform-header.h\"", "USE_NVM3=1", @@ -213,6 +223,15 @@ template("efr32_sdk") { defines += [ "SL_SYSTEM_VIEW=1" ] } + if (silabs_board == "BRD2704A" || silabs_board == "BRD4318A") { + _include_dirs += [ + "${efr32_sdk_root}/platform/radio/rail_lib/plugin/fem_util/", + "${efr32_sdk_root}/platform/radio/rail_lib/plugin/rail_util_rssi/", + "${efr32_sdk_root}/platform/driver/debug/inc/", + "${efr32_sdk_root}/hardware/driver/configuration_over_swo/inc/", + ] + } + defines += board_defines if (use_wstk_leds) { @@ -221,6 +240,10 @@ template("efr32_sdk") { defines += [ "ENABLE_WSTK_LEDS" ] } + if (use_wstk_buttons) { + _include_dirs += [ "${efr32_sdk_root}/platform/driver/button/inc" ] + } + if (defined(invoker.enable_sleepy_device)) { if (invoker.enable_sleepy_device) { defines += [ @@ -344,14 +367,27 @@ template("efr32_sdk") { "${sdk_support_root}/protocol/bluetooth/lib/EFR32MG24/GCC/libbluetooth.a", "${sdk_support_root}/platform/radio/rail_lib/autogen/librail_release/librail_multiprotocol_module_efr32xg24_gcc_release.a", "${sdk_support_root}/platform/emdrv/nvm3/lib/libnvm3_CM33_gcc.a", + "${efr32_sdk_root}/protocol/openthread/libs/libsl_openthread_efr32mg2x_gcc.a", ] if (silabs_mcu == "MGM240PB32VNA") { libs += [ "${sdk_support_root}/platform/radio/rail_lib/autogen/librail_release/librail_config_mgm240pb32vna_gcc.a" ] + defines += [ + "SL_RAIL_LIB_MULTIPROTOCOL_SUPPORT=1", + "RADIO_CONFIG_DMP_SUPPORT=1", + ] } else if (silabs_mcu == "MGM240PB22VNA") { libs += [ "${sdk_support_root}/platform/radio/rail_lib/autogen/librail_release/librail_config_mgm240pb22vna_gcc.a" ] } else if (silabs_mcu == "MGM240L022RNF") { libs += [ "${sdk_support_root}/platform/radio/rail_lib/autogen/librail_release/librail_config_mgm240l022rnf_gcc.a" ] + } else if (silabs_mcu == "MGM240SD22VNA") { + libs += [ "${sdk_support_root}/platform/radio/rail_lib/autogen/librail_release/librail_config_mgm240sd22vna_gcc.a" ] + defines += [ + "SL_RAIL_LIB_MULTIPROTOCOL_SUPPORT=1", + "RADIO_CONFIG_DMP_SUPPORT=1", + "SLI_RADIOAES_REQUIRES_MASKING=1", + "SL_RAIL_UTIL_PA_CONFIG_HEADER=", + ] } defines += [ @@ -420,8 +456,6 @@ template("efr32_sdk") { "${efr32_sdk_root}/platform/bootloader/api/btl_interface_storage.c", "${efr32_sdk_root}/platform/bootloader/security/sha/crypto_sha.c", "${efr32_sdk_root}/platform/common/src/sl_slist.c", - "${efr32_sdk_root}/platform/driver/button/src/sl_button.c", - "${efr32_sdk_root}/platform/driver/button/src/sl_simple_button.c", "${efr32_sdk_root}/platform/emdrv/dmadrv/src/dmadrv.c", "${efr32_sdk_root}/platform/emdrv/gpiointerrupt/src/gpiointerrupt.c", "${efr32_sdk_root}/platform/emdrv/nvm3/src/nvm3_default.c", @@ -485,7 +519,6 @@ template("efr32_sdk") { "${efr32_sdk_root}/platform/service/sleeptimer/src/sl_sleeptimer_hal_sysrtc.c", "${efr32_sdk_root}/platform/service/system/src/sl_system_init.c", "${efr32_sdk_root}/platform/service/system/src/sl_system_kernel.c", - "${efr32_sdk_root}/platform/service/system/src/sl_system_process_action.c", "${efr32_sdk_root}/platform/service/token_manager/src/sl_token_def.c", "${efr32_sdk_root}/platform/service/token_manager/src/sl_token_manager.c", "${efr32_sdk_root}/platform/service/token_manager/src/sl_token_manufacturing.c", @@ -590,9 +623,16 @@ template("efr32_sdk") { "${sdk_support_root}/matter/efr32/${silabs_family}/${silabs_board}/autogen/sl_board_default_init.c", "${sdk_support_root}/matter/efr32/${silabs_family}/${silabs_board}/autogen/sl_device_init_clocks.c", "${sdk_support_root}/matter/efr32/${silabs_family}/${silabs_board}/autogen/sl_event_handler.c", - "${sdk_support_root}/matter/efr32/${silabs_family}/${silabs_board}/autogen/sl_simple_button_instances.c", ] + if (use_wstk_buttons) { + sources += [ + "${efr32_sdk_root}/platform/driver/button/src/sl_button.c", + "${efr32_sdk_root}/platform/driver/button/src/sl_simple_button.c", + "${sdk_support_root}/matter/efr32/${silabs_family}/${silabs_board}/autogen/sl_simple_button_instances.c", + ] + } + if (use_system_view) { sources += [ "${efr32_sdk_root}/util/third_party/segger/systemview/SEGGER/SEGGER_SYSVIEW.c", @@ -814,10 +854,20 @@ template("efr32_sdk") { } if (silabs_board == "BRD4186A" || silabs_board == "BRD4186C" || - silabs_board == "BRD4187A" || silabs_board == "BRD4187C") { + silabs_board == "BRD4187A" || silabs_board == "BRD4187C" || + silabs_board == "BRD2704A") { sources += [ "${efr32_sdk_root}/platform/service/device_init/src/sl_device_init_dpll_s2.c" ] } + if (silabs_board == "BRD2704A" || silabs_board == "BRD4318A") { + sources += [ + "${efr32_sdk_root}/hardware/driver/configuration_over_swo/src/sl_cos.c", + "${efr32_sdk_root}/platform/driver/debug/src/sl_debug_swo.c", + "${efr32_sdk_root}/platform/radio/rail_lib/plugin/fem_util/sl_fem_util.c", + "${efr32_sdk_root}/platform/radio/rail_lib/plugin/rail_util_rssi/sl_rail_util_rssi.c", + ] + } + public_deps = [ ":efr32_mbedtls_config", "${segger_rtt_root}:segger_rtt", diff --git a/third_party/silabs/silabs_board.gni b/third_party/silabs/silabs_board.gni index 1e638c9351a2b6..dd944c47f51039 100644 --- a/third_party/silabs/silabs_board.gni +++ b/third_party/silabs/silabs_board.gni @@ -93,8 +93,14 @@ if (silabs_board == "BRD4304A") { } else if (silabs_board == "BRD4319A") { silabs_family = "mgm24" silabs_mcu = "MGM240L022RNF" +} else if (silabs_board == "BRD2704A") { + silabs_family = "mgm24" + silabs_mcu = "MGM240PB32VNA" +} else if (silabs_board == "BRD4318A") { + silabs_family = "mgm24" + silabs_mcu = "MGM240SD22VNA" } else { print( - "Please provide a valid value for SILABS_BOARD env variable (currently supported BRD4304A, BRD4161A, BRD4163A, BRD4164A BRD4166A, BRD4170A, BRD4186C, BRD4187C, BRD2601B, BRD2703A, BRD4317A)") + "Please provide a valid value for SILABS_BOARD env variable (currently supported BRD4304A, BRD4161A, BRD4163A, BRD4164A BRD4166A, BRD4170A, BRD4186C, BRD4187C, BRD2601B, BRD2703A, BRD4317A, BRD2704A)") assert(false, "The board ${silabs_board} is unsupported") } 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 bd91719cd0f2a6..4f8e3743198027 100644 --- a/zzz_generated/app-common/app-common/zap-generated/callback.h +++ b/zzz_generated/app-common/app-common/zap-generated/callback.h @@ -7639,7 +7639,7 @@ bool emberAfScenesClusterAddSceneCallback(chip::app::CommandHandler * commandObj * @brief Scenes Cluster AddSceneResponse Command callback (from server) */ bool emberAfScenesClusterAddSceneResponseCallback(chip::EndpointId endpoint, chip::app::CommandSender * commandObj, uint8_t Status, - chip::GroupId GroupId, uint8_t SceneId); + chip::GroupId GroupID, uint8_t SceneID); /** * @brief Scenes Cluster ViewScene Command callback (from client) */ @@ -7650,7 +7650,7 @@ bool emberAfScenesClusterViewSceneCallback(chip::app::CommandHandler * commandOb * @brief Scenes Cluster ViewSceneResponse Command callback (from server) */ bool emberAfScenesClusterViewSceneResponseCallback(chip::EndpointId endpoint, chip::app::CommandSender * commandObj, uint8_t Status, - chip::GroupId GroupId, uint8_t SceneId, uint16_t TransitionTime, + chip::GroupId GroupID, uint8_t SceneID, uint16_t TransitionTime, chip::CharSpan SceneName, /* TYPE WARNING: array array defaults to */ uint8_t * ExtensionFieldSets); /** @@ -7663,7 +7663,7 @@ bool emberAfScenesClusterRemoveSceneCallback(chip::app::CommandHandler * command * @brief Scenes Cluster RemoveSceneResponse Command callback (from server) */ bool emberAfScenesClusterRemoveSceneResponseCallback(chip::EndpointId endpoint, chip::app::CommandSender * commandObj, - uint8_t Status, chip::GroupId GroupId, uint8_t SceneId); + uint8_t Status, chip::GroupId GroupID, uint8_t SceneID); /** * @brief Scenes Cluster RemoveAllScenes Command callback (from client) */ @@ -7674,7 +7674,7 @@ bool emberAfScenesClusterRemoveAllScenesCallback( * @brief Scenes Cluster RemoveAllScenesResponse Command callback (from server) */ bool emberAfScenesClusterRemoveAllScenesResponseCallback(chip::EndpointId endpoint, chip::app::CommandSender * commandObj, - uint8_t Status, chip::GroupId GroupId); + uint8_t Status, chip::GroupId GroupID); /** * @brief Scenes Cluster StoreScene Command callback (from client) */ @@ -7685,7 +7685,7 @@ bool emberAfScenesClusterStoreSceneCallback(chip::app::CommandHandler * commandO * @brief Scenes Cluster StoreSceneResponse Command callback (from server) */ bool emberAfScenesClusterStoreSceneResponseCallback(chip::EndpointId endpoint, chip::app::CommandSender * commandObj, - uint8_t Status, chip::GroupId GroupId, uint8_t SceneId); + uint8_t Status, chip::GroupId GroupID, uint8_t SceneID); /** * @brief Scenes Cluster RecallScene Command callback (from client) */ @@ -7702,7 +7702,7 @@ bool emberAfScenesClusterGetSceneMembershipCallback( * @brief Scenes Cluster GetSceneMembershipResponse Command callback (from server) */ bool emberAfScenesClusterGetSceneMembershipResponseCallback(chip::EndpointId endpoint, chip::app::CommandSender * commandObj, - uint8_t Status, uint8_t Capacity, chip::GroupId GroupId, + uint8_t Status, uint8_t Capacity, chip::GroupId GroupID, /* TYPE WARNING: array array defaults to */ uint8_t * SceneList); /** * @brief Scenes Cluster EnhancedAddScene Command callback (from client) @@ -7714,7 +7714,7 @@ bool emberAfScenesClusterEnhancedAddSceneCallback( * @brief Scenes Cluster EnhancedAddSceneResponse Command callback (from server) */ bool emberAfScenesClusterEnhancedAddSceneResponseCallback(chip::EndpointId endpoint, chip::app::CommandSender * commandObj, - uint8_t Status, chip::GroupId GroupId, uint8_t SceneId); + uint8_t Status, chip::GroupId GroupID, uint8_t SceneID); /** * @brief Scenes Cluster EnhancedViewScene Command callback (from client) */ @@ -7725,7 +7725,7 @@ bool emberAfScenesClusterEnhancedViewSceneCallback( * @brief Scenes Cluster EnhancedViewSceneResponse Command callback (from server) */ bool emberAfScenesClusterEnhancedViewSceneResponseCallback( - chip::EndpointId endpoint, chip::app::CommandSender * commandObj, uint8_t Status, chip::GroupId GroupId, uint8_t SceneId, + chip::EndpointId endpoint, chip::app::CommandSender * commandObj, uint8_t Status, chip::GroupId GroupID, uint8_t SceneID, uint16_t TransitionTime, chip::CharSpan SceneName, /* TYPE WARNING: array array defaults to */ uint8_t * ExtensionFieldSets); /** * @brief Scenes Cluster CopyScene Command callback (from client) @@ -7737,7 +7737,7 @@ bool emberAfScenesClusterCopySceneCallback(chip::app::CommandHandler * commandOb * @brief Scenes Cluster CopySceneResponse Command callback (from server) */ bool emberAfScenesClusterCopySceneResponseCallback(chip::EndpointId endpoint, chip::app::CommandSender * commandObj, uint8_t Status, - chip::GroupId GroupIdFrom, uint8_t SceneIdFrom); + chip::GroupId GroupIdentifierFrom, uint8_t SceneIdentifierFrom); /** * @brief On/Off Cluster Off 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 80d01abffd9bb2..e964817905cb1b 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 @@ -1520,17 +1520,9 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::SetpointAdj using EnumType = Thermostat::SetpointAdjustMode; switch (val) { -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM - case EnumType::kHeatSetpoint: - case EnumType::kCoolSetpoint: - case EnumType::kHeatAndCoolSetpoints: -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM - case EMBER_ZCL_SETPOINT_ADJUST_MODE_HEAT_SETPOINT: - case EMBER_ZCL_SETPOINT_ADJUST_MODE_COOL_SETPOINT: - case EMBER_ZCL_SETPOINT_ADJUST_MODE_HEAT_AND_COOL_SETPOINTS: -#endif // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM + case EnumType::kHeat: + case EnumType::kCool: + case EnumType::kBoth: return val; default: return static_cast(3); @@ -1574,9 +1566,11 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(Thermostat::ThermostatS case EnumType::kAuto: case EnumType::kCool: case EnumType::kHeat: - case EnumType::kEmergencyHeating: + case EnumType::kEmergencyHeat: case EnumType::kPrecooling: case EnumType::kFanOnly: + case EnumType::kDry: + case EnumType::kSleep: return val; default: return static_cast(2); 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 aba44070a5c52c..25c76b14c33c66 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 @@ -107,6 +107,12 @@ enum class GroupClusterFeature : uint32_t namespace Scenes { +// Bitmap for SceneFeatures +enum class SceneFeatures : uint32_t +{ + kSceneNames = 0x1, +}; + // Bitmap for ScenesCopyMode enum class ScenesCopyMode : uint8_t { @@ -200,12 +206,6 @@ enum class OnOffFeature : uint32_t { kLighting = 0x1, }; - -// Bitmap for SceneFeatures -enum class SceneFeatures : uint32_t -{ - kSceneNames = 0x1, -}; } // namespace OnOff namespace OnOffSwitchConfiguration {} // namespace OnOffSwitchConfiguration @@ -1950,25 +1950,18 @@ enum class PumpStatus : uint16_t namespace Thermostat { -// Need to convert consumers to using the new enum classes, so we -// don't just have casts all over. -#ifdef CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for SetpointAdjustMode enum class SetpointAdjustMode : uint8_t { - kHeatSetpoint = 0x00, - kCoolSetpoint = 0x01, - kHeatAndCoolSetpoints = 0x02, + kHeat = 0x00, + kCool = 0x01, + kBoth = 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, }; -#else // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM -using SetpointAdjustMode = EmberAfSetpointAdjustMode; -static SetpointAdjustMode __attribute__((unused)) kSetpointAdjustModekUnknownEnumValue = static_cast(3); -#endif // CHIP_USE_ENUM_CLASS_FOR_IM_ENUM // Enum for ThermostatControlSequence enum class ThermostatControlSequence : uint8_t @@ -2002,13 +1995,15 @@ enum class ThermostatRunningMode : uint8_t // Enum for ThermostatSystemMode enum class ThermostatSystemMode : uint8_t { - kOff = 0x00, - kAuto = 0x01, - kCool = 0x03, - kHeat = 0x04, - kEmergencyHeating = 0x05, - kPrecooling = 0x06, - kFanOnly = 0x07, + kOff = 0x00, + kAuto = 0x01, + kCool = 0x03, + kHeat = 0x04, + kEmergencyHeat = 0x05, + kPrecooling = 0x06, + kFanOnly = 0x07, + kDry = 0x08, + kSleep = 0x09, // 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 @@ -2019,32 +2014,32 @@ enum class ThermostatSystemMode : uint8_t // Bitmap for DayOfWeek enum class DayOfWeek : uint8_t { - kSunday = 0x1, - kMonday = 0x2, - kTuesday = 0x4, - kWednesday = 0x8, - kThursday = 0x10, - kFriday = 0x20, - kSaturday = 0x40, - kAwayOrVacation = 0x80, + kSunday = 0x1, + kMonday = 0x2, + kTuesday = 0x4, + kWednesday = 0x8, + kThursday = 0x10, + kFriday = 0x20, + kSaturday = 0x40, + kAway = 0x80, }; // Bitmap for ModeForSequence enum class ModeForSequence : uint8_t { - kHeatSetpointFieldPresent = 0x1, - kCoolSetpointFieldPresent = 0x2, + kHeatSetpointPresent = 0x1, + kCoolSetpointPresent = 0x2, }; // Bitmap for ThermostatFeature enum class ThermostatFeature : uint32_t { - kHeating = 0x1, - kCooling = 0x2, - kOccupancy = 0x4, - kSchedule = 0x8, - kSetback = 0x10, - kAutomode = 0x20, + kHeating = 0x1, + kCooling = 0x2, + kOccupancy = 0x4, + kScheduleConfiguration = 0x8, + kSetback = 0x10, + kAutoMode = 0x20, }; } // namespace Thermostat 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 8ce0b83858e360..03fc87468fda2a 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 @@ -677,7 +677,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kAttributeId)), attributeId)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kAttributeID)), attributeID)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kAttributeValue)), attributeValue)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; @@ -698,8 +698,8 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } switch (TLV::TagNumFromTag(reader.GetTag())) { - case to_underlying(Fields::kAttributeId): - ReturnErrorOnFailure(DataModel::Decode(reader, attributeId)); + case to_underlying(Fields::kAttributeID): + ReturnErrorOnFailure(DataModel::Decode(reader, attributeID)); break; case to_underlying(Fields::kAttributeValue): ReturnErrorOnFailure(DataModel::Decode(reader, attributeValue)); @@ -721,7 +721,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kClusterId)), clusterId)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kClusterID)), clusterID)); ReturnErrorOnFailure( DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kAttributeValueList)), attributeValueList)); ReturnErrorOnFailure(writer.EndContainer(outer)); @@ -743,8 +743,8 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } switch (TLV::TagNumFromTag(reader.GetTag())) { - case to_underlying(Fields::kClusterId): - ReturnErrorOnFailure(DataModel::Decode(reader, clusterId)); + case to_underlying(Fields::kClusterID): + ReturnErrorOnFailure(DataModel::Decode(reader, clusterID)); break; case to_underlying(Fields::kAttributeValueList): ReturnErrorOnFailure(DataModel::Decode(reader, attributeValueList)); @@ -769,8 +769,8 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupId)), groupId)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneId)), sceneId)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupID)), groupID)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneID)), sceneID)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTransitionTime)), transitionTime)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneName)), sceneName)); ReturnErrorOnFailure( @@ -793,11 +793,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } switch (TLV::TagNumFromTag(reader.GetTag())) { - case to_underlying(Fields::kGroupId): - ReturnErrorOnFailure(DataModel::Decode(reader, groupId)); + case to_underlying(Fields::kGroupID): + ReturnErrorOnFailure(DataModel::Decode(reader, groupID)); break; - case to_underlying(Fields::kSceneId): - ReturnErrorOnFailure(DataModel::Decode(reader, sceneId)); + case to_underlying(Fields::kSceneID): + ReturnErrorOnFailure(DataModel::Decode(reader, sceneID)); break; case to_underlying(Fields::kTransitionTime): ReturnErrorOnFailure(DataModel::Decode(reader, transitionTime)); @@ -824,8 +824,8 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupId)), groupId)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneId)), sceneId)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupID)), groupID)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneID)), sceneID)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -847,11 +847,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) case to_underlying(Fields::kStatus): ReturnErrorOnFailure(DataModel::Decode(reader, status)); break; - case to_underlying(Fields::kGroupId): - ReturnErrorOnFailure(DataModel::Decode(reader, groupId)); + case to_underlying(Fields::kGroupID): + ReturnErrorOnFailure(DataModel::Decode(reader, groupID)); break; - case to_underlying(Fields::kSceneId): - ReturnErrorOnFailure(DataModel::Decode(reader, sceneId)); + case to_underlying(Fields::kSceneID): + ReturnErrorOnFailure(DataModel::Decode(reader, sceneID)); break; default: break; @@ -868,8 +868,8 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupId)), groupId)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneId)), sceneId)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupID)), groupID)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneID)), sceneID)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -888,11 +888,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } switch (TLV::TagNumFromTag(reader.GetTag())) { - case to_underlying(Fields::kGroupId): - ReturnErrorOnFailure(DataModel::Decode(reader, groupId)); + case to_underlying(Fields::kGroupID): + ReturnErrorOnFailure(DataModel::Decode(reader, groupID)); break; - case to_underlying(Fields::kSceneId): - ReturnErrorOnFailure(DataModel::Decode(reader, sceneId)); + case to_underlying(Fields::kSceneID): + ReturnErrorOnFailure(DataModel::Decode(reader, sceneID)); break; default: break; @@ -910,8 +910,8 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupId)), groupId)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneId)), sceneId)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupID)), groupID)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneID)), sceneID)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTransitionTime)), transitionTime)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneName)), sceneName)); ReturnErrorOnFailure( @@ -937,11 +937,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) case to_underlying(Fields::kStatus): ReturnErrorOnFailure(DataModel::Decode(reader, status)); break; - case to_underlying(Fields::kGroupId): - ReturnErrorOnFailure(DataModel::Decode(reader, groupId)); + case to_underlying(Fields::kGroupID): + ReturnErrorOnFailure(DataModel::Decode(reader, groupID)); break; - case to_underlying(Fields::kSceneId): - ReturnErrorOnFailure(DataModel::Decode(reader, sceneId)); + case to_underlying(Fields::kSceneID): + ReturnErrorOnFailure(DataModel::Decode(reader, sceneID)); break; case to_underlying(Fields::kTransitionTime): ReturnErrorOnFailure(DataModel::Decode(reader, transitionTime)); @@ -967,8 +967,8 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupId)), groupId)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneId)), sceneId)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupID)), groupID)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneID)), sceneID)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -987,11 +987,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } switch (TLV::TagNumFromTag(reader.GetTag())) { - case to_underlying(Fields::kGroupId): - ReturnErrorOnFailure(DataModel::Decode(reader, groupId)); + case to_underlying(Fields::kGroupID): + ReturnErrorOnFailure(DataModel::Decode(reader, groupID)); break; - case to_underlying(Fields::kSceneId): - ReturnErrorOnFailure(DataModel::Decode(reader, sceneId)); + case to_underlying(Fields::kSceneID): + ReturnErrorOnFailure(DataModel::Decode(reader, sceneID)); break; default: break; @@ -1009,8 +1009,8 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupId)), groupId)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneId)), sceneId)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupID)), groupID)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneID)), sceneID)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -1032,11 +1032,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) case to_underlying(Fields::kStatus): ReturnErrorOnFailure(DataModel::Decode(reader, status)); break; - case to_underlying(Fields::kGroupId): - ReturnErrorOnFailure(DataModel::Decode(reader, groupId)); + case to_underlying(Fields::kGroupID): + ReturnErrorOnFailure(DataModel::Decode(reader, groupID)); break; - case to_underlying(Fields::kSceneId): - ReturnErrorOnFailure(DataModel::Decode(reader, sceneId)); + case to_underlying(Fields::kSceneID): + ReturnErrorOnFailure(DataModel::Decode(reader, sceneID)); break; default: break; @@ -1053,7 +1053,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupId)), groupId)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupID)), groupID)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -1072,8 +1072,8 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } switch (TLV::TagNumFromTag(reader.GetTag())) { - case to_underlying(Fields::kGroupId): - ReturnErrorOnFailure(DataModel::Decode(reader, groupId)); + case to_underlying(Fields::kGroupID): + ReturnErrorOnFailure(DataModel::Decode(reader, groupID)); break; default: break; @@ -1091,7 +1091,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupId)), groupId)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupID)), groupID)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -1113,8 +1113,8 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) case to_underlying(Fields::kStatus): ReturnErrorOnFailure(DataModel::Decode(reader, status)); break; - case to_underlying(Fields::kGroupId): - ReturnErrorOnFailure(DataModel::Decode(reader, groupId)); + case to_underlying(Fields::kGroupID): + ReturnErrorOnFailure(DataModel::Decode(reader, groupID)); break; default: break; @@ -1131,8 +1131,8 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupId)), groupId)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneId)), sceneId)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupID)), groupID)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneID)), sceneID)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -1151,11 +1151,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } switch (TLV::TagNumFromTag(reader.GetTag())) { - case to_underlying(Fields::kGroupId): - ReturnErrorOnFailure(DataModel::Decode(reader, groupId)); + case to_underlying(Fields::kGroupID): + ReturnErrorOnFailure(DataModel::Decode(reader, groupID)); break; - case to_underlying(Fields::kSceneId): - ReturnErrorOnFailure(DataModel::Decode(reader, sceneId)); + case to_underlying(Fields::kSceneID): + ReturnErrorOnFailure(DataModel::Decode(reader, sceneID)); break; default: break; @@ -1173,8 +1173,8 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupId)), groupId)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneId)), sceneId)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupID)), groupID)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneID)), sceneID)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -1196,11 +1196,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) case to_underlying(Fields::kStatus): ReturnErrorOnFailure(DataModel::Decode(reader, status)); break; - case to_underlying(Fields::kGroupId): - ReturnErrorOnFailure(DataModel::Decode(reader, groupId)); + case to_underlying(Fields::kGroupID): + ReturnErrorOnFailure(DataModel::Decode(reader, groupID)); break; - case to_underlying(Fields::kSceneId): - ReturnErrorOnFailure(DataModel::Decode(reader, sceneId)); + case to_underlying(Fields::kSceneID): + ReturnErrorOnFailure(DataModel::Decode(reader, sceneID)); break; default: break; @@ -1217,8 +1217,8 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupId)), groupId)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneId)), sceneId)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupID)), groupID)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneID)), sceneID)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTransitionTime)), transitionTime)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; @@ -1238,11 +1238,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } switch (TLV::TagNumFromTag(reader.GetTag())) { - case to_underlying(Fields::kGroupId): - ReturnErrorOnFailure(DataModel::Decode(reader, groupId)); + case to_underlying(Fields::kGroupID): + ReturnErrorOnFailure(DataModel::Decode(reader, groupID)); break; - case to_underlying(Fields::kSceneId): - ReturnErrorOnFailure(DataModel::Decode(reader, sceneId)); + case to_underlying(Fields::kSceneID): + ReturnErrorOnFailure(DataModel::Decode(reader, sceneID)); break; case to_underlying(Fields::kTransitionTime): ReturnErrorOnFailure(DataModel::Decode(reader, transitionTime)); @@ -1262,7 +1262,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupId)), groupId)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupID)), groupID)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -1281,8 +1281,8 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } switch (TLV::TagNumFromTag(reader.GetTag())) { - case to_underlying(Fields::kGroupId): - ReturnErrorOnFailure(DataModel::Decode(reader, groupId)); + case to_underlying(Fields::kGroupID): + ReturnErrorOnFailure(DataModel::Decode(reader, groupID)); break; default: break; @@ -1301,7 +1301,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kCapacity)), capacity)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupId)), groupId)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupID)), groupID)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneList)), sceneList)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; @@ -1327,8 +1327,8 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) case to_underlying(Fields::kCapacity): ReturnErrorOnFailure(DataModel::Decode(reader, capacity)); break; - case to_underlying(Fields::kGroupId): - ReturnErrorOnFailure(DataModel::Decode(reader, groupId)); + case to_underlying(Fields::kGroupID): + ReturnErrorOnFailure(DataModel::Decode(reader, groupID)); break; case to_underlying(Fields::kSceneList): ReturnErrorOnFailure(DataModel::Decode(reader, sceneList)); @@ -1348,8 +1348,8 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupId)), groupId)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneId)), sceneId)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupID)), groupID)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneID)), sceneID)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTransitionTime)), transitionTime)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneName)), sceneName)); ReturnErrorOnFailure( @@ -1372,11 +1372,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } switch (TLV::TagNumFromTag(reader.GetTag())) { - case to_underlying(Fields::kGroupId): - ReturnErrorOnFailure(DataModel::Decode(reader, groupId)); + case to_underlying(Fields::kGroupID): + ReturnErrorOnFailure(DataModel::Decode(reader, groupID)); break; - case to_underlying(Fields::kSceneId): - ReturnErrorOnFailure(DataModel::Decode(reader, sceneId)); + case to_underlying(Fields::kSceneID): + ReturnErrorOnFailure(DataModel::Decode(reader, sceneID)); break; case to_underlying(Fields::kTransitionTime): ReturnErrorOnFailure(DataModel::Decode(reader, transitionTime)); @@ -1403,8 +1403,8 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupId)), groupId)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneId)), sceneId)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupID)), groupID)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneID)), sceneID)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -1426,11 +1426,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) case to_underlying(Fields::kStatus): ReturnErrorOnFailure(DataModel::Decode(reader, status)); break; - case to_underlying(Fields::kGroupId): - ReturnErrorOnFailure(DataModel::Decode(reader, groupId)); + case to_underlying(Fields::kGroupID): + ReturnErrorOnFailure(DataModel::Decode(reader, groupID)); break; - case to_underlying(Fields::kSceneId): - ReturnErrorOnFailure(DataModel::Decode(reader, sceneId)); + case to_underlying(Fields::kSceneID): + ReturnErrorOnFailure(DataModel::Decode(reader, sceneID)); break; default: break; @@ -1447,8 +1447,8 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const { TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupId)), groupId)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneId)), sceneId)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupID)), groupID)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneID)), sceneID)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -1467,11 +1467,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } switch (TLV::TagNumFromTag(reader.GetTag())) { - case to_underlying(Fields::kGroupId): - ReturnErrorOnFailure(DataModel::Decode(reader, groupId)); + case to_underlying(Fields::kGroupID): + ReturnErrorOnFailure(DataModel::Decode(reader, groupID)); break; - case to_underlying(Fields::kSceneId): - ReturnErrorOnFailure(DataModel::Decode(reader, sceneId)); + case to_underlying(Fields::kSceneID): + ReturnErrorOnFailure(DataModel::Decode(reader, sceneID)); break; default: break; @@ -1489,8 +1489,8 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupId)), groupId)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneId)), sceneId)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupID)), groupID)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneID)), sceneID)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kTransitionTime)), transitionTime)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneName)), sceneName)); ReturnErrorOnFailure( @@ -1516,11 +1516,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) case to_underlying(Fields::kStatus): ReturnErrorOnFailure(DataModel::Decode(reader, status)); break; - case to_underlying(Fields::kGroupId): - ReturnErrorOnFailure(DataModel::Decode(reader, groupId)); + case to_underlying(Fields::kGroupID): + ReturnErrorOnFailure(DataModel::Decode(reader, groupID)); break; - case to_underlying(Fields::kSceneId): - ReturnErrorOnFailure(DataModel::Decode(reader, sceneId)); + case to_underlying(Fields::kSceneID): + ReturnErrorOnFailure(DataModel::Decode(reader, sceneID)); break; case to_underlying(Fields::kTransitionTime): ReturnErrorOnFailure(DataModel::Decode(reader, transitionTime)); @@ -1547,10 +1547,12 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kMode)), mode)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupIdFrom)), groupIdFrom)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneIdFrom)), sceneIdFrom)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupIdTo)), groupIdTo)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneIdTo)), sceneIdTo)); + ReturnErrorOnFailure( + DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupIdentifierFrom)), groupIdentifierFrom)); + ReturnErrorOnFailure( + DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneIdentifierFrom)), sceneIdentifierFrom)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupIdentifierTo)), groupIdentifierTo)); + ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneIdentifierTo)), sceneIdentifierTo)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -1572,17 +1574,17 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) case to_underlying(Fields::kMode): ReturnErrorOnFailure(DataModel::Decode(reader, mode)); break; - case to_underlying(Fields::kGroupIdFrom): - ReturnErrorOnFailure(DataModel::Decode(reader, groupIdFrom)); + case to_underlying(Fields::kGroupIdentifierFrom): + ReturnErrorOnFailure(DataModel::Decode(reader, groupIdentifierFrom)); break; - case to_underlying(Fields::kSceneIdFrom): - ReturnErrorOnFailure(DataModel::Decode(reader, sceneIdFrom)); + case to_underlying(Fields::kSceneIdentifierFrom): + ReturnErrorOnFailure(DataModel::Decode(reader, sceneIdentifierFrom)); break; - case to_underlying(Fields::kGroupIdTo): - ReturnErrorOnFailure(DataModel::Decode(reader, groupIdTo)); + case to_underlying(Fields::kGroupIdentifierTo): + ReturnErrorOnFailure(DataModel::Decode(reader, groupIdentifierTo)); break; - case to_underlying(Fields::kSceneIdTo): - ReturnErrorOnFailure(DataModel::Decode(reader, sceneIdTo)); + case to_underlying(Fields::kSceneIdentifierTo): + ReturnErrorOnFailure(DataModel::Decode(reader, sceneIdentifierTo)); break; default: break; @@ -1600,8 +1602,10 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const TLV::TLVType outer; ReturnErrorOnFailure(writer.StartContainer(tag, TLV::kTLVType_Structure, outer)); ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kStatus)), status)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupIdFrom)), groupIdFrom)); - ReturnErrorOnFailure(DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneIdFrom)), sceneIdFrom)); + ReturnErrorOnFailure( + DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kGroupIdentifierFrom)), groupIdentifierFrom)); + ReturnErrorOnFailure( + DataModel::Encode(writer, TLV::ContextTag(to_underlying(Fields::kSceneIdentifierFrom)), sceneIdentifierFrom)); ReturnErrorOnFailure(writer.EndContainer(outer)); return CHIP_NO_ERROR; } @@ -1623,11 +1627,11 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) case to_underlying(Fields::kStatus): ReturnErrorOnFailure(DataModel::Decode(reader, status)); break; - case to_underlying(Fields::kGroupIdFrom): - ReturnErrorOnFailure(DataModel::Decode(reader, groupIdFrom)); + case to_underlying(Fields::kGroupIdentifierFrom): + ReturnErrorOnFailure(DataModel::Decode(reader, groupIdentifierFrom)); break; - case to_underlying(Fields::kSceneIdFrom): - ReturnErrorOnFailure(DataModel::Decode(reader, sceneIdFrom)); + case to_underlying(Fields::kSceneIdentifierFrom): + ReturnErrorOnFailure(DataModel::Decode(reader, sceneIdentifierFrom)); break; default: break; 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 ee11788b87948d..f4144c83c67342 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 @@ -785,14 +785,14 @@ namespace Structs { namespace AttributeValuePair { enum class Fields { - kAttributeId = 0, + kAttributeID = 0, kAttributeValue = 1, }; struct Type { public: - Optional attributeId; + Optional attributeID; DataModel::List attributeValue; static constexpr bool kIsFabricScoped = false; @@ -803,7 +803,7 @@ struct Type struct DecodableType { public: - Optional attributeId; + Optional attributeID; DataModel::DecodableList attributeValue; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -815,14 +815,14 @@ struct DecodableType namespace ExtensionFieldSet { enum class Fields { - kClusterId = 0, + kClusterID = 0, kAttributeValueList = 1, }; struct Type { public: - chip::ClusterId clusterId = static_cast(0); + chip::ClusterId clusterID = static_cast(0); DataModel::List attributeValueList; static constexpr bool kIsFabricScoped = false; @@ -833,7 +833,7 @@ struct Type struct DecodableType { public: - chip::ClusterId clusterId = static_cast(0); + chip::ClusterId clusterID = static_cast(0); DataModel::DecodableList attributeValueList; CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -948,8 +948,8 @@ namespace Commands { namespace AddScene { enum class Fields { - kGroupId = 0, - kSceneId = 1, + kGroupID = 0, + kSceneID = 1, kTransitionTime = 2, kSceneName = 3, kExtensionFieldSets = 4, @@ -962,8 +962,8 @@ struct Type 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); + chip::GroupId groupID = static_cast(0); + uint8_t sceneID = static_cast(0); uint16_t transitionTime = static_cast(0); chip::CharSpan sceneName; DataModel::List extensionFieldSets; @@ -981,8 +981,8 @@ struct DecodableType 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); + chip::GroupId groupID = static_cast(0); + uint8_t sceneID = static_cast(0); uint16_t transitionTime = static_cast(0); chip::CharSpan sceneName; DataModel::DecodableList extensionFieldSets; @@ -993,8 +993,8 @@ namespace AddSceneResponse { enum class Fields { kStatus = 0, - kGroupId = 1, - kSceneId = 2, + kGroupID = 1, + kSceneID = 2, }; struct Type @@ -1005,8 +1005,8 @@ struct Type 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::GroupId groupID = static_cast(0); + uint8_t sceneID = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -1022,16 +1022,16 @@ struct DecodableType 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::GroupId groupID = static_cast(0); + uint8_t sceneID = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace AddSceneResponse namespace ViewScene { enum class Fields { - kGroupId = 0, - kSceneId = 1, + kGroupID = 0, + kSceneID = 1, }; struct Type @@ -1041,8 +1041,8 @@ struct Type 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); + chip::GroupId groupID = static_cast(0); + uint8_t sceneID = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -1057,8 +1057,8 @@ struct DecodableType 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); + chip::GroupId groupID = static_cast(0); + uint8_t sceneID = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace ViewScene @@ -1066,8 +1066,8 @@ namespace ViewSceneResponse { enum class Fields { kStatus = 0, - kGroupId = 1, - kSceneId = 2, + kGroupID = 1, + kSceneID = 2, kTransitionTime = 3, kSceneName = 4, kExtensionFieldSets = 5, @@ -1081,8 +1081,8 @@ struct Type 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::GroupId groupID = static_cast(0); + uint8_t sceneID = static_cast(0); Optional transitionTime; Optional sceneName; Optional> extensionFieldSets; @@ -1101,8 +1101,8 @@ struct DecodableType 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::GroupId groupID = static_cast(0); + uint8_t sceneID = static_cast(0); Optional transitionTime; Optional sceneName; Optional> extensionFieldSets; @@ -1112,8 +1112,8 @@ struct DecodableType namespace RemoveScene { enum class Fields { - kGroupId = 0, - kSceneId = 1, + kGroupID = 0, + kSceneID = 1, }; struct Type @@ -1123,8 +1123,8 @@ struct Type 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); + chip::GroupId groupID = static_cast(0); + uint8_t sceneID = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -1139,8 +1139,8 @@ struct DecodableType 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); + chip::GroupId groupID = static_cast(0); + uint8_t sceneID = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace RemoveScene @@ -1148,8 +1148,8 @@ namespace RemoveSceneResponse { enum class Fields { kStatus = 0, - kGroupId = 1, - kSceneId = 2, + kGroupID = 1, + kSceneID = 2, }; struct Type @@ -1160,8 +1160,8 @@ struct Type 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::GroupId groupID = static_cast(0); + uint8_t sceneID = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -1177,15 +1177,15 @@ struct DecodableType 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::GroupId groupID = static_cast(0); + uint8_t sceneID = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace RemoveSceneResponse namespace RemoveAllScenes { enum class Fields { - kGroupId = 0, + kGroupID = 0, }; struct Type @@ -1195,7 +1195,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::RemoveAllScenes::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - chip::GroupId groupId = static_cast(0); + chip::GroupId groupID = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -1210,7 +1210,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::RemoveAllScenes::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - chip::GroupId groupId = static_cast(0); + chip::GroupId groupID = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace RemoveAllScenes @@ -1218,7 +1218,7 @@ namespace RemoveAllScenesResponse { enum class Fields { kStatus = 0, - kGroupId = 1, + kGroupID = 1, }; struct Type @@ -1229,7 +1229,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } uint8_t status = static_cast(0); - chip::GroupId groupId = static_cast(0); + chip::GroupId groupID = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -1245,15 +1245,15 @@ struct DecodableType static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } uint8_t status = static_cast(0); - chip::GroupId groupId = static_cast(0); + chip::GroupId groupID = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace RemoveAllScenesResponse namespace StoreScene { enum class Fields { - kGroupId = 0, - kSceneId = 1, + kGroupID = 0, + kSceneID = 1, }; struct Type @@ -1263,8 +1263,8 @@ struct Type 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::GroupId groupID = static_cast(0); + uint8_t sceneID = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -1279,8 +1279,8 @@ struct DecodableType 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::GroupId groupID = static_cast(0); + uint8_t sceneID = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace StoreScene @@ -1288,8 +1288,8 @@ namespace StoreSceneResponse { enum class Fields { kStatus = 0, - kGroupId = 1, - kSceneId = 2, + kGroupID = 1, + kSceneID = 2, }; struct Type @@ -1300,8 +1300,8 @@ struct Type 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::GroupId groupID = static_cast(0); + uint8_t sceneID = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -1317,16 +1317,16 @@ struct DecodableType 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::GroupId groupID = static_cast(0); + uint8_t sceneID = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace StoreSceneResponse namespace RecallScene { enum class Fields { - kGroupId = 0, - kSceneId = 1, + kGroupID = 0, + kSceneID = 1, kTransitionTime = 2, }; @@ -1337,8 +1337,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::RecallScene::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - chip::GroupId groupId = static_cast(0); - uint8_t sceneId = static_cast(0); + chip::GroupId groupID = static_cast(0); + uint8_t sceneID = static_cast(0); Optional> transitionTime; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -1354,8 +1354,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::RecallScene::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - chip::GroupId groupId = static_cast(0); - uint8_t sceneId = static_cast(0); + chip::GroupId groupID = static_cast(0); + uint8_t sceneID = static_cast(0); Optional> transitionTime; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -1363,7 +1363,7 @@ struct DecodableType namespace GetSceneMembership { enum class Fields { - kGroupId = 0, + kGroupID = 0, }; struct Type @@ -1373,7 +1373,7 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::GetSceneMembership::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - chip::GroupId groupId = static_cast(0); + chip::GroupId groupID = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -1388,7 +1388,7 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::GetSceneMembership::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - chip::GroupId groupId = static_cast(0); + chip::GroupId groupID = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace GetSceneMembership @@ -1397,7 +1397,7 @@ enum class Fields { kStatus = 0, kCapacity = 1, - kGroupId = 2, + kGroupID = 2, kSceneList = 3, }; @@ -1410,7 +1410,7 @@ struct Type uint8_t status = static_cast(0); DataModel::Nullable capacity; - chip::GroupId groupId = static_cast(0); + chip::GroupId groupID = static_cast(0); Optional> sceneList; CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -1428,7 +1428,7 @@ struct DecodableType uint8_t status = static_cast(0); DataModel::Nullable capacity; - chip::GroupId groupId = static_cast(0); + chip::GroupId groupID = static_cast(0); Optional> sceneList; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -1436,8 +1436,8 @@ struct DecodableType namespace EnhancedAddScene { enum class Fields { - kGroupId = 0, - kSceneId = 1, + kGroupID = 0, + kSceneID = 1, kTransitionTime = 2, kSceneName = 3, kExtensionFieldSets = 4, @@ -1450,8 +1450,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::EnhancedAddScene::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - chip::GroupId groupId = static_cast(0); - uint8_t sceneId = static_cast(0); + chip::GroupId groupID = static_cast(0); + uint8_t sceneID = static_cast(0); uint16_t transitionTime = static_cast(0); chip::CharSpan sceneName; DataModel::List extensionFieldSets; @@ -1469,8 +1469,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::EnhancedAddScene::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - chip::GroupId groupId = static_cast(0); - uint8_t sceneId = static_cast(0); + chip::GroupId groupID = static_cast(0); + uint8_t sceneID = static_cast(0); uint16_t transitionTime = static_cast(0); chip::CharSpan sceneName; DataModel::DecodableList extensionFieldSets; @@ -1481,8 +1481,8 @@ namespace EnhancedAddSceneResponse { enum class Fields { kStatus = 0, - kGroupId = 1, - kSceneId = 2, + kGroupID = 1, + kSceneID = 2, }; struct Type @@ -1493,8 +1493,8 @@ struct Type 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::GroupId groupID = static_cast(0); + uint8_t sceneID = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -1510,16 +1510,16 @@ struct DecodableType 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::GroupId groupID = static_cast(0); + uint8_t sceneID = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace EnhancedAddSceneResponse namespace EnhancedViewScene { enum class Fields { - kGroupId = 0, - kSceneId = 1, + kGroupID = 0, + kSceneID = 1, }; struct Type @@ -1529,8 +1529,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::EnhancedViewScene::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - chip::GroupId groupId = static_cast(0); - uint8_t sceneId = static_cast(0); + chip::GroupId groupID = static_cast(0); + uint8_t sceneID = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -1545,8 +1545,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::EnhancedViewScene::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - chip::GroupId groupId = static_cast(0); - uint8_t sceneId = static_cast(0); + chip::GroupId groupID = static_cast(0); + uint8_t sceneID = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace EnhancedViewScene @@ -1554,8 +1554,8 @@ namespace EnhancedViewSceneResponse { enum class Fields { kStatus = 0, - kGroupId = 1, - kSceneId = 2, + kGroupID = 1, + kSceneID = 2, kTransitionTime = 3, kSceneName = 4, kExtensionFieldSets = 5, @@ -1569,8 +1569,8 @@ struct Type 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::GroupId groupID = static_cast(0); + uint8_t sceneID = static_cast(0); Optional transitionTime; Optional sceneName; Optional> extensionFieldSets; @@ -1589,8 +1589,8 @@ struct DecodableType 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::GroupId groupID = static_cast(0); + uint8_t sceneID = static_cast(0); Optional transitionTime; Optional sceneName; Optional> extensionFieldSets; @@ -1600,11 +1600,11 @@ struct DecodableType namespace CopyScene { enum class Fields { - kMode = 0, - kGroupIdFrom = 1, - kSceneIdFrom = 2, - kGroupIdTo = 3, - kSceneIdTo = 4, + kMode = 0, + kGroupIdentifierFrom = 1, + kSceneIdentifierFrom = 2, + kGroupIdentifierTo = 3, + kSceneIdentifierTo = 4, }; struct Type @@ -1615,10 +1615,10 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } chip::BitMask mode = static_cast>(0); - chip::GroupId groupIdFrom = static_cast(0); - uint8_t sceneIdFrom = static_cast(0); - chip::GroupId groupIdTo = static_cast(0); - uint8_t sceneIdTo = 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 & writer, TLV::Tag tag) const; @@ -1634,19 +1634,19 @@ struct DecodableType static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } chip::BitMask mode = static_cast>(0); - chip::GroupId groupIdFrom = static_cast(0); - uint8_t sceneIdFrom = static_cast(0); - chip::GroupId groupIdTo = static_cast(0); - uint8_t sceneIdTo = 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 CopyScene namespace CopySceneResponse { enum class Fields { - kStatus = 0, - kGroupIdFrom = 1, - kSceneIdFrom = 2, + kStatus = 0, + kGroupIdentifierFrom = 1, + kSceneIdentifierFrom = 2, }; struct Type @@ -1656,9 +1656,9 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::CopySceneResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - uint8_t status = static_cast(0); - chip::GroupId groupIdFrom = static_cast(0); - uint8_t sceneIdFrom = static_cast(0); + uint8_t status = static_cast(0); + chip::GroupId groupIdentifierFrom = static_cast(0); + uint8_t sceneIdentifierFrom = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag) const; @@ -1673,9 +1673,9 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::CopySceneResponse::Id; } static constexpr ClusterId GetClusterId() { return Clusters::Scenes::Id; } - uint8_t status = static_cast(0); - chip::GroupId groupIdFrom = static_cast(0); - uint8_t sceneIdFrom = static_cast(0); + 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 CopySceneResponse diff --git a/zzz_generated/app-common/app-common/zap-generated/enums.h b/zzz_generated/app-common/app-common/zap-generated/enums.h index 36dc14164bf444..daf55b0963e8a7 100644 --- a/zzz_generated/app-common/app-common/zap-generated/enums.h +++ b/zzz_generated/app-common/app-common/zap-generated/enums.h @@ -281,14 +281,6 @@ enum EmberAfSecurityType : uint8_t EMBER_ZCL_SECURITY_TYPE_WPA3 = 5, }; -// Enum for SetpointAdjustMode -enum EmberAfSetpointAdjustMode : uint8_t -{ - EMBER_ZCL_SETPOINT_ADJUST_MODE_HEAT_SETPOINT = 0, - EMBER_ZCL_SETPOINT_ADJUST_MODE_COOL_SETPOINT = 1, - EMBER_ZCL_SETPOINT_ADJUST_MODE_HEAT_AND_COOL_SETPOINTS = 2, -}; - // Enum for StartUpOnOffValue enum EmberAfStartUpOnOffValue : uint8_t { @@ -474,8 +466,8 @@ enum EmberAfWiFiVersionType : uint8_t #define EMBER_AF_DAY_OF_WEEK_FRIDAY_OFFSET (5) #define EMBER_AF_DAY_OF_WEEK_SATURDAY (64) #define EMBER_AF_DAY_OF_WEEK_SATURDAY_OFFSET (6) -#define EMBER_AF_DAY_OF_WEEK_AWAY_OR_VACATION (128) -#define EMBER_AF_DAY_OF_WEEK_AWAY_OR_VACATION_OFFSET (7) +#define EMBER_AF_DAY_OF_WEEK_AWAY (128) +#define EMBER_AF_DAY_OF_WEEK_AWAY_OFFSET (7) #define EMBER_AF_DAYS_MASK_MAP_SUNDAY (1) #define EMBER_AF_DAYS_MASK_MAP_SUNDAY_OFFSET (0) #define EMBER_AF_DAYS_MASK_MAP_MONDAY (2) @@ -758,10 +750,10 @@ enum EmberAfWiFiVersionType : uint8_t #define EMBER_AF_MODE_MAINTENANCE_MODE_OFFSET (2) #define EMBER_AF_MODE_LED_FEEDBACK (8) #define EMBER_AF_MODE_LED_FEEDBACK_OFFSET (3) -#define EMBER_AF_MODE_FOR_SEQUENCE_HEAT_SETPOINT_FIELD_PRESENT (1) -#define EMBER_AF_MODE_FOR_SEQUENCE_HEAT_SETPOINT_FIELD_PRESENT_OFFSET (0) -#define EMBER_AF_MODE_FOR_SEQUENCE_COOL_SETPOINT_FIELD_PRESENT (2) -#define EMBER_AF_MODE_FOR_SEQUENCE_COOL_SETPOINT_FIELD_PRESENT_OFFSET (1) +#define EMBER_AF_MODE_FOR_SEQUENCE_HEAT_SETPOINT_PRESENT (1) +#define EMBER_AF_MODE_FOR_SEQUENCE_HEAT_SETPOINT_PRESENT_OFFSET (0) +#define EMBER_AF_MODE_FOR_SEQUENCE_COOL_SETPOINT_PRESENT (2) +#define EMBER_AF_MODE_FOR_SEQUENCE_COOL_SETPOINT_PRESENT_OFFSET (1) #define EMBER_AF_MODE_SELECT_FEATURE_DEPONOFF (1) #define EMBER_AF_MODE_SELECT_FEATURE_DEPONOFF_OFFSET (0) #define EMBER_AF_NETWORK_COMMISSIONING_FEATURE_WI_FI_NETWORK_INTERFACE (1) @@ -918,12 +910,12 @@ enum EmberAfWiFiVersionType : uint8_t #define EMBER_AF_THERMOSTAT_FEATURE_COOLING_OFFSET (1) #define EMBER_AF_THERMOSTAT_FEATURE_OCCUPANCY (4) #define EMBER_AF_THERMOSTAT_FEATURE_OCCUPANCY_OFFSET (2) -#define EMBER_AF_THERMOSTAT_FEATURE_SCHEDULE (8) -#define EMBER_AF_THERMOSTAT_FEATURE_SCHEDULE_OFFSET (3) +#define EMBER_AF_THERMOSTAT_FEATURE_SCHEDULE_CONFIGURATION (8) +#define EMBER_AF_THERMOSTAT_FEATURE_SCHEDULE_CONFIGURATION_OFFSET (3) #define EMBER_AF_THERMOSTAT_FEATURE_SETBACK (16) #define EMBER_AF_THERMOSTAT_FEATURE_SETBACK_OFFSET (4) -#define EMBER_AF_THERMOSTAT_FEATURE_AUTOMODE (32) -#define EMBER_AF_THERMOSTAT_FEATURE_AUTOMODE_OFFSET (5) +#define EMBER_AF_THERMOSTAT_FEATURE_AUTO_MODE (32) +#define EMBER_AF_THERMOSTAT_FEATURE_AUTO_MODE_OFFSET (5) #define EMBER_AF_THERMOSTAT_OCCUPANCY_OCCUPIED (1) #define EMBER_AF_THERMOSTAT_OCCUPANCY_OCCUPIED_OFFSET (0) #define EMBER_AF_THERMOSTAT_RUNNING_STATE_HEAT_STATE_ON (1) diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index ca80c9e90c8145..dfdbc2601f6d62 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -433,8 +433,8 @@ class ScenesAddScene : public ClusterCommand ScenesAddScene(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("add-scene", credsIssuerConfig), mComplex_ExtensionFieldSets(&mRequest.extensionFieldSets) { - AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); - AddArgument("SceneId", 0, UINT8_MAX, &mRequest.sceneId); + 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); @@ -469,8 +469,8 @@ class ScenesViewScene : public ClusterCommand public: ScenesViewScene(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("view-scene", credsIssuerConfig) { - AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); - AddArgument("SceneId", 0, UINT8_MAX, &mRequest.sceneId); + AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); + AddArgument("SceneID", 0, UINT8_MAX, &mRequest.sceneID); ClusterCommand::AddArguments(); } @@ -500,8 +500,8 @@ class ScenesRemoveScene : public ClusterCommand public: ScenesRemoveScene(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("remove-scene", credsIssuerConfig) { - AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); - AddArgument("SceneId", 0, UINT8_MAX, &mRequest.sceneId); + AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); + AddArgument("SceneID", 0, UINT8_MAX, &mRequest.sceneID); ClusterCommand::AddArguments(); } @@ -531,7 +531,7 @@ class ScenesRemoveAllScenes : public ClusterCommand public: ScenesRemoveAllScenes(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("remove-all-scenes", credsIssuerConfig) { - AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); + AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); ClusterCommand::AddArguments(); } @@ -561,8 +561,8 @@ class ScenesStoreScene : public ClusterCommand public: ScenesStoreScene(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("store-scene", credsIssuerConfig) { - AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); - AddArgument("SceneId", 0, UINT8_MAX, &mRequest.sceneId); + AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); + AddArgument("SceneID", 0, UINT8_MAX, &mRequest.sceneID); ClusterCommand::AddArguments(); } @@ -592,8 +592,8 @@ class ScenesRecallScene : public ClusterCommand public: ScenesRecallScene(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("recall-scene", credsIssuerConfig) { - AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); - AddArgument("SceneId", 0, UINT8_MAX, &mRequest.sceneId); + AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); + AddArgument("SceneID", 0, UINT8_MAX, &mRequest.sceneID); AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); ClusterCommand::AddArguments(); } @@ -625,7 +625,7 @@ class ScenesGetSceneMembership : public ClusterCommand ScenesGetSceneMembership(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("get-scene-membership", credsIssuerConfig) { - AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); + AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); ClusterCommand::AddArguments(); } @@ -656,8 +656,8 @@ class ScenesEnhancedAddScene : public ClusterCommand ScenesEnhancedAddScene(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("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); @@ -692,8 +692,8 @@ class ScenesEnhancedViewScene : public ClusterCommand public: ScenesEnhancedViewScene(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("enhanced-view-scene", credsIssuerConfig) { - AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); - AddArgument("SceneId", 0, UINT8_MAX, &mRequest.sceneId); + AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); + AddArgument("SceneID", 0, UINT8_MAX, &mRequest.sceneID); ClusterCommand::AddArguments(); } @@ -724,10 +724,10 @@ class ScenesCopyScene : public ClusterCommand ScenesCopyScene(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("copy-scene", credsIssuerConfig) { AddArgument("Mode", 0, UINT8_MAX, &mRequest.mode); - AddArgument("GroupIdFrom", 0, UINT16_MAX, &mRequest.groupIdFrom); - AddArgument("SceneIdFrom", 0, UINT8_MAX, &mRequest.sceneIdFrom); - AddArgument("GroupIdTo", 0, UINT16_MAX, &mRequest.groupIdTo); - AddArgument("SceneIdTo", 0, UINT8_MAX, &mRequest.sceneIdTo); + 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(); } diff --git a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp index 571f7c0ec3f1da..3127f85e5b9117 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/ComplexArgumentParser.cpp @@ -222,10 +222,10 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, value.isMember("attributeValue"))); char labelWithMember[kMaxLabelLength]; - if (value.isMember("attributeId")) + if (value.isMember("attributeID")) { - snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "attributeId"); - ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.attributeId, value["attributeId"])); + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "attributeID"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.attributeID, value["attributeID"])); } snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "attributeValue"); @@ -236,7 +236,7 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, void ComplexArgumentParser::Finalize(chip::app::Clusters::Scenes::Structs::AttributeValuePair::Type & request) { - ComplexArgumentParser::Finalize(request.attributeId); + ComplexArgumentParser::Finalize(request.attributeID); ComplexArgumentParser::Finalize(request.attributeValue); } CHIP_ERROR ComplexArgumentParser::Setup(const char * label, @@ -644,13 +644,13 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters: VerifyOrReturnError(value.isObject(), CHIP_ERROR_INVALID_ARGUMENT); ReturnErrorOnFailure( - ComplexArgumentParser::EnsureMemberExist("ExtensionFieldSet.clusterId", "clusterId", value.isMember("clusterId"))); + 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"])); + snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "clusterID"); + ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.clusterID, value["clusterID"])); snprintf(labelWithMember, sizeof(labelWithMember), "%s.%s", label, "attributeValueList"); ReturnErrorOnFailure(ComplexArgumentParser::Setup(labelWithMember, request.attributeValueList, value["attributeValueList"])); @@ -660,7 +660,7 @@ CHIP_ERROR ComplexArgumentParser::Setup(const char * label, chip::app::Clusters: void ComplexArgumentParser::Finalize(chip::app::Clusters::Scenes::Structs::ExtensionFieldSet::Type & request) { - ComplexArgumentParser::Finalize(request.clusterId); + ComplexArgumentParser::Finalize(request.clusterID); ComplexArgumentParser::Finalize(request.attributeValueList); } CHIP_ERROR 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 fd7004071e454e..b23d912a60a53e 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -230,10 +230,10 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = LogValue("AttributeId", indent + 1, value.attributeId); + 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'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'AttributeID'"); return err; } } @@ -643,10 +643,10 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = LogValue("ClusterId", indent + 1, value.clusterId); + 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'"); + DataModelLogger::LogString(indent + 1, "Struct truncated due to invalid value for 'ClusterID'"); return err; } } @@ -3694,8 +3694,8 @@ 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("groupId", indent + 1, value.groupId)); - ReturnErrorOnFailure(DataModelLogger::LogValue("sceneId", indent + 1, value.sceneId)); + ReturnErrorOnFailure(DataModelLogger::LogValue("groupID", indent + 1, value.groupID)); + ReturnErrorOnFailure(DataModelLogger::LogValue("sceneID", indent + 1, value.sceneID)); DataModelLogger::LogString(indent, "}"); return CHIP_NO_ERROR; } @@ -3704,8 +3704,8 @@ 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("groupId", indent + 1, value.groupId)); - ReturnErrorOnFailure(DataModelLogger::LogValue("sceneId", indent + 1, value.sceneId)); + 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)); @@ -3717,8 +3717,8 @@ 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("groupId", indent + 1, value.groupId)); - ReturnErrorOnFailure(DataModelLogger::LogValue("sceneId", indent + 1, value.sceneId)); + ReturnErrorOnFailure(DataModelLogger::LogValue("groupID", indent + 1, value.groupID)); + ReturnErrorOnFailure(DataModelLogger::LogValue("sceneID", indent + 1, value.sceneID)); DataModelLogger::LogString(indent, "}"); return CHIP_NO_ERROR; } @@ -3727,7 +3727,7 @@ 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("groupId", indent + 1, value.groupId)); + ReturnErrorOnFailure(DataModelLogger::LogValue("groupID", indent + 1, value.groupID)); DataModelLogger::LogString(indent, "}"); return CHIP_NO_ERROR; } @@ -3736,8 +3736,8 @@ 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("groupId", indent + 1, value.groupId)); - ReturnErrorOnFailure(DataModelLogger::LogValue("sceneId", indent + 1, value.sceneId)); + ReturnErrorOnFailure(DataModelLogger::LogValue("groupID", indent + 1, value.groupID)); + ReturnErrorOnFailure(DataModelLogger::LogValue("sceneID", indent + 1, value.sceneID)); DataModelLogger::LogString(indent, "}"); return CHIP_NO_ERROR; } @@ -3747,7 +3747,7 @@ 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("capacity", indent + 1, value.capacity)); - ReturnErrorOnFailure(DataModelLogger::LogValue("groupId", indent + 1, value.groupId)); + ReturnErrorOnFailure(DataModelLogger::LogValue("groupID", indent + 1, value.groupID)); ReturnErrorOnFailure(DataModelLogger::LogValue("sceneList", indent + 1, value.sceneList)); DataModelLogger::LogString(indent, "}"); return CHIP_NO_ERROR; @@ -3757,8 +3757,8 @@ 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("groupId", indent + 1, value.groupId)); - ReturnErrorOnFailure(DataModelLogger::LogValue("sceneId", indent + 1, value.sceneId)); + ReturnErrorOnFailure(DataModelLogger::LogValue("groupID", indent + 1, value.groupID)); + ReturnErrorOnFailure(DataModelLogger::LogValue("sceneID", indent + 1, value.sceneID)); DataModelLogger::LogString(indent, "}"); return CHIP_NO_ERROR; } @@ -3767,8 +3767,8 @@ 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("groupId", indent + 1, value.groupId)); - ReturnErrorOnFailure(DataModelLogger::LogValue("sceneId", indent + 1, value.sceneId)); + 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)); @@ -3780,8 +3780,8 @@ 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("groupIdFrom", indent + 1, value.groupIdFrom)); - ReturnErrorOnFailure(DataModelLogger::LogValue("sceneIdFrom", indent + 1, value.sceneIdFrom)); + ReturnErrorOnFailure(DataModelLogger::LogValue("groupIdentifierFrom", indent + 1, value.groupIdentifierFrom)); + ReturnErrorOnFailure(DataModelLogger::LogValue("sceneIdentifierFrom", indent + 1, value.sceneIdentifierFrom)); DataModelLogger::LogString(indent, "}"); return CHIP_NO_ERROR; } diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 06c412d33abec7..1eaa2e83eb8bca 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -165,6 +165,8 @@ class TestList : public Command printf("Test_TC_PSCFG_2_1\n"); printf("Test_TC_RH_1_1\n"); printf("Test_TC_RH_2_1\n"); + printf("Test_TC_SC_5_1\n"); + printf("Test_TC_SC_5_2\n"); printf("Test_TC_SWTCH_1_1\n"); printf("Test_TC_SWTCH_2_1\n"); printf("Test_TC_TMP_1_1\n"); @@ -484,8 +486,6 @@ class ManualTestList : public Command printf("Test_TC_SC_4_8\n"); printf("Test_TC_SC_4_9\n"); printf("Test_TC_SC_4_10\n"); - printf("Test_TC_SC_5_1\n"); - printf("Test_TC_SC_5_2\n"); printf("Test_TC_SC_5_3\n"); printf("Test_TC_SC_6_1\n"); printf("Test_TC_DGSW_2_1\n"); @@ -40944,28 +40944,815 @@ class Test_TC_RH_2_1Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "TH reads the MinMeasuredValue attribute from the DUT"); - VerifyOrDo(!ShouldSkip("RH.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::MinMeasuredValue::Id, true, chip::NullOptional); + LogStep(1, "TH reads the MinMeasuredValue attribute from the DUT"); + VerifyOrDo(!ShouldSkip("RH.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, + RelativeHumidityMeasurement::Attributes::MinMeasuredValue::Id, true, chip::NullOptional); + } + case 2: { + LogStep(2, "TH reads the MaxMeasuredValue attribute from the DUT"); + VerifyOrDo(!ShouldSkip("RH.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, + RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::Id, true, chip::NullOptional); + } + case 3: { + LogStep(3, "TH reads the MeasuredValue attribute from the DUT"); + VerifyOrDo(!ShouldSkip("RH.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, + RelativeHumidityMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads the Tolerance attribute from the DUT"); + VerifyOrDo(!ShouldSkip("RH.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, + RelativeHumidityMeasurement::Attributes::Tolerance::Id, true, chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_SC_5_1Suite : public TestCommand +{ +public: + Test_TC_SC_5_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_5_1", 17, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_SC_5_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + + // Allow yaml to access the current commissioner node id. + // Default to 0 (undefined node id) so we know if this isn't + // set correctly. + // Reset on every step in case it changed. + chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); + (void) commissionerNodeId; + + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + } + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("status", value.status, 0U)); + VerifyOrReturn(CheckValue("groupID", value.groupID, 259U)); + VerifyOrReturn(CheckValueAsString("groupName", value.groupName, chip::CharSpan("Test Group", 10))); + } + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("status", value.status, 0U)); + VerifyOrReturn(CheckValue("groupID", value.groupID, 259U)); + VerifyOrReturn(CheckValueAsString("groupName", value.groupName, chip::CharSpan("", 0))); + } + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("groupKeySet.groupKeySetID", value.groupKeySet.groupKeySetID, 419U)); + VerifyOrReturn(CheckValue("groupKeySet.groupKeySecurityPolicy", value.groupKeySet.groupKeySecurityPolicy, 0U)); + VerifyOrReturn(CheckValueNull("groupKeySet.epochKey0", value.groupKeySet.epochKey0)); + VerifyOrReturn(CheckValueNonNull("groupKeySet.epochStartTime0", value.groupKeySet.epochStartTime0)); + VerifyOrReturn( + CheckValue("groupKeySet.epochStartTime0.Value()", value.groupKeySet.epochStartTime0.Value(), 2220000ULL)); + VerifyOrReturn(CheckValueNull("groupKeySet.epochKey1", value.groupKeySet.epochKey1)); + VerifyOrReturn(CheckValueNonNull("groupKeySet.epochStartTime1", value.groupKeySet.epochStartTime1)); + VerifyOrReturn( + CheckValue("groupKeySet.epochStartTime1.Value()", value.groupKeySet.epochStartTime1.Value(), 2220001ULL)); + VerifyOrReturn(CheckValueNull("groupKeySet.epochKey2", value.groupKeySet.epochKey2)); + VerifyOrReturn(CheckValueNonNull("groupKeySet.epochStartTime2", value.groupKeySet.epochStartTime2)); + VerifyOrReturn( + CheckValue("groupKeySet.epochStartTime2.Value()", value.groupKeySet.epochStartTime2.Value(), 2220002ULL)); + } + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList< + chip::app::Clusters::GroupKeyManagement::Structs::GroupInfoMapStruct::DecodableType> + value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("groupTable", iter_0, 0)); + VerifyOrReturn(CheckValue("groupTable[0].groupId", iter_0.GetValue().groupId, 259U)); + { + auto iter_2 = iter_0.GetValue().endpoints.begin(); + VerifyOrReturn( + CheckNextListItemDecodes("groupTable[0].endpoints", iter_2, 0)); + VerifyOrReturn(CheckValue("groupTable[0].endpoints[0]", iter_2.GetValue(), + mEndpoint.HasValue() ? mEndpoint.Value() : 1U)); + VerifyOrReturn( + CheckNoMoreListItems("groupTable[0].endpoints", iter_2, 1)); + } + VerifyOrReturn(CheckValuePresent("groupTable[0].groupName", iter_0.GetValue().groupName)); + VerifyOrReturn(CheckValueAsString("groupTable[0].groupName.Value()", iter_0.GetValue().groupName.Value(), + chip::CharSpan("Test Group", 10))); + VerifyOrReturn(CheckNoMoreListItems("groupTable", iter_0, 1)); + } + } + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList< + chip::app::Clusters::GroupKeyManagement::Structs::GroupInfoMapStruct::DecodableType> + value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("groupTable", iter_0, 0)); + VerifyOrReturn(CheckValue("groupTable[0].groupId", iter_0.GetValue().groupId, 259U)); + { + auto iter_2 = iter_0.GetValue().endpoints.begin(); + VerifyOrReturn( + CheckNextListItemDecodes("groupTable[0].endpoints", iter_2, 0)); + VerifyOrReturn(CheckValue("groupTable[0].endpoints[0]", iter_2.GetValue(), + mEndpoint.HasValue() ? mEndpoint.Value() : 1U)); + VerifyOrReturn( + CheckNoMoreListItems("groupTable[0].endpoints", iter_2, 1)); + } + VerifyOrReturn(CheckValuePresent("groupTable[0].groupName", iter_0.GetValue().groupName)); + VerifyOrReturn(CheckValueAsString("groupTable[0].groupName.Value()", iter_0.GetValue().groupName.Value(), + chip::CharSpan("", 0))); + VerifyOrReturn(CheckNoMoreListItems("groupTable", iter_0, 1)); + } + } + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList< + chip::app::Clusters::GroupKeyManagement::Structs::GroupKeyMapStruct::DecodableType> + value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("groupKeyMap", iter_0, 0)); + } + } + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList< + chip::app::Clusters::GroupKeyManagement::Structs::GroupInfoMapStruct::DecodableType> + value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("groupTable", iter_0, 0)); + } + } + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + // Allow yaml to access the current commissioner node id. + // Default to 0 (undefined node id) so we know if this isn't + // set correctly. + // Reset on every step in case it changed. + chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); + (void) commissionerNodeId; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "TH adds ACL Operate privileges for Group 0x0103"); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = + new ListHolder(2); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); + listHolder_0->mList[0].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = commissionerNodeId; + listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); + } + listHolder_0->mList[0].targets.SetNull(); + listHolder_0->mList[0].fabricIndex = 1U; + + listHolder_0->mList[1].privilege = + static_cast(3); + listHolder_0->mList[1].authMode = + static_cast(3); + listHolder_0->mList[1].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = 259ULL; + listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); + } + listHolder_0->mList[1].targets.SetNull(); + listHolder_0->mList[1].fabricIndex = 1U; + + value = chip::app::DataModel::List( + listHolder_0->mList, 2); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 2: { + LogStep(2, "TH sends KeySetWrite command with incorrect key"); + ListFreer listFreer; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; + + value.groupKeySet.groupKeySetID = 419U; + value.groupKeySet.groupKeySecurityPolicy = + static_cast(0); + value.groupKeySet.epochKey0.SetNonNull(); + value.groupKeySet.epochKey0.Value() = chip::ByteSpan( + chip::Uint8::from_const_char("0x00000000000000000000000000000001garbage: not in length on purpose"), 34); + value.groupKeySet.epochStartTime0.SetNonNull(); + value.groupKeySet.epochStartTime0.Value() = 111ULL; + value.groupKeySet.epochKey1.SetNonNull(); + value.groupKeySet.epochKey1.Value() = chip::ByteSpan( + chip::Uint8::from_const_char("0x00000000000000000000000000000002garbage: not in length on purpose"), 34); + value.groupKeySet.epochStartTime1.SetNonNull(); + value.groupKeySet.epochStartTime1.Value() = 222ULL; + value.groupKeySet.epochKey2.SetNonNull(); + value.groupKeySet.epochKey2.Value() = chip::ByteSpan( + chip::Uint8::from_const_char("0x00000000000000000000000000000003garbage: not in length on purpose"), 34); + value.groupKeySet.epochStartTime2.SetNonNull(); + value.groupKeySet.epochStartTime2.Value() = 333ULL; + + return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional + + ); + } + case 3: { + LogStep(3, "TH sends KeySetWrite command with TH key"); + ListFreer listFreer; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; + + value.groupKeySet.groupKeySetID = 419U; + value.groupKeySet.groupKeySecurityPolicy = + static_cast(0); + value.groupKeySet.epochKey0.SetNonNull(); + value.groupKeySet.epochKey0.Value() = chip::ByteSpan( + chip::Uint8::from_const_char("0xd0d1d2d3d4d5d6d7d8d9dadbdcdddedfgarbage: not in length on purpose"), 34); + value.groupKeySet.epochStartTime0.SetNonNull(); + value.groupKeySet.epochStartTime0.Value() = 2220000ULL; + value.groupKeySet.epochKey1.SetNonNull(); + value.groupKeySet.epochKey1.Value() = chip::ByteSpan( + chip::Uint8::from_const_char("0xd1d1d2d3d4d5d6d7d8d9dadbdcdddedfgarbage: not in length on purpose"), 34); + value.groupKeySet.epochStartTime1.SetNonNull(); + value.groupKeySet.epochStartTime1.Value() = 2220001ULL; + value.groupKeySet.epochKey2.SetNonNull(); + value.groupKeySet.epochKey2.Value() = chip::ByteSpan( + chip::Uint8::from_const_char("0xd2d1d2d3d4d5d6d7d8d9dadbdcdddedfgarbage: not in length on purpose"), 34); + value.groupKeySet.epochStartTime2.SetNonNull(); + value.groupKeySet.epochStartTime2.Value() = 2220002ULL; + + return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional + + ); + } + case 4: { + LogStep(4, "TH binds GroupId to GroupKeySet"); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = new ListHolder(1); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].groupId = 259U; + listHolder_0->mList[0].groupKeySetID = 419U; + listHolder_0->mList[0].fabricIndex = 1U; + + value = chip::app::DataModel::List( + listHolder_0->mList, 1); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); + } + case 5: { + LogStep(5, "TH sends RemoveAllGroups command"); + ListFreer listFreer; + chip::app::Clusters::Groups::Commands::RemoveAllGroups::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::RemoveAllGroups::Id, value, + chip::NullOptional + + ); + } + case 6: { + LogStep(6, "TH sends AddGroup command"); + ListFreer listFreer; + chip::app::Clusters::Groups::Commands::AddGroup::Type value; + value.groupID = 259U; + value.groupName = chip::Span("Test Groupgarbage: not in length on purpose", 10); + return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::AddGroup::Id, value, chip::NullOptional + + ); + } + case 7: { + LogStep(7, "TH sends ViewGroup command"); + VerifyOrDo(!ShouldSkip("G.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::Groups::Commands::ViewGroup::Type value; + value.groupID = 259U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::ViewGroup::Id, value, + chip::NullOptional + + ); + } + case 8: { + LogStep(8, "TH sends ViewGroup command"); + VerifyOrDo(!ShouldSkip("!(G.S.F00)"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::Groups::Commands::ViewGroup::Type value; + value.groupID = 259U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::ViewGroup::Id, value, + chip::NullOptional + + ); + } + case 9: { + LogStep(9, "TH sends KeySetRead"); + ListFreer listFreer; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type value; + value.groupKeySetID = 419U; + return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Commands::KeySetRead::Id, + value, chip::NullOptional + + ); + } + case 10: { + LogStep(10, "TH reads GroupTable attribute"); + VerifyOrDo(!ShouldSkip("G.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Attributes::GroupTable::Id, true, chip::NullOptional); + } + case 11: { + LogStep(11, "TH reads GroupTable attribute"); + VerifyOrDo(!ShouldSkip("!(G.S.F00)"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Attributes::GroupTable::Id, true, chip::NullOptional); + } + case 12: { + LogStep(12, "TH removes the GroupKeySet"); + ListFreer listFreer; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type value; + value.groupKeySetID = 419U; + return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Commands::KeySetRemove::Id, value, chip::NullOptional + + ); + } + case 13: { + LogStep(13, "TH verifies the corresponding GroupKeyMap entry has been removed"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Attributes::GroupKeyMap::Id, true, chip::NullOptional); + } + case 14: { + LogStep(14, "TH cleans up groups using RemoveAllGroups command"); + ListFreer listFreer; + chip::app::Clusters::Groups::Commands::RemoveAllGroups::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::RemoveAllGroups::Id, value, + chip::NullOptional + + ); + } + case 15: { + LogStep(15, "TH verifies the group has been removed in the GroupTable"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Attributes::GroupTable::Id, true, chip::NullOptional); + } + case 16: { + LogStep(16, "TH removes ACL Operate privileges for Group 0x0103"); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = + new ListHolder(1); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); + listHolder_0->mList[0].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = commissionerNodeId; + listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); + } + listHolder_0->mList[0].targets.SetNull(); + listHolder_0->mList[0].fabricIndex = 1U; + + value = chip::app::DataModel::List( + listHolder_0->mList, 1); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, + chip::NullOptional, chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_SC_5_2Suite : public TestCommand +{ +public: + Test_TC_SC_5_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_5_2", 11, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_SC_5_2Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + + // Allow yaml to access the current commissioner node id. + // Default to 0 (undefined node id) so we know if this isn't + // set correctly. + // Reset on every step in case it changed. + chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); + (void) commissionerNodeId; + + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::Groups::Commands::AddGroupResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + } + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("status", value.status, 0U)); + VerifyOrReturn(CheckValue("groupID", value.groupID, 259U)); + VerifyOrReturn(CheckValueAsString("groupName", value.groupName, chip::CharSpan("Test Group", 10))); + } + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("status", value.status, 0U)); + VerifyOrReturn(CheckValue("groupID", value.groupID, 259U)); + VerifyOrReturn(CheckValueAsString("groupName", value.groupName, chip::CharSpan("", 0))); + } + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + // Allow yaml to access the current commissioner node id. + // Default to 0 (undefined node id) so we know if this isn't + // set correctly. + // Reset on every step in case it changed. + chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); + (void) commissionerNodeId; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "TH adds ACL Operate privileges for Group 0x0103"); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = + new ListHolder(2); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); + listHolder_0->mList[0].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = commissionerNodeId; + listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); + } + listHolder_0->mList[0].targets.SetNull(); + listHolder_0->mList[0].fabricIndex = 1U; + + listHolder_0->mList[1].privilege = + static_cast(3); + listHolder_0->mList[1].authMode = + static_cast(3); + listHolder_0->mList[1].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = 259ULL; + listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); + } + listHolder_0->mList[1].targets.SetNull(); + listHolder_0->mList[1].fabricIndex = 1U; + + value = chip::app::DataModel::List( + listHolder_0->mList, 2); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, + chip::NullOptional, chip::NullOptional); } case 2: { - LogStep(2, "TH reads the MaxMeasuredValue attribute from the DUT"); - VerifyOrDo(!ShouldSkip("RH.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::MaxMeasuredValue::Id, true, chip::NullOptional); + LogStep(2, "TH sends KeySetWrite command with TH key"); + ListFreer listFreer; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetWrite::Type value; + + value.groupKeySet.groupKeySetID = 419U; + value.groupKeySet.groupKeySecurityPolicy = + static_cast(0); + value.groupKeySet.epochKey0.SetNonNull(); + value.groupKeySet.epochKey0.Value() = chip::ByteSpan( + chip::Uint8::from_const_char("0xd0d1d2d3d4d5d6d7d8d9dadbdcdddedfgarbage: not in length on purpose"), 34); + value.groupKeySet.epochStartTime0.SetNonNull(); + value.groupKeySet.epochStartTime0.Value() = 2220000ULL; + value.groupKeySet.epochKey1.SetNonNull(); + value.groupKeySet.epochKey1.Value() = chip::ByteSpan( + chip::Uint8::from_const_char("0xd1d1d2d3d4d5d6d7d8d9dadbdcdddedfgarbage: not in length on purpose"), 34); + value.groupKeySet.epochStartTime1.SetNonNull(); + value.groupKeySet.epochStartTime1.Value() = 2220001ULL; + value.groupKeySet.epochKey2.SetNonNull(); + value.groupKeySet.epochKey2.Value() = chip::ByteSpan( + chip::Uint8::from_const_char("0xd2d1d2d3d4d5d6d7d8d9dadbdcdddedfgarbage: not in length on purpose"), 34); + value.groupKeySet.epochStartTime2.SetNonNull(); + value.groupKeySet.epochStartTime2.Value() = 2220002ULL; + + return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Commands::KeySetWrite::Id, value, chip::NullOptional + + ); } case 3: { - LogStep(3, "TH reads the MeasuredValue attribute from the DUT"); - VerifyOrDo(!ShouldSkip("RH.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); + LogStep(3, "TH binds GroupId to GroupKeySet"); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = new ListHolder(1); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].groupId = 259U; + listHolder_0->mList[0].groupKeySetID = 419U; + listHolder_0->mList[0].fabricIndex = 1U; + + value = chip::app::DataModel::List( + listHolder_0->mList, 1); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); } case 4: { - LogStep(4, "TH reads the Tolerance attribute from the DUT"); - VerifyOrDo(!ShouldSkip("RH.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), RelativeHumidityMeasurement::Id, - RelativeHumidityMeasurement::Attributes::Tolerance::Id, true, chip::NullOptional); + LogStep(4, "TH sends RemoveAllGroups command"); + ListFreer listFreer; + chip::app::Clusters::Groups::Commands::RemoveAllGroups::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::RemoveAllGroups::Id, value, + chip::NullOptional + + ); + } + case 5: { + LogStep(5, "TH sends AddGroup command"); + ListFreer listFreer; + chip::app::Clusters::Groups::Commands::AddGroup::Type value; + value.groupID = 259U; + value.groupName = chip::Span("Test Groupgarbage: not in length on purpose", 10); + return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::AddGroup::Id, value, chip::NullOptional + + ); + } + case 6: { + LogStep(6, "TH sends ViewGroup command using group messaging"); + VerifyOrDo(!ShouldSkip("G.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::Groups::Commands::ViewGroup::Type value; + value.groupID = 259U; + return SendGroupCommand(kIdentityAlpha, 259, Groups::Id, Groups::Commands::ViewGroup::Id, value); + } + case 7: { + LogStep(7, "TH sends ViewGroup command using group messaging"); + VerifyOrDo(!ShouldSkip("!(G.S.F00)"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::Groups::Commands::ViewGroup::Type value; + value.groupID = 259U; + return SendGroupCommand(kIdentityAlpha, 259, Groups::Id, Groups::Commands::ViewGroup::Id, value); + } + case 8: { + LogStep(8, "TH removes the GroupKeySet"); + ListFreer listFreer; + chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type value; + value.groupKeySetID = 419U; + return SendCommand(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, + GroupKeyManagement::Commands::KeySetRemove::Id, value, chip::NullOptional + + ); + } + case 9: { + LogStep(9, "TH cleans up groups using RemoveAllGroups command"); + ListFreer listFreer; + chip::app::Clusters::Groups::Commands::RemoveAllGroups::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), Groups::Id, Groups::Commands::RemoveAllGroups::Id, value, + chip::NullOptional + + ); + } + case 10: { + LogStep(10, "TH removes ACL Operate privileges for Group 0x0103"); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = + new ListHolder(1); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); + listHolder_0->mList[0].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = commissionerNodeId; + listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); + } + listHolder_0->mList[0].targets.SetNull(); + listHolder_0->mList[0].fabricIndex = 1U; + + value = chip::app::DataModel::List( + listHolder_0->mList, 1); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, + chip::NullOptional, chip::NullOptional); } } return CHIP_NO_ERROR; @@ -103165,148 +103952,10 @@ class Test_TC_MOD_2_1Suite : public TestCommand } }; -class Test_TC_MOD_2_2Suite : public TestCommand -{ -public: - Test_TC_MOD_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_2_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_MOD_2_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - - // Allow yaml to access the current commissioner node id. - // Default to 0 (undefined node id) so we know if this isn't - // set correctly. - // Reset on every step in case it changed. - chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); - (void) commissionerNodeId; - - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - // Allow yaml to access the current commissioner node id. - // Default to 0 (undefined node id) so we know if this isn't - // set correctly. - // Reset on every step in case it changed. - chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); - (void) commissionerNodeId; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_MOD_3_1Suite : public TestCommand -{ -public: - Test_TC_MOD_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_3_1", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_MOD_3_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - - // Allow yaml to access the current commissioner node id. - // Default to 0 (undefined node id) so we know if this isn't - // set correctly. - // Reset on every step in case it changed. - chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); - (void) commissionerNodeId; - - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - // Allow yaml to access the current commissioner node id. - // Default to 0 (undefined node id) so we know if this isn't - // set correctly. - // Reset on every step in case it changed. - chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); - (void) commissionerNodeId; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_MOD_3_2Suite : public TestCommand +class Test_TC_MOD_2_2Suite : public TestCommand { public: - Test_TC_MOD_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_3_2", 0, credsIssuerConfig) + Test_TC_MOD_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -103314,7 +103963,7 @@ class Test_TC_MOD_3_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MOD_3_2Suite() {} + ~Test_TC_MOD_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -103372,10 +104021,10 @@ class Test_TC_MOD_3_2Suite : public TestCommand } }; -class Test_TC_MOD_3_3Suite : public TestCommand +class Test_TC_MOD_3_1Suite : public TestCommand { public: - Test_TC_MOD_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_3_3", 0, credsIssuerConfig) + Test_TC_MOD_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -103383,7 +104032,7 @@ class Test_TC_MOD_3_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MOD_3_3Suite() {} + ~Test_TC_MOD_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -103441,10 +104090,10 @@ class Test_TC_MOD_3_3Suite : public TestCommand } }; -class Test_TC_MOD_3_4Suite : public TestCommand +class Test_TC_MOD_3_2Suite : public TestCommand { public: - Test_TC_MOD_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_3_4", 0, credsIssuerConfig) + Test_TC_MOD_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -103452,7 +104101,7 @@ class Test_TC_MOD_3_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MOD_3_4Suite() {} + ~Test_TC_MOD_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -103510,10 +104159,10 @@ class Test_TC_MOD_3_4Suite : public TestCommand } }; -class Test_TC_SU_1_1Suite : public TestCommand +class Test_TC_MOD_3_3Suite : public TestCommand { public: - Test_TC_SU_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_1_1", 0, credsIssuerConfig) + Test_TC_MOD_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_3_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -103521,7 +104170,7 @@ class Test_TC_SU_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_1_1Suite() {} + ~Test_TC_MOD_3_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -103579,10 +104228,10 @@ class Test_TC_SU_1_1Suite : public TestCommand } }; -class Test_TC_SU_2_1Suite : public TestCommand +class Test_TC_MOD_3_4Suite : public TestCommand { public: - Test_TC_SU_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_1", 0, credsIssuerConfig) + Test_TC_MOD_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_3_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -103590,7 +104239,7 @@ class Test_TC_SU_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_2_1Suite() {} + ~Test_TC_MOD_3_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -103648,10 +104297,10 @@ class Test_TC_SU_2_1Suite : public TestCommand } }; -class Test_TC_SU_2_2Suite : public TestCommand +class Test_TC_SU_1_1Suite : public TestCommand { public: - Test_TC_SU_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_2", 0, credsIssuerConfig) + Test_TC_SU_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_1_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -103659,7 +104308,7 @@ class Test_TC_SU_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_2_2Suite() {} + ~Test_TC_SU_1_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -103717,10 +104366,10 @@ class Test_TC_SU_2_2Suite : public TestCommand } }; -class Test_TC_SU_2_3Suite : public TestCommand +class Test_TC_SU_2_1Suite : public TestCommand { public: - Test_TC_SU_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_3", 0, credsIssuerConfig) + Test_TC_SU_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -103728,7 +104377,7 @@ class Test_TC_SU_2_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_2_3Suite() {} + ~Test_TC_SU_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -103786,10 +104435,10 @@ class Test_TC_SU_2_3Suite : public TestCommand } }; -class Test_TC_SU_2_4Suite : public TestCommand +class Test_TC_SU_2_2Suite : public TestCommand { public: - Test_TC_SU_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_4", 0, credsIssuerConfig) + Test_TC_SU_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -103797,7 +104446,7 @@ class Test_TC_SU_2_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_2_4Suite() {} + ~Test_TC_SU_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -103855,10 +104504,10 @@ class Test_TC_SU_2_4Suite : public TestCommand } }; -class Test_TC_SU_2_5Suite : public TestCommand +class Test_TC_SU_2_3Suite : public TestCommand { public: - Test_TC_SU_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_5", 0, credsIssuerConfig) + Test_TC_SU_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -103866,7 +104515,7 @@ class Test_TC_SU_2_5Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_2_5Suite() {} + ~Test_TC_SU_2_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -103924,10 +104573,10 @@ class Test_TC_SU_2_5Suite : public TestCommand } }; -class Test_TC_SU_2_6Suite : public TestCommand +class Test_TC_SU_2_4Suite : public TestCommand { public: - Test_TC_SU_2_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_6", 0, credsIssuerConfig) + Test_TC_SU_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -103935,7 +104584,7 @@ class Test_TC_SU_2_6Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_2_6Suite() {} + ~Test_TC_SU_2_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -103993,10 +104642,10 @@ class Test_TC_SU_2_6Suite : public TestCommand } }; -class Test_TC_SU_2_7Suite : public TestCommand +class Test_TC_SU_2_5Suite : public TestCommand { public: - Test_TC_SU_2_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_7", 0, credsIssuerConfig) + Test_TC_SU_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_5", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -104004,7 +104653,7 @@ class Test_TC_SU_2_7Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_2_7Suite() {} + ~Test_TC_SU_2_5Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -104062,10 +104711,10 @@ class Test_TC_SU_2_7Suite : public TestCommand } }; -class Test_TC_SU_2_8Suite : public TestCommand +class Test_TC_SU_2_6Suite : public TestCommand { public: - Test_TC_SU_2_8Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_8", 0, credsIssuerConfig) + Test_TC_SU_2_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_6", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -104073,7 +104722,7 @@ class Test_TC_SU_2_8Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_2_8Suite() {} + ~Test_TC_SU_2_6Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -104131,10 +104780,10 @@ class Test_TC_SU_2_8Suite : public TestCommand } }; -class Test_TC_SU_3_1Suite : public TestCommand +class Test_TC_SU_2_7Suite : public TestCommand { public: - Test_TC_SU_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_3_1", 0, credsIssuerConfig) + Test_TC_SU_2_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_7", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -104142,7 +104791,7 @@ class Test_TC_SU_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_3_1Suite() {} + ~Test_TC_SU_2_7Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -104200,10 +104849,10 @@ class Test_TC_SU_3_1Suite : public TestCommand } }; -class Test_TC_SU_3_2Suite : public TestCommand +class Test_TC_SU_2_8Suite : public TestCommand { public: - Test_TC_SU_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_3_2", 0, credsIssuerConfig) + Test_TC_SU_2_8Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_8", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -104211,7 +104860,7 @@ class Test_TC_SU_3_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_3_2Suite() {} + ~Test_TC_SU_2_8Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -104269,10 +104918,10 @@ class Test_TC_SU_3_2Suite : public TestCommand } }; -class Test_TC_SU_3_3Suite : public TestCommand +class Test_TC_SU_3_1Suite : public TestCommand { public: - Test_TC_SU_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_3_3", 0, credsIssuerConfig) + Test_TC_SU_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -104280,7 +104929,7 @@ class Test_TC_SU_3_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_3_3Suite() {} + ~Test_TC_SU_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -104338,10 +104987,10 @@ class Test_TC_SU_3_3Suite : public TestCommand } }; -class Test_TC_SU_3_4Suite : public TestCommand +class Test_TC_SU_3_2Suite : public TestCommand { public: - Test_TC_SU_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_3_4", 0, credsIssuerConfig) + Test_TC_SU_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -104349,7 +104998,7 @@ class Test_TC_SU_3_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_3_4Suite() {} + ~Test_TC_SU_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -104407,10 +105056,10 @@ class Test_TC_SU_3_4Suite : public TestCommand } }; -class Test_TC_SU_4_1Suite : public TestCommand +class Test_TC_SU_3_3Suite : public TestCommand { public: - Test_TC_SU_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_4_1", 0, credsIssuerConfig) + Test_TC_SU_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_3_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -104418,7 +105067,7 @@ class Test_TC_SU_4_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_4_1Suite() {} + ~Test_TC_SU_3_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -104476,10 +105125,10 @@ class Test_TC_SU_4_1Suite : public TestCommand } }; -class Test_TC_SU_4_2Suite : public TestCommand +class Test_TC_SU_3_4Suite : public TestCommand { public: - Test_TC_SU_4_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_4_2", 0, credsIssuerConfig) + Test_TC_SU_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_3_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -104487,7 +105136,7 @@ class Test_TC_SU_4_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_4_2Suite() {} + ~Test_TC_SU_3_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -104545,10 +105194,10 @@ class Test_TC_SU_4_2Suite : public TestCommand } }; -class Test_TC_PSCFG_2_2Suite : public TestCommand +class Test_TC_SU_4_1Suite : public TestCommand { public: - Test_TC_PSCFG_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PSCFG_2_2", 0, credsIssuerConfig) + Test_TC_SU_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_4_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -104556,7 +105205,7 @@ class Test_TC_PSCFG_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_PSCFG_2_2Suite() {} + ~Test_TC_SU_4_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -104614,10 +105263,10 @@ class Test_TC_PSCFG_2_2Suite : public TestCommand } }; -class Test_TC_SC_1_1Suite : public TestCommand +class Test_TC_SU_4_2Suite : public TestCommand { public: - Test_TC_SC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_1_1", 0, credsIssuerConfig) + Test_TC_SU_4_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_4_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -104625,7 +105274,7 @@ class Test_TC_SC_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_1_1Suite() {} + ~Test_TC_SU_4_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -104683,10 +105332,10 @@ class Test_TC_SC_1_1Suite : public TestCommand } }; -class Test_TC_SC_1_2Suite : public TestCommand +class Test_TC_PSCFG_2_2Suite : public TestCommand { public: - Test_TC_SC_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_1_2", 0, credsIssuerConfig) + Test_TC_PSCFG_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PSCFG_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -104694,7 +105343,7 @@ class Test_TC_SC_1_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_1_2Suite() {} + ~Test_TC_PSCFG_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -104752,10 +105401,10 @@ class Test_TC_SC_1_2Suite : public TestCommand } }; -class Test_TC_SC_1_3Suite : public TestCommand +class Test_TC_SC_1_1Suite : public TestCommand { public: - Test_TC_SC_1_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_1_3", 0, credsIssuerConfig) + Test_TC_SC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_1_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -104763,7 +105412,7 @@ class Test_TC_SC_1_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_1_3Suite() {} + ~Test_TC_SC_1_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -104821,10 +105470,10 @@ class Test_TC_SC_1_3Suite : public TestCommand } }; -class Test_TC_SC_1_4Suite : public TestCommand +class Test_TC_SC_1_2Suite : public TestCommand { public: - Test_TC_SC_1_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_1_4", 0, credsIssuerConfig) + Test_TC_SC_1_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_1_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -104832,7 +105481,7 @@ class Test_TC_SC_1_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_1_4Suite() {} + ~Test_TC_SC_1_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -104890,10 +105539,10 @@ class Test_TC_SC_1_4Suite : public TestCommand } }; -class Test_TC_SC_2_1Suite : public TestCommand +class Test_TC_SC_1_3Suite : public TestCommand { public: - Test_TC_SC_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_2_1", 0, credsIssuerConfig) + Test_TC_SC_1_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_1_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -104901,7 +105550,7 @@ class Test_TC_SC_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_2_1Suite() {} + ~Test_TC_SC_1_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -104959,10 +105608,10 @@ class Test_TC_SC_2_1Suite : public TestCommand } }; -class Test_TC_SC_2_2Suite : public TestCommand +class Test_TC_SC_1_4Suite : public TestCommand { public: - Test_TC_SC_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_2_2", 0, credsIssuerConfig) + Test_TC_SC_1_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_1_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -104970,7 +105619,7 @@ class Test_TC_SC_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_2_2Suite() {} + ~Test_TC_SC_1_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -105028,10 +105677,10 @@ class Test_TC_SC_2_2Suite : public TestCommand } }; -class Test_TC_SC_2_3Suite : public TestCommand +class Test_TC_SC_2_1Suite : public TestCommand { public: - Test_TC_SC_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_2_3", 0, credsIssuerConfig) + Test_TC_SC_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -105039,7 +105688,7 @@ class Test_TC_SC_2_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_2_3Suite() {} + ~Test_TC_SC_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -105097,10 +105746,10 @@ class Test_TC_SC_2_3Suite : public TestCommand } }; -class Test_TC_SC_2_4Suite : public TestCommand +class Test_TC_SC_2_2Suite : public TestCommand { public: - Test_TC_SC_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_2_4", 0, credsIssuerConfig) + Test_TC_SC_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -105108,7 +105757,7 @@ class Test_TC_SC_2_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_2_4Suite() {} + ~Test_TC_SC_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -105166,10 +105815,10 @@ class Test_TC_SC_2_4Suite : public TestCommand } }; -class Test_TC_SC_3_1Suite : public TestCommand +class Test_TC_SC_2_3Suite : public TestCommand { public: - Test_TC_SC_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_3_1", 0, credsIssuerConfig) + Test_TC_SC_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_2_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -105177,7 +105826,7 @@ class Test_TC_SC_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_3_1Suite() {} + ~Test_TC_SC_2_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -105235,10 +105884,10 @@ class Test_TC_SC_3_1Suite : public TestCommand } }; -class Test_TC_SC_3_2Suite : public TestCommand +class Test_TC_SC_2_4Suite : public TestCommand { public: - Test_TC_SC_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_3_2", 0, credsIssuerConfig) + Test_TC_SC_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_2_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -105246,7 +105895,7 @@ class Test_TC_SC_3_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_3_2Suite() {} + ~Test_TC_SC_2_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -105304,10 +105953,10 @@ class Test_TC_SC_3_2Suite : public TestCommand } }; -class Test_TC_SC_3_3Suite : public TestCommand +class Test_TC_SC_3_1Suite : public TestCommand { public: - Test_TC_SC_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_3_3", 0, credsIssuerConfig) + Test_TC_SC_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -105315,7 +105964,7 @@ class Test_TC_SC_3_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_3_3Suite() {} + ~Test_TC_SC_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -105373,10 +106022,10 @@ class Test_TC_SC_3_3Suite : public TestCommand } }; -class Test_TC_SC_3_4Suite : public TestCommand +class Test_TC_SC_3_2Suite : public TestCommand { public: - Test_TC_SC_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_3_4", 0, credsIssuerConfig) + Test_TC_SC_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -105384,7 +106033,7 @@ class Test_TC_SC_3_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_3_4Suite() {} + ~Test_TC_SC_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -105442,10 +106091,10 @@ class Test_TC_SC_3_4Suite : public TestCommand } }; -class Test_TC_SC_4_1Suite : public TestCommand +class Test_TC_SC_3_3Suite : public TestCommand { public: - Test_TC_SC_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_1", 0, credsIssuerConfig) + Test_TC_SC_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_3_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -105453,7 +106102,7 @@ class Test_TC_SC_4_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_4_1Suite() {} + ~Test_TC_SC_3_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -105511,10 +106160,10 @@ class Test_TC_SC_4_1Suite : public TestCommand } }; -class Test_TC_SC_4_2Suite : public TestCommand +class Test_TC_SC_3_4Suite : public TestCommand { public: - Test_TC_SC_4_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_2", 0, credsIssuerConfig) + Test_TC_SC_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_3_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -105522,7 +106171,7 @@ class Test_TC_SC_4_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_4_2Suite() {} + ~Test_TC_SC_3_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -105580,10 +106229,10 @@ class Test_TC_SC_4_2Suite : public TestCommand } }; -class Test_TC_SC_4_3Suite : public TestCommand +class Test_TC_SC_4_1Suite : public TestCommand { public: - Test_TC_SC_4_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_3", 0, credsIssuerConfig) + Test_TC_SC_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -105591,7 +106240,7 @@ class Test_TC_SC_4_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_4_3Suite() {} + ~Test_TC_SC_4_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -105649,10 +106298,10 @@ class Test_TC_SC_4_3Suite : public TestCommand } }; -class Test_TC_SC_4_4Suite : public TestCommand +class Test_TC_SC_4_2Suite : public TestCommand { public: - Test_TC_SC_4_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_4", 0, credsIssuerConfig) + Test_TC_SC_4_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -105660,7 +106309,7 @@ class Test_TC_SC_4_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_4_4Suite() {} + ~Test_TC_SC_4_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -105718,10 +106367,10 @@ class Test_TC_SC_4_4Suite : public TestCommand } }; -class Test_TC_SC_4_5Suite : public TestCommand +class Test_TC_SC_4_3Suite : public TestCommand { public: - Test_TC_SC_4_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_5", 0, credsIssuerConfig) + Test_TC_SC_4_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -105729,7 +106378,7 @@ class Test_TC_SC_4_5Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_4_5Suite() {} + ~Test_TC_SC_4_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -105787,10 +106436,10 @@ class Test_TC_SC_4_5Suite : public TestCommand } }; -class Test_TC_SC_4_6Suite : public TestCommand +class Test_TC_SC_4_4Suite : public TestCommand { public: - Test_TC_SC_4_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_6", 0, credsIssuerConfig) + Test_TC_SC_4_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -105798,7 +106447,7 @@ class Test_TC_SC_4_6Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_4_6Suite() {} + ~Test_TC_SC_4_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -105856,10 +106505,10 @@ class Test_TC_SC_4_6Suite : public TestCommand } }; -class Test_TC_SC_4_7Suite : public TestCommand +class Test_TC_SC_4_5Suite : public TestCommand { public: - Test_TC_SC_4_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_7", 0, credsIssuerConfig) + Test_TC_SC_4_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_5", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -105867,7 +106516,7 @@ class Test_TC_SC_4_7Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_4_7Suite() {} + ~Test_TC_SC_4_5Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -105925,10 +106574,10 @@ class Test_TC_SC_4_7Suite : public TestCommand } }; -class Test_TC_SC_4_8Suite : public TestCommand +class Test_TC_SC_4_6Suite : public TestCommand { public: - Test_TC_SC_4_8Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_8", 0, credsIssuerConfig) + Test_TC_SC_4_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_6", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -105936,7 +106585,7 @@ class Test_TC_SC_4_8Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_4_8Suite() {} + ~Test_TC_SC_4_6Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -105994,10 +106643,10 @@ class Test_TC_SC_4_8Suite : public TestCommand } }; -class Test_TC_SC_4_9Suite : public TestCommand +class Test_TC_SC_4_7Suite : public TestCommand { public: - Test_TC_SC_4_9Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_9", 0, credsIssuerConfig) + Test_TC_SC_4_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_7", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -106005,7 +106654,7 @@ class Test_TC_SC_4_9Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_4_9Suite() {} + ~Test_TC_SC_4_7Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -106063,10 +106712,10 @@ class Test_TC_SC_4_9Suite : public TestCommand } }; -class Test_TC_SC_4_10Suite : public TestCommand +class Test_TC_SC_4_8Suite : public TestCommand { public: - Test_TC_SC_4_10Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_10", 0, credsIssuerConfig) + Test_TC_SC_4_8Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_8", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -106074,7 +106723,7 @@ class Test_TC_SC_4_10Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_4_10Suite() {} + ~Test_TC_SC_4_8Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -106132,10 +106781,10 @@ class Test_TC_SC_4_10Suite : public TestCommand } }; -class Test_TC_SC_5_1Suite : public TestCommand +class Test_TC_SC_4_9Suite : public TestCommand { public: - Test_TC_SC_5_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_5_1", 0, credsIssuerConfig) + Test_TC_SC_4_9Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_9", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -106143,7 +106792,7 @@ class Test_TC_SC_5_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_5_1Suite() {} + ~Test_TC_SC_4_9Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -106201,10 +106850,10 @@ class Test_TC_SC_5_1Suite : public TestCommand } }; -class Test_TC_SC_5_2Suite : public TestCommand +class Test_TC_SC_4_10Suite : public TestCommand { public: - Test_TC_SC_5_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_5_2", 0, credsIssuerConfig) + Test_TC_SC_4_10Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_4_10", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -106212,7 +106861,7 @@ class Test_TC_SC_5_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SC_5_2Suite() {} + ~Test_TC_SC_4_10Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -117180,6 +117829,8 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -117488,8 +118139,6 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), 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 809f1bda6d0e4b..d34afdbcb5e437 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -1461,8 +1461,8 @@ class ScenesAddScene : public ClusterCommand { : ClusterCommand("add-scene") , mComplex_ExtensionFieldSets(&mRequest.extensionFieldSets) { - AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); - AddArgument("SceneId", 0, UINT8_MAX, &mRequest.sceneId); + 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); @@ -1478,8 +1478,8 @@ class ScenesAddScene : public ClusterCommand { __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.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() @@ -1489,16 +1489,16 @@ class ScenesAddScene : public ClusterCommand { for (auto & entry_0 : mRequest.extensionFieldSets) { MTRScenesClusterExtensionFieldSet * newElement_0; newElement_0 = [MTRScenesClusterExtensionFieldSet new]; - newElement_0.clusterId = [NSNumber numberWithUnsignedInt:entry_0.clusterId]; + 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]; - if (entry_2.attributeId.HasValue()) { - newElement_2.attributeId = [NSNumber numberWithUnsignedInt:entry_2.attributeId.Value()]; + if (entry_2.attributeID.HasValue()) { + newElement_2.attributeID = [NSNumber numberWithUnsignedInt:entry_2.attributeID.Value()]; } else { - newElement_2.attributeId = nil; + newElement_2.attributeID = nil; } { // Scope for our temporary variables auto * array_4 = [NSMutableArray new]; @@ -1550,8 +1550,8 @@ class ScenesViewScene : public ClusterCommand { ScenesViewScene() : ClusterCommand("view-scene") { - AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); - AddArgument("SceneId", 0, UINT8_MAX, &mRequest.sceneId); + AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); + AddArgument("SceneID", 0, UINT8_MAX, &mRequest.sceneID); ClusterCommand::AddArguments(); } @@ -1564,8 +1564,8 @@ class ScenesViewScene : public ClusterCommand { __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]; + 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--) { @@ -1597,8 +1597,8 @@ class ScenesRemoveScene : public ClusterCommand { ScenesRemoveScene() : ClusterCommand("remove-scene") { - AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); - AddArgument("SceneId", 0, UINT8_MAX, &mRequest.sceneId); + AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); + AddArgument("SceneID", 0, UINT8_MAX, &mRequest.sceneID); ClusterCommand::AddArguments(); } @@ -1611,8 +1611,8 @@ class ScenesRemoveScene : public ClusterCommand { __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]; + 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--) { @@ -1645,7 +1645,7 @@ class ScenesRemoveAllScenes : public ClusterCommand { ScenesRemoveAllScenes() : ClusterCommand("remove-all-scenes") { - AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); + AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); ClusterCommand::AddArguments(); } @@ -1658,7 +1658,7 @@ class ScenesRemoveAllScenes : public ClusterCommand { __auto_type * params = [[MTRScenesClusterRemoveAllScenesParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.groupId = [NSNumber numberWithUnsignedShort:mRequest.groupId]; + params.groupID = [NSNumber numberWithUnsignedShort:mRequest.groupID]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -1691,8 +1691,8 @@ class ScenesStoreScene : public ClusterCommand { ScenesStoreScene() : ClusterCommand("store-scene") { - AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); - AddArgument("SceneId", 0, UINT8_MAX, &mRequest.sceneId); + AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); + AddArgument("SceneID", 0, UINT8_MAX, &mRequest.sceneID); ClusterCommand::AddArguments(); } @@ -1705,8 +1705,8 @@ class ScenesStoreScene : public ClusterCommand { __auto_type * params = [[MTRScenesClusterStoreSceneParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.groupId = [NSNumber numberWithUnsignedShort:mRequest.groupId]; - params.sceneId = [NSNumber numberWithUnsignedChar:mRequest.sceneId]; + 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--) { @@ -1739,8 +1739,8 @@ class ScenesRecallScene : public ClusterCommand { ScenesRecallScene() : ClusterCommand("recall-scene") { - AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); - AddArgument("SceneId", 0, UINT8_MAX, &mRequest.sceneId); + AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); + AddArgument("SceneID", 0, UINT8_MAX, &mRequest.sceneID); AddArgument("TransitionTime", 0, UINT16_MAX, &mRequest.transitionTime); ClusterCommand::AddArguments(); } @@ -1754,8 +1754,8 @@ class ScenesRecallScene : public ClusterCommand { __auto_type * params = [[MTRScenesClusterRecallSceneParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.groupId = [NSNumber numberWithUnsignedShort:mRequest.groupId]; - params.sceneId = [NSNumber numberWithUnsignedChar:mRequest.sceneId]; + params.groupID = [NSNumber numberWithUnsignedShort:mRequest.groupID]; + params.sceneID = [NSNumber numberWithUnsignedChar:mRequest.sceneID]; if (mRequest.transitionTime.HasValue()) { if (mRequest.transitionTime.Value().IsNull()) { params.transitionTime = nil; @@ -1795,7 +1795,7 @@ class ScenesGetSceneMembership : public ClusterCommand { ScenesGetSceneMembership() : ClusterCommand("get-scene-membership") { - AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); + AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); ClusterCommand::AddArguments(); } @@ -1808,7 +1808,7 @@ class ScenesGetSceneMembership : public ClusterCommand { __auto_type * params = [[MTRScenesClusterGetSceneMembershipParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.groupId = [NSNumber numberWithUnsignedShort:mRequest.groupId]; + params.groupID = [NSNumber numberWithUnsignedShort:mRequest.groupID]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { @@ -1842,8 +1842,8 @@ class ScenesEnhancedAddScene : public ClusterCommand { : ClusterCommand("enhanced-add-scene") , mComplex_ExtensionFieldSets(&mRequest.extensionFieldSets) { - AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); - AddArgument("SceneId", 0, UINT8_MAX, &mRequest.sceneId); + 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); @@ -1859,8 +1859,8 @@ class ScenesEnhancedAddScene : public ClusterCommand { __auto_type * params = [[MTRScenesClusterEnhancedAddSceneParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.groupId = [NSNumber numberWithUnsignedShort:mRequest.groupId]; - params.sceneId = [NSNumber numberWithUnsignedChar:mRequest.sceneId]; + 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() @@ -1870,16 +1870,16 @@ class ScenesEnhancedAddScene : public ClusterCommand { for (auto & entry_0 : mRequest.extensionFieldSets) { MTRScenesClusterExtensionFieldSet * newElement_0; newElement_0 = [MTRScenesClusterExtensionFieldSet new]; - newElement_0.clusterId = [NSNumber numberWithUnsignedInt:entry_0.clusterId]; + 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]; - if (entry_2.attributeId.HasValue()) { - newElement_2.attributeId = [NSNumber numberWithUnsignedInt:entry_2.attributeId.Value()]; + if (entry_2.attributeID.HasValue()) { + newElement_2.attributeID = [NSNumber numberWithUnsignedInt:entry_2.attributeID.Value()]; } else { - newElement_2.attributeId = nil; + newElement_2.attributeID = nil; } { // Scope for our temporary variables auto * array_4 = [NSMutableArray new]; @@ -1932,8 +1932,8 @@ class ScenesEnhancedViewScene : public ClusterCommand { ScenesEnhancedViewScene() : ClusterCommand("enhanced-view-scene") { - AddArgument("GroupId", 0, UINT16_MAX, &mRequest.groupId); - AddArgument("SceneId", 0, UINT8_MAX, &mRequest.sceneId); + AddArgument("GroupID", 0, UINT16_MAX, &mRequest.groupID); + AddArgument("SceneID", 0, UINT8_MAX, &mRequest.sceneID); ClusterCommand::AddArguments(); } @@ -1946,8 +1946,8 @@ class ScenesEnhancedViewScene : public ClusterCommand { __auto_type * params = [[MTRScenesClusterEnhancedViewSceneParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; - params.groupId = [NSNumber numberWithUnsignedShort:mRequest.groupId]; - params.sceneId = [NSNumber numberWithUnsignedChar:mRequest.sceneId]; + 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--) { @@ -1981,10 +1981,10 @@ class ScenesCopyScene : public ClusterCommand { : ClusterCommand("copy-scene") { AddArgument("Mode", 0, UINT8_MAX, &mRequest.mode); - AddArgument("GroupIdFrom", 0, UINT16_MAX, &mRequest.groupIdFrom); - AddArgument("SceneIdFrom", 0, UINT8_MAX, &mRequest.sceneIdFrom); - AddArgument("GroupIdTo", 0, UINT16_MAX, &mRequest.groupIdTo); - AddArgument("SceneIdTo", 0, UINT8_MAX, &mRequest.sceneIdTo); + 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(); } @@ -1998,10 +1998,10 @@ class ScenesCopyScene : public ClusterCommand { params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; params.mode = [NSNumber numberWithUnsignedChar:mRequest.mode.Raw()]; - params.groupIdFrom = [NSNumber numberWithUnsignedShort:mRequest.groupIdFrom]; - params.sceneIdFrom = [NSNumber numberWithUnsignedChar:mRequest.sceneIdFrom]; - params.groupIdTo = [NSNumber numberWithUnsignedShort:mRequest.groupIdTo]; - params.sceneIdTo = [NSNumber numberWithUnsignedChar:mRequest.sceneIdTo]; + params.groupIdentifierFrom = [NSNumber numberWithUnsignedShort:mRequest.groupIdentifierFrom]; + params.sceneIdentifierFrom = [NSNumber numberWithUnsignedChar:mRequest.sceneIdentifierFrom]; + params.groupIdentifierTo = [NSNumber numberWithUnsignedShort:mRequest.groupIdentifierTo]; + params.sceneIdentifierTo = [NSNumber numberWithUnsignedChar:mRequest.sceneIdentifierTo]; uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { 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 6d60cbae3fcfa2..8d2baf95d96803 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -152,6 +152,8 @@ class TestList : public Command { printf("Test_TC_PSCFG_2_1\n"); printf("Test_TC_RH_1_1\n"); printf("Test_TC_RH_2_1\n"); + printf("Test_TC_SC_5_1\n"); + printf("Test_TC_SC_5_2\n"); printf("Test_TC_SWTCH_1_1\n"); printf("Test_TC_TMP_1_1\n"); printf("Test_TC_TMP_2_1\n"); @@ -57980,6 +57982,1263 @@ class Test_TC_RH_2_1 : public TestCommandBridge { } }; +class Test_TC_SC_5_1 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_SC_5_1() + : TestCommandBridge("Test_TC_SC_5_1") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_SC_5_1() {} + + // Allow yaml to access the current commissioner node id. + // Default to 0 (undefined node id) so we know if this isn't + // set correctly. + // Reset on every step in case it changed. + chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + commissionerNodeId = mCommissionerNodeId.ValueOr(0); + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_SC_5_1\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SC_5_1\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : TH adds ACL Operate privileges for Group 0x0103\n"); + err = TestThAddsAclOperatePrivilegesForGroup0x0103_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : TH sends KeySetWrite command with incorrect key\n"); + err = TestThSendsKeySetWriteCommandWithIncorrectKey_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : TH sends KeySetWrite command with TH key\n"); + err = TestThSendsKeySetWriteCommandWithThKey_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : TH binds GroupId to GroupKeySet\n"); + err = TestThBindsGroupIdToGroupKeySet_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends RemoveAllGroups command\n"); + err = TestThSendsRemoveAllGroupsCommand_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends AddGroup command\n"); + err = TestThSendsAddGroupCommand_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : TH sends ViewGroup command\n"); + if (ShouldSkip("G.S.F00")) { + NextTest(); + return; + } + err = TestThSendsViewGroupCommand_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : TH sends ViewGroup command\n"); + if (ShouldSkip("!(G.S.F00)")) { + NextTest(); + return; + } + err = TestThSendsViewGroupCommand_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : TH sends KeySetRead\n"); + err = TestThSendsKeySetRead_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads GroupTable attribute\n"); + if (ShouldSkip("G.S.F00")) { + NextTest(); + return; + } + err = TestThReadsGroupTableAttribute_10(); + break; + case 11: + ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads GroupTable attribute\n"); + if (ShouldSkip("!(G.S.F00)")) { + NextTest(); + return; + } + err = TestThReadsGroupTableAttribute_11(); + break; + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : TH removes the GroupKeySet\n"); + err = TestThRemovesTheGroupKeySet_12(); + break; + case 13: + ChipLogProgress(chipTool, " ***** Test Step 13 : TH verifies the corresponding GroupKeyMap entry has been removed\n"); + err = TestThVerifiesTheCorrespondingGroupKeyMapEntryHasBeenRemoved_13(); + break; + case 14: + ChipLogProgress(chipTool, " ***** Test Step 14 : TH cleans up groups using RemoveAllGroups command\n"); + err = TestThCleansUpGroupsUsingRemoveAllGroupsCommand_14(); + break; + case 15: + ChipLogProgress(chipTool, " ***** Test Step 15 : TH verifies the group has been removed in the GroupTable\n"); + err = TestThVerifiesTheGroupHasBeenRemovedInTheGroupTable_15(); + break; + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : TH removes ACL Operate privileges for Group 0x0103\n"); + err = TestThRemovesAclOperatePrivilegesForGroup0x0103_16(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 15: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 16: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 17; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestThAddsAclOperatePrivilegesForGroup0x0103_1() + { + + MTRBaseDevice * device = GetDevice("alpha"); + commissionerNodeId = mCommissionerNodeId.ValueOr(0); + __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id aclArgument; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; + { + NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; + temp_3[0] = [NSNumber numberWithUnsignedLongLong:commissionerNodeId]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).subjects = temp_3; + } + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).targets = nil; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + + temp_0[1] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:3U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:3U]; + { + NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; + temp_3[0] = [NSNumber numberWithUnsignedLongLong:259ULL]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).subjects = temp_3; + } + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).targets = nil; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + + aclArgument = temp_0; + } + [cluster writeAttributeACLWithValue:aclArgument + completion:^(NSError * _Nullable err) { + NSLog(@"TH adds ACL Operate privileges for Group 0x0103 Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSendsKeySetWriteCommandWithIncorrectKey_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + commissionerNodeId = mCommissionerNodeId.ValueOr(0); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:419U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"0x00000000000000000000000000000001" length:34]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:111ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"0x00000000000000000000000000000002" length:34]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:222ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = + [[NSData alloc] initWithBytes:"0x00000000000000000000000000000003" length:34]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = + [NSNumber numberWithUnsignedLongLong:333ULL]; + + [cluster keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends KeySetWrite command with incorrect key Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSendsKeySetWriteCommandWithThKey_3() + { + + MTRBaseDevice * device = GetDevice("alpha"); + commissionerNodeId = mCommissionerNodeId.ValueOr(0); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:419U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"0xd0d1d2d3d4d5d6d7d8d9dadbdcdddedf" length:34]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:2220000ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"0xd1d1d2d3d4d5d6d7d8d9dadbdcdddedf" length:34]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:2220001ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = + [[NSData alloc] initWithBytes:"0xd2d1d2d3d4d5d6d7d8d9dadbdcdddedf" length:34]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = + [NSNumber numberWithUnsignedLongLong:2220002ULL]; + + [cluster keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends KeySetWrite command with TH key Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThBindsGroupIdToGroupKeySet_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + commissionerNodeId = mCommissionerNodeId.ValueOr(0); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id groupKeyMapArgument; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupId = [NSNumber numberWithUnsignedShort:259U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupKeySetID = [NSNumber numberWithUnsignedShort:419U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + + groupKeyMapArgument = temp_0; + } + [cluster writeAttributeGroupKeyMapWithValue:groupKeyMapArgument + completion:^(NSError * _Nullable err) { + NSLog(@"TH binds GroupId to GroupKeySet Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSendsRemoveAllGroupsCommand_5() + { + + MTRBaseDevice * device = GetDevice("alpha"); + commissionerNodeId = mCommissionerNodeId.ValueOr(0); + __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster removeAllGroupsWithCompletion:^(NSError * _Nullable err) { + NSLog(@"TH sends RemoveAllGroups command Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSendsAddGroupCommand_6() + { + + MTRBaseDevice * device = GetDevice("alpha"); + commissionerNodeId = mCommissionerNodeId.ValueOr(0); + __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupsClusterAddGroupParams alloc] init]; + params.groupID = [NSNumber numberWithUnsignedShort:259U]; + params.groupName = @"Test Group"; + [cluster addGroupWithParams:params + completion:^(MTRGroupsClusterAddGroupResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH sends AddGroup command Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSendsViewGroupCommand_7() + { + + MTRBaseDevice * device = GetDevice("alpha"); + commissionerNodeId = mCommissionerNodeId.ValueOr(0); + __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; + params.groupID = [NSNumber numberWithUnsignedShort:259U]; + [cluster viewGroupWithParams:params + completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH sends ViewGroup command Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } + + { + id actualValue = values.groupID; + VerifyOrReturn(CheckValue("GroupID", actualValue, 259U)); + } + + { + id actualValue = values.groupName; + VerifyOrReturn(CheckValueAsString("GroupName", actualValue, @"Test Group")); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSendsViewGroupCommand_8() + { + + MTRBaseDevice * device = GetDevice("alpha"); + commissionerNodeId = mCommissionerNodeId.ValueOr(0); + __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; + params.groupID = [NSNumber numberWithUnsignedShort:259U]; + [cluster viewGroupWithParams:params + completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH sends ViewGroup command Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } + + { + id actualValue = values.groupID; + VerifyOrReturn(CheckValue("GroupID", actualValue, 259U)); + } + + { + id actualValue = values.groupName; + VerifyOrReturn(CheckValueAsString("GroupName", actualValue, @"")); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSendsKeySetRead_9() + { + + MTRBaseDevice * device = GetDevice("alpha"); + commissionerNodeId = mCommissionerNodeId.ValueOr(0); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetReadParams alloc] init]; + params.groupKeySetID = [NSNumber numberWithUnsignedShort:419U]; + [cluster + keySetReadWithParams:params + completion:^( + MTRGroupKeyManagementClusterKeySetReadResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH sends KeySetRead Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.groupKeySet; + VerifyOrReturn(CheckValue("GroupKeySetID", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).groupKeySetID, 419U)); + VerifyOrReturn(CheckValue("GroupKeySecurityPolicy", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).groupKeySecurityPolicy, 0U)); + VerifyOrReturn(CheckValueNull( + "EpochKey0", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey0)); + VerifyOrReturn(CheckValueNonNull("EpochStartTime0", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime0)); + VerifyOrReturn(CheckValue("EpochStartTime0", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime0, 2220000ULL)); + VerifyOrReturn(CheckValueNull( + "EpochKey1", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey1)); + VerifyOrReturn(CheckValueNonNull("EpochStartTime1", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime1)); + VerifyOrReturn(CheckValue("EpochStartTime1", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime1, 2220001ULL)); + VerifyOrReturn(CheckValueNull( + "EpochKey2", ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochKey2)); + VerifyOrReturn(CheckValueNonNull("EpochStartTime2", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime2)); + VerifyOrReturn(CheckValue("EpochStartTime2", + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) actualValue).epochStartTime2, 2220002ULL)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsGroupTableAttribute_10() + { + + MTRBaseDevice * device = GetDevice("alpha"); + commissionerNodeId = mCommissionerNodeId.ValueOr(0); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRReadParams alloc] init]; + params.filterByFabric = true; + [cluster + readAttributeGroupTableWithParams:params + completion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads GroupTable attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("GroupTable", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupId, 259U)); + VerifyOrReturn(CheckValue("Endpoints", + [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) + actualValue[0]).endpoints count], + static_cast(1))); + VerifyOrReturn(CheckValue("", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).endpoints[0], + mEndpoint.HasValue() ? mEndpoint.Value() : 1U)); + VerifyOrReturn(CheckValueAsString("GroupName", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupName, + @"Test Group")); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsGroupTableAttribute_11() + { + + MTRBaseDevice * device = GetDevice("alpha"); + commissionerNodeId = mCommissionerNodeId.ValueOr(0); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRReadParams alloc] init]; + params.filterByFabric = true; + [cluster + readAttributeGroupTableWithParams:params + completion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads GroupTable attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("GroupTable", [actualValue count], static_cast(1))); + VerifyOrReturn(CheckValue("GroupId", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupId, 259U)); + VerifyOrReturn(CheckValue("Endpoints", + [((MTRGroupKeyManagementClusterGroupInfoMapStruct *) + actualValue[0]).endpoints count], + static_cast(1))); + VerifyOrReturn(CheckValue("", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).endpoints[0], + mEndpoint.HasValue() ? mEndpoint.Value() : 1U)); + VerifyOrReturn(CheckValueAsString("GroupName", + ((MTRGroupKeyManagementClusterGroupInfoMapStruct *) actualValue[0]).groupName, @"")); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThRemovesTheGroupKeySet_12() + { + + MTRBaseDevice * device = GetDevice("alpha"); + commissionerNodeId = mCommissionerNodeId.ValueOr(0); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetRemoveParams alloc] init]; + params.groupKeySetID = [NSNumber numberWithUnsignedShort:419U]; + [cluster keySetRemoveWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH removes the GroupKeySet Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThVerifiesTheCorrespondingGroupKeyMapEntryHasBeenRemoved_13() + { + + MTRBaseDevice * device = GetDevice("alpha"); + commissionerNodeId = mCommissionerNodeId.ValueOr(0); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRReadParams alloc] init]; + params.filterByFabric = true; + [cluster + readAttributeGroupKeyMapWithParams:params + completion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH verifies the corresponding GroupKeyMap entry has been removed Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn( + CheckValue("GroupKeyMap", [actualValue count], static_cast(0))); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThCleansUpGroupsUsingRemoveAllGroupsCommand_14() + { + + MTRBaseDevice * device = GetDevice("alpha"); + commissionerNodeId = mCommissionerNodeId.ValueOr(0); + __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster removeAllGroupsWithCompletion:^(NSError * _Nullable err) { + NSLog(@"TH cleans up groups using RemoveAllGroups command Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThVerifiesTheGroupHasBeenRemovedInTheGroupTable_15() + { + + MTRBaseDevice * device = GetDevice("alpha"); + commissionerNodeId = mCommissionerNodeId.ValueOr(0); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRReadParams alloc] init]; + params.filterByFabric = true; + [cluster + readAttributeGroupTableWithParams:params + completion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH verifies the group has been removed in the GroupTable Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("GroupTable", [actualValue count], static_cast(0))); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThRemovesAclOperatePrivilegesForGroup0x0103_16() + { + + MTRBaseDevice * device = GetDevice("alpha"); + commissionerNodeId = mCommissionerNodeId.ValueOr(0); + __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id aclArgument; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; + { + NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; + temp_3[0] = [NSNumber numberWithUnsignedLongLong:commissionerNodeId]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).subjects = temp_3; + } + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).targets = nil; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + + aclArgument = temp_0; + } + [cluster writeAttributeACLWithValue:aclArgument + completion:^(NSError * _Nullable err) { + NSLog(@"TH removes ACL Operate privileges for Group 0x0103 Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + +class Test_TC_SC_5_2 : public TestCommandBridge { +public: + // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced + Test_TC_SC_5_2() + : TestCommandBridge("Test_TC_SC_5_2") + , mTestIndex(0) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) + + ~Test_TC_SC_5_2() {} + + // Allow yaml to access the current commissioner node id. + // Default to 0 (undefined node id) so we know if this isn't + // set correctly. + // Reset on every step in case it changed. + chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); + + /////////// TestCommand Interface ///////// + void NextTest() override + { + CHIP_ERROR err = CHIP_NO_ERROR; + commissionerNodeId = mCommissionerNodeId.ValueOr(0); + + if (0 == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Start: Test_TC_SC_5_2\n"); + } + + if (mTestCount == mTestIndex) { + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_SC_5_2\n"); + SetCommandExitStatus(CHIP_NO_ERROR); + return; + } + + Wait(); + + // Ensure we increment mTestIndex before we start running the relevant + // command. That way if we lose the timeslice after we send the message + // but before our function call returns, we won't end up with an + // incorrect mTestIndex value observed when we get the response. + switch (mTestIndex++) { + case 0: + ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); + err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); + break; + case 1: + ChipLogProgress(chipTool, " ***** Test Step 1 : TH adds ACL Operate privileges for Group 0x0103\n"); + err = TestThAddsAclOperatePrivilegesForGroup0x0103_1(); + break; + case 2: + ChipLogProgress(chipTool, " ***** Test Step 2 : TH sends KeySetWrite command with TH key\n"); + err = TestThSendsKeySetWriteCommandWithThKey_2(); + break; + case 3: + ChipLogProgress(chipTool, " ***** Test Step 3 : TH binds GroupId to GroupKeySet\n"); + err = TestThBindsGroupIdToGroupKeySet_3(); + break; + case 4: + ChipLogProgress(chipTool, " ***** Test Step 4 : TH sends RemoveAllGroups command\n"); + err = TestThSendsRemoveAllGroupsCommand_4(); + break; + case 5: + ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends AddGroup command\n"); + err = TestThSendsAddGroupCommand_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends ViewGroup command using group messaging\n"); + if (ShouldSkip("G.S.F00")) { + NextTest(); + return; + } + err = TestThSendsViewGroupCommandUsingGroupMessaging_6(); + break; + case 7: + ChipLogProgress(chipTool, " ***** Test Step 7 : TH sends ViewGroup command using group messaging\n"); + if (ShouldSkip("!(G.S.F00)")) { + NextTest(); + return; + } + err = TestThSendsViewGroupCommandUsingGroupMessaging_7(); + break; + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : TH removes the GroupKeySet\n"); + err = TestThRemovesTheGroupKeySet_8(); + break; + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : TH cleans up groups using RemoveAllGroups command\n"); + err = TestThCleansUpGroupsUsingRemoveAllGroupsCommand_9(); + break; + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : TH removes ACL Operate privileges for Group 0x0103\n"); + err = TestThRemovesAclOperatePrivilegesForGroup0x0103_10(); + break; + } + + if (CHIP_NO_ERROR != err) { + ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); + SetCommandExitStatus(err); + } + } + + void OnStatusUpdate(const chip::app::StatusIB & status) override + { + switch (mTestIndex - 1) { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 8: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 9: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 10: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + } + + // Go on to the next test. + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + std::atomic_uint16_t mTestIndex; + const uint16_t mTestCount = 11; + + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() + { + + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee("alpha", value); + } + + CHIP_ERROR TestThAddsAclOperatePrivilegesForGroup0x0103_1() + { + + MTRBaseDevice * device = GetDevice("alpha"); + commissionerNodeId = mCommissionerNodeId.ValueOr(0); + __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id aclArgument; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; + { + NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; + temp_3[0] = [NSNumber numberWithUnsignedLongLong:commissionerNodeId]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).subjects = temp_3; + } + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).targets = nil; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + + temp_0[1] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).privilege = [NSNumber numberWithUnsignedChar:3U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).authMode = [NSNumber numberWithUnsignedChar:3U]; + { + NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; + temp_3[0] = [NSNumber numberWithUnsignedLongLong:259ULL]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).subjects = temp_3; + } + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).targets = nil; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[1]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + + aclArgument = temp_0; + } + [cluster writeAttributeACLWithValue:aclArgument + completion:^(NSError * _Nullable err) { + NSLog(@"TH adds ACL Operate privileges for Group 0x0103 Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSendsKeySetWriteCommandWithThKey_2() + { + + MTRBaseDevice * device = GetDevice("alpha"); + commissionerNodeId = mCommissionerNodeId.ValueOr(0); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetWriteParams alloc] init]; + params.groupKeySet = [[MTRGroupKeyManagementClusterGroupKeySetStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySetID = + [NSNumber numberWithUnsignedShort:419U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).groupKeySecurityPolicy = + [NSNumber numberWithUnsignedChar:0U]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey0 = + [[NSData alloc] initWithBytes:"0xd0d1d2d3d4d5d6d7d8d9dadbdcdddedf" length:34]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime0 = + [NSNumber numberWithUnsignedLongLong:2220000ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey1 = + [[NSData alloc] initWithBytes:"0xd1d1d2d3d4d5d6d7d8d9dadbdcdddedf" length:34]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime1 = + [NSNumber numberWithUnsignedLongLong:2220001ULL]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochKey2 = + [[NSData alloc] initWithBytes:"0xd2d1d2d3d4d5d6d7d8d9dadbdcdddedf" length:34]; + ((MTRGroupKeyManagementClusterGroupKeySetStruct *) params.groupKeySet).epochStartTime2 = + [NSNumber numberWithUnsignedLongLong:2220002ULL]; + + [cluster keySetWriteWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH sends KeySetWrite command with TH key Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThBindsGroupIdToGroupKeySet_3() + { + + MTRBaseDevice * device = GetDevice("alpha"); + commissionerNodeId = mCommissionerNodeId.ValueOr(0); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id groupKeyMapArgument; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[MTRGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupId = [NSNumber numberWithUnsignedShort:259U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupKeySetID = [NSNumber numberWithUnsignedShort:419U]; + ((MTRGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + + groupKeyMapArgument = temp_0; + } + [cluster writeAttributeGroupKeyMapWithValue:groupKeyMapArgument + completion:^(NSError * _Nullable err) { + NSLog(@"TH binds GroupId to GroupKeySet Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSendsRemoveAllGroupsCommand_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + commissionerNodeId = mCommissionerNodeId.ValueOr(0); + __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster removeAllGroupsWithCompletion:^(NSError * _Nullable err) { + NSLog(@"TH sends RemoveAllGroups command Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSendsAddGroupCommand_5() + { + + MTRBaseDevice * device = GetDevice("alpha"); + commissionerNodeId = mCommissionerNodeId.ValueOr(0); + __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupsClusterAddGroupParams alloc] init]; + params.groupID = [NSNumber numberWithUnsignedShort:259U]; + params.groupName = @"Test Group"; + [cluster addGroupWithParams:params + completion:^(MTRGroupsClusterAddGroupResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH sends AddGroup command Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSendsViewGroupCommandUsingGroupMessaging_6() + { + + MTRBaseDevice * device = GetDevice("alpha"); + commissionerNodeId = mCommissionerNodeId.ValueOr(0); + __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; + params.groupID = [NSNumber numberWithUnsignedShort:259U]; + [cluster viewGroupWithParams:params + completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH sends ViewGroup command using group messaging Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } + + { + id actualValue = values.groupID; + VerifyOrReturn(CheckValue("GroupID", actualValue, 259U)); + } + + { + id actualValue = values.groupName; + VerifyOrReturn(CheckValueAsString("GroupName", actualValue, @"Test Group")); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSendsViewGroupCommandUsingGroupMessaging_7() + { + + MTRBaseDevice * device = GetDevice("alpha"); + commissionerNodeId = mCommissionerNodeId.ValueOr(0); + __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupsClusterViewGroupParams alloc] init]; + params.groupID = [NSNumber numberWithUnsignedShort:259U]; + [cluster viewGroupWithParams:params + completion:^(MTRGroupsClusterViewGroupResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH sends ViewGroup command using group messaging Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 0U)); + } + + { + id actualValue = values.groupID; + VerifyOrReturn(CheckValue("GroupID", actualValue, 259U)); + } + + { + id actualValue = values.groupName; + VerifyOrReturn(CheckValueAsString("GroupName", actualValue, @"")); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThRemovesTheGroupKeySet_8() + { + + MTRBaseDevice * device = GetDevice("alpha"); + commissionerNodeId = mCommissionerNodeId.ValueOr(0); + __auto_type * cluster = [[MTRBaseClusterGroupKeyManagement alloc] initWithDevice:device + endpointID:@(0) + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRGroupKeyManagementClusterKeySetRemoveParams alloc] init]; + params.groupKeySetID = [NSNumber numberWithUnsignedShort:419U]; + [cluster keySetRemoveWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"TH removes the GroupKeySet Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThCleansUpGroupsUsingRemoveAllGroupsCommand_9() + { + + MTRBaseDevice * device = GetDevice("alpha"); + commissionerNodeId = mCommissionerNodeId.ValueOr(0); + __auto_type * cluster = [[MTRBaseClusterGroups alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster removeAllGroupsWithCompletion:^(NSError * _Nullable err) { + NSLog(@"TH cleans up groups using RemoveAllGroups command Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThRemovesAclOperatePrivilegesForGroup0x0103_10() + { + + MTRBaseDevice * device = GetDevice("alpha"); + commissionerNodeId = mCommissionerNodeId.ValueOr(0); + __auto_type * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device endpointID:@(0) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id aclArgument; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[MTRAccessControlClusterAccessControlEntryStruct alloc] init]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).privilege = [NSNumber numberWithUnsignedChar:5U]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).authMode = [NSNumber numberWithUnsignedChar:2U]; + { + NSMutableArray * temp_3 = [[NSMutableArray alloc] init]; + temp_3[0] = [NSNumber numberWithUnsignedLongLong:commissionerNodeId]; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).subjects = temp_3; + } + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).targets = nil; + ((MTRAccessControlClusterAccessControlEntryStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1U]; + + aclArgument = temp_0; + } + [cluster writeAttributeACLWithValue:aclArgument + completion:^(NSError * _Nullable err) { + NSLog(@"TH removes ACL Operate privileges for Group 0x0103 Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } +}; + class Test_TC_SWTCH_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced @@ -134327,6 +135586,8 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), + make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(),